diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e95623d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/mod_http2-1.15.19.tar.gz diff --git a/.mod_http2.metadata b/.mod_http2.metadata new file mode 100644 index 0000000..6e7a106 --- /dev/null +++ b/.mod_http2.metadata @@ -0,0 +1 @@ +90be4a24989a8e0041d9cc20f7db34a453e4fa9f SOURCES/mod_http2-1.15.19.tar.gz diff --git a/SOURCES/mod_http2-1.14.1-buildfix.patch b/SOURCES/mod_http2-1.14.1-buildfix.patch new file mode 100644 index 0000000..25ff1fa --- /dev/null +++ b/SOURCES/mod_http2-1.14.1-buildfix.patch @@ -0,0 +1,14 @@ +diff -uap mod_http2-1.14.0/mod_http2/h2_from_h1.c.buildfix mod_http2-1.14.0/mod_http2/h2_from_h1.c +--- mod_http2-1.14.0/mod_http2/h2_from_h1.c.buildfix 2019-02-12 13:30:56.000000000 +0000 ++++ mod_http2-1.14.0/mod_http2/h2_from_h1.c 2019-03-14 10:35:46.365678537 +0000 +@@ -35,6 +35,10 @@ + #include "h2_task.h" + #include "h2_util.h" + ++#ifndef AP_STATUS_IS_HEADER_ONLY ++#define AP_STATUS_IS_HEADER_ONLY(x) ((x) == HTTP_NO_CONTENT || \ ++ (x) == HTTP_NOT_MODIFIED) ++#endif + + /* This routine is called by apr_table_do and merges all instances of + * the passed field values into a single array that will be further diff --git a/SOURCES/mod_http2-1.15.14-openssl30.patch b/SOURCES/mod_http2-1.15.14-openssl30.patch new file mode 100644 index 0000000..69a28f4 --- /dev/null +++ b/SOURCES/mod_http2-1.15.14-openssl30.patch @@ -0,0 +1,65 @@ +commit 124c2ca0886b05d0871ee09466de555d757b72fc +Author: Joe Orton +Date: Fri May 7 10:58:18 2021 +0100 + + Switch to using OpenSSL EVP_* API to avoid deprecation warnings + with OpenSSL 3.0. + +diff --git a/mod_http2/h2_push.c b/mod_http2/h2_push.c +index 8ae0b49..0a90a5d 100644 +--- a/mod_http2/h2_push.c ++++ b/mod_http2/h2_push.c +@@ -23,7 +23,7 @@ + #include + + #ifdef H2_OPENSSL +-#include ++#include + #endif + + #include +@@ -472,27 +472,32 @@ typedef struct h2_push_diary_entry { + + + #ifdef H2_OPENSSL +-static void sha256_update(SHA256_CTX *ctx, const char *s) ++static void sha256_update(EVP_MD_CTX *ctx, const char *s) + { +- SHA256_Update(ctx, s, strlen(s)); ++ EVP_DigestUpdate(ctx, s, strlen(s)); + } + + static void calc_sha256_hash(h2_push_diary *diary, apr_uint64_t *phash, h2_push *push) + { +- SHA256_CTX sha256; ++ EVP_MD_CTX *md; + apr_uint64_t val; +- unsigned char hash[SHA256_DIGEST_LENGTH]; ++ unsigned char hash[EVP_MAX_MD_SIZE]; ++ unsigned len; + int i; +- +- SHA256_Init(&sha256); +- sha256_update(&sha256, push->req->scheme); +- sha256_update(&sha256, "://"); +- sha256_update(&sha256, push->req->authority); +- sha256_update(&sha256, push->req->path); +- SHA256_Final(hash, &sha256); ++ ++ md = EVP_MD_CTX_create(); ++ ap_assert(md != NULL); ++ ++ i = EVP_DigestInit_ex(md, EVP_sha256(), NULL); ++ ap_assert(i == 1); ++ sha256_update(md, push->req->scheme); ++ sha256_update(md, "://"); ++ sha256_update(md, push->req->authority); ++ sha256_update(md, push->req->path); ++ EVP_DigestFinal(md, hash, &len); + + val = 0; +- for (i = 0; i != sizeof(val); ++i) ++ for (i = 0; i != len; ++i) + val = val * 256 + hash[i]; + *phash = val >> (64 - diary->mask_bits); + } diff --git a/SPECS/mod_http2.spec b/SPECS/mod_http2.spec new file mode 100644 index 0000000..3835b43 --- /dev/null +++ b/SPECS/mod_http2.spec @@ -0,0 +1,167 @@ +# Module Magic Number +%{!?_httpd_mmn: %global _httpd_mmn %(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)} + +Name: mod_http2 +Version: 1.15.19 +Release: 2%{?dist} +Summary: module implementing HTTP/2 for Apache 2 +License: ASL 2.0 +URL: https://icing.github.io/mod_h2/ +Source0: https://github.com/icing/mod_h2/releases/download/v%{version}/mod_http2-%{version}.tar.gz +Patch1: mod_http2-1.14.1-buildfix.patch +Patch2: mod_http2-1.15.14-openssl30.patch +BuildRequires: make +BuildRequires: gcc +BuildRequires: pkgconfig, httpd-devel >= 2.4.20, libnghttp2-devel >= 1.7.0, openssl-devel >= 1.0.2 +BuildRequires: autoconf, libtool, /usr/bin/hostname +Requires: httpd-mmn = %{_httpd_mmn} +Conflicts: httpd < 2.4.25-8 + +%description +The mod_h2 Apache httpd module implements the HTTP2 protocol (h2+h2c) on +top of libnghttp2 for httpd 2.4 servers. + +%prep +%setup -q +%patch1 -p1 -b .buildfix +%patch2 -p1 -b .openssl30 + +%build +autoreconf -i +%configure --with-apxs=%{_httpd_apxs} +%make_build + +%install +%make_install +rm -rf %{buildroot}/etc/httpd/share/doc/ + +# create configuration +mkdir -p %{buildroot}%{_httpd_modconfdir} +echo "LoadModule http2_module modules/mod_http2.so" > %{buildroot}%{_httpd_modconfdir}/10-h2.conf +echo "LoadModule proxy_http2_module modules/mod_proxy_http2.so" > %{buildroot}%{_httpd_modconfdir}/10-proxy_h2.conf + +%files +%doc README.md ChangeLog AUTHORS +%license LICENSE +%config(noreplace) %{_httpd_modconfdir}/10-h2.conf +%config(noreplace) %{_httpd_modconfdir}/10-proxy_h2.conf +%{_httpd_moddir}/mod_http2.so +%{_httpd_moddir}/mod_proxy_http2.so + +%changelog +* Mon Aug 09 2021 Mohan Boddu - 1.15.19-2 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Fri Jun 18 2021 Luboš Uhliarik - 1.15.19-1 +- new version 1.15.19 +- Resolves: #1970918 - mod_http2: rebase to 1.15.19 + +* Wed Jun 16 2021 Mohan Boddu - 1.15.14-6 +- Rebuilt for RHEL 9 BETA for openssl 3.0 + Related: rhbz#1971065 + +* Fri May 7 2021 Joe Orton - 1.15.14-5 +- avoid use of deprecated OpenSSL 3.0 API (#1958042) + +* Fri Apr 16 2021 Mohan Boddu - 1.15.14-4 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 1.15.14-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Aug 27 2020 Joe Orton - 1.15.14-2 +- use apxs via _httpd_apxs macro + +* Mon Aug 17 2020 Joe Orton - 1.15.14-1 +- update to 1.15.14 + +* Tue Jul 28 2020 Fedora Release Engineering - 1.15.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Mar 6 2020 Joe Orton - 1.15.7-1 +- update to 1.15.7 + +* Fri Feb 7 2020 Joe Orton - 1.15.5-1 +- update to 1.15.5 + +* Wed Jan 29 2020 Fedora Release Engineering - 1.15.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Aug 19 2019 Lubos Uhliarik - 1.15.3-2 +- Rebuilt with newer nghttp2 + +* Thu Aug 8 2019 Joe Orton - 1.15.3-1 +- update to 1.15.3 + +* Thu Jul 25 2019 Fedora Release Engineering - 1.15.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed May 29 2019 Joe Orton - 1.15.1-1 +- update to 1.15.1 + +* Wed May 22 2019 Joe Orton - 1.15.0-1 +- update to 1.15.0 + +* Thu Mar 14 2019 Joe Orton - 1.14.1-1 +- update to 1.14.1 + +* Tue Mar 5 2019 Joe Orton - 1.14.0-1 +- update to 1.14.0 + +* Tue Feb 26 2019 Joe Orton - 1.13.0-1 +- update to 1.13.0 + +* Fri Feb 01 2019 Fedora Release Engineering - 1.12.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jan 18 2019 Joe Orton - 1.12.1-1 +- update to 1.12.1 + +* Tue Oct 09 2018 Lubos Uhliarik - 1.11.2-1 +- new version 1.11.2 + +* Fri Oct 05 2018 Luboš Uhliarik - 1.11.1-1 +- new version 1.11.1 (CVE-2018-11763) + +* Fri Jul 13 2018 Fedora Release Engineering - 1.10.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed May 2 2018 Joe Orton - 1.10.20-1 +- update to 1.10.20 + +* Wed Apr 18 2018 Joe Orton - 1.10.18-1 +- update to 1.10.18 + +* Thu Mar 29 2018 Joe Orton - 1.10.16-1 +- update to 1.10.16 (CVE-2018-1302) + +* Thu Feb 08 2018 Fedora Release Engineering - 1.10.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Nov 7 2017 Joe Orton - 1.10.13-1 +- update to 1.10.13 + +* Fri Oct 20 2017 Joe Orton - 1.10.12-1 +- update to 1.10.12 + +* Thu Aug 03 2017 Fedora Release Engineering - 1.10.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Mon Jul 31 2017 Joe Orton - 1.10.10-1 +- update to 1.10.10 + +* Wed Jul 26 2017 Fedora Release Engineering - 1.10.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Jul 6 2017 Joe Orton - 1.10.7-1 +- update to 1.10.7 + +* Mon Jun 12 2017 Joe Orton - 1.10.6-1 +- update to 1.10.6 + +* Tue May 16 2017 Joe Orton - 1.10.5-1 +- update to 1.10.5 + +* Mon Apr 10 2017 Luboš Uhliarik - 1.10.1-1 +- Initial import (#1440780).