From f201a4ebc1cf1111d8a761dc9c0ba6662bd463fb Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Sep 28 2018 07:51:19 +0000 Subject: apachectl: don't read /etc/sysconfig/httpd --- diff --git a/httpd-2.4.3-apctl-systemd.patch b/httpd-2.4.3-apctl-systemd.patch deleted file mode 100644 index c6bf5da..0000000 --- a/httpd-2.4.3-apctl-systemd.patch +++ /dev/null @@ -1,51 +0,0 @@ - -Make apachectl run via systemctl. - -Note: "apachectl graceful" is documented to start httpd if not running. - -Upstream-Status: vendor specific patch - ---- httpd-2.4.18/support/apachectl.in.apctlsystemd -+++ httpd-2.4.18/support/apachectl.in -@@ -100,9 +100,28 @@ 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) -+ if /usr/bin/systemctl -q is-active httpd.service; then -+ /usr/bin/systemctl reload httpd.service -+ else -+ /usr/bin/systemctl start httpd.service -+ fi -+ ERROR=$? -+ ;; -+graceful-stop) -+ /usr/bin/systemctl stop httpd.service - ERROR=$? - ;; - startssl|sslstart|start-SSL) -@@ -114,10 +133,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.34-apctlsystemd.patch b/httpd-2.4.34-apctlsystemd.patch new file mode 100644 index 0000000..996978c --- /dev/null +++ b/httpd-2.4.34-apctlsystemd.patch @@ -0,0 +1,63 @@ + +Make apachectl run via systemctl. + +Note: "apachectl graceful" is documented to start httpd if not running. + +Upstream-Status: vendor specific patch + +--- httpd-2.4.34/support/apachectl.in.apctlsystemd ++++ httpd-2.4.34/support/apachectl.in +@@ -58,11 +58,6 @@ + # have one, then status and fullstatus will not work. + STATUSURL="http://localhost:@PORT@/server-status" + +-# Source /etc/sysconfig/httpd for $HTTPD setting, etc. +-if [ -r /etc/sysconfig/httpd ]; then +- . /etc/sysconfig/httpd +-fi +- + # + # Set this variable to a command that increases the maximum + # number of file descriptors allowed per child process. This is +@@ -100,9 +95,28 @@ + 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 To pass extra arguments to httpd, see the httpd.service(8) ++ echo man page. ++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) ++ if /usr/bin/systemctl -q is-active httpd.service; then ++ /usr/bin/systemctl reload httpd.service ++ else ++ /usr/bin/systemctl start httpd.service ++ fi ++ ERROR=$? ++ ;; ++graceful-stop) ++ /usr/bin/systemctl stop httpd.service + ERROR=$? + ;; + startssl|sslstart|start-SSL) +@@ -114,10 +128,6 @@ + configtest) + testconfig + ;; +-status) +- checklynx +- $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } ' +- ;; + fullstatus) + checklynx + $LYNX $STATUSURL diff --git a/httpd.spec b/httpd.spec index 5d42dca..8938613 100644 --- a/httpd.spec +++ b/httpd.spec @@ -13,7 +13,7 @@ Summary: Apache HTTP Server Name: httpd Version: 2.4.34 -Release: 9%{?dist} +Release: 10%{?dist} URL: https://httpd.apache.org/ Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 Source1: index.html @@ -59,7 +59,7 @@ Patch1: httpd-2.4.1-apctl.patch Patch2: httpd-2.4.9-apxs.patch Patch3: httpd-2.4.1-deplibs.patch Patch4: httpd-2.4.34-layfix.patch -Patch6: httpd-2.4.3-apctl-systemd.patch +Patch6: httpd-2.4.34-apctlsystemd.patch # Needed for socket activation and mod_systemd patch Patch19: httpd-2.4.25-detect-systemd.patch # Features/functional changes @@ -733,6 +733,9 @@ exit $rv %{_rpmconfigdir}/macros.d/macros.httpd %changelog +* Fri Sep 28 2018 Joe Orton - 2.4.34-10 +- apachectl: don't read /etc/sysconfig/httpd + * Tue Sep 25 2018 Joe Orton - 2.4.34-9 - fix build if OpenSSL built w/o SSLv3 support