summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-09-25 15:24:19 +0200
committerRemi Collet <remi@remirepo.net>2017-09-25 15:24:19 +0200
commit7d4c56707996b642ac6373599077a6c87962bb0b (patch)
tree0bdf6be5532f4b20f086ba4a6fd939549bef6ab9
parenteeefd950b9eb0619453a2b99a1324e03e158b341 (diff)
F27: php now requires php-fpm and start it with httpd / nginx
-rw-r--r--php-fpm.wants3
-rw-r--r--php72.spec26
2 files changed, 23 insertions, 6 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/php72.spec b/php72.spec
index 673aee8..b3e75cb 100644
--- a/php72.spec
+++ b/php72.spec
@@ -1,4 +1,3 @@
-# remirepo spec file for php 7.2
# with backport stuff, adapted from
#
# Fedora spec file for php
@@ -118,7 +117,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: %{upver}%{?rcver:~%{rcver}}
-Release: 2%{?dist}
+Release: 3%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -139,7 +138,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
@@ -235,6 +235,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
@@ -1663,7 +1667,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
@@ -1713,8 +1717,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
@@ -2029,6 +2036,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
@@ -2111,6 +2122,9 @@ fi
%changelog
+* Mon Sep 25 2017 Remi Collet <remi@remirepo.net> - 7.2.0~RC2-3
+- F27: php now requires php-fpm and start it with httpd / nginx
+
* Thu Sep 14 2017 Remi Collet <remi@remirepo.net> - 7.2.0~RC2-2
- update builder from RHEL 7.3 to RHEL 7.4