use serverroot-relative statedir, rundir by default

This commit is contained in:
Joe Orton 2019-02-05 12:11:27 +00:00
parent 887d8d1a45
commit 80cf4174c6
4 changed files with 65 additions and 24 deletions

24
config.layout Normal file
View File

@ -0,0 +1,24 @@
# Layout used in Fedora httpd packaging.
<Layout Fedora>
prefix: /etc/httpd
localstatedir: /var
exec_prefix: /usr
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/sbin
libdir: ${exec_prefix}/lib
libexecdir: ${exec_prefix}/libexec
mandir: ${exec_prefix}/man
sysconfdir: /etc/httpd/conf
datadir: ${exec_prefix}/share/httpd
installbuilddir: ${libdir}/httpd/build
errordir: ${datadir}/error
iconsdir: ${datadir}/icons
htdocsdir: ${localstatedir}/www/html
manualdir: ${datadir}/manual
cgidir: ${localstatedir}/www/cgi-bin
includedir: ${exec_prefix}/include/httpd
runtimedir: ${prefix}/run
logfiledir: ${localstatedir}/log/httpd
statedir: ${prefix}/state
proxycachedir: ${localstatedir}/cache/httpd/proxy
</Layout>

View File

@ -1,9 +1,10 @@
# ./pullrev.sh 1842929 1842931 # ./pullrev.sh 1842929 1842931
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
--- httpd-2.4.37/acinclude.m4.r1842929+ --- httpd-2.4.38/acinclude.m4.r1842929+
+++ httpd-2.4.37/acinclude.m4 +++ httpd-2.4.38/acinclude.m4
@@ -45,6 +45,7 @@ @@ -45,6 +45,7 @@
APACHE_SUBST(installbuilddir) APACHE_SUBST(installbuilddir)
APACHE_SUBST(runtimedir) APACHE_SUBST(runtimedir)
@ -20,8 +21,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
]) ])
dnl dnl
--- httpd-2.4.37/config.layout.r1842929+ --- httpd-2.4.38/config.layout.r1842929+
+++ httpd-2.4.37/config.layout +++ httpd-2.4.38/config.layout
@@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
includedir: ${prefix}/include includedir: ${prefix}/include
localstatedir: ${prefix} localstatedir: ${prefix}
@ -142,8 +143,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
logfiledir: ${localstatedir}/log/httpd logfiledir: ${localstatedir}/log/httpd
proxycachedir: ${localstatedir}/cache/httpd proxycachedir: ${localstatedir}/cache/httpd
</Layout> </Layout>
--- httpd-2.4.37/configure.in.r1842929+ --- httpd-2.4.38/configure.in.r1842929+
+++ httpd-2.4.37/configure.in +++ httpd-2.4.38/configure.in
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
AC_PREFIX_DEFAULT(/usr/local/apache2) AC_PREFIX_DEFAULT(/usr/local/apache2)
@ -153,8 +154,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
dnl reparse the configure arguments. dnl reparse the configure arguments.
APR_PARSE_ARGUMENTS APR_PARSE_ARGUMENTS
--- httpd-2.4.37/include/ap_config_layout.h.in.r1842929+ --- httpd-2.4.38/include/ap_config_layout.h.in.r1842929+
+++ httpd-2.4.37/include/ap_config_layout.h.in +++ httpd-2.4.38/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@"
@ -163,8 +164,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
+#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.37/include/http_config.h.r1842929+ --- httpd-2.4.38/include/http_config.h.r1842929+
+++ httpd-2.4.37/include/http_config.h +++ httpd-2.4.38/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);
@ -180,8 +181,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
/* Finally, the hook for dynamically loading modules in... */ /* Finally, the hook for dynamically loading modules in... */
/** /**
--- httpd-2.4.37/Makefile.in.r1842929+ --- httpd-2.4.38/Makefile.in.r1842929+
+++ httpd-2.4.37/Makefile.in +++ httpd-2.4.38/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)
@ -190,8 +191,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
@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.37/modules/dav/fs/mod_dav_fs.c.r1842929+ --- httpd-2.4.38/modules/dav/fs/mod_dav_fs.c.r1842929+
+++ httpd-2.4.37/modules/dav/fs/mod_dav_fs.c +++ httpd-2.4.38/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;
@ -216,14 +217,14 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
} }
static void *dav_fs_merge_server_config(apr_pool_t *p, static void *dav_fs_merge_server_config(apr_pool_t *p,
--- httpd-2.4.37/modules/md/mod_md_config.c.r1842929+ --- httpd-2.4.38/modules/md/mod_md_config.c.r1842929+
+++ httpd-2.4.37/modules/md/mod_md_config.c +++ httpd-2.4.38/modules/md/mod_md_config.c
@@ -54,10 +54,14 @@ @@ -54,10 +54,14 @@
#define DEF_VAL (-1) #define DEF_VAL (-1)
+#ifndef MD_DEFAULT_BASE_DIR +#ifndef MD_DEFAULT_BASE_DIR
+#define MD_DEFAULT_BASE_DIR "state/md" +#define MD_DEFAULT_BASE_DIR "md"
+#endif +#endif
+ +
/* Default settings for the global conf */ /* Default settings for the global conf */
@ -242,8 +243,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
apr_pool_cleanup_register(pool, NULL, cleanup_mod_config, apr_pool_cleanup_null); apr_pool_cleanup_register(pool, NULL, cleanup_mod_config, apr_pool_cleanup_null);
} }
--- httpd-2.4.37/server/core.c.r1842929+ --- httpd-2.4.38/server/core.c.r1842929+
+++ httpd-2.4.37/server/core.c +++ httpd-2.4.38/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;
@ -287,7 +288,15 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
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"),
@@ -5150,6 +5172,27 @@ @@ -4927,6 +4949,7 @@
ap_regcomp_set_default_cflags(AP_REG_DOLLAR_ENDONLY);
mpm_common_pre_config(pconf);
+ core_state_dir = NULL;
return OK;
}
@@ -5150,6 +5173,27 @@
} }
} }

