summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-09-25 15:27:01 +0200
committerRemi Collet <remi@remirepo.net>2017-09-25 15:27:01 +0200
commit4375b924ac70bbbd6f130ecebe8f0c046e8663e5 (patch)
tree23b3830c060d08482206f7bd17426c93abe90b03
parent4801b14874a92e5fdaba2c86915831495833dd79 (diff)
F27: php now requires php-fpm and start it with httpd / nginx
-rw-r--r--php-fpm.wants3
-rw-r--r--php71.spec23
2 files changed, 22 insertions, 4 deletions
diff --git a/php-fpm.wants b/php-fpm.wants
new file mode 100644
index 0000000..5c7c8e4
--- /dev/null
+++ b/php-fpm.wants
@@ -0,0 +1,3 @@
+[Unit]
+Wants=php-fpm.service
+
diff --git a/php71.spec b/php71.spec
index e8c4fc0..205df3b 100644
--- a/php71.spec
+++ b/php71.spec
@@ -134,7 +134,8 @@ Source7: php-fpm.logrotate
Source8: php-fpm.sysconfig
Source9: php.modconf
Source10: php.ztsmodconf
-Source12: php.conf2
+Source11: php.conf2
+Source12: php-fpm.wants
Source13: nginx-fpm.conf
Source14: nginx-php.conf
# Configuration files for some extensions
@@ -233,6 +234,10 @@ Requires(pre): httpd
%endif
# php engine for Apache httpd webserver
Provides: php(httpd)
+%if 0%{?fedora} >= 27
+# httpd have threaded MPM by default
+Requires: php-fpm%{?_isa} = %{version}-%{release}
+%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
# Don't provides extensions, which are not shared library, as .so
@@ -1597,7 +1602,7 @@ cat %{SOURCE10} >>$RPM_BUILD_ROOT%{_httpd_modconfdir}/15-php.conf
install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
%endif
%if %{with_httpd2410}
-cat %{SOURCE12} >>$RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
+cat %{SOURCE11} >>$RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
%endif
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
@@ -1647,8 +1652,11 @@ sed -e 's/^pid/;pid/' \
-i $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf
# this folder requires systemd >= 204
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/php-fpm.service.d
-install -m 755 -d $RPM_BUILD_ROOT%{_unitdir}
-install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/
+install -Dm 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/php-fpm.service
+%if 0%{?fedora} >= 27
+install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/httpd.service.d/php-fpm.conf
+install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/nginx.service.d/php-fpm.conf
+%endif
%else
sed -ne '1,2p' -i $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm
install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/php-fpm
@@ -1962,6 +1970,10 @@ fi
%if %{with_systemd}
%{_prefix}/lib/tmpfiles.d/php-fpm.conf
%{_unitdir}/php-fpm.service
+%if 0%{?fedora} >= 27
+%{_unitdir}/httpd.service.d/%{?scl_prefix}php-fpm.conf
+%{_unitdir}/nginx.service.d/%{?scl_prefix}php-fpm.conf
+%endif
%dir %{_sysconfdir}/systemd/system/php-fpm.service.d
%dir /run/php-fpm
%else
@@ -2044,6 +2056,9 @@ fi
%changelog
+* Mon Sep 25 2017 Remi Collet <remi@remirepo.net> - 7.1.10~RC1-3
+- F27: php now requires php-fpm and start it with httpd / nginx
+
* Thu Sep 14 2017 Remi Collet <remi@remirepo.net> - 7.1.10~RC1-2
- update builder from RHEL 7.3 to RHEL 7.4