|
@@ -1,3 +1,4 @@
|
|
|
+%bcond_with systemd
|
|
|
%bcond_with debug
|
|
|
%bcond_without apache2
|
|
|
|
|
@@ -50,8 +51,8 @@
|
|
|
Name: php%{majorver}
|
|
|
Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
|
|
|
Summary(ja): HTML 埋め込み型スクリプト言語 PHP
|
|
|
-Version: 7.4.4
|
|
|
-Release: 1%{_dist_release}
|
|
|
+Version: 7.4.5
|
|
|
+Release: 1%{_dist_release}%{?with_systemd:.systemd}
|
|
|
Conflicts: php5 < 5.6.11
|
|
|
|
|
|
Vendor: Project Vine
|
|
@@ -76,6 +77,7 @@ Source27: default-pool.conf.in
|
|
|
Source28: php-fpm.logrotate
|
|
|
Source29: php_params
|
|
|
Source31: macros.pear.ver
|
|
|
+Source32: php-fpm.service
|
|
|
|
|
|
Patch33: php-5.2.4-phpincludedir.patch
|
|
|
|
|
@@ -107,6 +109,7 @@ BuildRequires: gcc-c++
|
|
|
BuildRequires: %{gd_name}-devel
|
|
|
BuildRequires: gdbm-devel
|
|
|
BuildRequires: gmp-devel
|
|
|
+BuildRequires: libacl-devel
|
|
|
BuildRequires: libedit-devel
|
|
|
BuildRequires: libjpeg-devel
|
|
|
BuildRequires: libpng-devel
|
|
@@ -131,6 +134,16 @@ BuildRequires: libzip-devel
|
|
|
%if %{?_dist_release} != "vl4"
|
|
|
BuildRequires: krb5-devel
|
|
|
%endif
|
|
|
+%if %{with systemd}
|
|
|
+BuildRequires: systemd-devel
|
|
|
+BuildRequires: systemd-units
|
|
|
+Requires(post): systemd-units
|
|
|
+Requires(preun): systemd-units
|
|
|
+Requires(postun): systemd-units
|
|
|
+%else
|
|
|
+Requires(post): chkconfig
|
|
|
+Requires(preun): chkconfig
|
|
|
+%endif
|
|
|
|
|
|
%if %{?_dist_release} != "vl6"
|
|
|
BuildRequires: www-common
|
|
@@ -457,6 +470,9 @@ Conflicts: php5-opcache < 5.6.11
|
|
|
in shared memory, thereby removing the need for PHP to load and parse scripts
|
|
|
on each request.
|
|
|
|
|
|
+#======================================================================
|
|
|
+
|
|
|
+%debug_package
|
|
|
|
|
|
#======================================================================
|
|
|
%prep
|
|
@@ -569,11 +585,18 @@ popd
|
|
|
# Build /usr/sbin/php-fpm
|
|
|
pushd build-fpm
|
|
|
build \
|
|
|
- --enable-fpm
|
|
|
+ --enable-fpm \
|
|
|
+ --with-fpm-acl \
|
|
|
+%if %{with systemd}
|
|
|
+ --with-fpm-systemd \
|
|
|
+%endif
|
|
|
+ %{nil}
|
|
|
popd
|
|
|
|
|
|
-sed -e 's/@WWWUSER@/%{fpm_user}/' -e 's/@WWWGROUP@/%{fpm_group}/' \
|
|
|
- -e 's/@majorver@/%{majorver}/'< %{SOURCE27} > default-pool.conf
|
|
|
+sed \
|
|
|
+ -e 's/@WWWUSER@/%{fpm_user}/' \
|
|
|
+ -e 's/@WWWGROUP@/%{fpm_group}/' \
|
|
|
+ -e 's/@majorver@/%{majorver}/' < %{SOURCE27} > default-pool.conf
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
# Build Apache2 module
|
|
@@ -661,8 +684,6 @@ mv %{buildroot}%{_bindir}/php-cgi%{majorver} %{buildroot}%{_bindir}/%{_name}-cgi
|
|
|
%{__install} -d %{buildroot}%{_mandir}/man8
|
|
|
%{__install} -d %{buildroot}%{_sysconfdir}/logrotate.d
|
|
|
%{__install} -m 755 build-fpm/sapi/fpm/php-fpm %{buildroot}%{_sbindir}/%{_name}-fpm
|
|
|
-%{__install} -m 755 %{SOURCE25} %{buildroot}%{_initdir}/%{_name}-fpm
|
|
|
-sed -i -e 's/@majorver@/%{majorver}/g' %{buildroot}%{_initdir}/%{_name}-fpm
|
|
|
%{__install} -m 644 build-fpm/sapi/fpm/php-fpm.8 %{buildroot}%{_mandir}/man8/%{_name}-fpm.8
|
|
|
%{__install} -m 644 %{SOURCE26} %{buildroot}%{php_confdir}/php-fpm.conf
|
|
|
sed -i -e 's/@majorver@/%{majorver}/g' %{buildroot}%{php_confdir}/php-fpm.conf
|
|
@@ -671,6 +692,17 @@ sed -i -e 's/@majorver@/%{majorver}/g' %{buildroot}%{php_confdir}/php-fpm.conf
|
|
|
sed -i \
|
|
|
-e 's/@majorver@/%{majorver}/g' \
|
|
|
%{buildroot}%{_sysconfdir}/logrotate.d/%{_name}-fpm
|
|
|
+%if %{with systemd}
|
|
|
+mkdir -p %{buildroot}%{_unitdir}
|
|
|
+%{__install} -m 644 %{SOURCE32} \
|
|
|
+ %{buildroot}%{_unitdir}/%{_name}-fpm.service
|
|
|
+sed -i \
|
|
|
+ -e 's/@majorver@/%{majorver}/g' \
|
|
|
+ %{buildroot}%{_unitdir}/%{_name}-fpm.service
|
|
|
+%else
|
|
|
+%{__install} -m 755 %{SOURCE25} %{buildroot}%{_initdir}/%{_name}-fpm
|
|
|
+sed -i -e 's/@majorver@/%{majorver}/g' %{buildroot}%{_initdir}/%{_name}-fpm
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
# Install the Apache2 module, CGI SAPI, config fragment
|
|
@@ -800,22 +832,38 @@ fi
|
|
|
/sbin/update-alternatives \
|
|
|
--install %{_sbindir}/php-fpm php-fpm %{_sbindir}/%{_name}-fpm %{majorver} \
|
|
|
--slave %{_mandir}/man8/php-fpm.8.gz php-fpm.8.gz %{_mandir}/man8/%{_name}-fpm.8.gz
|
|
|
-
|
|
|
# fix broken symlink if it's there
|
|
|
if [ ! -f %{_sbindir}/php-fpm ] ; then
|
|
|
/sbin/update-alternatives --auto php-fpm
|
|
|
fi
|
|
|
+
|
|
|
+%if %{with systemd}
|
|
|
+%systemd_post %{_name}-fpm.service
|
|
|
+%else
|
|
|
/sbin/chkconfig --add %{_name}-fpm
|
|
|
+%endif
|
|
|
|
|
|
%triggerun fpm -- php5-fpm < 5.6.11
|
|
|
/sbin/chkconfig --del php-fpm 2>/dev/null ||:
|
|
|
|
|
|
%preun fpm
|
|
|
-if [ "$1" = 0 ]; then
|
|
|
+%if %{with systemd}
|
|
|
+%systemd_preun %{_name}-fpm.service
|
|
|
+%else
|
|
|
+if [ "$1" = 0 -o -x /bin/systemctl ]; then
|
|
|
+ /sbin/service %{_name}-fpm stop >/dev/null 2>&1 ||:
|
|
|
/sbin/chkconfig --del %{_name}-fpm
|
|
|
+fi
|
|
|
+%endif
|
|
|
+if [ "$1" = 0 ]; then
|
|
|
/sbin/update-alternatives --remove php-fpm %{_sbindir}/php%{majorver}-fpm
|
|
|
fi
|
|
|
|
|
|
+%postun fpm
|
|
|
+%if %{with systemd}
|
|
|
+%systemd_postun_with_restart %{_name}-fpm.service
|
|
|
+%endif
|
|
|
+
|
|
|
%post nginx
|
|
|
/sbin/update-alternatives \
|
|
|
--install %{_sysconfdir}/nginx/php_params \
|
|
@@ -914,7 +962,7 @@ rm -f files.*
|
|
|
%files
|
|
|
%defattr(-,root,root)
|
|
|
%license LICENSE
|
|
|
-%doc CODING_STANDARDS CREDITS EXTENSIONS INSTALL NEWS README*
|
|
|
+%doc CODING_STANDARDS* EXTENSIONS NEWS README*
|
|
|
%doc Zend/ZEND_* TSRM_LICENSE
|
|
|
%doc php.ini-{development,production}
|
|
|
%doc php.gif
|
|
@@ -972,7 +1020,11 @@ rm -f files.*
|
|
|
%files fpm
|
|
|
%defattr(-,root,root)
|
|
|
%{_sbindir}/%{_name}-fpm
|
|
|
+%if %{with systemd}
|
|
|
+%{_unitdir}/%{_name}-fpm.service
|
|
|
+%else
|
|
|
%{_initdir}/%{_name}-fpm
|
|
|
+%endif
|
|
|
%{_mandir}/man8/%{_name}-fpm.8*
|
|
|
%dir %{php_confdir}/fpm.d
|
|
|
%config(noreplace) %{php_confdir}/php-fpm.conf
|
|
@@ -999,6 +1051,11 @@ rm -f files.*
|
|
|
|
|
|
#======================================================================
|
|
|
%changelog
|
|
|
+* Thu Apr 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.4.5-1
|
|
|
+- new upstream release.
|
|
|
+- added systemd support (disabled as default).
|
|
|
+- activated %%debug_package.
|
|
|
+
|
|
|
* Thu Mar 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.4.4-1
|
|
|
- new upstream release.
|
|
|
|