From f3797e25505b803a423e937a6e058ff36b49d593 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Jun 05 2017 17:30:59 +0000 Subject: Merge branch 'master' into f26 --- diff --git a/.gitignore b/.gitignore index 62a3130..65aa7f9 100644 --- a/.gitignore +++ b/.gitignore @@ -24,5 +24,5 @@ x86_64 /httpd-2.4.18.tar.bz2 /httpd-2.4.23.tar.bz2 /httpd-2.4.25.tar.bz2 -/httpd.socket.5 -/httpd.service.5 +/httpd.socket.8 +/httpd.service.8 diff --git a/httpd.service b/httpd.service index 5875d9c..1f707e8 100644 --- a/httpd.service +++ b/httpd.service @@ -1,4 +1,4 @@ -# See httpd.service(5) for more information on using the httpd service. +# See httpd.service(8) for more information on using the httpd service. # Modifying this file in-place is not recommended, because changes # will be overwritten during package upgrades. If you want to @@ -15,6 +15,7 @@ [Unit] Description=The Apache HTTP Server After=network.target remote-fs.target nss-lookup.target +Documentation=man:httpd.service(8) [Service] Type=notify diff --git a/httpd.service.xml b/httpd.service.xml index 9524045..d03e133 100644 --- a/httpd.service.xml +++ b/httpd.service.xml @@ -3,6 +3,24 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ ]> + @@ -13,7 +31,7 @@ httpd.service - 5 + 8 @@ -41,6 +59,17 @@ socket-based activation. Most systems will use httpd.service. + The apachectl command has been modified + to invoke systemctl for most uses, so for + example, running apachectl start is equivalent + to running systemctl start httpd.service. This + ensures that the running httpd daemon is tracked and managed by + systemd. In contrast, running + httpd directly from a root shell will start the + service outside of systemd; in this case, + default security restrictions described below (including, but not + limited to, SELinux) will not be enforced. + Changing default behaviour @@ -55,13 +84,12 @@ /etc/systemd/system/httpd.service.d which over-rides the system defaults. - For example, to set the LD_LIBRARY_PATH + For example, to set the environment variable for the daemon, run systemctl edit httpd.service and enter: [Service] Environment=LD_LIBRARY_PATH=/opt/vendor/lib - @@ -76,7 +104,7 @@ Environment=LD_LIBRARY_PATH=/opt/vendor/lib IPv4 or IPv6 address. If httpd is configured to depend on any specific IP - address (for example, with a "Listen" directive), which may only + address (for example, with a "Listen" directive) which may only become available during startup, or if httpd depends on other services (such as a database daemon), the service must be configured to ensure correct @@ -84,7 +112,7 @@ Environment=LD_LIBRARY_PATH=/opt/vendor/lib For example, to ensure httpd is only running after all configured network interfaces are configured, create a drop-in - file (as described above) with the following: + file (as described above) with the following section: [Unit] After=network-online.target @@ -100,7 +128,7 @@ Wants=network-online.target Reloading and stopping the service When running systemctl reload - httpd.service, a "graceful" + httpd.service, a graceful restart is used, which sends a signal to the httpd parent process to reload the configuration and re-open log files. Any children with open connections at the time of reload will @@ -110,7 +138,7 @@ Wants=network-online.target delay before any configuration changes take effect for all users. - Similarly, a "graceful stop" is used + Similarly, a graceful stop is used when systemctl stop httpd.service is run, which terminates the server only once active connections have been processed. @@ -120,7 +148,7 @@ Wants=network-online.target systemd integration and mod_systemd - httpd.service uses the "" systemd + The httpd service uses the systemd service type. The mod_systemd module must be loaded (as in the default configuration) for this to work correctly - the service will fail if this module is not @@ -135,12 +163,12 @@ Wants=network-online.target Security and SELinux The default SELinux policy restricts the httpd service in - various ways. The ports to which httpd can bind (using the - Listen directive), which parts of the - filesystem can be accessed, whether outgoing TCP connections are - possible, are limited by default, for example. Many of these - restrictions can be lifted using SELinux booleans and port - types. See + various ways. For example, the default policy limits the ports + to which httpd can bind (using the Listen + directive), which parts of the filesystem can be accessed, and + whether outgoing TCP connections are possible. Many of these + restrictions can be adjusted using semanage + to change booleans or other types. See httpd_selinux8 for more information. @@ -173,7 +201,8 @@ Wants=network-online.target systemctl1, systemd.service5, systemd.exec5, - httpd_selinux8 + httpd_selinux8, + semanage8 diff --git a/httpd.socket b/httpd.socket index a75779c..074695e 100644 --- a/httpd.socket +++ b/httpd.socket @@ -1,7 +1,8 @@ -# See httpd.socket(5) for more information on using the httpd service. +# See httpd.socket(8) for more information on using the httpd service. [Unit] Description=Apache httpd Server Socket +Documentation=man:httpd.socket(8) [Socket] ListenStream=80 diff --git a/httpd.spec b/httpd.spec index 34ae869..3db2d21 100644 --- a/httpd.spec +++ b/httpd.spec @@ -8,7 +8,7 @@ Summary: Apache HTTP Server Name: httpd Version: 2.4.25 -Release: 9%{?dist} +Release: 10%{?dist} URL: http://httpd.apache.org/ Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 Source1: index.html @@ -439,9 +439,8 @@ install -m 644 -p $RPM_SOURCE_DIR/httpd.logrotate \ $RPM_BUILD_ROOT/etc/logrotate.d/httpd # Install systemd service man pages -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5 -install -m 644 -p httpd.service.5 httpd.socket.5 \ - $RPM_BUILD_ROOT%{_mandir}/man5 +install -m 644 -p httpd.service.8 httpd.socket.8 \ + $RPM_BUILD_ROOT%{_mandir}/man8 # fix man page paths sed -e "s|/usr/local/apache2/conf/httpd.conf|/etc/httpd/conf/httpd.conf|" \ @@ -633,7 +632,6 @@ rm -rf $RPM_BUILD_ROOT %attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd/proxy %{_mandir}/man8/* -%{_mandir}/man5/* %{_unitdir}/*.service %{_unitdir}/*.socket @@ -700,6 +698,9 @@ rm -rf $RPM_BUILD_ROOT %{_rpmconfigdir}/macros.d/macros.httpd %changelog +* Mon Jun 5 2017 Joe Orton - 2.4.25-10 +- move unit man pages to section 8, add as Documentation= in units + * Fri May 19 2017 Joe Orton - 2.4.25-9 - add httpd.service(5) and httpd.socket(5) man pages