diff --git a/httpd.service b/httpd.service index 307666c..52502b8 100644 --- a/httpd.service +++ b/httpd.service @@ -1,10 +1,27 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the best +# way is to create a file "/etc/systemd/system/httpd.service", +# containing +# .include /lib/systemd/system/httpd.service +# ...make your changes here... +# For more info about custom unit files, see +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F + +# For example, to pass additional options (for instance, -D definitions) to the +# httpd binary at startup, you need to create a file named +# "/etc/systemd/system/httpd.service" containing: +# .include /lib/systemd/system/httpd.service +# [Service] +# Environment=OPTIONS=-DMY_DEFINE + [Unit] Description=The Apache HTTP Server After=network.target remote-fs.target nss-lookup.target [Service] Type=notify -EnvironmentFile=/etc/sysconfig/httpd +Environment=LANG=C + ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND ExecReload=/usr/sbin/httpd $OPTIONS -k graceful ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop diff --git a/httpd.spec b/httpd.spec index 20c1ec2..a554921 100644 --- a/httpd.spec +++ b/httpd.spec @@ -14,7 +14,7 @@ Summary: Apache HTTP Server Name: httpd Version: 2.4.4 -Release: 6%{?dist} +Release: 7%{?dist} URL: http://httpd.apache.org/ Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 Source1: index.html @@ -616,6 +616,10 @@ rm -rf $RPM_BUILD_ROOT %{_sysconfdir}/rpm/macros.httpd %changelog +* Fri May 24 2013 Jan Kaluza - 2.4.4-7 +- ignore /etc/sysconfig/httpd and document systemd way of setting env variables + in this file + * Mon May 20 2013 Jan Kaluza - 2.4.4-6 - htpasswd/htdbm: fix hash generation bug (#956344) - do not dump vhosts twice in httpd -S output (#928761) diff --git a/httpd.sysconf b/httpd.sysconf index 1b38411..44a8246 100644 --- a/httpd.sysconf +++ b/httpd.sysconf @@ -1,25 +1,30 @@ # -# This file can be used to set additional environment variables for -# the httpd process, or pass additional options to the httpd -# executable. +# This file is no longer used to configure additional environment variables +# for the httpd process. # +# It has been replaced by systemd. If you want to customize, the best +# way is to create a file "/etc/systemd/system/httpd.service", +# containing +# .include /lib/systemd/system/httpd.service +# ...make your changes here... +# For more info about custom unit files, see +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F + + +# To set OPTIONS environment variable which was set in this file +# in older versions, you need to create a file named +# "/etc/systemd/system/httpd.service" containing: +# .include /lib/systemd/system/httpd.service +# [Service] +# # +# # To pass additional options (for instance, -D definitions) to the +# # httpd binary at startup, set OPTIONS here. +# # +# Environment=OPTIONS=-DMY_DEFINE + # Note: With previous versions of httpd, the MPM could be changed by # editing an "HTTPD" variable here. With the current version, that # variable is now ignored. The MPM is a loadable module, and the # choice of MPM can be changed by editing the configuration file # /etc/httpd/conf.modules.d/00-mpm.conf. -# - # -# To pass additional options (for instance, -D definitions) to the -# httpd binary at startup, set OPTIONS here. -# -#OPTIONS= - -# -# This setting ensures the httpd process is started in the "C" locale -# by default. (Some modules will not behave correctly if -# case-sensitive string comparisons are performed in a different -# locale.) -# -LANG=C