From a62c50b2bed51e40a7f697199a6ab02bc166de69 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Oct 01 2012 07:17:09 +0000 Subject: use systemctl from apachectl (#842736) --- diff --git a/httpd-2.4.3-apctl-systemd.patch b/httpd-2.4.3-apctl-systemd.patch new file mode 100644 index 0000000..013202a --- /dev/null +++ b/httpd-2.4.3-apctl-systemd.patch @@ -0,0 +1,42 @@ +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 ++ 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.spec b/httpd.spec index 4ebd149..67274ef 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: 6%{?dist} URL: http://httpd.apache.org/ Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 Source1: index.html @@ -41,6 +41,7 @@ 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 @@ -154,6 +155,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 @@ -580,6 +582,9 @@ rm -rf $RPM_BUILD_ROOT %{_sysconfdir}/rpm/macros.httpd %changelog +* Mon Oct 01 2012 Jan Kaluza - 2.4.3-6 +- use systemctl from apachectl (#842736) + * Wed Sep 19 2012 Joe Orton - 2.4.3-5 - fix some error log spam with graceful-stop (r1387633) - minor mod_systemd tweaks