From 3aad8e0ac5256cafbdaeaa17653e700ba8ead0a9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 5 Oct 2012 18:48:49 +0200 Subject: httpd: sync with rawhide --- httpd-2.4.2-icons.patch | 3 ++- httpd-2.4.2-r1387633.patch | 23 ------------------- httpd-2.4.3-apctl-systemd.patch | 45 +++++++++++++++++++++++++++++++++++++ httpd-2.4.3-mod_systemd.patch | 2 +- httpd-2.4.3-r1387633+.patch | 27 +++++++++++++++++++++++ httpd-2.4.3-release.patch | 16 -------------- httpd.service | 5 ++--- httpd.spec | 49 ++++++++++++++++++++++++++++++++++------- 8 files changed, 118 insertions(+), 52 deletions(-) delete mode 100644 httpd-2.4.2-r1387633.patch create mode 100644 httpd-2.4.3-apctl-systemd.patch create mode 100644 httpd-2.4.3-r1387633+.patch delete mode 100644 httpd-2.4.3-release.patch diff --git a/httpd-2.4.2-icons.patch b/httpd-2.4.2-icons.patch index 9f26494..1341999 100644 --- a/httpd-2.4.2-icons.patch +++ b/httpd-2.4.2-icons.patch @@ -1,8 +1,9 @@ - Fix config for /icons/ dir to allow symlink to poweredby.png. - - Avoid using coredump GIF for a directory called "core" +Upstream-Status: vendor specific patch + --- httpd-2.4.2/docs/conf/extra/httpd-autoindex.conf.in.icons +++ httpd-2.4.2/docs/conf/extra/httpd-autoindex.conf.in @@ -21,7 +21,7 @@ IndexOptions FancyIndexing HTMLTable Ver diff --git a/httpd-2.4.2-r1387633.patch b/httpd-2.4.2-r1387633.patch deleted file mode 100644 index 3fc0143..0000000 --- a/httpd-2.4.2-r1387633.patch +++ /dev/null @@ -1,23 +0,0 @@ -# ./pullrev.sh 1387633 - -http://svn.apache.org/viewvc?view=revision&revision=1387633 - ---- httpd-2.4.2/server/mpm/prefork/prefork.c -+++ httpd-2.4.2/server/mpm/prefork/prefork.c -@@ -564,8 +564,14 @@ - - status = apr_pollset_add(pollset, &pfd); - if (status != APR_SUCCESS) { -- ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf, APLOGNO(00157) -- "Couldn't add listener to pollset; check system or user limits"); -+ /* If the child processed a SIGWINCH before setting up the -+ * pollset, this error path is expected and harmless, -+ * since the listener fd was already closed; so don't -+ * pollute the logs in that case. */ -+ if (!die_now) { -+ ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf, APLOGNO(00157) -+ "Couldn't add listener to pollset; check system or user limits"); -+ } - clean_child_exit(APEXIT_CHILDSICK); - } - diff --git a/httpd-2.4.3-apctl-systemd.patch b/httpd-2.4.3-apctl-systemd.patch new file mode 100644 index 0000000..bcb57fe --- /dev/null +++ b/httpd-2.4.3-apctl-systemd.patch @@ -0,0 +1,45 @@ + +Upstream-Status: vendor specific patch + +diff --git a/support/apachectl.in b/support/apachectl.in +index c6ac3ea..2599386 100644 +--- a/support/apachectl.in ++++ b/support/apachectl.in +@@ -100,9 +100,24 @@ fi + ERROR=$? + } + ++if [ "x$2" != "x" ] ; then ++ echo Passing arguments to httpd using apachectl is no longer supported. ++ echo You can only start/stop/restart httpd using this script. ++ echo If you want to pass extra arguments to httpd, edit the ++ echo /etc/sysconfig/httpd config file. ++fi ++ + case $ACMD in +-start|stop|restart|graceful|graceful-stop) +- $HTTPD $OPTIONS -k $ARGV ++start|stop|restart|status) ++ /usr/bin/systemctl $ACMD httpd.service ++ ERROR=$? ++ ;; ++graceful) ++ /usr/bin/systemctl restart httpd.service ++ ERROR=$? ++ ;; ++graceful-stop) ++ /usr/bin/systemctl stop httpd.service + ERROR=$? + ;; + startssl|sslstart|start-SSL) +@@ -114,10 +129,6 @@ startssl|sslstart|start-SSL) + configtest) + testconfig + ;; +-status) +- checklynx +- $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } ' +- ;; + fullstatus) + checklynx + $LYNX $STATUSURL diff --git a/httpd-2.4.3-mod_systemd.patch b/httpd-2.4.3-mod_systemd.patch index 701234e..a9b1fd9 100644 --- a/httpd-2.4.3-mod_systemd.patch +++ b/httpd-2.4.3-mod_systemd.patch @@ -8,7 +8,7 @@ +APACHE_MODULE(systemd, Systemd support, , , $unixd_mods_enabled, [ + AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon") + AC_CHECK_HEADERS(systemd/sd-daemon.h, [ap_HAVE_SD_DAEMON_H="yes"], [ap_HAVE_SD_DAEMON_H="no"]) -+ if test $ap_HAVE_SD_DAEMON_H = "no" || test -z "${LUA_LIBS}"; then ++ if test $ap_HAVE_SD_DAEMON_H = "no" || test -z "${SYSTEMD_LIBS}"; then + AC_MSG_WARN([Your system does not support systemd.]) + enable_systemd="no" + else diff --git a/httpd-2.4.3-r1387633+.patch b/httpd-2.4.3-r1387633+.patch new file mode 100644 index 0000000..b09b338 --- /dev/null +++ b/httpd-2.4.3-r1387633+.patch @@ -0,0 +1,27 @@ +# ./pullrev.sh 1387633 1392850 + +http://svn.apache.org/viewvc?view=revision&revision=1387633 +http://svn.apache.org/viewvc?view=revision&revision=1392850 + +--- httpd-2.4.3/server/mpm/prefork/prefork.c ++++ httpd-2.4.3/server/mpm/prefork/prefork.c +@@ -564,9 +564,16 @@ + + status = apr_pollset_add(pollset, &pfd); + if (status != APR_SUCCESS) { +- ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf, APLOGNO(00157) +- "Couldn't add listener to pollset; check system or user limits"); +- clean_child_exit(APEXIT_CHILDSICK); ++ /* If the child processed a SIGWINCH before setting up the ++ * pollset, this error path is expected and harmless, ++ * since the listener fd was already closed; so don't ++ * pollute the logs in that case. */ ++ if (!die_now) { ++ ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf, APLOGNO(00157) ++ "Couldn't add listener to pollset; check system or user limits"); ++ clean_child_exit(APEXIT_CHILDSICK); ++ } ++ clean_child_exit(0); + } + + lr->accept_func = ap_unixd_accept; diff --git a/httpd-2.4.3-release.patch b/httpd-2.4.3-release.patch deleted file mode 100644 index 0b2fb77..0000000 --- a/httpd-2.4.3-release.patch +++ /dev/null @@ -1,16 +0,0 @@ - -Upstream-HEAD: vendor -Upstream-2.0: vendor -Upstream-Status: vendor-specific change - ---- httpd-2.4.3/server/core.c.release -+++ httpd-2.4.3/server/core.c -@@ -3189,7 +3189,7 @@ static void set_banner(apr_pool_t *pconf - ap_add_version_component(pconf, AP_SERVER_BASEPRODUCT "/" AP_SERVER_MAJORVERSION); - } - else { -- ap_add_version_component(pconf, AP_SERVER_BASEVERSION " (" PLATFORM ")"); -+ ap_add_version_component(pconf, AP_SERVER_BASEVERSION " (@RELEASE@)"); - } - - /* diff --git a/httpd.service b/httpd.service index 0e9f0c0..b176a92 100644 --- a/httpd.service +++ b/httpd.service @@ -3,10 +3,9 @@ Description=The Apache HTTP Server After=network.target remote-fs.target nss-lookup.target [Service] -Type=forking -PIDFile=/run/httpd/httpd.pid +Type=notify EnvironmentFile=/etc/sysconfig/httpd -ExecStart=/usr/sbin/httpd $OPTIONS +ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND ExecReload=/usr/sbin/httpd $OPTIONS -k graceful ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop PrivateTmp=true diff --git a/httpd.spec b/httpd.spec index 28cb47f..9daa7f8 100644 --- a/httpd.spec +++ b/httpd.spec @@ -8,7 +8,7 @@ Summary: Apache HTTP Server Name: httpd Version: 2.4.3 -Release: 5%{?dist} +Release: 10%{?dist} URL: http://httpd.apache.org/ Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 Source1: index.html @@ -41,8 +41,8 @@ Patch1: httpd-2.4.1-apctl.patch Patch2: httpd-2.4.3-apxs.patch Patch3: httpd-2.4.1-deplibs.patch Patch5: httpd-2.4.3-layout.patch +Patch6: httpd-2.4.3-apctl-systemd.patch # Features/functional changes -Patch20: httpd-2.4.3-release.patch Patch23: httpd-2.4.1-export.patch Patch24: httpd-2.4.1-corelimit.patch Patch25: httpd-2.4.1-selinux.patch @@ -52,7 +52,7 @@ Patch28: httpd-2.4.2-r1332643+.patch Patch29: httpd-2.4.3-mod_systemd.patch # Bug fixes Patch50: httpd-2.4.2-r1374214+.patch -Patch51: httpd-2.4.2-r1387633.patch +Patch51: httpd-2.4.3-r1387633+.patch License: ASL 2.0 Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -154,6 +154,7 @@ authentication to the Apache HTTP Server. %patch2 -p1 -b .apxs %patch3 -p1 -b .deplibs %patch5 -p1 -b .layout +%patch6 -p1 -b .apctlsystemd %patch23 -p1 -b .export %patch24 -p1 -b .corelimit @@ -166,8 +167,8 @@ authentication to the Apache HTTP Server. %patch50 -p1 -b .r1374214+ %patch51 -p1 -b .r1387633 -# Patch in vendor/release string -sed "s/@RELEASE@/%{vstring}/" < %{PATCH20} | patch --fuzz=%{_default_patch_fuzz} -p1 +# Patch in the vendor string +sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h # Prevent use of setcap in "install-suexec-caps" target. sed -i '/suexec/s,setcap ,echo Skipping setcap for ,' Makefile.in @@ -396,21 +397,33 @@ rm -rf $RPM_BUILD_ROOT/etc/httpd/conf/{original,extra} -s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || : %post +%if 0%{?systemd_post:1} +%systemd_post httpd.service +%else # Register the httpd service if [ $1 -eq 1 ] ; then # Initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi +%endif %preun +%if 0%{?systemd_preun:1} +%systemd_preun httpd.service +%else if [ $1 -eq 0 ] ; then # Package removal, not upgrade - /bin/systemctl --no-reload disable %{all_services} > /dev/null 2>&1 || : - /bin/systemctl stop %{all_services} > /dev/null 2>&1 || : + /bin/systemctl --no-reload disable httpd.service > /dev/null 2>&1 || : + /bin/systemctl stop httpd.service > /dev/null 2>&1 || : fi +%endif %postun +%if 0%{?systemd_postun:1} +%systemd_postun +%else /bin/systemctl daemon-reload >/dev/null 2>&1 || : +%endif # Trigger for conversion from SysV, per guidelines at: # https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd @@ -424,7 +437,8 @@ fi /sbin/chkconfig --del httpd >/dev/null 2>&1 || : %posttrans -/bin/systemctl try-restart httpd.service >/dev/null 2>&1 || : +test -f /etc/sysconfig/httpd-disable-posttrans || \ + /bin/systemctl try-restart httpd.service >/dev/null 2>&1 || : %define sslcert %{_sysconfdir}/pki/tls/certs/localhost.crt %define sslkey %{_sysconfdir}/pki/tls/private/localhost.key @@ -580,6 +594,25 @@ rm -rf $RPM_BUILD_ROOT %{_sysconfdir}/rpm/macros.httpd %changelog +* Fri Oct 5 2012 Remi Collet - 2.4.3-10 +- sync with rawhide, rebuild for remi repo + +* Wed Oct 3 2012 Joe Orton - 2.4.3-10 +- pull upstream patch r1392850 in addition to r1387633 + +* Mon Oct 1 2012 Joe Orton - 2.4.3-9 +- define PLATFORM in os.h using vendor string + +* Mon Oct 1 2012 Joe Orton - 2.4.3-8 +- use systemd script unconditionally (#850149) + +* Mon Oct 1 2012 Joe Orton - 2.4.3-7 +- use systemd scriptlets if available (#850149) +- don't run posttrans restart if /etc/sysconfig/httpd-disable-posttrans exists + +* Mon Oct 01 2012 Jan Kaluza - 2.4.3-6 +- use systemctl from apachectl (#842736) + * Thu Sep 20 2012 Remi Collet - 2.4.3-5 - sync with rawhide, rebuild for remi repo -- cgit