--- rpms/smeserver-php/sme10/smeserver-php.spec 2020/03/09 16:57:16 1.4 +++ rpms/smeserver-php/sme10/smeserver-php.spec 2023/02/05 04:34:17 1.56 @@ -1,5 +1,5 @@ %define version 3.0.0 -%define release 3 +%define release 45 %define name smeserver-php @@ -14,6 +14,38 @@ Patch0: smeserver-php-fpm-0.1.1-bz10871- Patch1: smeserver-php-fpm-0.1.1-bz10871-bz10335-fix1.patch Patch2: smeserver-php-fpm-0.1.1-bz10879-php-fpm_syslog.patch Patch3: smeserver-php-fpm-0.1.1-bz10877-pool-logs.patch +Patch4: smeserver-php-3.0.0-bz10888-sys_temp_dir.patch +Patch5: smeserver-php-fpm-0.1.1-bz0335-fix2.patch +Patch6: smeserver-php-fpm-0.1.1-bz10335-fix3-systemd-units.patch +Patch7: smeserver-php-3.0.0-bz10891-php.ini-allversions.patch +Patch8: smeserver-php-3.0.0-bz10904-pass-auth-token-to-fpm.patch +Patch9: smeserver-php-3.0.0-bz8787-phpmail.patch +Patch10: smeserver-php-3.0.0-bz11014.sme-server.target.patch +Patch11: smeserver-php-3.0.0-bz11087-webapps.patch +Patch12: smeserver-php-3.0.0-bz11092.typo-upload.patch +Patch13: smeserver-php-3.0.0-bz11173-bz11015-logging.patch +Patch14: smeserver-php-3.0.0-bz11267-ibay-php-version.patch +Patch15: smeserver-php-3.0.0-bz11287-fix-event-links.patch +Patch16: smeserver-php-3.0.0-bz11325-logging.patch +Patch17: smeserver-php-3.0.0-bz11287-pooldir.patch +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 BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArch: x86_64 @@ -22,7 +54,13 @@ BuildRequires: e-smith-devtools 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 Requires: tmpwatch Requires: logrotate @@ -183,7 +221,6 @@ Requires: php74-php-soap Requires: php74-php-opcache Requires: php74-php-fpm Requires: php74-php-mbstring -Requires: php74-php-mysql Requires: php74-php-json Requires: php74-php-bcmath Requires: php74-php-intl @@ -192,6 +229,44 @@ Requires: php74-php-process Requires: php74-php-snmp Requires: php74-php, php74-php-enchant , php74-php-pdo php74-php-tidy , php74-php-mysqlnd php74-php-pecl-zip +# PHP 8.0 +Requires: php80-php-cli +Requires: php80-php-ldap +Requires: php80-php-imap +Requires: php80-php-gd +Requires: php80-php-xml +Requires: php80-php-xmlrpc +Requires: php80-php-soap +Requires: php80-php-opcache +Requires: php80-php-fpm +Requires: php80-php-mbstring +Requires: php80-php-json +Requires: php80-php-bcmath +Requires: php80-php-intl +Requires: php80-php-pear +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 + %description Manage PHP FPM pools, and switch between PHP versions easily @@ -201,6 +276,38 @@ Manage PHP FPM pools, and switch between %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%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 %build perl createlinks @@ -211,50 +318,67 @@ perl createlinks #%{__mkdir_p} root/%{_unitdir}/php-fpm.service.d/ #echo '' > root/%{_unitdir}/php-fpm.service.d/php-fpm.conf #enable by default -%{__mkdir_p} root/%{_presetdir} -echo 'enable php-fpm.service' >root/%{_presetdir}/80-koozali-php.preset +#%{__mkdir_p} root/%{_presetdir} +#echo 'enable php-fpm.service' >root/%{_presetdir}/80-koozali-php.preset + +#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 -for phpver in "55" "56" "70" "71" "72" "73" "74"; do +%{__mkdir_p} root/etc/e-smith/templates.metadata/etc/logrotate.d/ +for phpver in "55" "56" "70" "71" "72" "73" "74" "80" "81"; 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" +MORE_DATA={ PHP_VERSION => '$phpver'}' > root/etc/e-smith/templates.metadata/etc/logrotate.d/php$phpver-php-fpm + +#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 + done #to add a new php version #php5* for phpver in "55" ; do #cp php56 metadata -cp -a root/etc/e-smith/templates.metadata/opt/remi/php56 root/etc/e-smith/templates.metadata/opt/remi/php$phpver +mkdir -p root/etc/e-smith/templates.metadata/opt/remi/php$phpver +cp -a root/etc/e-smith/templates.metadata/opt/remi/php56/* root/etc/e-smith/templates.metadata/opt/remi/php$phpver #sed inplace find root/etc/e-smith/templates.metadata/opt/remi/php$phpver -type f -print0 | xargs -0 sed -i 's/56/'$phpver'/g' done # php7* -for phpver in "72" "73" "74"; do +for phpver in "72" "73" "74" "80" "81"; do #cp ph70 metada -cp -a root/etc/e-smith/templates.metadata/etc/opt/remi/php70 root/etc/e-smith/templates.metadata/etc/opt/remi/php$phpver +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/ #sed inplace find root/etc/e-smith/templates.metadata/etc/opt/remi/php$phpver -type f -print0 | xargs -0 sed -i 's/70/'$phpver'/g' 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 @@ -266,7 +390,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"; 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"; 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 @@ -285,6 +409,142 @@ rm -rf $RPM_BUILD_ROOT %preun %changelog +* 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 +- add perl module to help handling fpm version available [SME: 11413] + +* Mon Feb 22 2021 Jean-Philipe Pialasse 3.0.0-25.sme +- add missing default db configuration for php80* [SME: 11378] + +* Sun Feb 21 2021 Jean-Philipe Pialasse 3.0.0-24.sme +- allow php-pool-dirs to run from generik event [SME: 11287] +- add php80 support [SME: 11295] + +* Wed Jan 27 2021 Jean-Philipe Pialasse 3.0.0-23.sme +- fix php55 logrotate [SME: 11325] +- cleanup remove services in sme-server.target.wants [SME: 10956] +- remove usr/lib preset file from rpm [SME: 10958] + +* Fri Dec 25 2020 Jean-Philipe Pialasse 3.0.0-22.sme +- add WantedBy=sme-server.target for all php-fpm service files [SME: 11294] + +* Mon Dec 21 2020 John Crisp 3.0.0.21.sme +- Fix createlinks typo missing event links [SME: 11287] +- Fix typo + +* 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 +- fix wrong syntax = in place of eq [SME: 11173] + thanks to Terry Fage + +* Mon Dec 07 2020 Jean-Philipe Pialasse 3.0.0-18.sme +- fix logrotate error because parent directory has insecure permissions [SME: 11173] + +* Wed Nov 18 2020 Jean-Philipe Pialasse 3.0.0-17.sme +- fix warning: ~ action is deprecated with rsyslog [SME: 11015] +- fix logrotate error because parent directory has insecure permissions [SME: 11173] + +* Mon Nov 09 2020 Jean-Philipe Pialasse 3.0.0-16.sme +- fix typo for upload_tmp_dir [SME: 11092] + +* Sun Nov 08 2020 Jean-Philipe Pialasse 3.0.0-15.sme +- improve integration of webapps : virtualhost and event [SME: 11087] + +* Wed Sep 30 2020 Jean-Philipe Pialasse 3.0.0-14.sme +- enable php services for sme-server.target [SME: 11014] + +* Tue Jun 23 2020 Jean-Philipe Pialasse 3.0.0-13.sme +- move and fix link to start services units [SME: 10960] + +* Fri Mar 27 2020 Jean-Philipe Pialasse 3.0.0-12.sme +- fix typo in smeserver-php-3.0.0-bz10904-pass-auth-token-to-fpm.patch [SME: 10904] + +* Thu Mar 26 2020 Jean-Philipe Pialasse 3.0.0-11.sme +- help monitoring email sent by php [SME: 8787] + +* Thu Mar 26 2020 Jean-Philipe Pialasse 3.0.0-9.sme +- move auto_prepend_file from php.ini to php-fpm.d [SME: 10904] + add /usr/share/php in open_basedir if dfined to allow execution of auto_prepend_file +- fix templates-metadata path fot php 55 72 73 74 + +* Tue Mar 24 2020 Jean-Philipe Pialasse 3.0.0-8.sme +- transfer SERVER auth variables from httpd server to php-fpm pool [SME: 10904] + this allow easy auth for php app using httpd auth as if using php module + +* Tue Mar 24 2020 Jean-Philipe Pialasse 3.0.0-7.sme +- templating all php.ini for all available version [SME: 10891] + expanded using webapps-update, smeserver-php-update, console-save and bootstrap-console-save + Values are those from php configuration key, unless defined for the php$VERSION key. + only one template for all, using templates.metadata and conditions vhen needed. + reworked the content of the php.ini to have it uptodate + +* Wed Mar 11 2020 Jean-Philipe Pialasse 3.0.0-6.sme +- enable units for php-fpm services [SME: 10335] + +* Tue Mar 10 2020 Jean-Philipe Pialasse 3.0.0-5.sme +- set sys_temp_dir for php-fpm and ibays [SME: 10888] +- set restart for php-fpm services in the smeserver-php-update event [SME: 10335] + * Mon Mar 09 2020 Jean-Philipe Pialasse 3.0.0-3.sme - fix typos and logic in scripts [SME: 10335] - only set php admin values if php module is enabled [SME: 10871]