Skip to content

Commit 564513a

Browse files
author
Julian Brown
authored
Merge pull request #4 from webpros-cpanel/ZC-12579
ZC-12579: Build on AlmaLinux 10
2 parents 6ba3e61 + d14e3f7 commit 564513a

File tree

1 file changed

+65
-8
lines changed

1 file changed

+65
-8
lines changed

SPECS/ea-apache24.spec

Lines changed: 65 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
%global with_http2 0
2121
%endif
2222

23+
%if 0%{?rhel} >= 10
24+
# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_brp_buildroot_policy_scripts
25+
%global __brp_check_rpaths %{nil}
26+
%endif
27+
2328
Summary: Apache HTTP Server
2429
Name: ea-apache24
2530
Version: 2.4.63
@@ -113,10 +118,21 @@ Requires: openssl
113118
BuildRequires: autoconf, perl, pkgconfig, findutils, xmlto
114119
BuildRequires: zlib-devel, libselinux-devel, lua-devel
115120
BuildRequires: ea-apr-devel >= 1.6.3-1, ea-apr-util-devel >= 1.6.1-1
116-
BuildRequires: pcre-devel >= 5.0
121+
122+
%if 0%{?rhel} >= 10
123+
BuildRequires: libxml2 libxml2-devel
124+
BuildRequires: pcre2-devel
125+
%else
117126
BuildRequires: ea-libxml2 ea-libxml2-devel
127+
BuildRequires: pcre-devel >= 5.0
128+
%endif
129+
118130
%if %{with_http2}
131+
%if 0%{?rhel} >= 10
132+
BuildRequires: nghttp2 libnghttp2
133+
%else
119134
BuildRequires: ea-nghttp2 ea-libnghttp2
135+
%endif
120136
%endif
121137

122138
%if 0%{?rhel} >=7
@@ -157,7 +173,14 @@ Provides: ea-apache24-mmn = %{oldmmnisa}
157173
Requires: ea-apache24-tools = %{version}-%{release}
158174
Requires: ea-apache24-mod_proxy_http
159175
Requires: ea-apache24-mod_proxy
176+
177+
178+
%if 0%{?rhel} == 10
179+
# ea-cpanel-tools needs cpanel perl which is not yet available on Almalinux 10
180+
%else
160181
Requires: ea-cpanel-tools
182+
%endif
183+
161184
%if 0%{?rhel} < 8
162185
Requires: elinks
163186
%endif
@@ -199,7 +222,11 @@ also be found at http://httpd.apache.org/docs/2.4/.
199222
%package -n ea-apache24-mod_http2
200223
Group: System Environment/Daemons
201224
Summary: HTTP2 module for Apache HTTP Server
225+
%if 0%{?rhel} >= 10
226+
BuildRequires: libnghttp2-devel
227+
%else
202228
BuildRequires: ea-libnghttp2-devel
229+
%endif
203230

204231
%if 0%{?rhel} < 8
205232
BuildRequires: ea-openssl11 >= %{ea_openssl_ver}, ea-openssl11-devel >= %{ea_openssl_ver}
@@ -210,7 +237,12 @@ BuildRequires: openssl, openssl-devel
210237
Requires: openssl
211238
%endif
212239

240+
%if 0%{?rhel} >= 10
241+
Requires: nghttp2
242+
%else
213243
Requires: ea-nghttp2
244+
%endif
245+
214246
Requires: ea-apache24 = 0:%{version}-%{release}, ea-apache24-mmn = %{mmnisa}
215247
Conflicts: ea-apache24-mod_mpm_itk, ea-apache24-mod_mpm_prefork
216248

@@ -412,8 +444,13 @@ authentication module, such as mod_auth_basic or mod_auth_digest.
412444
Group: System Environment/Daemons
413445
Summary: Compress content via Brotli before it is delivered to the client
414446
Requires: ea-apache24 = 0:%{version}-%{release}, ea-apache24-mmn = %{mmnisa}
447+
%if 0%{?rhel} >= 10
448+
Requires: brotli
449+
BuildRequires: brotli-devel
450+
%else
415451
Requires: ea-brotli
416452
BuildRequires: ea-brotli-devel
453+
%endif
417454

418455
%description -n ea-apache24-mod_brotli
419456
The mod_brotli module provides the BROTLI_COMPRESS output filter that allows
@@ -1030,7 +1067,11 @@ Group: System Environment/Daemons
10301067
Summary: HTML and XML content filters for the Apache HTTP Server
10311068
Requires: ea-apache24 = 0:%{version}-%{release}, ea-apache24-mmn = %{mmnisa}
10321069
Requires: ea-apache24-mod_proxy = 0:%{version}-%{release}
1070+
%if 0%{?rhel} >= 10
1071+
BuildRequires: libxml2 libxml2-devel
1072+
%else
10331073
BuildRequires: ea-libxml2 ea-libxml2-devel
1074+
%endif
10341075
Obsoletes: mod_proxy_html
10351076

10361077
%description -n ea-apache24-mod_proxy_html
@@ -1239,7 +1280,12 @@ BuildRequires: openssl, openssl-devel
12391280
Requires(post): openssl
12401281
%endif
12411282

