--- rpms/smeserver-php/sme10/smeserver-php.spec 2020/02/02 02:55:21 1.3 +++ rpms/smeserver-php/sme10/smeserver-php.spec 2020/12/07 05:02:29 1.20 @@ -1,5 +1,5 @@ %define version 3.0.0 -%define release 2 +%define release 18 %define name smeserver-php @@ -11,6 +11,19 @@ License: MIT Group: Applications/System Source: %{name}-%{version}.tar.gz Patch0: smeserver-php-fpm-0.1.1-bz10871-ibay-php-fpm.patch +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 BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArch: x86_64 @@ -19,6 +32,7 @@ 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 Requires: tmpwatch Requires: logrotate @@ -195,6 +209,19 @@ Manage PHP FPM pools, and switch between %prep %setup -q -n %{name}-%{version} %patch0 -p1 +%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 %build perl createlinks @@ -208,6 +235,7 @@ perl createlinks %{__mkdir_p} root/%{_presetdir} echo 'enable php-fpm.service' >root/%{_presetdir}/80-koozali-php.preset +%{__mkdir_p} root/etc/e-smith/templates.metadata/etc/logrotate.d/ for phpver in "55" "56" "70" "71" "72" "73" "74"; do #needed folder %{__mkdir_p} root/var/log/php/php$phpver/ @@ -225,13 +253,18 @@ echo 'service'> root/etc/e-smith/db/conf #enable by default php fpm echo 'enable php'$phpver'-php-fpm.service' >>root/%{_presetdir}/80-koozali-php.preset +#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 + 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 @@ -239,7 +272,8 @@ done # php7* for phpver in "72" "73" "74"; 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 @@ -279,6 +313,60 @@ rm -rf $RPM_BUILD_ROOT %preun %changelog +* 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] +- redirect php*-php-fpm services logs to /var/log/php/php*/php-fpm.log [SME: 10879] +- pool logs in /var/log/php/*/error.log [SME: 10877] + * Sat Feb 01 2020 Jean-Philipe Pialasse 3.0.0-2.sme - modification for ibays php-fpm support in httpd.conf [SME: 10871]