fixes for StateDir directive (upstream r1857731, r1857731)
This commit is contained in:
parent
bc95575bf5
commit
67d32a785d
@ -1,10 +1,12 @@
|
|||||||
# ./pullrev.sh 1842929 1842931
|
# ./pullrev.sh 1842929 1842931 1852982 1853631 1857731
|
||||||
http://svn.apache.org/viewvc?view=revision&revision=1842929
|
http://svn.apache.org/viewvc?view=revision&revision=1842929
|
||||||
http://svn.apache.org/viewvc?view=revision&revision=1842931
|
http://svn.apache.org/viewvc?view=revision&revision=1842931
|
||||||
http://svn.apache.org/viewvc?view=revision&revision=1852982
|
http://svn.apache.org/viewvc?view=revision&revision=1852982
|
||||||
|
http://svn.apache.org/viewvc?view=revision&revision=1857731
|
||||||
|
http://svn.apache.org/viewvc?view=revision&revision=1853631
|
||||||
|
|
||||||
--- httpd-2.4.38/acinclude.m4.r1842929+
|
--- httpd-2.4.39/acinclude.m4.r1842929+
|
||||||
+++ httpd-2.4.38/acinclude.m4
|
+++ httpd-2.4.39/acinclude.m4
|
||||||
@@ -45,6 +45,7 @@
|
@@ -45,6 +45,7 @@
|
||||||
APACHE_SUBST(installbuilddir)
|
APACHE_SUBST(installbuilddir)
|
||||||
APACHE_SUBST(runtimedir)
|
APACHE_SUBST(runtimedir)
|
||||||
@ -21,8 +23,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
|
|||||||
])
|
])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
--- httpd-2.4.38/config.layout.r1842929+
|
--- httpd-2.4.39/config.layout.r1842929+
|
||||||
+++ httpd-2.4.38/config.layout
|
+++ httpd-2.4.39/config.layout
|
||||||
@@ -29,6 +29,7 @@
|
@@ -29,6 +29,7 @@
|
||||||
includedir: ${prefix}/include
|
includedir: ${prefix}/include
|
||||||
localstatedir: ${prefix}
|
localstatedir: ${prefix}
|
||||||
@ -143,8 +145,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
|
|||||||
logfiledir: ${localstatedir}/log/httpd
|
logfiledir: ${localstatedir}/log/httpd
|
||||||
proxycachedir: ${localstatedir}/cache/httpd
|
proxycachedir: ${localstatedir}/cache/httpd
|
||||||
</Layout>
|
</Layout>
|
||||||
--- httpd-2.4.38/configure.in.r1842929+
|
--- httpd-2.4.39/configure.in.r1842929+
|
||||||
+++ httpd-2.4.38/configure.in
|
+++ httpd-2.4.39/configure.in
|
||||||
@@ -41,7 +41,7 @@
|
@@ -41,7 +41,7 @@
|
||||||
AC_PREFIX_DEFAULT(/usr/local/apache2)
|
AC_PREFIX_DEFAULT(/usr/local/apache2)
|
||||||
|
|
||||||
@ -154,8 +156,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
|
|||||||
|
|
||||||
dnl reparse the configure arguments.
|
dnl reparse the configure arguments.
|
||||||
APR_PARSE_ARGUMENTS
|
APR_PARSE_ARGUMENTS
|
||||||
--- httpd-2.4.38/include/ap_config_layout.h.in.r1842929+
|
--- httpd-2.4.39/include/ap_config_layout.h.in.r1842929+
|
||||||
+++ httpd-2.4.38/include/ap_config_layout.h.in
|
+++ httpd-2.4.39/include/ap_config_layout.h.in
|
||||||
@@ -60,5 +60,7 @@
|
@@ -60,5 +60,7 @@
|
||||||
#define DEFAULT_REL_LOGFILEDIR "@rel_logfiledir@"
|
#define DEFAULT_REL_LOGFILEDIR "@rel_logfiledir@"
|
||||||
#define DEFAULT_EXP_PROXYCACHEDIR "@exp_proxycachedir@"
|
#define DEFAULT_EXP_PROXYCACHEDIR "@exp_proxycachedir@"
|
||||||
@ -164,8 +166,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
|
|||||||
+#define DEFAULT_REL_STATEDIR "@rel_statedir@"
|
+#define DEFAULT_REL_STATEDIR "@rel_statedir@"
|
||||||
|
|
||||||
#endif /* AP_CONFIG_LAYOUT_H */
|
#endif /* AP_CONFIG_LAYOUT_H */
|
||||||
--- httpd-2.4.38/include/http_config.h.r1842929+
|
--- httpd-2.4.39/include/http_config.h.r1842929+
|
||||||
+++ httpd-2.4.38/include/http_config.h
|
+++ httpd-2.4.39/include/http_config.h
|
||||||
@@ -757,6 +757,14 @@
|
@@ -757,6 +757,14 @@
|
||||||
*/
|
*/
|
||||||
AP_DECLARE(char *) ap_runtime_dir_relative(apr_pool_t *p, const char *fname);
|
AP_DECLARE(char *) ap_runtime_dir_relative(apr_pool_t *p, const char *fname);
|
||||||
@ -181,8 +183,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
|
|||||||
/* Finally, the hook for dynamically loading modules in... */
|
/* Finally, the hook for dynamically loading modules in... */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
--- httpd-2.4.38/Makefile.in.r1842929+
|
--- httpd-2.4.39/Makefile.in.r1842929+
|
||||||
+++ httpd-2.4.38/Makefile.in
|
+++ httpd-2.4.39/Makefile.in
|
||||||
@@ -213,6 +213,7 @@
|
@@ -213,6 +213,7 @@
|
||||||
install-other:
|
install-other:
|
||||||
@test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
|
@test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
|
||||||
@ -191,8 +193,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
|
|||||||
@for ext in dll x; do \
|
@for ext in dll x; do \
|
||||||
file=apachecore.$$ext; \
|
file=apachecore.$$ext; \
|
||||||
if test -f $$file; then \
|
if test -f $$file; then \
|
||||||
--- httpd-2.4.38/modules/dav/fs/mod_dav_fs.c.r1842929+
|
--- httpd-2.4.39/modules/dav/fs/mod_dav_fs.c.r1842929+
|
||||||
+++ httpd-2.4.38/modules/dav/fs/mod_dav_fs.c
|
+++ httpd-2.4.39/modules/dav/fs/mod_dav_fs.c
|
||||||
@@ -29,6 +29,10 @@
|
@@ -29,6 +29,10 @@
|
||||||
|
|
||||||
extern module AP_MODULE_DECLARE_DATA dav_fs_module;
|
extern module AP_MODULE_DECLARE_DATA dav_fs_module;
|
||||||
@ -204,22 +206,43 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
|
|||||||
const char *dav_get_lockdb_path(const request_rec *r)
|
const char *dav_get_lockdb_path(const request_rec *r)
|
||||||
{
|
{
|
||||||
dav_fs_server_conf *conf;
|
dav_fs_server_conf *conf;
|
||||||
@@ -39,7 +43,11 @@
|
@@ -57,6 +61,24 @@
|
||||||
|
return newconf;
|
||||||
static void *dav_fs_create_server_config(apr_pool_t *p, server_rec *s)
|
|
||||||
{
|
|
||||||
- return apr_pcalloc(p, sizeof(dav_fs_server_conf));
|
|
||||||
+ dav_fs_server_conf *conf = apr_pcalloc(p, sizeof(dav_fs_server_conf));
|
|
||||||
+
|
|
||||||
+ conf->lockdb_path = ap_state_dir_relative(p, DEFAULT_DAV_LOCKDB);
|
|
||||||
+
|
|
||||||
+ return conf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *dav_fs_merge_server_config(apr_pool_t *p,
|
+static apr_status_t dav_fs_post_config(apr_pool_t *p, apr_pool_t *plog,
|
||||||
--- httpd-2.4.38/modules/md/mod_md_config.c.r1842929+
|
+ apr_pool_t *ptemp, server_rec *base_server)
|
||||||
+++ httpd-2.4.38/modules/md/mod_md_config.c
|
+{
|
||||||
@@ -54,10 +54,14 @@
|
+ server_rec *s;
|
||||||
|
+
|
||||||
|
+ for (s = base_server; s; s = s->next) {
|
||||||
|
+ dav_fs_server_conf *conf;
|
||||||
|
+
|
||||||
|
+ conf = ap_get_module_config(s->module_config, &dav_fs_module);
|
||||||
|
+
|
||||||
|
+ if (!conf->lockdb_path) {
|
||||||
|
+ conf->lockdb_path = ap_state_dir_relative(p, DEFAULT_DAV_LOCKDB);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return OK;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Command handler for the DAVLockDB directive, which is TAKE1
|
||||||
|
*/
|
||||||
|
@@ -87,6 +109,8 @@
|
||||||
|
|
||||||
|
static void register_hooks(apr_pool_t *p)
|
||||||
|
{
|
||||||
|
+ ap_hook_post_config(dav_fs_post_config, NULL, NULL, APR_HOOK_MIDDLE);
|
||||||
|
+
|
||||||
|
dav_hook_gather_propsets(dav_fs_gather_propsets, NULL, NULL,
|
||||||
|
APR_HOOK_MIDDLE);
|
||||||
|
dav_hook_find_liveprop(dav_fs_find_liveprop, NULL, NULL, APR_HOOK_MIDDLE);
|
||||||
|
--- httpd-2.4.39/modules/md/mod_md_config.c.r1842929+
|
||||||
|
+++ httpd-2.4.39/modules/md/mod_md_config.c
|
||||||
|
@@ -54,10 +54,18 @@
|
||||||
|
|
||||||
#define DEF_VAL (-1)
|
#define DEF_VAL (-1)
|
||||||
|
|
||||||
@ -231,20 +254,29 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
|
|||||||
static md_mod_conf_t defmc = {
|
static md_mod_conf_t defmc = {
|
||||||
NULL,
|
NULL,
|
||||||
- "md",
|
- "md",
|
||||||
+ NULL,
|
+#if 1
|
||||||
|
+ NULL, /* apply default state-dir-relative */
|
||||||
|
+#else
|
||||||
|
+ MD_DEFAULT_BASE_DIR,
|
||||||
|
+#endif
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
80,
|
80,
|
||||||
@@ -112,6 +116,7 @@
|
@@ -864,6 +872,12 @@
|
||||||
memcpy(mod_md_config, &defmc, sizeof(*mod_md_config));
|
if (mc->hsts_max_age > 0) {
|
||||||
mod_md_config->mds = apr_array_make(pool, 5, sizeof(const md_t *));
|
mc->hsts_header = apr_psprintf(p, "max-age=%d", mc->hsts_max_age);
|
||||||
mod_md_config->unused_names = apr_array_make(pool, 5, sizeof(const md_t *));
|
|
||||||
+ mod_md_config->base_dir = ap_state_dir_relative(pool, MD_DEFAULT_BASE_DIR);
|
|
||||||
|
|
||||||
apr_pool_cleanup_register(pool, NULL, cleanup_mod_config, apr_pool_cleanup_null);
|
|
||||||
}
|
}
|
||||||
--- httpd-2.4.38/server/core.c.r1842929+
|
+
|
||||||
+++ httpd-2.4.38/server/core.c
|
+#if 1
|
||||||
|
+ if (mc->base_dir == NULL) {
|
||||||
|
+ mc->base_dir = ap_state_dir_relative(p, MD_DEFAULT_BASE_DIR);
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
return APR_SUCCESS;
|
||||||
|
}
|
||||||
|
--- httpd-2.4.39/server/core.c.r1842929+
|
||||||
|
+++ httpd-2.4.39/server/core.c
|
||||||
@@ -129,6 +129,8 @@
|
@@ -129,6 +129,8 @@
|
||||||
AP_DECLARE_DATA int ap_run_mode = AP_SQ_RM_UNKNOWN;
|
AP_DECLARE_DATA int ap_run_mode = AP_SQ_RM_UNKNOWN;
|
||||||
AP_DECLARE_DATA int ap_config_generation = 0;
|
AP_DECLARE_DATA int ap_config_generation = 0;
|
||||||
@ -254,7 +286,25 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
|
|||||||
static void *create_core_dir_config(apr_pool_t *a, char *dir)
|
static void *create_core_dir_config(apr_pool_t *a, char *dir)
|
||||||
{
|
{
|
||||||
core_dir_config *conf;
|
core_dir_config *conf;
|
||||||
@@ -3104,6 +3106,24 @@
|
@@ -1409,12 +1411,15 @@
|
||||||
|
return res_buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int reset_config_defines(void *dummy)
|
||||||
|
+/* pconf cleanup - clear global variables set from config here. */
|
||||||
|
+static apr_status_t reset_config(void *dummy)
|
||||||
|
{
|
||||||
|
ap_server_config_defines = saved_server_config_defines;
|
||||||
|
saved_server_config_defines = NULL;
|
||||||
|
server_config_defined_vars = NULL;
|
||||||
|
- return OK;
|
||||||
|
+ core_state_dir = NULL;
|
||||||
|
+
|
||||||
|
+ return APR_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -3113,6 +3118,24 @@
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,7 +329,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
|
|||||||
static const char *set_timeout(cmd_parms *cmd, void *dummy, const char *arg)
|
static const char *set_timeout(cmd_parms *cmd, void *dummy, const char *arg)
|
||||||
{
|
{
|
||||||
const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_CONTEXT);
|
const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_CONTEXT);
|
||||||
@@ -4398,6 +4418,8 @@
|
@@ -4407,6 +4430,8 @@
|
||||||
"Common directory of server-related files (logs, confs, etc.)"),
|
"Common directory of server-related files (logs, confs, etc.)"),
|
||||||
AP_INIT_TAKE1("DefaultRuntimeDir", set_runtime_dir, NULL, RSRC_CONF | EXEC_ON_READ,
|
AP_INIT_TAKE1("DefaultRuntimeDir", set_runtime_dir, NULL, RSRC_CONF | EXEC_ON_READ,
|
||||||
"Common directory for run-time files (shared memory, locks, etc.)"),
|
"Common directory for run-time files (shared memory, locks, etc.)"),
|
||||||
@ -288,15 +338,17 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
|
|||||||
AP_INIT_TAKE1("ErrorLog", set_server_string_slot,
|
AP_INIT_TAKE1("ErrorLog", set_server_string_slot,
|
||||||
(void *)APR_OFFSETOF(server_rec, error_fname), RSRC_CONF,
|
(void *)APR_OFFSETOF(server_rec, error_fname), RSRC_CONF,
|
||||||
"The filename of the error log"),
|
"The filename of the error log"),
|
||||||
@@ -4927,6 +4949,7 @@
|
@@ -4934,8 +4959,7 @@
|
||||||
|
|
||||||
|
if (!saved_server_config_defines)
|
||||||
|
init_config_defines(pconf);
|
||||||
|
- apr_pool_cleanup_register(pconf, NULL, reset_config_defines,
|
||||||
|
- apr_pool_cleanup_null);
|
||||||
|
+ apr_pool_cleanup_register(pconf, NULL, reset_config, apr_pool_cleanup_null);
|
||||||
|
|
||||||
ap_regcomp_set_default_cflags(AP_REG_DOLLAR_ENDONLY);
|
ap_regcomp_set_default_cflags(AP_REG_DOLLAR_ENDONLY);
|
||||||
|
|
||||||
mpm_common_pre_config(pconf);
|
@@ -5163,6 +5187,27 @@
|
||||||
+ core_state_dir = NULL;
|
|
||||||
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
@@ -5150,6 +5173,27 @@
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -13,7 +13,7 @@
|
|||||||
Summary: Apache HTTP Server
|
Summary: Apache HTTP Server
|
||||||
Name: httpd
|
Name: httpd
|
||||||
Version: 2.4.39
|
Version: 2.4.39
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
URL: https://httpd.apache.org/
|
URL: https://httpd.apache.org/
|
||||||
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
|
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
|
||||||
Source1: index.html
|
Source1: index.html
|
||||||
@ -63,7 +63,7 @@ Patch3: httpd-2.4.1-deplibs.patch
|
|||||||
# Needed for socket activation and mod_systemd patch
|
# Needed for socket activation and mod_systemd patch
|
||||||
Patch19: httpd-2.4.25-detect-systemd.patch
|
Patch19: httpd-2.4.25-detect-systemd.patch
|
||||||
# Features/functional changes
|
# Features/functional changes
|
||||||
Patch21: httpd-2.4.37-r1842929+.patch
|
Patch21: httpd-2.4.39-r1842929+.patch
|
||||||
Patch23: httpd-2.4.33-export.patch
|
Patch23: httpd-2.4.33-export.patch
|
||||||
Patch24: httpd-2.4.1-corelimit.patch
|
Patch24: httpd-2.4.1-corelimit.patch
|
||||||
Patch25: httpd-2.4.25-selinux.patch
|
Patch25: httpd-2.4.25-selinux.patch
|
||||||
@ -737,6 +737,9 @@ exit $rv
|
|||||||
%{_rpmconfigdir}/macros.d/macros.httpd
|
%{_rpmconfigdir}/macros.d/macros.httpd
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 12 2019 Joe Orton <jorton@redhat.com> - 2.4.39-5
|
||||||
|
- fixes for StateDir directive (upstream r1857731, r1857731)
|
||||||
|
|
||||||
* Thu May 02 2019 Lubos Uhliarik <luhliari@redhat.com> - 2.4.39-4
|
* Thu May 02 2019 Lubos Uhliarik <luhliari@redhat.com> - 2.4.39-4
|
||||||
- httpd dependency on initscripts is unspecified (#1705188)
|
- httpd dependency on initscripts is unspecified (#1705188)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user