--- rpms/smeserver-php/sme10/smeserver-php.spec 2021/09/18 03:01:12 1.49 +++ rpms/smeserver-php/sme10/smeserver-php.spec 2024/03/20 11:14:25 1.59 @@ -1,5 +1,5 @@ %define version 3.0.0 -%define release 39 +%define release 48 %define name smeserver-php @@ -41,6 +41,14 @@ Patch27: smeserver-php-3.0.0-bz11452-bz5 Patch28: smeserver-php-3.0.0-bz11422-logging.patch Patch29: smeserver-php-3.0.0-bz11573.patch Patch30: smeserver-php-3.0.0-bz8077-bz11666.patch +Patch31: smeserver-php-3.0.0-bz11666-error_reporting.patch +Patch32: smeserver-php-3.0.0-bz11717-addphp81.patch +Patch33: smeserver-php-3.0.0-bz11943-require.patch +Patch34: smeserver-php-3.0.0-bz12269.patch +Patch35: smeserver-php-3.0.0-bz12303-session.save_handler.patch +Patch36: smeserver-php-3.0.0-bz12403-addphp82.patch +Patch37: smeserver-php-3.0.0-bz12405-addphp83.patch +Patch38: smeserver-php-3.0.0-bz12514-fixphp83logdir.patch BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArch: x86_64 @@ -50,12 +58,15 @@ Requires: e-smith-base >= 5.6.0 Provides: e-smith-php = %{version}-%{release} Obsoletes: e-smith-php < %{version} Provides: smeserver-webapps-common -Provides: php(language) = 8.0 -Provides: php(language) = 7.4 -Provides: php(language) = 7.3 -Provides: php(language) = 7.2 -Provides: php(language) = 7.1 Provides: php(language) = 7.0 +Provides: php(language) = 7.1 +Provides: php(language) = 7.2 +Provides: php(language) = 7.3 +Provides: php(language) = 7.4 +Provides: php(language) = 8.0 +Provides: php(language) = 8.1 +Provides: php(language) = 8.2 +Provides: php(language) = 8.3 Requires: tmpwatch Requires: logrotate @@ -243,6 +254,63 @@ Requires: php80-php-process Requires: php80-php-snmp Requires: php80-php, php80-php-enchant , php80-php-pdo php80-php-tidy , php80-php-mysqlnd php80-php-pecl-zip +# PHP 8.1 +Requires: php81-php-cli +Requires: php81-php-ldap +Requires: php81-php-imap +Requires: php81-php-gd +Requires: php81-php-xml +Requires: php81-php-xmlrpc +Requires: php81-php-soap +Requires: php81-php-opcache +Requires: php81-php-fpm +Requires: php81-php-mbstring +Requires: php81-php-json +Requires: php81-php-bcmath +Requires: php81-php-intl +Requires: php81-php-pear +Requires: php81-php-process +Requires: php81-php-snmp +Requires: php81-php, php81-php-enchant , php81-php-pdo php81-php-tidy , php81-php-mysqlnd php81-php-pecl-zip + +# PHP 8.2 +Requires: php82-php-cli +Requires: php82-php-ldap +Requires: php82-php-imap +Requires: php82-php-gd +Requires: php82-php-xml +Requires: php82-php-xmlrpc +Requires: php82-php-soap +Requires: php82-php-opcache +Requires: php82-php-fpm +Requires: php82-php-mbstring +Requires: php82-php-json +Requires: php82-php-bcmath +Requires: php82-php-intl +Requires: php82-php-pear +Requires: php82-php-process +Requires: php82-php-snmp +Requires: php82-php, php82-php-enchant , php82-php-pdo php82-php-tidy , php82-php-mysqlnd php82-php-pecl-zip + +# PHP 8.3 +Requires: php83-php-cli +Requires: php83-php-ldap +Requires: php83-php-imap +Requires: php83-php-gd +Requires: php83-php-xml +Requires: php83-php-xmlrpc +Requires: php83-php-soap +Requires: php83-php-opcache +Requires: php83-php-fpm +Requires: php83-php-mbstring +Requires: php83-php-json +Requires: php83-php-bcmath +Requires: php83-php-intl +Requires: php83-php-pear +Requires: php83-php-process +Requires: php83-php-snmp +Requires: php83-php, php83-php-enchant , php83-php-pdo php83-php-tidy , php83-php-mysqlnd php83-php-pecl-zip + %description Manage PHP FPM pools, and switch between PHP versions easily @@ -279,6 +347,14 @@ Manage PHP FPM pools, and switch between %patch28 -p1 %patch29 -p1 %patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 %build perl createlinks @@ -295,25 +371,22 @@ perl createlinks #drop in systemd file %{__mkdir_p} root/usr/lib/systemd/system/php-fpm.service.d echo "[Install]" > root/usr/lib/systemd/system/php-fpm.service.d/51koozali.conf -echo "WantedBy=sme-server.target" > root/usr/lib/systemd/system/php-fpm.service.d/51koozali.conf +echo "WantedBy=sme-server.target" >> root/usr/lib/systemd/system/php-fpm.service.d/51koozali.conf %{__mkdir_p} root/etc/e-smith/templates.metadata/etc/logrotate.d/ -for phpver in "55" "56" "70" "71" "72" "73" "74" "80"; do +for phpver in "55" "56" "70" "71" "72" "73" "74" "80" "81" "82" "83"; do #needed folder %{__mkdir_p} root/var/log/php/php$phpver/ %{__mkdir_p} root/var/lib/php/php$phpver/{session,tmp,opcache,wsdlcache} #db configuration %{__mkdir_p} root/etc/e-smith/db/configuration/defaults/php$phpver-php-fpm +%{__mkdir_p} root/etc/e-smith/db/configuration/defaults/php$phpver echo 'enabled' > root/etc/e-smith/db/configuration/defaults/php$phpver-php-fpm/status echo 'service'> root/etc/e-smith/db/configuration/defaults/php$phpver-php-fpm/type -#create service configuration for SME Seerver -#%{__mkdir_p} root/%{_unitdir}/php$phpver-php-fpm.service.d/ -#echo '' > root/%{_unitdir}/php$phpver-php-fpm.service.d/php$phpver-php-fpm.conf - -##enable by default php fpm -#echo 'enable php'$phpver'-php-fpm.service' >>root/%{_presetdir}/80-koozali-php.preset +echo 'configuration'> root/etc/e-smith/db/configuration/defaults/php$phpver/type +echo 'Off'> root/etc/e-smith/db/configuration/defaults/php$phpver/AllowUrlFopen #logrotate templates echo 'TEMPLATE_PATH="/etc/logrotate.d/php-fpm" @@ -337,7 +410,7 @@ find root/etc/e-smith/templates.metadata done # php7* -for phpver in "72" "73" "74" "80"; do +for phpver in "72" "73" "74" "80" "81" "82" "83"; do #cp ph70 metada mkdir -p root/etc/e-smith/templates.metadata/etc/opt/remi/php$phpver/ cp -a root/etc/e-smith/templates.metadata/etc/opt/remi/php70/* root/etc/e-smith/templates.metadata/etc/opt/remi/php$phpver/ @@ -346,10 +419,13 @@ find root/etc/e-smith/templates.metadata done # then patch the following files -#./templates/etc/logrotate.d/php-fpm/php-fpm: /sbin/e-smith/service php56-php-fpm reload >/dev/null 2>&1 || true -#./templates/etc/httpd/conf/httpd.conf/68FastCGIConfig: foreach my $ver ('', '56', '70', '71'){ -#./templates/etc/cron.daily/tmpwatch-php-fpm/10Defaults:for VER in php php56 php70 php71; do - +### TODO +### fix those files so we do not have to patch them, but generate them or sed them to change a known WORDTODOGENERIC +#smeserver-php-3.0.0/createlinks +#smeserver-php-3.0.0/root/etc/e-smith/templates/etc/cron.daily/tmpwatch-php-fpm/10Defaults +#smeserver-php-3.0.0/root/etc/e-smith/templates/etc/logrotate.d/php-fpm/php-fpm +#smeserver-php-3.0.0/root/etc/e-smith/templates/etc/rsyslog.conf/32php # this one could be cut in fragments per version +#smeserver-php-3.0.0/root/etc/e-smith/templates.metadata/etc/opt/remi/php81/php.ini %install /bin/rm -rf $RPM_BUILD_ROOT @@ -361,7 +437,7 @@ done --dir /var/lib/php/php/tmp 'attr(0770,root,www)' \ --dir /var/lib/php/php/opcache 'attr(0770,root,www)' \ --dir /var/lib/php/php/wsdlcache 'attr(0770,root,www)' \ -`for phpver in "54" "55" "56" "70" "71" "72" "73" "74" "80"; do echo -n "--dir /var/log/php/php$phpver attr(0770,root,www) --dir /var/lib/php/php$phpver/session attr(0770,root,www) --dir /var/lib/php/php$phpver/tmp attr(0770,root,www) --dir /var/lib/php/php$phpver/opcache attr(0770,root,www) --dir /var/lib/php/php$phpver/wsdlcache attr(0770,root,www) ";done ` \ +`for phpver in "54" "55" "56" "70" "71" "72" "73" "74" "80" "81" "82" "83"; do echo -n "--dir /var/log/php/php$phpver attr(0770,root,www) --dir /var/lib/php/php$phpver/session attr(0770,root,www) --dir /var/lib/php/php$phpver/tmp attr(0770,root,www) --dir /var/lib/php/php$phpver/opcache attr(0770,root,www) --dir /var/lib/php/php$phpver/wsdlcache attr(0770,root,www) ";done ` \ > %{name}-%{version}-filelist @@ -380,6 +456,34 @@ rm -rf $RPM_BUILD_ROOT %preun %changelog +* Wed Mar 20 2024 Zsolt Vasarhelyi 3.0.0-48.sme +- PHP 8.3 logs to 8.2 logdir [SME:12514] + +* Mon Sep 04 2023 John Crisp 3.0.0-47.sme +- Add php83 support [SME:12405] + +* Sat Aug 26 2023 John Crisp 3.0.0-46.sme +- fix missing php 81 settings +- Add php82 support [SME:12403] + +* Sat Feb 04 2023 Jean-Philippe Pialasse 3.0.0-45.sme +- fix session.save_handler forced without any way to change it [SME: 12303] + +* Wed Dec 14 2022 Jean-Philippe Pialasse 3.0.0-44.sme +- fix tkt auth not propagated to php pool [SME: 12269] + +* Sun Apr 17 2022 Jean-Philippe Pialasse 3.0.0-43.sme +- update to httpd 2.4 Require usage [SME: 11943] + +* Mon Dec 20 2021 Jean-Philippe Pialasse 3.0.0-42.sme +- fix missing section in php-fpm dropin file [SME: 11814] + +* Sun Oct 24 2021 Jean-Philippe Pialasse 3.0.0-41.sme +- add php81 support [SME: 11717] + +* Fri Sep 24 2021 John Crisp 3.0.0-40.sme +- Fix incorrect commenting for error reporting + * Fri Sep 17 2021 Jean-Philippe Pialasse 3.0.0-39.sme - add ErrorReporting and DisplayErrors properties [SME: 8077] only per ibays (php defaults still hardcoded) @@ -446,7 +550,7 @@ rm -rf $RPM_BUILD_ROOT * Thu Dec 17 2020 John Crisp 3.0.0.20.sme - Fix individual PHP version for ibay [SME: 11267] -* Sun Dec 13 2020 Jean-Philipe Pialasse 3.0.0-19.sme +* Sun Dec 13 2020 Jean-Philipe Pialasse