update to 2.0.8

This commit is contained in:
Joe Orton 2019-07-12 07:57:42 +01:00
parent 4b87cbd83e
commit e7e79bae42
5 changed files with 30 additions and 45 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/mod_md-2.0.3.tar.gz
/mod_md-2.0.8.tar.gz

View File

@ -1,42 +0,0 @@
From 67cb21cae6ce9b1d76479f2fff14fe5ea106f994 Mon Sep 17 00:00:00 2001
From: Joe Orton <jorton@redhat.com>
Date: Tue, 11 Jun 2019 15:17:59 +0100
Subject: [PATCH] Fix use of StateDir after httpd trunk r1852982:
* src/mod_md_config.c (md_config_post_config): Pick up base_dir
from statedir in post-config phase so StateDir can influence it.
(Sync with httpd r1857731)
---
src/mod_md_config.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/mod_md_config.c b/src/mod_md_config.c
index f9dd128..8a9330f 100644
--- a/src/mod_md_config.c
+++ b/src/mod_md_config.c
@@ -131,11 +131,6 @@ static md_mod_conf_t *md_mod_conf_get(apr_pool_t *pool, int create)
mod_md_config->env = apr_table_make(pool, 10);
mod_md_config->init_errors = apr_hash_make(pool);
-#if AP_MODULE_MAGIC_AT_LEAST(20180906, 2)
- mod_md_config->base_dir = ap_state_dir_relative(pool,
- MD_DEFAULT_BASE_DIR);
-#endif
-
apr_pool_cleanup_register(pool, NULL, cleanup_mod_config, apr_pool_cleanup_null);
}
@@ -853,6 +848,12 @@ apr_status_t md_config_post_config(server_rec *s, apr_pool_t *p)
if (mc->hsts_max_age > 0) {
mc->hsts_header = apr_psprintf(p, "max-age=%d", mc->hsts_max_age);
}
+
+#if 1
+ if (mc->base_dir == NULL) {
+ mc->base_dir = ap_state_dir_relative(p, MD_DEFAULT_BASE_DIR);
+ }
+#endif
return APR_SUCCESS;
}

View File

@ -0,0 +1,23 @@
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 @@
/* 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 */
#else
MD_DEFAULT_BASE_DIR,
@@ -898,7 +898,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) {
mc->base_dir = ap_state_dir_relative(p, MD_DEFAULT_BASE_DIR);
}

View File

@ -2,13 +2,13 @@
%{!?_httpd_mmn: %global _httpd_mmn %(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}
Name: mod_md
Version: 2.0.3
Version: 2.0.8
Release: 1%{?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
Patch1: mod_md-2.0.3-state_dir.patch
Patch1: mod_md-2.0.8-state_dir.patch
BuildRequires: gcc
BuildRequires: pkgconfig, httpd-devel >= 2.4.38, openssl-devel >= 1.1.0, jansson-devel, libcurl-devel
Requires: httpd-mmn = %{_httpd_mmn}
@ -57,5 +57,8 @@ echo "LoadModule md_module modules/mod_md.so" > %{buildroot}%{_httpd_modconfdir}
%{_bindir}/a2md
%changelog
* Fri Jul 12 2019 Joe Orton <jorton@redhat.com> - 1:2.0.8-1
- update to 2.0.8
* Tue Jun 11 2019 Lubos Uhliarik <luhliari@redhat.com> - 2.0.3-1
- Initial import (#1719248).

View File

@ -1 +1 @@
SHA512 (mod_md-2.0.3.tar.gz) = af76224d1f7c38336b189b9e324524a20c08936c5c8cf5be8b208c9af0b4209b9bc0bed62e6199f0ad87b712afd07f066dce4ec50af7bf1731bec97b3fd6a767
SHA512 (mod_md-2.0.8.tar.gz) = fc92b9a5e5db5b6e4f8d1d193a977d22590ab10ee0aa59de73cb3275a7bf7b07538136c9bc1347821aedf078983cf191bad9fd58a69e325b411959226a1fdae8