From 9c59939401c8a9ba435a3c4bf8f58d4a3cde5bbd Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 6 Jul 2017 19:15:14 +0200 Subject: [PATCH] Add support for PHP 7.0 and PHP 7.1 --- createlinks | 8 +++-- .../etc/opt/remi/php70/php-fpm.conf | 2 ++ .../etc/opt/remi/php70/php-fpm.d/www.conf | 2 ++ .../etc/opt/remi/php71/php-fpm.conf | 2 ++ .../etc/opt/remi/php71/php-fpm.d/www.conf | 2 ++ .../etc/httpd/conf/httpd.conf/68FastCGIConfig | 10 ++++++ smeserver-php-fpm.spec | 40 ++++++++++++++++++++++ 7 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 root/etc/e-smith/templates.metadata/etc/opt/remi/php70/php-fpm.conf create mode 100644 root/etc/e-smith/templates.metadata/etc/opt/remi/php70/php-fpm.d/www.conf create mode 100644 root/etc/e-smith/templates.metadata/etc/opt/remi/php71/php-fpm.conf create mode 100644 root/etc/e-smith/templates.metadata/etc/opt/remi/php71/php-fpm.d/www.conf diff --git a/createlinks b/createlinks index f8b0911..63bb3f9 100644 --- a/createlinks +++ b/createlinks @@ -2,7 +2,7 @@ use esmith::Build::CreateLinks qw(:all); -foreach my $service (qw(php-fpm php56-php-fpm)){ +foreach my $service (qw(php-fpm php56-php-fpm php70-php-fpm php71-php-fpm)){ service_link_enhanced($service, "S86", "7"); service_link_enhanced($service, "K16", "6"); service_link_enhanced($service, "K16", "0"); @@ -12,6 +12,10 @@ foreach my $service (qw(php-fpm php56-php-fpm)){ foreach my $file qw( /etc/php-fpm.conf /etc/php-fpm.d/www.conf /opt/remi/php56/root/etc/php-fpm.conf - /opt/remi/php56/root/etc/php-fpm.d/www.conf ){ + /opt/remi/php56/root/etc/php-fpm.d/www.conf + /etc/opt/remi/php70/php-fpm.conf + /etc/opt/remi/php70/php-fpm.d/www.conf + /etc/opt/remi/php71/php-fpm.conf + /etc/opt/remi/php71/php-fpm.d/www.conf ){ templates2events($file, qw(webapps-update bootstrap-console-save)); } diff --git a/root/etc/e-smith/templates.metadata/etc/opt/remi/php70/php-fpm.conf b/root/etc/e-smith/templates.metadata/etc/opt/remi/php70/php-fpm.conf new file mode 100644 index 0000000..87418d0 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/opt/remi/php70/php-fpm.conf @@ -0,0 +1,2 @@ +TEMPLATE_PATH="/etc/php-fpm.conf" +MORE_DATA={ PHP_VERSION => 70, FPM_POOL_DIR => "/etc/opt/remi/php70/php-fpm.d" } diff --git a/root/etc/e-smith/templates.metadata/etc/opt/remi/php70/php-fpm.d/www.conf b/root/etc/e-smith/templates.metadata/etc/opt/remi/php70/php-fpm.d/www.conf new file mode 100644 index 0000000..50b0deb --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/opt/remi/php70/php-fpm.d/www.conf @@ -0,0 +1,2 @@ +TEMPLATE_PATH="/etc/php-fpm.d/www.conf" +MORE_DATA={ PHP_VERSION => 70, FPM_POOL_DIR => "/etc/opt/remi/php70/php-fpm.d" } diff --git a/root/etc/e-smith/templates.metadata/etc/opt/remi/php71/php-fpm.conf b/root/etc/e-smith/templates.metadata/etc/opt/remi/php71/php-fpm.conf new file mode 100644 index 0000000..e0ce9d1 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/opt/remi/php71/php-fpm.conf @@ -0,0 +1,2 @@ +TEMPLATE_PATH="/etc/php-fpm.conf" +MORE_DATA={ PHP_VERSION => 71, FPM_POOL_DIR => "/etc/opt/remi/php71/php-fpm.d" } diff --git a/root/etc/e-smith/templates.metadata/etc/opt/remi/php71/php-fpm.d/www.conf b/root/etc/e-smith/templates.metadata/etc/opt/remi/php71/php-fpm.d/www.conf new file mode 100644 index 0000000..21d095c --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/opt/remi/php71/php-fpm.d/www.conf @@ -0,0 +1,2 @@ +TEMPLATE_PATH="/etc/php-fpm.d/www.conf" +MORE_DATA={ PHP_VERSION => 71, FPM_POOL_DIR => "/etc/opt/remi/php71/php-fpm.d" } diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig index 839483c..8d56192 100644 --- a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig @@ -19,6 +19,16 @@ Action php56-fastcgi /php-cgi-bin/php56-wrapper Alias /php-cgi-bin/php56-wrapper /var/www/php-cgi-bin/php56-wrapper FastCgiExternalServer /var/www/php-cgi-bin/php56-wrapper -socket /var/run/php-fpm/php56.sock -pass-header Authorization -idle-timeout 120 +# PHP 7.0 +Action php70-fastcgi /php-cgi-bin/php70-wrapper +Alias /php-cgi-bin/php70-wrapper /var/www/php-cgi-bin/php70-wrapper +FastCgiExternalServer /var/www/php-cgi-bin/php70-wrapper -socket /var/run/php-fpm/php70.sock -pass-header Authorization -idle-timeout 120 + +# PHP 7.1 +Action php71-fastcgi /php-cgi-bin/php71-wrapper +Alias /php-cgi-bin/php71-wrapper /var/www/php-cgi-bin/php71-wrapper +FastCgiExternalServer /var/www/php-cgi-bin/php71-wrapper -socket /var/run/php-fpm/php71.sock -pass-header Authorization -idle-timeout 120 + _EOF } else{ diff --git a/smeserver-php-fpm.spec b/smeserver-php-fpm.spec index d237043..a9caf6b 100644 --- a/smeserver-php-fpm.spec +++ b/smeserver-php-fpm.spec @@ -60,6 +60,46 @@ Requires: php56-php-pear Requires: php56-php-process Requires: php56-php-snmp +# PHP 7.0 +Requires: php70-php-cli +Requires: php70-php-ldap +Requires: php70-php-imap +Requires: php70-php-gd +Requires: php70-php-xml +Requires: php70-php-xmlrpc +Requires: php70-php-soap +Requires: php70-php-opcache +Requires: php70-php-fpm +Requires: php70-php-mbstring +Requires: php70-php-mysql +Requires: php70-php-json +Requires: php70-php-bcmath +Requires: php70-php-intl +Requires: php70-php-mcrypt +Requires: php70-php-pear +Requires: php70-php-process +Requires: php70-php-snmp + +# PHP 7.1 +Requires: php71-php-cli +Requires: php71-php-ldap +Requires: php71-php-imap +Requires: php71-php-gd +Requires: php71-php-xml +Requires: php71-php-xmlrpc +Requires: php71-php-soap +Requires: php71-php-opcache +Requires: php71-php-fpm +Requires: php71-php-mbstring +Requires: php71-php-mysql +Requires: php71-php-json +Requires: php71-php-bcmath +Requires: php71-php-intl +Requires: php71-php-mcrypt +Requires: php71-php-pear +Requires: php71-php-process +Requires: php71-php-snmp + %description Manage PHP FPM pools, and switch between PHP versions easily