@@ -86,6 +86,7 @@ Source9: php.modconf
86
86
Source10: php.ztsmodconf
87
87
Source13: nginx-fpm.conf
88
88
Source14: nginx-php.conf
89
+ Source15: httpd-fpm.conf
89
90
# Configuration files for some extensions
90
91
Source50: 10-opcache.ini
91
92
Source51: opcache-default.blacklist
@@ -227,6 +228,30 @@ PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI
227
228
implementation with some additional features useful for sites of
228
229
any size, especially busier sites.
229
230
231
+ %package fpm-nginx
232
+ Summary: Nginx configuration for PHP-FPM
233
+ BuildArch: noarch
234
+ Requires: %{name }-fpm = %{version }-%{release }
235
+ Requires: nginx
236
+ # safe replacement
237
+ Provides: php-fpm-nginx = %{version }-%{release }
238
+ Conflicts: php-fpm-nginx < %{version }-%{release }
239
+
240
+ %description fpm-nginx
241
+ Nginx configuration files for the PHP FastCGI Process Manager.
242
+
243
+ %package fpm-httpd
244
+ Summary: Apache HTTP Server configuration for PHP-FPM
245
+ BuildArch: noarch
246
+ Requires: %{name }-fpm = %{version }-%{release }
247
+ Requires: httpd >= 2.4
248
+ # safe replacement
249
+ Provides: php-fpm-httpd = %{version }-%{release }
250
+ Conflicts: php-fpm-httpd < %{version }-%{release }
251
+
252
+ %description fpm-httpd
253
+ Apache HTTP Server configuration file for the PHP FastCGI Process Manager.
254
+
230
255
%package common
231
256
Summary: Common files for PHP
232
257
# All files licensed under PHP version 3.01, except
@@ -1354,11 +1379,16 @@ install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
1354
1379
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir }/php-zts.d
1355
1380
%endif
1356
1381
install -m 755 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php
1357
- install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php/session
1358
- install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php/wsdlcache
1359
- install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php/opcache
1382
+ install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php/mod_php
1383
+ install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php/mod_php/session
1384
+ install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php/mod_php/wsdlcache
1385
+ install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php/mod_php/opcache
1360
1386
1361
1387
# PHP-FPM stuff
1388
+ install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php/fpm
1389
+ install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php/fpm/session
1390
+ install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php/fpm/wsdlcache
1391
+ install -m 700 -d $RPM_BUILD_ROOT%{_sharedstatedir }/php/fpm/opcache
1362
1392
# Log
1363
1393
install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir }/log/php-fpm
1364
1394
install -m 755 -d $RPM_BUILD_ROOT/run/php-fpm
@@ -1377,6 +1407,8 @@ install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm
1377
1407
# Nginx configuration
1378
1408
install -D -m 644 %{SOURCE13 } $RPM_BUILD_ROOT%{_sysconfdir }/nginx/conf.d/php-fpm.conf
1379
1409
install -D -m 644 %{SOURCE14 } $RPM_BUILD_ROOT%{_sysconfdir }/nginx/default.d/php.conf
1410
+ # Apache httpd configuration
1411
+ install -D -m 644 %{SOURCE15 } $RPM_BUILD_ROOT%{_httpd_confdir }/php-fpm.conf
1380
1412
1381
1413
# Generate files lists and stub .ini files for each subpackage
1382
1414
for mod in pgsql odbc ldap snmp xmlrpc \
@@ -1514,6 +1546,13 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/php/modules/*.a \
1514
1546
# Remove irrelevant docs
1515
1547
rm -f README.{Zeus,QNX,CVS-RULES}
1516
1548
1549
+ %pre fpm
1550
+ getent group php-fpm > /dev/null || groupadd -r php-fpm
1551
+ getent passwd php-fpm > /dev/null || \
1552
+ useradd -r -g php-fpm -d %{_sharedstatedir }/php/fpm \
1553
+ -s /sbin/nologin -c " php-fpm" php-fpm
1554
+ exit 0
1555
+
1517
1556
%post fpm
1518
1557
%systemd_post php-fpm.service
1519
1558
@@ -1531,9 +1570,10 @@ rm -f README.{Zeus,QNX,CVS-RULES}
1531
1570
%if %{with_zts }
1532
1571
%{_httpd_moddir }/libphp7-zts.so
1533
1572
%endif
1534
- %attr(0770,root,apache) %dir %{_sharedstatedir }/php/session
1535
- %attr(0770,root,apache) %dir %{_sharedstatedir }/php/wsdlcache
1536
- %attr(0770,root,apache) %dir %{_sharedstatedir }/php/opcache
1573
+ %attr(0770,root,apache) %dir %{_sharedstatedir }/php/mod_php
1574
+ %attr(0770,root,apache) %dir %{_sharedstatedir }/php/mod_php/session
1575
+ %attr(0770,root,apache) %dir %{_sharedstatedir }/php/mod_php/wsdlcache
1576
+ %attr(0770,root,apache) %dir %{_sharedstatedir }/php/mod_php/opcache
1537
1577
%config(noreplace) %{_httpd_confdir }/php.conf
1538
1578
%config(noreplace) %{_httpd_modconfdir }/15-php.conf
1539
1579
%{_httpd_contentdir }/icons/php.gif
@@ -1586,26 +1626,30 @@ rm -f README.{Zeus,QNX,CVS-RULES}
1586
1626
%files fpm
1587
1627
%doc php-fpm.conf.default www.conf.default
1588
1628
%license fpm_LICENSE
1589
- %attr(0770,root,apache ) %dir %{_sharedstatedir }/php/session
1590
- %attr(0770,root,apache ) %dir %{_sharedstatedir }/php/wsdlcache
1591
- %attr(0770,root,apache ) %dir %{_sharedstatedir }/php/opcache
1592
- %config(noreplace ) %{ _httpd_confdir }/php.conf
1629
+ %attr(0770,root,php-fpm ) %dir %{_sharedstatedir }/php/fpm
1630
+ %attr(0770,root,php-fpm ) %dir %{_sharedstatedir }/php/fpm/session
1631
+ %attr(0770,root,php-fpm ) %dir %{_sharedstatedir }/php/fpm/wsdlcache
1632
+ %attr(0770,root,php-fpm ) %dir %{ _sharedstatedir }/php/fpm/opcache
1593
1633
%config(noreplace) %{_sysconfdir }/php-fpm.conf
1594
1634
%config(noreplace) %{_sysconfdir }/php-fpm.d/www.conf
1595
1635
%config(noreplace) %{_sysconfdir }/logrotate.d/php-fpm
1596
- %config(noreplace) %{_sysconfdir }/nginx/conf.d/php-fpm.conf
1597
- %config(noreplace) %{_sysconfdir }/nginx/default.d/php.conf
1598
1636
%{_unitdir }/php-fpm.service
1599
1637
%{_sbindir }/php-fpm
1600
1638
%dir %{_sysconfdir }/systemd/system/php-fpm.service.d
1601
1639
%dir %{_sysconfdir }/php-fpm.d
1602
- # log owned by apache for log
1603
- %attr(770,apache,root) %dir %{_localstatedir }/log/php-fpm
1640
+ %attr(770,php-fpm,php-fpm) %dir %{_localstatedir }/log/php-fpm
1604
1641
%dir %ghost /run/php-fpm
1605
1642
%{_mandir }/man8/php-fpm.8*
1606
1643
%dir %{_datadir }/fpm
1607
1644
%{_datadir }/fpm/status.html
1608
1645
1646
+ %files fpm-nginx
1647
+ %config(noreplace) %{_sysconfdir }/nginx/conf.d/php-fpm.conf
1648
+ %config(noreplace) %{_sysconfdir }/nginx/default.d/php.conf
1649
+
1650
+ %files fpm-httpd
1651
+ %config(noreplace) %{_httpd_confdir }/php-fpm.conf
1652
+
1609
1653
%files devel
1610
1654
%{_bindir }/php-config
1611
1655
%{_includedir }/php
@@ -1678,6 +1722,7 @@ rm -f README.{Zeus,QNX,CVS-RULES}
1678
1722
*
Wed Apr 17 2019 Matt Linscott <[email protected] > -
7.3.4-2
1679
1723
- Initial port from Fedora to IUS
1680
1724
- Move httpd module to a mod_php subpackage
1725
+ - Add fpm-nginx and fpm-httpd subpackages
1681
1726
1682
1727
*
Tue Apr 2 2019 Remi Collet <[email protected] > -
7.3.4-1
1683
1728
- Update to 7.3.4 - http://www.php.net/releases/7_3_4.php
0 commit comments