sync with rawhide

build against OpenSSL 3 on EL8
enable kTLS support

Signed-off-by: Felix Kaechele <felix@kaechele.ca>
This commit is contained in:
Felix Kaechele 2022-08-17 20:34:07 -04:00
parent 4e10bed0c2
commit 0161f58749

View File

@ -7,12 +7,12 @@
%bcond_with geoip %bcond_with geoip
# nginx gperftools support should be dissabled for RHEL >= 8 # nginx gperftools support should be disabled for RHEL >= 8
# see: https://bugzilla.redhat.com/show_bug.cgi?id=1931402 # see: https://bugzilla.redhat.com/show_bug.cgi?id=1931402
%if 0%{?rhel} >= 8 %if 0%{?rhel} >= 8
%global with_gperftools 0 %global with_gperftools 0
%else %else
# gperftools exist only on selected arches # gperftools exists only on selected arches
# gperftools *detection* is failing on ppc64*, possibly only configure # gperftools *detection* is failing on ppc64*, possibly only configure
# bug, but disable anyway. # bug, but disable anyway.
%ifnarch s390 s390x ppc64 ppc64le %ifnarch s390 s390x ppc64 ppc64le
@ -26,6 +26,21 @@
%global with_mailcap_mimetypes 1 %global with_mailcap_mimetypes 1
%endif %endif
# kTLS requires OpenSSL 3.0 (default in F36+ and EL9+, available in EPEL8)
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 8
%global with_ktls 1
%endif
# Build against OpenSSL 1.1 on EL7
%if 0%{?rhel} == 7
%global openssl_pkgversion 11
%endif
# Build against OpenSSL 3 on EL8
%if 0%{?rhel} == 8
%global openssl_pkgversion 3
%endif
# Cf. https://www.nginx.com/blog/creating-installable-packages-dynamic-modules/ # Cf. https://www.nginx.com/blog/creating-installable-packages-dynamic-modules/
%global nginx_abiversion %{version} %global nginx_abiversion %{version}
@ -41,7 +56,7 @@
Name: nginx Name: nginx
Epoch: 1 Epoch: 1
Version: 1.23.1 Version: 1.23.1
Release: 1%{?dist} Release: 2%{?dist}
Summary: A high performance web server and reverse proxy server Summary: A high performance web server and reverse proxy server
# BSD License (two clause) # BSD License (two clause)
@ -83,11 +98,7 @@ BuildRequires: gnupg2
%if 0%{?with_gperftools} %if 0%{?with_gperftools}
BuildRequires: gperftools-devel BuildRequires: gperftools-devel
%endif %endif
%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: openssl%{?openssl_pkgversion}-devel
BuildRequires: openssl-devel
%else
BuildRequires: openssl11-devel
%endif
BuildRequires: pcre2-devel BuildRequires: pcre2-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
@ -126,8 +137,9 @@ Summary: nginx minimal core
%if 0%{?with_mailcap_mimetypes} %if 0%{?with_mailcap_mimetypes}
Requires: nginx-mimetypes Requires: nginx-mimetypes
%endif %endif
Requires: openssl-libs Requires: openssl%{?openssl_pkgversion}-libs
Requires(pre): nginx-filesystem Requires(pre): nginx-filesystem
Conflicts: nginx < 1:1.20.2-4
%description core %description core
nginx minimal core nginx minimal core
@ -227,11 +239,7 @@ Requires: gperftools-devel
Requires: GeoIP-devel Requires: GeoIP-devel
%endif %endif
Requires: libxslt-devel Requires: libxslt-devel
%if 0%{?fedora} || 0%{?rhel} >= 8 Requires: openssl%{?openssl_pkgversion}-devel
Requires: openssl-devel
%else
Requires: openssl11-devel
%endif
Requires: pcre2-devel Requires: pcre2-devel
Requires: perl-devel Requires: perl-devel
Requires: perl(ExtUtils::Embed) Requires: perl(ExtUtils::Embed)
@ -253,10 +261,10 @@ sed -i -e 's#KillMode=.*#KillMode=process#g' nginx.service
sed -i -e 's#PROFILE=SYSTEM#HIGH:!aNULL:!MD5#' nginx.conf sed -i -e 's#PROFILE=SYSTEM#HIGH:!aNULL:!MD5#' nginx.conf
%endif %endif
%if 0%{?rhel} == 7 %if 0%{?openssl_pkgversion}
sed \ sed \
-e 's|\(ngx_feature_path=\)$|\1%{_includedir}/openssl11|' \ -e 's|\(ngx_feature_path=\)$|\1%{_includedir}/openssl%{openssl_pkgversion}|' \
-e 's|\(ngx_feature_libs="\)|\1-L%{_libdir}/openssl11 |' \ -e 's|\(ngx_feature_libs="\)|\1-L%{_libdir}/openssl%{openssl_pkgversion} |' \
-i auto/lib/openssl/conf -i auto/lib/openssl/conf
%endif %endif
@ -322,6 +330,9 @@ if ! ./configure \
--with-http_xslt_module=dynamic \ --with-http_xslt_module=dynamic \
--with-mail=dynamic \ --with-mail=dynamic \
--with-mail_ssl_module \ --with-mail_ssl_module \
%if 0%{?with_ktls}
--with-openssl-opt=enable-ktls \
%endif
--with-pcre \ --with-pcre \
--with-pcre-jit \ --with-pcre-jit \
--with-stream=dynamic \ --with-stream=dynamic \
@ -586,6 +597,11 @@ fi
%changelog %changelog
* Wed Aug 17 2022 Felix Kaechele <felix@kaechele.ca> - 1:1.23.1-2
- sync with rawhide
- build against OpenSSL 3 on EL8
- enable kTLS support
* Tue Jul 19 2022 Felix Kaechele <felix@kaechele.ca> - 1:1.23.1-1 * Tue Jul 19 2022 Felix Kaechele <felix@kaechele.ca> - 1:1.23.1-1
- update to 1.23.1 - update to 1.23.1