forked from proftpd/proftpd
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (90 loc) · 2.88 KB
/
rpm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: RPM
on:
push:
branches:
- master
- 1.3.8
paths-ignore:
- NEWS
- RELEASE_NOTES
- 'doc/**'
- '**/*.html'
- '**/*.md'
pull_request:
branches:
- master
- 1.3.8
paths-ignore:
- NEWS
- RELEASE_NOTES
- 'doc/**'
- '**/*.html'
- '**/*.md'
jobs:
build:
runs-on: ubuntu-latest
env:
# We need to avoid using NodeJS v20, because it doesn't work with
# older glibc versions. See:
# https://github.com/actions/checkout/issues/1809.
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
strategy:
matrix:
container:
- almalinux:8
container: ${{ matrix.container }}
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Configure RPM repos
if: ${{ matrix.container == 'almalinux:8' }}
run: |
# Need to add other repos for e.g. libsodium
yum install -y dnf-plugins-core epel-release yum-utils
dnf config-manager --enable epel
dnf config-manager --set-enabled powertools
- name: Install packages
run: |
# for builds
yum install -y bash gcc make imake
# for rpm builds
yum install -y rpm-build rpmlint redhat-rpm-config
# for dependencies
yum install -y GeoIP-devel
yum install -y gettext
yum install -y hiredis-devel
yum install -y libacl-devel
yum install -y libcap-devel
yum install -y libmemcached-devel
yum install -y libsodium-devel
yum install -y mysql-devel
yum install -y ncurses-devel
yum install -y openldap-devel cyrus-sasl-devel
yum install -y openssl-devel
yum install -y pam-devel
yum install -y pcre-devel
yum install -y postgresql-devel
yum install -y sqlite-devel
yum install -y zlib-devel
- name: Generate RPM spec
run: |
./configure
make
# To properly name the tarball later with the version suffix, we need
# to query the built `proftpd` binary for its version.
echo "release_version=$(./proftpd -v | cut -f3 -d' ')" >> $GITHUB_ENV
make dist
- name: Check RPM spec
run: |
rpmlint proftpd.spec
- name: Build release tarball
run: |
cd ..
mv proftpd "proftpd-${{ env.release_version }}"
tar zcf "/tmp/proftpd-${{ env.release_version }}.tar.gz" "proftpd-${{ env.release_version }}"
mv "proftpd-${{ env.release_version }}" proftpd
- name: Build RPM from release tarball
run: |
rpmbuild -tb -vvv --with everything "/tmp/proftpd-${{ env.release_version }}.tar.gz"