1 |
%define version 3.0.0 |
%define version 3.0.0 |
2 |
%define release 1 |
%define release 28 |
3 |
%define name smeserver-php |
%define name smeserver-php |
4 |
|
|
5 |
|
|
10 |
License: MIT |
License: MIT |
11 |
Group: Applications/System |
Group: Applications/System |
12 |
Source: %{name}-%{version}.tar.gz |
Source: %{name}-%{version}.tar.gz |
13 |
|
Patch0: smeserver-php-fpm-0.1.1-bz10871-ibay-php-fpm.patch |
14 |
|
Patch1: smeserver-php-fpm-0.1.1-bz10871-bz10335-fix1.patch |
15 |
|
Patch2: smeserver-php-fpm-0.1.1-bz10879-php-fpm_syslog.patch |
16 |
|
Patch3: smeserver-php-fpm-0.1.1-bz10877-pool-logs.patch |
17 |
|
Patch4: smeserver-php-3.0.0-bz10888-sys_temp_dir.patch |
18 |
|
Patch5: smeserver-php-fpm-0.1.1-bz0335-fix2.patch |
19 |
|
Patch6: smeserver-php-fpm-0.1.1-bz10335-fix3-systemd-units.patch |
20 |
|
Patch7: smeserver-php-3.0.0-bz10891-php.ini-allversions.patch |
21 |
|
Patch8: smeserver-php-3.0.0-bz10904-pass-auth-token-to-fpm.patch |
22 |
|
Patch9: smeserver-php-3.0.0-bz8787-phpmail.patch |
23 |
|
Patch10: smeserver-php-3.0.0-bz11014.sme-server.target.patch |
24 |
|
Patch11: smeserver-php-3.0.0-bz11087-webapps.patch |
25 |
|
Patch12: smeserver-php-3.0.0-bz11092.typo-upload.patch |
26 |
|
Patch13: smeserver-php-3.0.0-bz11173-bz11015-logging.patch |
27 |
|
Patch14: smeserver-php-3.0.0-bz11267-ibay-php-version.patch |
28 |
|
Patch15: smeserver-php-3.0.0-bz11287-fix-event-links.patch |
29 |
|
Patch16: smeserver-php-3.0.0-bz11325-logging.patch |
30 |
|
Patch17: smeserver-php-3.0.0-bz11287-pooldir.patch |
31 |
|
Patch18: smeserver-php-3.0.0-bz11295-addphp80.patch |
32 |
|
Patch19: smeserver-php-3.0.0-bz11410-sendmail.patch |
33 |
|
Patch20: smeserver-php-3.0.0-bz11413-php-perl-module.patch |
34 |
|
Patch21: smeserver-php-3.0.0-bz11401-empty-property-not-honored.patch |
35 |
|
Patch22: smeserver-php-3.0.0-bz10907-phpfile-exist.patch |
36 |
|
|
37 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
38 |
BuildArch: x86_64 |
BuildArch: x86_64 |
41 |
Requires: e-smith-base >= 5.6.0 |
Requires: e-smith-base >= 5.6.0 |
42 |
Provides: e-smith-php = %{version}-%{release} |
Provides: e-smith-php = %{version}-%{release} |
43 |
Obsoletes: e-smith-php < %{version} |
Obsoletes: e-smith-php < %{version} |
44 |
|
Provides: smeserver-webapps-common |
45 |
|
Provides: php(language) = 8.0 |
46 |
|
Provides: php(language) = 7.4 |
47 |
|
Provides: php(language) = 7.3 |
48 |
|
Provides: php(language) = 7.2 |
49 |
|
Provides: php(language) = 7.1 |
50 |
|
Provides: php(language) = 7.0 |
51 |
Requires: tmpwatch |
Requires: tmpwatch |
52 |
Requires: logrotate |
Requires: logrotate |
53 |
|
|
208 |
Requires: php74-php-opcache |
Requires: php74-php-opcache |
209 |
Requires: php74-php-fpm |
Requires: php74-php-fpm |
210 |
Requires: php74-php-mbstring |
Requires: php74-php-mbstring |
|
Requires: php74-php-mysql |
|
211 |
Requires: php74-php-json |
Requires: php74-php-json |
212 |
Requires: php74-php-bcmath |
Requires: php74-php-bcmath |
213 |
Requires: php74-php-intl |
Requires: php74-php-intl |
216 |
Requires: php74-php-snmp |
Requires: php74-php-snmp |
217 |
Requires: php74-php, php74-php-enchant , php74-php-pdo php74-php-tidy , php74-php-mysqlnd php74-php-pecl-zip |
Requires: php74-php, php74-php-enchant , php74-php-pdo php74-php-tidy , php74-php-mysqlnd php74-php-pecl-zip |
218 |
|
|
219 |
|
# PHP 8.0 |
220 |
|
Requires: php80-php-cli |
221 |
|
Requires: php80-php-ldap |
222 |
|
Requires: php80-php-imap |
223 |
|
Requires: php80-php-gd |
224 |
|
Requires: php80-php-xml |
225 |
|
Requires: php80-php-xmlrpc |
226 |
|
Requires: php80-php-soap |
227 |
|
Requires: php80-php-opcache |
228 |
|
Requires: php80-php-fpm |
229 |
|
Requires: php80-php-mbstring |
230 |
|
Requires: php80-php-json |
231 |
|
Requires: php80-php-bcmath |
232 |
|
Requires: php80-php-intl |
233 |
|
Requires: php80-php-pear |
234 |
|
Requires: php80-php-process |
235 |
|
Requires: php80-php-snmp |
236 |
|
Requires: php80-php, php80-php-enchant , php80-php-pdo php80-php-tidy , php80-php-mysqlnd php80-php-pecl-zip |
237 |
|
|
238 |
%description |
%description |
239 |
Manage PHP FPM pools, and switch between PHP versions easily |
Manage PHP FPM pools, and switch between PHP versions easily |
240 |
|
|
241 |
%prep |
%prep |
242 |
%setup -q -n %{name}-%{version} |
%setup -q -n %{name}-%{version} |
243 |
|
%patch0 -p1 |
244 |
|
%patch1 -p1 |
245 |
|
%patch2 -p1 |
246 |
|
%patch3 -p1 |
247 |
|
%patch4 -p1 |
248 |
|
%patch5 -p1 |
249 |
|
%patch6 -p1 |
250 |
|
%patch7 -p1 |
251 |
|
%patch8 -p1 |
252 |
|
%patch9 -p1 |
253 |
|
%patch10 -p1 |
254 |
|
%patch11 -p1 |
255 |
|
%patch12 -p1 |
256 |
|
%patch13 -p1 |
257 |
|
%patch14 -p1 |
258 |
|
%patch15 -p1 |
259 |
|
%patch16 -p1 |
260 |
|
%patch17 -p1 |
261 |
|
%patch18 -p1 |
262 |
|
%patch19 -p1 |
263 |
|
%patch20 -p1 |
264 |
|
%patch21 -p1 |
265 |
|
%patch22 -p1 |
266 |
|
|
267 |
%build |
%build |
268 |
perl createlinks |
perl createlinks |
273 |
#%{__mkdir_p} root/%{_unitdir}/php-fpm.service.d/ |
#%{__mkdir_p} root/%{_unitdir}/php-fpm.service.d/ |
274 |
#echo '' > root/%{_unitdir}/php-fpm.service.d/php-fpm.conf |
#echo '' > root/%{_unitdir}/php-fpm.service.d/php-fpm.conf |
275 |
#enable by default |
#enable by default |
276 |
%{__mkdir_p} root/%{_presetdir} |
#%{__mkdir_p} root/%{_presetdir} |
277 |
echo 'enable php-fpm.service' >root/%{_presetdir}/80-koozali-php.preset |
#echo 'enable php-fpm.service' >root/%{_presetdir}/80-koozali-php.preset |
278 |
|
|
279 |
for phpver in "55" "56" "70" "71" "72" "73" "74"; do |
#drop in systemd file |
280 |
|
%{__mkdir_p} root/usr/lib/systemd/system/php-fpm.service.d |
281 |
|
echo "[Install]" > root/usr/lib/systemd/system/php-fpm.service.d/51koozali.conf |
282 |
|
echo "WantedBy=sme-server.target" > root/usr/lib/systemd/system/php-fpm.service.d/51koozali.conf |
283 |
|
|
284 |
|
%{__mkdir_p} root/etc/e-smith/templates.metadata/etc/logrotate.d/ |
285 |
|
for phpver in "55" "56" "70" "71" "72" "73" "74" "80"; do |
286 |
#needed folder |
#needed folder |
287 |
%{__mkdir_p} root/var/log/php/php$phpver/ |
%{__mkdir_p} root/var/log/php/php$phpver/ |
288 |
%{__mkdir_p} root/var/lib/php/php$phpver/{session,tmp,opcache,wsdlcache} |
%{__mkdir_p} root/var/lib/php/php$phpver/{session,tmp,opcache,wsdlcache} |
296 |
#%{__mkdir_p} root/%{_unitdir}/php$phpver-php-fpm.service.d/ |
#%{__mkdir_p} root/%{_unitdir}/php$phpver-php-fpm.service.d/ |
297 |
#echo '' > root/%{_unitdir}/php$phpver-php-fpm.service.d/php$phpver-php-fpm.conf |
#echo '' > root/%{_unitdir}/php$phpver-php-fpm.service.d/php$phpver-php-fpm.conf |
298 |
|
|
299 |
#enable by default php fpm |
##enable by default php fpm |
300 |
echo 'enable php'$phpver'-php-fpm.service' >>root/%{_presetdir}/80-koozali-php.preset |
#echo 'enable php'$phpver'-php-fpm.service' >>root/%{_presetdir}/80-koozali-php.preset |
301 |
|
|
302 |
|
#logrotate templates |
303 |
|
echo 'TEMPLATE_PATH="/etc/logrotate.d/php-fpm" |
304 |
|
MORE_DATA={ PHP_VERSION => '$phpver'}' > root/etc/e-smith/templates.metadata/etc/logrotate.d/php$phpver-php-fpm |
305 |
|
|
306 |
|
#drop in systemd file |
307 |
|
%{__mkdir_p} root/usr/lib/systemd/system/php$phpver-php-fpm.service.d |
308 |
|
echo "[Install]" > root/usr/lib/systemd/system/php$phpver-php-fpm.service.d/51koozali.conf |
309 |
|
echo "WantedBy=sme-server.target" > root/usr/lib/systemd/system/php$phpver-php-fpm.service.d/51koozali.conf |
310 |
|
|
311 |
done |
done |
312 |
|
|
313 |
#to add a new php version |
#to add a new php version |
314 |
#php5* |
#php5* |
315 |
for phpver in "55" ; do |
for phpver in "55" ; do |
316 |
#cp php56 metadata |
#cp php56 metadata |
317 |
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 |
318 |
|
cp -a root/etc/e-smith/templates.metadata/opt/remi/php56/* root/etc/e-smith/templates.metadata/opt/remi/php$phpver |
319 |
#sed inplace |
#sed inplace |
320 |
find root/etc/e-smith/templates.metadata/opt/remi/php$phpver -type f -print0 | xargs -0 sed -i 's/56/'$phpver'/g' |
find root/etc/e-smith/templates.metadata/opt/remi/php$phpver -type f -print0 | xargs -0 sed -i 's/56/'$phpver'/g' |
321 |
done |
done |
322 |
|
|
323 |
# php7* |
# php7* |
324 |
for phpver in "72" "73" "74"; do |
for phpver in "72" "73" "74" "80"; do |
325 |
#cp ph70 metada |
#cp ph70 metada |
326 |
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/ |
327 |
|
cp -a root/etc/e-smith/templates.metadata/etc/opt/remi/php70/* root/etc/e-smith/templates.metadata/etc/opt/remi/php$phpver/ |
328 |
#sed inplace |
#sed inplace |
329 |
find root/etc/e-smith/templates.metadata/etc/opt/remi/php$phpver -type f -print0 | xargs -0 sed -i 's/70/'$phpver'/g' |
find root/etc/e-smith/templates.metadata/etc/opt/remi/php$phpver -type f -print0 | xargs -0 sed -i 's/70/'$phpver'/g' |
330 |
done |
done |
345 |
--dir /var/lib/php/php/tmp 'attr(0770,root,www)' \ |
--dir /var/lib/php/php/tmp 'attr(0770,root,www)' \ |
346 |
--dir /var/lib/php/php/opcache 'attr(0770,root,www)' \ |
--dir /var/lib/php/php/opcache 'attr(0770,root,www)' \ |
347 |
--dir /var/lib/php/php/wsdlcache 'attr(0770,root,www)' \ |
--dir /var/lib/php/php/wsdlcache 'attr(0770,root,www)' \ |
348 |
`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"; 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 ` \ |
349 |
> %{name}-%{version}-filelist |
> %{name}-%{version}-filelist |
350 |
|
|
351 |
|
|
364 |
%preun |
%preun |
365 |
|
|
366 |
%changelog |
%changelog |
367 |
|
* Mon Mar 08 2021 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-28.sme |
368 |
|
- filter non existing php script [SME: 10907] |
369 |
|
|
370 |
|
* Mon Mar 08 2021 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-27.sme |
371 |
|
- String not honoured as php-fpm but as default [SME: 11401] |
372 |
|
|
373 |
|
* Sat Mar 06 2021 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-26.sme |
374 |
|
- improve sendmail parameter, force sender [SME: 11410] |
375 |
|
MailForceSender as property for php versions, ibays and pools |
376 |
|
- add perl module to help handling fpm version available [SME: 11413] |
377 |
|
|
378 |
|
* Mon Feb 22 2021 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-25.sme |
379 |
|
- add missing default db configuration for php80* [SME: 11378] |
380 |
|
|
381 |
|
* Sun Feb 21 2021 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-24.sme |
382 |
|
- allow php-pool-dirs to run from generik event [SME: 11287] |
383 |
|
- add php80 support [SME: 11295] |
384 |
|
|
385 |
|
* Wed Jan 27 2021 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-23.sme |
386 |
|
- fix php55 logrotate [SME: 11325] |
387 |
|
- cleanup remove services in sme-server.target.wants [SME: 10956] |
388 |
|
- remove usr/lib preset file from rpm [SME: 10958] |
389 |
|
|
390 |
|
* Fri Dec 25 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-22.sme |
391 |
|
- add WantedBy=sme-server.target for all php-fpm service files [SME: 11294] |
392 |
|
|
393 |
|
* Mon Dec 21 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.0.21.sme |
394 |
|
- Fix createlinks typo missing event links [SME: 11287] |
395 |
|
- Fix typo |
396 |
|
|
397 |
|
* Thu Dec 17 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.0.20.sme |
398 |
|
- Fix individual PHP version for ibay [SME: 11267] |
399 |
|
|
400 |
|
* Sun Dec 13 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-19.sme |
401 |
|
- fix wrong syntax = in place of eq [SME: 11173] |
402 |
|
thanks to Terry Fage |
403 |
|
|
404 |
|
* Mon Dec 07 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-18.sme |
405 |
|
- fix logrotate error because parent directory has insecure permissions [SME: 11173] |
406 |
|
|
407 |
|
* Wed Nov 18 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-17.sme |
408 |
|
- fix warning: ~ action is deprecated with rsyslog [SME: 11015] |
409 |
|
- fix logrotate error because parent directory has insecure permissions [SME: 11173] |
410 |
|
|
411 |
|
* Mon Nov 09 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-16.sme |
412 |
|
- fix typo for upload_tmp_dir [SME: 11092] |
413 |
|
|
414 |
|
* Sun Nov 08 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-15.sme |
415 |
|
- improve integration of webapps : virtualhost and event [SME: 11087] |
416 |
|
|
417 |
|
* Wed Sep 30 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-14.sme |
418 |
|
- enable php services for sme-server.target [SME: 11014] |
419 |
|
|
420 |
|
* Tue Jun 23 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-13.sme |
421 |
|
- move and fix link to start services units [SME: 10960] |
422 |
|
|
423 |
|
* Fri Mar 27 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-12.sme |
424 |
|
- fix typo in smeserver-php-3.0.0-bz10904-pass-auth-token-to-fpm.patch [SME: 10904] |
425 |
|
|
426 |
|
* Thu Mar 26 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-11.sme |
427 |
|
- help monitoring email sent by php [SME: 8787] |
428 |
|
|
429 |
|
* Thu Mar 26 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-9.sme |
430 |
|
- move auto_prepend_file from php.ini to php-fpm.d [SME: 10904] |
431 |
|
add /usr/share/php in open_basedir if dfined to allow execution of auto_prepend_file |
432 |
|
- fix templates-metadata path fot php 55 72 73 74 |
433 |
|
|
434 |
|
* Tue Mar 24 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-8.sme |
435 |
|
- transfer SERVER auth variables from httpd server to php-fpm pool [SME: 10904] |
436 |
|
this allow easy auth for php app using httpd auth as if using php module |
437 |
|
|
438 |
|
* Tue Mar 24 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-7.sme |
439 |
|
- templating all php.ini for all available version [SME: 10891] |
440 |
|
expanded using webapps-update, smeserver-php-update, console-save and bootstrap-console-save |
441 |
|
Values are those from php configuration key, unless defined for the php$VERSION key. |
442 |
|
only one template for all, using templates.metadata and conditions vhen needed. |
443 |
|
reworked the content of the php.ini to have it uptodate |
444 |
|
|
445 |
|
* Wed Mar 11 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-6.sme |
446 |
|
- enable units for php-fpm services [SME: 10335] |
447 |
|
|
448 |
|
* Tue Mar 10 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-5.sme |
449 |
|
- set sys_temp_dir for php-fpm and ibays [SME: 10888] |
450 |
|
- set restart for php-fpm services in the smeserver-php-update event [SME: 10335] |
451 |
|
|
452 |
|
* Mon Mar 09 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-3.sme |
453 |
|
- fix typos and logic in scripts [SME: 10335] |
454 |
|
- only set php admin values if php module is enabled [SME: 10871] |
455 |
|
- redirect php*-php-fpm services logs to /var/log/php/php*/php-fpm.log [SME: 10879] |
456 |
|
- pool logs in /var/log/php/*/error.log [SME: 10877] |
457 |
|
|
458 |
|
* Sat Feb 01 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-2.sme |
459 |
|
- modification for ibays php-fpm support in httpd.conf [SME: 10871] |
460 |
|
|
461 |
* Tue Jan 28 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-1.sme |
* Tue Jan 28 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-1.sme |
462 |
- initial release of smeserver-php from smeserver-php-fpm [SME: 10335] |
- initial release of smeserver-php from smeserver-php-fpm [SME: 10335] |
463 |
added support for ibays, remove references to shares (should move to smeserver-share-folders) |
added support for ibays, remove references to shares (should move to smeserver-share-folders) |