1283+
%if 0%{?rhel} >= 10
1284+
Requires(post): /usr/bin/cat
1285+
%else
12421286
Requires(post): /bin/cat
1287+
%endif
1288+
12431289
Requires(pre): ea-apache24
12441290
Requires: ea-apache24 = 0:%{version}-%{release}, ea-apache24-mmn = %{mmnisa}
12451291
Obsoletes: stronghold-mod_ssl, mod_ssl
@@ -1432,7 +1478,11 @@ export LYNX_PATH=/usr/bin/links
14321478
--enable-ssl --with-ssl \
14331479
%endif
14341480
--enable-ssl-staticlib-deps \
1481+
%if 0%{?rhel} >= 10
1482+
--with-nghttp2 \
1483+
%else
14351484
--with-nghttp2=/opt/cpanel/nghttp2/ \
1485+
%endif
14361486
--enable-nghttp2-staticlib-deps \
14371487
%else
14381488
--enable-ssl --with-ssl \
@@ -1449,10 +1499,16 @@ export LYNX_PATH=/usr/bin/links
14491499
--enable-authn-alias \
14501500
--enable-imagemap \
14511501
--disable-echo \
1452-
--with-libxml2=/opt/cpanel/ea-libxml2/include/libxml2 \
1453-
--disable-v4-mapped \
14541502
--enable-brotli \
1503+
%if 0%{?rhel} >= 10
1504+
--enable-libxml2 \
1505+
%else
1506+
--with-libxml2=/opt/cpanel/ea-libxml2/include/libxml2 \
14551507
--with-brotli=/opt/cpanel/ea-brotli \
1508+
%endif
1509+
--disable-v4-mapped \
1510+
%if 0%{?rhel} >= 10
1511+
%else
14561512
MOD_PROXY_HTML_LDADD="-L/opt/cpanel/ea-libxml2/%{_lib} -R/opt/cpanel/ea-libxml2/%{_lib}" \
14571513
MOD_XML2ENC_LDADD="-L/opt/cpanel/ea-libxml2/%{_lib} -R/opt/cpanel/ea-libxml2/%{_lib}" \
14581514
MOD_BROTLI_LDADD="-L/opt/cpanel/ea-brotli/lib -R/opt/cpanel/ea-brotli/lib" \
@@ -1462,10 +1518,12 @@ export LYNX_PATH=/usr/bin/links
14621518
%if %{with_http2}
14631519
MOD_HTTP2_LDADD="-L/opt/cpanel/ea-openssl11/%{_lib} -R/opt/cpanel/ea-openssl11/%{_lib}" \
14641520
%endif
1521+
%endif
14651522
%endif
14661523
$*
14671524

14681525
%if 0%{?rhel} >= 8
1526+
%if 0%{?rhel} < 10
14691527
# This is ugly, very ugly.
14701528
# ZC-6833 was created to eventually come up with a proper solution for these
14711529
# linking issues.
@@ -1475,11 +1533,6 @@ export LYNX_PATH=/usr/bin/links
14751533
# link against the system directory, then -l:libcrypto.so.1.1 I am telling it
14761534
# to link that particular library in.
14771535

1478-
# I need to prepend this for later "sed"ing
1479-
%if 0%{?rhel} < 8
1480-
echo 'SYS_OPENSSL = -Wl,-rpath=/opt/cpanel/ea-openssl11/lib -Wl,-rpath-link=/lib64 -L/lib64 -l:libcrypto.so.1.1' > support/Makefile.tmp
1481-
%endif
1482-
14831536
cat support/Makefile >> support/Makefile.tmp
14841537
cp -f support/Makefile.tmp support/Makefile
14851538

@@ -1489,6 +1542,7 @@ sed -i '/^.*PROGRAM_LDADD[ \t]*=.*$/ s/$/ $(SYS_OPENSSL)/' support/Makefile
14891542
# ab, does it's own thing so I need to do our thing
14901543
sed -i '/^.*$(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ $(ab_LTFLAGS) $(ab_OBJECTS) $(ab_LDADD).*$/ s/$/ $(SYS_OPENSSL)/' support/Makefile
14911544
%endif
1545+
%endif
14921546

14931547
make %{?_smp_mflags}
14941548

@@ -1820,6 +1874,9 @@ for fd in httpd-dav.conf httpd-default.conf httpd-languages.conf httpd-manual.co
18201874
cp docs/conf/extra/$fd $RPM_BUILD_ROOT/usr/share/doc/ea-apache24/docs/conf/extra/$fd
18211875
done
18221876

1877+
echo "APACHEMODULES" $RPM_BUILD_ROOT $RPM_BUILD_ROOT/%{_libdir} $RPM_BUILD_ROOT/%{_libdir}/apache2/modules
1878+
ls -ld $RPM_BUILD_ROOT/%{_libdir}/apache2/modules/* || /bin/true
1879+
18231880
%pre
18241881
%include %{SOURCE46}
18251882

0 commit comments

Comments
 (0)