public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/php] private-php86: use same build tree for fpm and embed
@ 2026-11-27 7:33 Remi Collet
0 siblings, 0 replies; only message in thread
From: Remi Collet @ 2026-11-27 7:33 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/php
Branch : private-php86
Commit : 6710dea4031d586ce479cda8a518c132715cf9a8
Author : Remi Collet <remi@fedoraproject.org>
Date : 2025-05-19T16:16:46+02:00
Stats : +47/-31 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/php/c/6710dea4031d586ce479cda8a518c132715cf9a8?branch=private-php86
Log:
use same build tree for fpm and embed
---
diff --git a/php-8.4.0-httpd.patch b/php-8.4.0-httpd.patch
index 227468c..51e3032 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 72b5e4c..b926b67 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.spec b/php.spec
index 8f18b42..c607ae4 100644
--- a/php.spec
+++ b/php.spec
@@ -66,7 +66,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: %{upver}%{?rcver:~%{rcver}}
-Release: 1%{?dist}
+Release: 2%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -716,7 +716,9 @@ cp ext/bcmath/libbcmath/LICENSE libbcmath_LICENSE
cp ext/date/lib/LICENSE.rst timelib_LICENSE
# Multiple builds for multiple SAPIs
-mkdir build-cgi build-embedded \
+# mod_php (apache2handler) and libphp (embed) can not be built from same tree
+mkdir \
+ build-cgi \
%if %{with modphp}
build-apache \
%endif
@@ -881,11 +883,10 @@ fi
%make_build
}
-# 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 \
@@ -962,6 +963,8 @@ popd
without_shared="--without-gd \
--disable-dom --disable-dba --without-unixODBC \
+ --without-mysqli \
+ --disable-pdo \
--disable-opcache \
--disable-phpdbg \
--without-ffi \
@@ -975,33 +978,21 @@ without_shared="--without-gd \
--disable-sysvmsg --disable-sysvshm --disable-sysvsem"
%if %{with modphp}
-# 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 \
- --without-mysqli \
- --disable-pdo \
${without_shared}
popd
%endif
-# Build php-fpm
+# Build php-fpm and embed
pushd build-fpm
build --enable-fpm \
--with-fpm-acl \
--with-fpm-systemd \
--with-fpm-selinux \
- --libdir=%{_libdir}/php \
- --without-mysqli \
- --disable-pdo \
- ${without_shared}
-popd
-
-# Build for inclusion as embedded script language into applications,
-# /usr/lib[64]/libphp7.so
-pushd build-embedded
-build --enable-embed \
- --without-mysqli --disable-pdo \
+ --enable-embed \
${without_shared}
popd
@@ -1135,7 +1126,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
@@ -1147,7 +1138,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}/
@@ -1498,6 +1489,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || :
%changelog
+* Mon May 19 2025 Remi Collet <remi@remirepo.net> - 8.4.7-2
+- use same build tree for fpm and embed
+
* Tue May 6 2025 Remi Collet <remi@remirepo.net> - 8.4.7-1
- Update to 8.4.7 - http://www.php.net/releases/8_4_7.php
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-27 7:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-27 7:33 [rpms/php] private-php86: use same build tree for fpm and embed Remi Collet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox