--- rpms/smeserver-php/sme10/smeserver-php.spec 2021/03/07 06:07:17 1.32 +++ rpms/smeserver-php/sme10/smeserver-php.spec 2023/08/26 10:17:59 1.57 @@ -1,5 +1,5 @@ %define version 3.0.0 -%define release 26 +%define release 46 %define name smeserver-php @@ -31,6 +31,22 @@ Patch17: smeserver-php-3.0.0-bz11287-poo Patch18: smeserver-php-3.0.0-bz11295-addphp80.patch Patch19: smeserver-php-3.0.0-bz11410-sendmail.patch Patch20: smeserver-php-3.0.0-bz11413-php-perl-module.patch +Patch21: smeserver-php-3.0.0-bz11401-empty-property-not-honored.patch +Patch22: smeserver-php-3.0.0-bz10907-phpfile-exist.patch +Patch23: smeserver-php-3.0.0-bz10890-allowphpembdedcode.patch +Patch24: smeserver-php-3.0.0-bz11427-timeout.patch +Patch25: smeserver-php-3.0.0-bz11411-uniformizePhpProperties.patch +Patch26: smeserver-php-3.0.0-bz11412-phptempsdirs.patch +Patch27: smeserver-php-3.0.0-bz11452-bz5759.patch +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 BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArch: x86_64 @@ -40,6 +56,8 @@ 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.2 +Provides: php(language) = 8.1 Provides: php(language) = 8.0 Provides: php(language) = 7.4 Provides: php(language) = 7.3 @@ -233,6 +251,45 @@ 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 + + %description Manage PHP FPM pools, and switch between PHP versions easily @@ -259,6 +316,22 @@ Manage PHP FPM pools, and switch between %patch18 -p1 %patch19 -p1 %patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 -F4 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 %build perl createlinks @@ -275,25 +348,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"; 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" @@ -302,7 +372,7 @@ MORE_DATA={ PHP_VERSION => '$phpver'}' > #drop in systemd file %{__mkdir_p} root/usr/lib/systemd/system/php$phpver-php-fpm.service.d echo "[Install]" > root/usr/lib/systemd/system/php$phpver-php-fpm.service.d/51koozali.conf -echo "WantedBy=sme-server.target" > root/usr/lib/systemd/system/php$phpver-php-fpm.service.d/51koozali.conf +echo "WantedBy=sme-server.target" >> root/usr/lib/systemd/system/php$phpver-php-fpm.service.d/51koozali.conf done @@ -317,7 +387,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"; 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/ @@ -326,10 +396,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 @@ -341,7 +414,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"; 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 @@ -360,6 +433,67 @@ rm -rf $RPM_BUILD_ROOT %preun %changelog +* 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) +- fix typo in AllowUrlFopen, was using AllowUrlfOpen for ibays in httpd [SME: 11666] + +* Wed Jun 30 2021 Jean-Philippe Pialasse 3.0.0-37.sme +- fix typo in 25SSLDirectives fragment for WebAppVirtualHost [SME: 11641] + +* Thu Jun 03 2021 Terry Fage 3.0.0-35.sme +- fix syntax error "> - >>" in spec file for systemd drop in [SME: 11612] + +* Wed Apr 21 2021 Jean-Philippe Pialasse 3.0.0-34.sme +- fix open_basedir for pool missing /var/lib/php/$ibay/ [SME: 11573] + +* Tue Mar 16 2021 Jean-Philippe Pialasse 3.0.0-33.sme +- clean rsyslog syntax for php [SME: 11422] + +* Tue Mar 16 2021 Jean-Philippe Pialasse 3.0.0-32.sme +- add /usr/share/pear and /usr/share/php to basedir [SME: 5759] +- fix last big differences between module setting and fpm [SME: 11452] + +* Mon Mar 08 2021 Jean-Philipe Pialasse 3.0.0-31.sme +- move from e-smith-ibays handling of temps dirs [SME: 11412] +- improve httpd fragment [SME: 11401] + +* Mon Mar 08 2021 Jean-Philipe Pialasse 3.0.0-30.sme +- uniformize php related properties between ibays and php [SME: 11411] + tidy fragments for php-fpm and ibays +- revert patch for timeouts [SME: 11427] + +* Mon Mar 08 2021 Jean-Philipe Pialasse 3.0.0-28.sme +- filter non existing php script [SME: 10907] +- allow php embded files per ibay using AllowPHTML [SME: 10890] +- add timeout property in case of need for long running script [SME: 11427] + e.g. upgrade of a wiki + +* Mon Mar 08 2021 Jean-Philipe Pialasse 3.0.0-27.sme +- String not honoured as php-fpm but as default [SME: 11401] + * Sat Mar 06 2021 Jean-Philipe Pialasse 3.0.0-26.sme - improve sendmail parameter, force sender [SME: 11410] MailForceSender as property for php versions, ibays and pools