View File

@ -13,7 +13,7 @@
Summary: Apache HTTP Server Summary: Apache HTTP Server
Name: httpd Name: httpd
Version: 2.4.38 Version: 2.4.38
Release: 3%{?dist} Release: 4%{?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
@ -56,6 +56,7 @@ Source41: htcacheclean.sysconf
Source42: httpd-init.service Source42: httpd-init.service
Source43: httpd-ssl-gencerts Source43: httpd-ssl-gencerts
Source44: httpd@.service Source44: httpd@.service
Source45: config.layout
# build/scripts patches # build/scripts patches
Patch1: httpd-2.4.1-apctl.patch Patch1: httpd-2.4.1-apctl.patch
Patch2: httpd-2.4.9-apxs.patch Patch2: httpd-2.4.9-apxs.patch
@ -257,6 +258,9 @@ if test "x${vmmn}" != "x%{mmn}"; then
exit 1 exit 1
fi fi
# Provide default layout
cp $RPM_SOURCE_DIR/config.layout .
sed ' sed '
s,@MPM@,%{mpm},g s,@MPM@,%{mpm},g
s,@DOCROOT@,%{docroot},g s,@DOCROOT@,%{docroot},g
@ -399,7 +403,7 @@ install -m 644 -p $RPM_SOURCE_DIR/httpd.tmpfiles \
# Other directories # Other directories
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav \ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav \
$RPM_BUILD_ROOT%{_localstatedir}/lib/httpd \ $RPM_BUILD_ROOT%{_localstatedir}/lib/httpd/state \
$RPM_BUILD_ROOT/run/httpd/htcacheclean $RPM_BUILD_ROOT/run/httpd/htcacheclean
# Substitute in defaults which are usually done (badly) by "make install" # Substitute in defaults which are usually done (badly) by "make install"
@ -461,8 +465,9 @@ ln -s ../../pixmaps/poweredby.png \
$RPM_BUILD_ROOT%{contentdir}/icons/poweredby.png $RPM_BUILD_ROOT%{contentdir}/icons/poweredby.png
# symlinks for /etc/httpd # symlinks for /etc/httpd
rmdir $RPM_BUILD_ROOT/etc/httpd/{state,run}
ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs
ln -s ../..%{_localstatedir}/lib/httpd $RPM_BUILD_ROOT/etc/httpd/state ln -s ../..%{_localstatedir}/lib/httpd/state $RPM_BUILD_ROOT/etc/httpd/state
ln -s /run/httpd $RPM_BUILD_ROOT/etc/httpd/run ln -s /run/httpd $RPM_BUILD_ROOT/etc/httpd/run
ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules
@ -729,6 +734,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd %{_rpmconfigdir}/macros.d/macros.httpd
%changelog %changelog
* Tue Feb 5 2019 Joe Orton <jorton@redhat.com> - 2.4.38-4
- use serverroot-relative statedir, rundir by default
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.38-3 * Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.38-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -7,7 +7,7 @@ fi
repo="https://svn.apache.org/repos/asf/httpd/httpd/trunk" repo="https://svn.apache.org/repos/asf/httpd/httpd/trunk"
#repo="https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x" #repo="https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x"
ver=2.4.34 ver=2.4.37
prefix="httpd-${ver}" prefix="httpd-${ver}"
suffix="r$1${2:++}" suffix="r$1${2:++}"
fn="${prefix}-${suffix}.patch" fn="${prefix}-${suffix}.patch"