Browse Source

php74-7.4.26-1

Tomohiro "Tomo-p" KATO 3 years ago
parent
commit
44dea49cc9
1 changed files with 22 additions and 44 deletions
  1. 22 44
      p/php74/php74-vl.spec

+ 22 - 44
p/php74/php74-vl.spec

@@ -16,11 +16,7 @@
 
 %global php_confdir %{_sysconfdir}/%{_name}
 
-%if "%{?_dist_release}" == "vl6"
-%define gd_name gd21
-%else
 %define gd_name gd
-%endif
 
 %global apache2_confdir %{_sysconfdir}/apache2/conf.d
 %global apache2_moduledir %{_libdir}/apache2/modules
@@ -28,23 +24,21 @@
 %global apache2_cgidir %{apache2_contentdir}/cgi-bin
 %global apache2_fcgidir %{apache2_contentdir}/fcgi-bin
 
-%if "%{?_dist_release}" == "vl6"
-%define www_user apache
-%define www_group apache
-%define fpm_user nobody
-%define fpm_group nobody
-%else
 %define www_user www-data
 %define www_group www-data
 %define fpm_user www-data
 %define fpm_group www-data
+%if %{with systemd}
+%global fpm_sockdir /run/php%{majorver}-fpm
+%else
+%global fpm_sockdir /tmp
 %endif
 
 Name: php%{majorver}
 Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
 Summary(ja): HTML 埋め込み型スクリプト言語 PHP
-Version: 7.4.25
-Release: 2%{_dist_release}%{?with_systemd:.systemd}
+Version: 7.4.26
+Release: 1%{_dist_release}%{?with_systemd:.systemd}
 Group: programming
 Vendor: Project Vine
 Distribution: Vine Linux
@@ -65,13 +59,12 @@ Source28: php-fpm.logrotate
 Source29: php_params
 Source31: macros.php.ver
 Source32: php-fpm.service
+Source33: php-fpm.tmpfiles
 
 # upstream patch
 # for libgd >= 2.3.3
 # https://github.com/php/php-src/commit/b3646440b1808abf0874b6f89027ce53ec5da03f
 Patch1: php-gd2.3.3.patch
-# https://github.com/php/php-src/pull/7596
-Patch2: php-icu70.patch
 
 # Additional feature
 Patch33: php-5.2.4-phpincludedir.patch
@@ -91,11 +84,7 @@ BuildRequires: bison
 BuildRequires: bzip2
 BuildRequires: bzip2-devel
 BuildRequires: curl-devel
-%if "%{?_dist_release}" == "vl6"
-BuildRequires: db4-devel
-%else
 BuildRequires: libdb-devel
-%endif
 BuildRequires: coreutils
 BuildRequires: flex
 BuildRequires: freetype2-devel
@@ -137,10 +126,8 @@ Requires(post): chkconfig
 Requires(preun): chkconfig
 %endif
 
-%if "%{?_dist_release}" != "vl6"
 BuildRequires: www-common
 Requires: www-common
-%endif
 
 Requires(post,preun): alternatives
 Conflicts: php5 < 5.6.11
@@ -337,11 +324,7 @@ databases.
 Summary: A PostgreSQL database module for PHP.
 Group: programming
 BuildRequires: openssl-devel
-%if "%{?_dist_release}" == "vl6"
-BuildRequires: postgresql-devel
-%else
 BuildRequires: libpq-devel
-%endif
 Requires: %{name} = %{version}-%{release}
 Requires: %{name}-pdo
 Provides: %{name}_database
@@ -453,7 +436,6 @@ on each request.
 %setup -q -n %{srcname}
 
 %patch1 -p1
-%patch2 -p1
 
 %patch33 -p1 -b .phpincludedir
 
@@ -568,6 +550,7 @@ popd
 sed \
 	-e 's/@WWWUSER@/%{fpm_user}/' \
 	-e 's/@WWWGROUP@/%{fpm_group}/' \
+	-e 's|@sockdir@|%{fpm_sockdir}|' \
 	-e 's/@majorver@/%{majorver}/' < %{SOURCE27} > default-pool.conf
 
 #----------------------------------------------------------------------
@@ -640,6 +623,12 @@ mkdir -p %{buildroot}%{_unitdir}
 sed -i \
 	-e 's/@majorver@/%{majorver}/g' \
 	%{buildroot}%{_unitdir}/%{_name}-fpm.service
+mkdir -p %{buildroot}%{_tmpfilesdir}
+%{__install} -m 644 %{SOURCE33} \
+	%{buildroot}%{_tmpfilesdir}/%{_name}-fpm.conf
+sed -i \
+	-e 's/@majorver@/%{majorver}/g' \
+	%{buildroot}%{_tmpfilesdir}/%{_name}-fpm.conf
 %else
 %{__install} -m 755 %{SOURCE25} %{buildroot}%{_initdir}/%{_name}-fpm
 sed -i -e 's/@majorver@/%{majorver}/g' %{buildroot}%{_initdir}/%{_name}-fpm
@@ -665,7 +654,9 @@ sed -i \
 # Install the configuration file for Nginx
 mkdir -p %{buildroot}%{_sysconfdir}/nginx
 %{__install} -m 644 %{SOURCE29} %{buildroot}%{_sysconfdir}/nginx/%{_name}_params
-sed -i -e 's/@majorver@/%{majorver}/g' \
+sed -i \
+  -e 's/@majorver@/%{majorver}/g' \
+  -e 's|@sockdir@|%{fpm_sockdir}|g' \
   %{buildroot}%{_sysconfdir}/nginx/%{_name}_params
 
 %{__install} -m 755 -d %{buildroot}%{php_confdir}/php.d
@@ -835,23 +826,6 @@ fi
 
 %if %{with apache2}
 %post apache2
-%if "%{?_dist_release}" == "vl6"
-chown root:apache %{_localstatedir}/%{_name}/session 2>/dev/null || true
-
-MPM=`file /etc/alternatives/apache2 | sed -e 's/^.*apache2\.\([a-z]*\).*$/\1/'`
-if [ "$MPM" != "prefork" ]; then
-  cat <<EOF
-
- Apache2 is configured to use $MPM MPM. But php%{majorver}-apache2 requires
-prefork MPM. Run the following command as root to switch MPM:
-
-    /sbin/update-alternatives --config apache2
-
-EOF
-fi
-
-%else
-
 MPM=`/usr/sbin/apache2ctl -V | grep "Server MPM:" | sed -e 's/^.*: *//'`
 if [ "$MPM" != "prefork" ]; then
   cat <<EOF
@@ -864,7 +838,6 @@ EOF
 fi
 
 %endif
-%endif
 
 
 %clean
@@ -925,6 +898,7 @@ rm -f files.*
 %{_sbindir}/%{_name}-fpm
 %if %{with systemd}
 %{_unitdir}/%{_name}-fpm.service
+%{_tmpfilesdir}/%{_name}-fpm.conf
 %else
 %{_initdir}/%{_name}-fpm
 %endif
@@ -954,6 +928,10 @@ rm -f files.*
 
 #======================================================================
 %changelog
+* Fri Nov 19 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.4.26-1
+- new upstream release.
+- dropped Patch2: fixed in upstream.
+
 * Sat Oct 30 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.4.25-2
 - built with icu-70.1.