summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-01-20 14:05:34 +0100
committerRemi Collet <fedora@famillecollet.com>2015-01-20 14:05:34 +0100
commitbe843181462f8133c2de3b1f02ab7c6f8b427210 (patch)
tree41bb549741ec9f73a2bfcdbd893d28461c278b20
parentf616a33ccdc55e0dea37aa1bd1737a0a96151293 (diff)
php55-php: fix php-fpm.service.d location
-rw-r--r--php-fpm.service3
-rw-r--r--php-fpm.sysconfig12
-rw-r--r--php.spec15
3 files changed, 25 insertions, 5 deletions
diff --git a/php-fpm.service b/php-fpm.service
index 41f6bfe..05fc52d 100644
--- a/php-fpm.service
+++ b/php-fpm.service
@@ -1,6 +1,7 @@
# 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/php-fpm.service".
+# best way is to drop a file with the suffix .conf in
+# /etc/systemd/system/php-fpm.service.d
[Unit]
Description=The PHP FastCGI Process Manager
diff --git a/php-fpm.sysconfig b/php-fpm.sysconfig
index 72096da..4099ed6 100644
--- a/php-fpm.sysconfig
+++ b/php-fpm.sysconfig
@@ -1,2 +1,14 @@
# Additional environment file for php-fpm
+# This file is deprecated when systemd is used and
+# will be removed in the future
+
+# With systemd >= 204 you can simply drop a file with the
+# suffix .conf in /etc/systemd/system/php-fpm.service.d, with
+# [Service]
+# Environment=FOO=bar
+
+# See systemd documentation.
+# man systemd.unit
+# man systemd.exec
+
diff --git a/php.spec b/php.spec
index ae6609f..2ebe7a1 100644
--- a/php.spec
+++ b/php.spec
@@ -132,7 +132,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: %{?scl_prefix}php
Version: 5.5.21
-Release: 0.1.RC1%{?dist}
+Release: 0.2.RC1%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -1324,11 +1324,12 @@ mv $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf.default .
install -m 755 -d $RPM_BUILD_ROOT%{_unitdir}
install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/%{?scl_prefix}php-fpm.service
sed -e 's:/run:%{_localstatedir}/run:' \
- -e 's:/etc:%{_sysconfdir}:' \
+ -e 's:/etc/sysconfig:%{_sysconfdir}/sysconfig:' \
+ -e 's:php-fpm.service:%{?scl_prefix}php-fpm.service:' \
-e 's:/usr/sbin:%{_sbindir}:' \
-i $RPM_BUILD_ROOT%{_unitdir}/%{?scl_prefix}php-fpm.service
# this folder requires systemd >= 204
-install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/%{?scl_prefix}php-fpm.service.d
+install -m 755 -d $RPM_BUILD_ROOT%{_root_sysconfdir}/systemd/system/%{?scl_prefix}php-fpm.service.d
%else
# Service
install -m 755 -d $RPM_BUILD_ROOT%{_root_initddir}
@@ -1348,9 +1349,12 @@ install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_root_sysconfdir}/logrotate.d/%{?scl_
sed -e 's:/run:%{_localstatedir}/run:' \
-e 's:/var/log:%{_localstatedir}/log:' \
-i $RPM_BUILD_ROOT%{_root_sysconfdir}/logrotate.d/%{?scl_prefix}php-fpm
+
# Environment file
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm
+sed -e 's:php-fpm.service:%{?scl_prefix}php-fpm.service:' \
+ -i $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm
# Fix the link
(cd $RPM_BUILD_ROOT%{_bindir}; ln -sfn phar.phar phar)
@@ -1635,7 +1639,7 @@ fi
# %{_prefix}/lib/tmpfiles.d/php-fpm.conf
%if %{with_systemd}
%{_unitdir}/%{?scl_prefix}php-fpm.service
-%dir %{_sysconfdir}/systemd/system/%{?scl_prefix}php-fpm.service.d
+%dir %{_root_sysconfdir}/systemd/system/%{?scl_prefix}php-fpm.service.d
%else
%{_root_initddir}/%{?scl_prefix}php-fpm
%endif
@@ -1727,6 +1731,9 @@ fi
%changelog
+* Tue Jan 20 2015 Remi Collet <rcollet@redhat.com> 5.5.21-0.2.RC1
+- fix php-fpm.service.d location
+
* Thu Jan 8 2015 Remi Collet <remi@fedoraproject.org> 5.5.21-0.1.RC1
- update to 5.5.21RC1