Skip to content

Commit 57bb700

Browse files
committed
feat: add support for RHEL/AlmaLinux/Rocky Linux 10
1 parent ae60a66 commit 57bb700

File tree

6 files changed

+33
-11
lines changed

6 files changed

+33
-11
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- almalinux_9_appstream_1.22
2929
- almalinux_9_appstream_1.24
3030
- almalinux_9_appstream_1.26
31+
- almalinux_10
3132
arch:
3233
- linux/amd64
3334
- linux/arm64/v8

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- almalinux_9_appstream_1.22
3030
- almalinux_9_appstream_1.24
3131
- almalinux_9_appstream_1.26
32+
- almalinux_10
3233
arch:
3334
- linux/amd64
3435
- linux/arm64/v8

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ Usage:
5757
Options:
5858
-d Debug mode.
5959
60+
Build for RHEL/AlmaLinux/Rocky Linux 10 + AppStream module:
61+
build almalinux:10
62+
6063
Build for RHEL/AlmaLinux/Rocky Linux 9 + AppStream module:
6164
build almalinux:9
6265
build almalinux:9:appstream:1.22
@@ -75,6 +78,9 @@ Usage:
7578
# EPEL 8 Modularity was going away on February 15, 2023
7679
build almalinux:8:epel-modular:mainline
7780
81+
Build for RHEL/AlmaLinux/Rocky Linux 10 linux/arm64/v8(aarch64) + AppStream module:
82+
build -p linux/arm64/v8 almalinux:10
83+
7884
Build for RHEL/AlmaLinux/Rocky Linux 9 linux/arm64/v8(aarch64) + AppStream module:
7985
build -p linux/arm64/v8 almalinux:9
8086
build -p linux/arm64/v8 almalinux:9:appstream:1.22
@@ -86,15 +92,15 @@ Usage:
8692
You can build RPM packages in Docker.
8793

8894
```bash
89-
# el9 + Non-modular package version
90-
./build almalinux:9
95+
# el10 + Non-modular package version
96+
./build almalinux:10
9197
```
9298

9399
- Debug shell
94100

95101
```bash
96-
# el9 + debug shell
97-
BUILD_HOSTNAME=el9.example.org ./build -d almalinux:9
102+
# el10 + debug shell
103+
BUILD_HOSTNAME=el10.example.org ./build -d almalinux:10
98104
/pkg/build-rpm /pkg/rpmbuild nginx-module-fancyindex.spec
99105
100106
# el9 + linux/arm64/v8 + debug shell

build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ Usage:
2929
Options:
3030
-d Debug mode.
3131
32+
Build for RHEL/AlmaLinux/Rocky Linux 10 + AppStream module:
33+
${PACKAGER} almalinux:10
34+
3235
Build for RHEL/AlmaLinux/Rocky Linux 9 + AppStream module:
3336
${PACKAGER} almalinux:9
3437
${PACKAGER} almalinux:9:appstream:1.22
@@ -46,6 +49,9 @@ Usage:
4649
# EPEL 8 Modularity was going away on February 15, 2023
4750
${PACKAGER} almalinux:8:epel-modular:mainline
4851
52+
Build for RHEL/AlmaLinux/Rocky Linux 10 linux/arm64/v8(aarch64) + AppStream module:
53+
${PACKAGER} -p linux/arm64/v8 almalinux:10
54+
4955
Build for RHEL/AlmaLinux/Rocky Linux 9 linux/arm64/v8(aarch64) + AppStream module:
5056
${PACKAGER} -p linux/arm64/v8 almalinux:9
5157
${PACKAGER} -p linux/arm64/v8 almalinux:9:appstream:1.22

build-rpm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ if [[ ! -d SOURCES ]]; then
8989
mkdir SOURCES
9090
fi
9191

92-
if [[ "${RPM_DIST}" = ".el9" ]]; then
93-
# el9 or later
94-
spectool -g -a "SPECS/${SPEC_FILE_NAME}" -C SOURCES/
95-
else
92+
if [[ "${RPM_DIST}" = ".el8" ]]; then
9693
# el8
9794
spectool -g -A "SPECS/${SPEC_FILE_NAME}" -C SOURCES/
95+
else
96+
# el9 or later
97+
spectool -g -a "SPECS/${SPEC_FILE_NAME}" -C SOURCES/
9898
fi
9999

100100
echo "Building RPM files:"

rpmbuild/SPECS/nginx-module-fancyindex.spec.in

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ Requires: nginx = %{nginx_epoch_version}:%{nginx_version}
2121
BuildRequires: autoconf
2222
BuildRequires: automake
2323
BuildRequires: gd-devel
24-
%if 0%{?rhel} == 7
25-
BuildRequires: gperftools-devel
26-
%endif
2724
BuildRequires: libtool
2825
BuildRequires: libxslt-devel
2926
BuildRequires: nginx
3027
BuildRequires: openssl-devel
28+
%if 0%{?rhel} == 10
29+
BuildRequires: pcre2-devel
30+
%else
31+
# el8 and el9
3132
BuildRequires: pcre-devel
33+
%endif
3234
BuildRequires: perl-devel
3335
BuildRequires: perl(ExtUtils::Embed)
3436
BuildRequires: zlib-devel
@@ -46,7 +48,13 @@ Nginx module to use PAM for simple http authentication.
4648

4749
%build
4850
cd %{_builddir}/nginx-%{nginx_version}
51+
%if 0%{?rhel} == 10
52+
# Fix ./configure: error: invalid option "--without-engine
53+
./configure %(nginx -V 2>&1 | grep 'configure arguments' | sed -r 's@^[^:]+: @@' | sed 's/--without-engine //') --add-dynamic-module=../%{mod_base_dir}-%{version}
54+
%else
55+
# el8 and el9
4956
./configure %(nginx -V 2>&1 | grep 'configure arguments' | sed -r 's@^[^:]+: @@') --add-dynamic-module=../%{mod_base_dir}-%{version}
57+
%endif
5058
make modules
5159

5260
%install

0 commit comments

Comments
 (0)