From de56edf226f421ff4bb89bbdfb971f25cccaf675 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 25 Sep 2017 11:40:05 +0200 Subject: [PATCH] php now requires php-fpm and start it with httpd / nginx --- php-fpm.wants | 3 +++ php.spec | 14 +++++++++++--- php.ztsmodconf | 3 ++- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 php-fpm.wants 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/php.spec b/php.spec index a2636d4..279faae 100644 --- a/php.spec +++ b/php.spec @@ -67,7 +67,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php Version: %{upver}%{?rcver:~%{rcver}} -Release: 1%{?dist} +Release: 2%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -87,6 +87,7 @@ Source6: php-fpm.service Source7: php-fpm.logrotate Source9: php.modconf Source10: php.ztsmodconf +Source12: php-fpm.wants Source13: nginx-fpm.conf Source14: nginx-php.conf # Configuration files for some extensions @@ -152,6 +153,7 @@ Provides: mod_php = %{version}-%{release} Requires: php-common%{?_isa} = %{version}-%{release} # For backwards-compatibility, require php-cli for the time being: Requires: php-cli%{?_isa} = %{version}-%{release} +Requires: php-fpm%{?_isa} = %{version}-%{release} # To ensure correct /var/lib/php/session ownership: Requires(pre): httpd-filesystem # php engine for Apache httpd webserver @@ -1224,8 +1226,9 @@ install -m 755 -d $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d install -m 644 php-fpm.tmpfiles $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/php-fpm.conf # install systemd unit files and scripts for handling server startup 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.conf +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 # LogRotate install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm @@ -1438,6 +1441,8 @@ rm -f README.{Zeus,QNX,CVS-RULES} %config(noreplace) %{_sysconfdir}/nginx/default.d/php.conf %{_prefix}/lib/tmpfiles.d/php-fpm.conf %{_unitdir}/php-fpm.service +%{_unitdir}/httpd.service.d/php-fpm.conf +%{_unitdir}/nginx.service.d/php-fpm.conf %{_sbindir}/php-fpm %dir %{_sysconfdir}/systemd/system/php-fpm.service.d %dir %{_sysconfdir}/php-fpm.d @@ -1508,6 +1513,9 @@ rm -f README.{Zeus,QNX,CVS-RULES} %changelog +* Mon Sep 25 2017 Remi Collet - 7.1.10~RC1-2 +- php now requires php-fpm and start it with httpd / nginx + * Wed Sep 13 2017 Remi Collet - 7.1.10~RC1-1 - Update to 7.1.10RC1 diff --git a/php.ztsmodconf b/php.ztsmodconf index 8085cbd..38b2cd0 100644 --- a/php.ztsmodconf +++ b/php.ztsmodconf @@ -1,6 +1,7 @@ - LoadModule php7_module modules/libphp7-zts.so + # ZTS module is not supported, so FPM is preferred + # LoadModule php7_module modules/libphp7-zts.so