From 7cd426c38f26fc48bf424ff7a58fc4267e6133c2 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 15:54:34 +0000 Subject: [PATCH] import UBI mod_md-2.4.26-3.el10 --- .gitignore | 2 +- .mod_md.metadata | 1 - SOURCES/a2md.xml | 418 ------------------ SOURCES/mod_md-2.0.8-duptrim-seg.patch | 13 - .../mod_md-2.0.8-tolerate-missing-res.patch | 22 - SPECS/mod_md.spec | 99 ----- ..._dir.patch => mod_md-2.0.8-state_dir.patch | 12 +- mod_md.spec | 163 +++++++ sources | 1 + 9 files changed, 171 insertions(+), 560 deletions(-) delete mode 100644 .mod_md.metadata delete mode 100644 SOURCES/a2md.xml delete mode 100644 SOURCES/mod_md-2.0.8-duptrim-seg.patch delete mode 100644 SOURCES/mod_md-2.0.8-tolerate-missing-res.patch delete mode 100644 SPECS/mod_md.spec rename SOURCES/mod_md-2.0.8-state_dir.patch => mod_md-2.0.8-state_dir.patch (70%) create mode 100644 mod_md.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index 6333b36..556c7f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/mod_md-2.0.8.tar.gz +mod_md-2.4.26.tar.gz diff --git a/.mod_md.metadata b/.mod_md.metadata deleted file mode 100644 index 083e09c..0000000 --- a/.mod_md.metadata +++ /dev/null @@ -1 +0,0 @@ -6cec32070c6fd83701be0874a2d8b4f30d929d03 SOURCES/mod_md-2.0.8.tar.gz diff --git a/SOURCES/a2md.xml b/SOURCES/a2md.xml deleted file mode 100644 index 0f74182..0000000 --- a/SOURCES/a2md.xml +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - a2md - mod_md - AuthorEissingStefanstefan.eissing@greenbytes.de - DocumentationUhliarikLubosluhliari@redhat.com - - - - a2md - 1 - - - - a2md - Show and manipulate Apache Managed Domains - - - - - a2md - options - - acme - add - update - drive - list - store - - cmd options - args - - - - - Description - - The a2md utility can be used to configure and update managed domains with - the mod_md module for Apache HTTP Server. Managed Domains are virtual hosts - which automatically obtain and renew TLS certificates from an ACME server. - - - - - Options - - - - - arg, - arg - - The url of the ACME server directory - - - - - arg, - arg - - Directory for file data - - - - - , - - - Print usage information - - - - - , - - - Produce JSON output - - - - - arg, - arg - - Use the HTTP proxy url - - - - - , - - - Produce less output - - - - - arg, - arg - - You agree to the terms of services (url) - - - - - , - - - Produce more output - - - - - , - - - Print version - - - - - ACME server commands - - a2md acme - - newreg - delreg - agree - authz - validate - - opts - args - - - - Play with the ACME server. For most of the commands you need to specify - the url of the ACME server directory. - - - - newreg - - newreg - contact-uri - contact-uri... - - Register a new account at ACME server with given contact-uri (email) - - - - delreg - - delreg - account - - Delete an existing ACME account - - - - agree - - agree - account - - Agree to ACME terms of service - - - - authz - - authz - account - domain - - Request a new authorization for an account and - domain - - - - validate - - validate - account - - Validate account existence - - - - - Managed domain addition - - a2md add - opts - domain - domain... - - - - Adds a new managed domain. Must not overlap with existing domains. - - - - - Updating managed domain - - a2md update - name - opts - - domains - ca - account - contacts - agreement - - - - - Update a managed domain's properties, where name belongs to managed domain which - will be updated. - - - URL of ACME server can be also updated if | - option is present. - - - domains - - domains - dname - dname... - - Update domain where dname is domain name which will be updated. - - - - ca - - ca - url - proto - - The URL where the CA offers its service. - Currently only ACME (LetsEncrypt) proto is implemented. - - - - account - - account - - Account name on corresponding ACME server. - - - - contacts - - contacts - email - email... - - Contact address which will be used by ACME server to inform about renewals or changed terms of service. - - - - agreement - - agreement - URI - - URI pointing to terms of service of ACME server. - - - - - Drive managed domains - - a2md drive - md... - options... - - - - Drive all or the mentioned managed domains toward completeness - - - Options - - - - arg, - arg - - Which challenge type to use - - - - , - - - Force driving the managed domain, even when it seems valid - - - - , - - - Reset any staging data for the managed domain - - - - - - - List managed domamins - - a2md list - - - - List all managed domains - - - - - Manipulating MD store - - a2md store - - add - remove - list - update - - opts - args - - - - Manipulate the MD store - - - - add - - add - dns - dns2... - - Add a new managed domain dns with all the additional domain names - - - - remove - - remove - -f | --force - name - name... - - Remove the managed domains name from the store - When or option is specified, force managed domain removal - be silent about missing domains - - - list - - list - - List all managed domains in the store - - - update - - update - name - - domains - dname - dname... - - - If cmd is specified followed by one or - more domains, MD store will be updated with those domains. - URL of ACME server can be also updated if | - option is present. - - - - - - - diff --git a/SOURCES/mod_md-2.0.8-duptrim-seg.patch b/SOURCES/mod_md-2.0.8-duptrim-seg.patch deleted file mode 100644 index 4267558..0000000 --- a/SOURCES/mod_md-2.0.8-duptrim-seg.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/md_result.c b/src/md_result.c -index 4076d5b..0e0b688 100644 ---- a/src/md_result.c -+++ b/src/md_result.c -@@ -32,7 +32,7 @@ - static const char *dup_trim(apr_pool_t *p, const char *s) - { - char *d = apr_pstrdup(p, s); -- apr_collapse_spaces(d, d); -+ if (d) apr_collapse_spaces(d, d); - return d; - } - diff --git a/SOURCES/mod_md-2.0.8-tolerate-missing-res.patch b/SOURCES/mod_md-2.0.8-tolerate-missing-res.patch deleted file mode 100644 index 37819cc..0000000 --- a/SOURCES/mod_md-2.0.8-tolerate-missing-res.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/md_acme.c b/src/md_acme.c -index d2cc00a..005a387 100644 ---- a/src/md_acme.c -+++ b/src/md_acme.c -@@ -728,8 +728,15 @@ static apr_status_t update_directory(const md_http_response_t *res) - acme->api.v2.revoke_cert = md_json_dups(acme->p, json, "revokeCert", NULL); - acme->api.v2.key_change = md_json_dups(acme->p, json, "keyChange", NULL); - acme->api.v2.new_nonce = md_json_dups(acme->p, json, "newNonce", NULL); -- if (acme->api.v2.new_account && acme->api.v2.new_order -- && acme->api.v2.revoke_cert && acme->api.v2.key_change -+ /* RFC 8555 only requires "directory" and "newNonce" resources. -+ * mod_md uses "newAccount" and "newOrder" so check for them. -+ * But mod_md does not use the "revokeCert" or "keyChange" -+ * resources, so tolerate the absense of those keys. In the -+ * future if mod_md implements revocation or key rollover then -+ * the use of those features should be predicated on the -+ * server's advertised capabilities. */ -+ if (acme->api.v2.new_account -+ && acme->api.v2.new_order - && acme->api.v2.new_nonce) { - acme->version = MD_ACME_VERSION_2; - } diff --git a/SPECS/mod_md.spec b/SPECS/mod_md.spec deleted file mode 100644 index 299efa1..0000000 --- a/SPECS/mod_md.spec +++ /dev/null @@ -1,99 +0,0 @@ -# Module Magic Numberfa -%{!?_httpd_mmn: %global _httpd_mmn %(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)} - -Name: mod_md -Version: 2.0.8 -Release: 8%{?dist} -Summary: Certificate provisioning using ACME for the Apache HTTP Server -License: ASL 2.0 -URL: https://icing.github.io/mod_md/ -Source0: https://github.com/icing/mod_md/releases/download/v%{version}/mod_md-%{version}.tar.gz -# documentation -Source10: a2md.xml -Patch1: mod_md-2.0.8-state_dir.patch -Patch2: mod_md-2.0.8-duptrim-seg.patch -Patch3: mod_md-2.0.8-tolerate-missing-res.patch -BuildRequires: gcc -BuildRequires: pkgconfig, httpd-devel >= 2.4.37, openssl-devel >= 1.1.0, jansson-devel, libcurl-devel -BuildRequires: xmlto -Requires: httpd-mmn = %{_httpd_mmn}, mod_ssl >= 1:2.4.37-17 -Conflicts: httpd < 2.4.37-17 -Epoch: 1 - -%description -This module manages common properties of domains for one or more -virtual hosts. Specifically it can use the ACME protocol to automate -certificate provisioning. Certificates will be configured for managed -domains and their virtual hosts automatically, including at renewal. - -%prep -%setup -q -%patch1 -p1 -b .state_dir -%patch2 -p1 -b .dup_trim -%patch3 -p1 -b .tol_missing_res - -xmlto man $RPM_SOURCE_DIR/a2md.xml - -%build -%configure -# remove rpath -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool - -%make_build V=1 - -%check -%make_build check - -%install -%make_install -rm -rf %{buildroot}/etc/httpd/share/doc/ - -# remove links and rename SO files -rm -f %{buildroot}%{_httpd_moddir}/mod_md.so -mv %{buildroot}%{_httpd_moddir}/mod_md.so.0.0.0 %{buildroot}%{_httpd_moddir}/mod_md.so - -# create configuration -mkdir -p %{buildroot}%{_httpd_modconfdir} -echo "LoadModule md_module modules/mod_md.so" > %{buildroot}%{_httpd_modconfdir}/01-md.conf - -# Install man pages -install -d $RPM_BUILD_ROOT%{_mandir}/man1 -install -m 644 -p a2md.1 $RPM_BUILD_ROOT%{_mandir}/man1 - -%files -%doc README.md ChangeLog AUTHORS -%license LICENSE -%config(noreplace) %{_httpd_modconfdir}/01-md.conf -%{_httpd_moddir}/mod_md.so -%{_bindir}/a2md -%{_mandir}/man1/* - -%changelog -* Thu May 28 2020 Lubos Uhliarik - 1:2.0.8-8 -- Resolves: #1832844 - mod_md does not work with ACME server that does not - provide keyChange or revokeCert resources - -* Wed Jan 22 2020 Lubos Uhliarik - 1:2.0.8-7 -- Resolves: #1747912 - add a2md(1) documentation - -* Mon Dec 09 2019 Lubos Uhliarik - 1:2.0.8-6 -- Resolves: #1781263 - mod_md ACMEv1 crash - -* Thu Oct 03 2019 Lubos Uhliarik - 1:2.0.8-5 -- Resolves: #1747898 - add mod_md package - -* Fri Aug 30 2019 Joe Orton - 1:2.0.8-4 -- require mod_ssl, update package description - -* Fri Aug 30 2019 Joe Orton - 1:2.0.8-3 -- rebuild against 2.4.41 - -* Thu Jul 25 2019 Fedora Release Engineering - 1:2.0.8-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Jul 12 2019 Joe Orton - 1:2.0.8-1 -- update to 2.0.8 - -* Tue Jun 11 2019 Lubos Uhliarik - 2.0.3-1 -- Initial import (#1719248). diff --git a/SOURCES/mod_md-2.0.8-state_dir.patch b/mod_md-2.0.8-state_dir.patch similarity index 70% rename from SOURCES/mod_md-2.0.8-state_dir.patch rename to mod_md-2.0.8-state_dir.patch index 970424f..ba4e9c4 100644 --- a/SOURCES/mod_md-2.0.8-state_dir.patch +++ b/mod_md-2.0.8-state_dir.patch @@ -1,21 +1,21 @@ Enable state_dir support for 2.4.x. ---- mod_md-2.0.8/src/mod_md_config.c.state_dir -+++ mod_md-2.0.8/src/mod_md_config.c -@@ -44,7 +44,7 @@ +--- mod_md-2.2.6/src/mod_md_config.c.state_dir ++++ mod_md-2.2.6/src/mod_md_config.c +@@ -54,7 +54,7 @@ /* Default settings for the global conf */ static md_mod_conf_t defmc = { NULL, /* list of mds */ -#if AP_MODULE_MAGIC_AT_LEAST(20180906, 2) +#if 1 - NULL, /* base dir by default state-dir-relative */ + NULL, /* base dirm by default state-dir-relative */ #else MD_DEFAULT_BASE_DIR, -@@ -898,7 +898,7 @@ +@@ -1039,7 +1039,7 @@ mc->hsts_header = apr_psprintf(p, "max-age=%d", mc->hsts_max_age); } - + -#if AP_MODULE_MAGIC_AT_LEAST(20180906, 2) +#if 1 if (mc->base_dir == NULL) { diff --git a/mod_md.spec b/mod_md.spec new file mode 100644 index 0000000..3fa90f3 --- /dev/null +++ b/mod_md.spec @@ -0,0 +1,163 @@ +# Module Magic Number +%{!?_httpd_mmn: %global _httpd_mmn %(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)} +# State directory +%{!?_httpd_statedir: %global _httpd_statedir %{_localstatedir}/lib/httpd} + +Name: mod_md +Version: 2.4.26 +Release: 3%{?dist} +Summary: Certificate provisioning using ACME for the Apache HTTP Server +License: Apache-2.0 +URL: https://icing.github.io/mod_md/ +Source0: https://github.com/icing/mod_md/releases/download/v%{version}/mod_md-%{version}.tar.gz +Patch1: mod_md-2.0.8-state_dir.patch +BuildRequires: make, gcc +BuildRequires: pkgconfig, httpd-devel >= 2.4.41, openssl-devel >= 1.1.0, jansson-devel, libcurl-devel, xmlto +Requires: httpd-mmn = %{_httpd_mmn}, mod_ssl >= 1:2.4.41 +Conflicts: httpd < 2.4.39-7 +Epoch: 1 + +%description +This module manages common properties of domains for one or more +virtual hosts. Specifically it can use the ACME protocol to automate +certificate provisioning. Certificates will be configured for managed +domains and their virtual hosts automatically, including at renewal. + +%prep +%autosetup -p1 + +%build +%configure --with-apxs=%{_httpd_apxs} +# remove rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +%make_build V=1 + +%check +%make_build check + +%install +%make_install +rm -rf %{buildroot}/etc/httpd/share/doc/ + +# remove links and rename SO files +rm -f %{buildroot}%{_httpd_moddir}/mod_md.so +mv %{buildroot}%{_httpd_moddir}/mod_md.so.0.0.0 %{buildroot}%{_httpd_moddir}/mod_md.so + +# create configuration and state directory +mkdir -p %{buildroot}%{_httpd_modconfdir} %{buildroot}%{_httpd_statedir}/md +echo "LoadModule md_module modules/mod_md.so" > %{buildroot}%{_httpd_modconfdir}/01-md.conf + +%files +%doc README.md ChangeLog AUTHORS +%license LICENSE +%config(noreplace) %{_httpd_modconfdir}/01-md.conf +%{_httpd_moddir}/mod_md.so +%{_bindir}/a2md +%{_mandir}/man1/* +%dir %{_httpd_statedir}/md + +%changelog +* Tue Oct 29 2024 Troy Dawson - 1:2.4.26-3 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Mon Jun 24 2024 Troy Dawson - 1:2.4.26-2 +- Bump release for June 2024 mass rebuild + +* Thu Jan 25 2024 Joe Orton - 1:2.4.26-1 +- update to 2.4.26 + +* Thu Jan 25 2024 Fedora Release Engineering - 1:2.4.25-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1:2.4.25-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Nov 28 2023 Joe Orton - 1:2.4.25-1 +- update to 2.4.25 + +* Mon Sep 11 2023 Luboš Uhliarik - 1:2.4.24-1 +- new version 2.4.24 + +* Thu Jul 20 2023 Fedora Release Engineering - 1:2.4.21-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jun 01 2023 Luboš Uhliarik - 1:2.4.21-1 +- new version 2.4.21 +- SPDX migration + +* Thu Jan 19 2023 Fedora Release Engineering - 1:2.4.19-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Dec 19 2022 Joe Orton - 1:2.4.19-2 +- package the "md" directory (#2154348) + +* Thu Oct 6 2022 Joe Orton - 1:2.4.19-1 +- update to 2.4.19 + +* Thu Jul 21 2022 Fedora Release Engineering - 1:2.4.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 1:2.4.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Dec 3 2021 Joe Orton - 1:2.4.10-1 +- update to 2.4.10 + +* Fri Sep 17 2021 Joe Orton - 1:2.4.7-1 +- update to 2.4.7 + +* Tue Sep 14 2021 Sahana Prasad - 1:2.4.0-3 +- Rebuilt with OpenSSL 3.0.0 + +* Thu Jul 22 2021 Fedora Release Engineering - 1:2.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Mar 9 2021 Joe Orton - 1:2.4.0-1 +- update to 2.4.0 + +* Tue Feb 2 2021 Joe Orton - 1:2.3.7-1 +- update to 2.3.7 (beta) +- use autosetup macro + +* Tue Jan 26 2021 Fedora Release Engineering - 1:2.2.8-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 22 2021 Joe Orton - 1:2.2.8-4 +- update to 2.2.8 + +* Fri Aug 28 2020 Joe Orton - 1:2.2.7-4 +- use _httpd_apxs macro + +* Tue Jul 28 2020 Fedora Release Engineering - 1:2.2.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jun 23 2020 Alexander Bokovoy - 1:2.2.7-2 +- mod_md does not work with ACME server that does not provide revokeCert or + keyChange resource (#1832841) + +* Tue Feb 11 2020 Joe Orton - 1:2.2.7-1 +- update to 2.2.7 + +* Fri Feb 7 2020 Joe Orton - 1:2.2.6-1 +- update to 2.2.6 (#1799660) + +* Wed Jan 29 2020 Fedora Release Engineering - 1:2.0.8-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Aug 30 2019 Joe Orton - 1:2.0.8-4 +- require mod_ssl, update package description + +* Fri Aug 30 2019 Joe Orton - 1:2.0.8-3 +- rebuild against 2.4.41 + +* Thu Jul 25 2019 Fedora Release Engineering - 1:2.0.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Jul 12 2019 Joe Orton - 1:2.0.8-1 +- update to 2.0.8 + +* Tue Jun 11 2019 Lubos Uhliarik - 2.0.3-1 +- Initial import (#1719248). diff --git a/sources b/sources new file mode 100644 index 0000000..bef340a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (mod_md-2.4.26.tar.gz) = 438d914684042356d80f2c04740051e9d2a8d1762c46c53bc4a96b25dc691e0034a7871ddf02cc40e075290a62413707926661fb707f19d9a06fc255ef9cc6c1