diff --git a/php-8.4.0-httpd.patch b/php-8.4.0-httpd.patch index 227468c1515f8b577e6b143c56c11f955dbe61a0..51e3032b43281672d77fc8be4c5ec1915693396b 100644 --- a/php-8.4.0-httpd.patch +++ b/php-8.4.0-httpd.patch @@ -1,13 +1,22 @@ Disable MPM detection +mod_php is always build as NTS for prefork -mod_php is build twice -- as NTS without option -- as ZTS using --enable-maintainer-zts +Disable httpd.conf change diff -up ./sapi/apache2handler/config.m4.mpmcheck ./sapi/apache2handler/config.m4 ---- ./sapi/apache2handler/config.m4.mpmcheck 2024-07-03 15:56:56.882370597 +0200 -+++ ./sapi/apache2handler/config.m4 2024-07-03 15:59:15.967824949 +0200 -@@ -120,11 +120,6 @@ if test "$PHP_APXS2" != "no"; then +--- ./sapi/apache2handler/config.m4.mpmcheck 2025-05-06 14:31:58.000000000 +0200 ++++ ./sapi/apache2handler/config.m4 2025-05-19 15:14:27.710935097 +0200 +@@ -78,8 +78,7 @@ if test "$PHP_APXS2" != "no"; then + INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ +- -S SYSCONFDIR='$APXS_SYSCONFDIR' \ +- -i -a -n php" ++ -i -n php" + fi + + LIBPHP_CFLAGS="-shared" +@@ -120,11 +119,6 @@ if test "$PHP_APXS2" != "no"; then -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 ]) diff --git a/php-8.4.6-embed.patch b/php-8.4.6-embed.patch index 72b5e4ce75958658224111d8444d110870080403..b926b678b1b9bb078542ad8a369075fe206d1d32 100644 --- a/php-8.4.6-embed.patch +++ b/php-8.4.6-embed.patch @@ -7,7 +7,7 @@ diff -up ./sapi/embed/config.m4.embed ./sapi/embed/config.m4 ], [PHP_EMBED_TYPE=shared]) - INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(orig_libdir)" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -release \$(PHP_MAJOR_VERSION).\$(PHP_MINOR_VERSION)" -+ INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(libdir); \$(LIBTOOL) --mode=install \$(INSTALL) -m 0755 \$(OVERALL_TARGET) \$(INSTALL_ROOT)\$(libdir)" ++ INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(LIBTOOL) --mode=install \$(INSTALL) -m 0755 \$(OVERALL_TARGET) \$(INSTALL_ROOT)\$(orig_libdir)" ], [static], [ LIBPHP_CFLAGS="-static" @@ -19,7 +19,20 @@ diff -up ./scripts/php-config.in.embed ./scripts/php-config.in php_cgi_binary=NONE configure_options="@CONFIGURE_OPTIONS@" -php_sapis="@PHP_INSTALLED_SAPIS@" -+php_sapis="apache2handler litespeed fpm phpdbg @PHP_INSTALLED_SAPIS@" ++php_sapis="apache2handler litespeed phpdbg @PHP_INSTALLED_SAPIS@" ini_dir="@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@" ini_path="@EXPANDED_PHP_CONFIG_FILE_PATH@" php_embed_type="@PHP_EMBED_TYPE@" +diff --git a/configure.ac b/configure.ac +index 6dc1e45b34f..895c5153a2d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1306,7 +1306,7 @@ AS_VAR_IF([program_suffix], [NONE], [program_suffix=]) + + orig_libdir=$libdir + AS_CASE([$libdir], +- ['${exec_prefix}/lib'], [libdir=$libdir/php]) ++ [${prefix}/${PHP_LIBDIR}], [libdir=$libdir/php]) + + AS_CASE([$(eval echo $datadir)], + ['${prefix}/share'], [datadir=$datadir/php]) diff --git a/php-8.4.7.tar.xz b/php-8.4.8.tar.xz similarity index 32% rename from php-8.4.7.tar.xz rename to php-8.4.8.tar.xz index 23e8b313e86b57f2a52d9f3ecdd1d539d9653d4d..36d422bb92b1e7222df65f3c871779cd05f87182 100644 --- a/php-8.4.7.tar.xz +++ b/php-8.4.8.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e29f4c23be2816ed005aa3f06bbb8eae0f22cc133863862e893515fc841e65e3 -size 13616620 +oid sha256:aa6a4d330b47eacd83e351658ba8c47747a1e4356456219cfb6d75e7838da091 +size 13619152 diff --git a/php-fpm.service b/php-fpm.service index 2d96ce753eacdb27ab1b08075de1a47956465b10..0aaa112d21c07103c231c632fe1395de28682ef6 100644 --- a/php-fpm.service +++ b/php-fpm.service @@ -4,7 +4,7 @@ [Unit] Description=The PHP FastCGI Process Manager -After=syslog.target network.target +After=network.target [Service] Type=notify diff --git a/php.spec b/php.spec index fbf64aa89f51016834bd2796ecd935bdfbfd0759..d3ad1d19aab9e9b7244c8b511d2eea9724d7384b 100644 --- a/php.spec +++ b/php.spec @@ -4,7 +4,7 @@ %global pdover 20240423 # Extension version %global fileinfover 1.0.5 -%global zipver 1.22.5 +%global zipver 1.22.6 # Adds -z now to the linker flags %global _hardened_build 1 @@ -61,7 +61,7 @@ %bcond_without libgd %bcond_with zip -%global upver 8.4.7 +%global upver 8.4.8 Summary: PHP scripting language for creating dynamic web sites Name: php @@ -816,7 +816,10 @@ cp ext/bcmath/libbcmath/LICENSE libbcmath_LICENSE cp ext/date/lib/LICENSE.rst timelib_LICENSE # Multiple builds for multiple SAPIs -mkdir build-cgi build-apache build-embedded \ +# mod_php (apache2handler) and libphp (embed) can not be built from same tree +mkdir \ + build-cgi \ + build-apache \ %if %{with zts} build-ztscli \ %endif @@ -1020,11 +1023,10 @@ fi make %{?_smp_mflags} } -# Build /usr/bin/php-cgi with the CGI SAPI, and most shared extensions +# Build cli and cgi SAPI, and most shared extensions pushd build-cgi -build --libdir=%{_libdir}/php \ - --enable-pcntl \ +build --enable-pcntl \ --enable-opcache \ --with-capstone \ --enable-phpdbg --enable-phpdbg-readline \ @@ -1103,6 +1105,8 @@ popd without_shared="--disable-gd \ --disable-dom --disable-dba --without-unixODBC \ + --without-mysqli \ + --disable-pdo \ --disable-opcache \ --disable-phpdbg \ --without-ffi \ @@ -1115,35 +1119,23 @@ without_shared="--disable-gd \ --disable-shmop --disable-tokenizer \ --disable-sysvmsg --disable-sysvshm --disable-sysvsem" -# Build Apache module, and the CLI SAPI, /usr/bin/php +# Build Apache module +# use separate build to avoid libedit, libncurses... pushd build-apache build --with-apxs2=%{_httpd_apxs} \ - --libdir=%{_libdir}/php \ %if %{with lsws} --enable-litespeed \ %endif - --without-mysqli \ - --disable-pdo \ ${without_shared} popd -# Build php-fpm +# Build php-fpm and embed pushd build-fpm build --enable-fpm \ --with-fpm-systemd \ --with-fpm-selinux \ --with-fpm-acl \ - --libdir=%{_libdir}/php \ - --without-mysqli \ - --disable-pdo \ - ${without_shared} -popd - -# Build for inclusion as embedded script language into applications, -# /usr/lib[64]/libphp.so -pushd build-embedded -build --enable-embed \ - --without-mysqli --disable-pdo \ + --enable-embed \ ${without_shared} popd @@ -1281,7 +1273,7 @@ make -C build-ztscli install \ %endif # Install the version for embedded script language in applications + php_embed.h -make -C build-embedded install-sapi install-headers \ +make -C build-fpm install-sapi install-headers \ INSTALL_ROOT=$RPM_BUILD_ROOT # Install the php-fpm binary @@ -1293,7 +1285,7 @@ make -C build-cgi install \ INSTALL_ROOT=$RPM_BUILD_ROOT # Use php-config from embed SAPI to reduce used libs -install -m 755 build-embedded/scripts/php-config $RPM_BUILD_ROOT%{_bindir}/php-config +install -m 755 build-fpm/scripts/php-config $RPM_BUILD_ROOT%{_bindir}/php-config # Install the default configuration file install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/ @@ -1324,7 +1316,7 @@ install -m 755 -d $RPM_BUILD_ROOT%{_docdir}/pecl install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/tests/pecl %if %{with lsws} -install -m 755 build-apache/sapi/litespeed/php $RPM_BUILD_ROOT%{_bindir}/lsphp +install -m 755 build-apache/sapi/litespeed/lsphp $RPM_BUILD_ROOT%{_bindir}/lsphp %endif # PHP-FPM stuff @@ -1640,6 +1632,10 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %{_fileattrsdir}/composer.attr %changelog +* Sat Jun 07 2025 Funda Wang - 8.4.8-1 +- New version 8.4.8 +- use same build tree for fpm and embed + * Thu May 08 2025 Funda Wang - 8.4.7-1 - New version 8.4.7