mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-12-14 06:16:04 +01:00
php: remove php-phar to support reproducible build
According to [1][2], generate phar.php during cross-compile can't be
done, but upstream test res of $(TEST_PHP_EXECUTABLE) is not suitable
for Yocto.
Explicitly set TEST_PHP_EXECUTABLE_RES = "1" to not generate phar.php
for target recipe
Drop 0005-sapi-cli-config.m4-fix-build-directory.patch which is obsolete
for generating phar.php
After apply this commit
...log.do_compile...
Generating phar.php
Skipping phar.php generating during cross compilation
Generating phar.phar
Skipping phar.phar generating during cross compilation
...log.do_compile...
Then php supports reproducible build
[1] https://github.com/php/php-src/issues/11099
[2] 93fa9613e1
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
986fd73afb
commit
6d835df920
|
|
@ -231,7 +231,6 @@ OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES += " \
|
|||
pcp-src \
|
||||
perfetto \
|
||||
perfetto-dbg \
|
||||
php-phar \
|
||||
pidgin \
|
||||
pidgin-dbg \
|
||||
pim435-staticdev \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
From 41c8c5821fc74efea8b086927a17aa3bc7aef6bb Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Tue, 18 Nov 2025 16:25:28 +0800
|
||||
Subject: [PATCH] explicitly not generate phar.php during cross-compile
|
||||
|
||||
According to [1][2], Generating phar.php during cross-compile
|
||||
can't be done, explicitly set TEST_PHP_EXECUTABLE_RES = 1
|
||||
for target recipe to not generate phar.php for cross-compile
|
||||
|
||||
[1] https://github.com/php/php-src/issues/11099
|
||||
[2] https://github.com/php/php-src/commit/93fa9613e162d1a0e8479ba83c4b6a399846e209
|
||||
|
||||
Upstream-Status: Inappropriate [OE specific]
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
ext/phar/Makefile.frag | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag
|
||||
index 09d577d7..2f85847c 100644
|
||||
--- a/ext/phar/Makefile.frag
|
||||
+++ b/ext/phar/Makefile.frag
|
||||
@@ -19,7 +19,7 @@ $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc
|
||||
-@test -f $(builddir)/phar/phar.inc || cp $(srcdir)/phar/phar.inc $(builddir)/phar/phar.inc
|
||||
|
||||
TEST_PHP_EXECUTABLE = $(shell $(PHP_EXECUTABLE) -v 2>&1)
|
||||
-TEST_PHP_EXECUTABLE_RES = $(shell echo "$(TEST_PHP_EXECUTABLE)" | grep -c 'Exec format error')
|
||||
+TEST_PHP_EXECUTABLE_RES = "1"
|
||||
|
||||
$(builddir)/phar.php: $(srcdir)/build_precommand.php $(srcdir)/phar/*.inc $(srcdir)/phar/*.php $(SAPI_CLI_PATH)
|
||||
-@(echo "Generating phar.php"; \
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
From 581751f8b612c381a4a7914a33bfc4130853d305 Mon Sep 17 00:00:00 2001
|
||||
From: Claude Bing <cbing@cybernetics.com>
|
||||
Date: Tue, 9 Nov 2021 13:08:06 -0500
|
||||
Subject: [PATCH 5/5] sapi/cli/config.m4: fix build directory
|
||||
|
||||
Upstream-Status: Inappropriate
|
||||
|
||||
update patch to version 7.4.4
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
|
||||
update patch to version 8.0.12
|
||||
Signed-off-by: Claude Bing <cbing@cybernetics.com>
|
||||
|
||||
update patch for version 8.4.4
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
sapi/cli/config.m4 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4
|
||||
index 76c2d64e8..0c7436fd9 100644
|
||||
--- a/sapi/cli/config.m4
|
||||
+++ b/sapi/cli/config.m4
|
||||
@@ -50,7 +50,7 @@ if test "$PHP_CLI" != "no"; then
|
||||
])
|
||||
|
||||
dnl Set executable for tests.
|
||||
- PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)"
|
||||
+ PHP_EXECUTABLE="${PHP_NATIVE_DIR}/php"
|
||||
|
||||
PHP_SUBST([PHP_EXECUTABLE])
|
||||
PHP_SUBST([SAPI_CLI_PATH])
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \
|
|||
SRC_URI:append:class-target = " \
|
||||
file://0003-iconv-fix-detection.patch \
|
||||
file://0004-pear-fix-Makefile.frag-for-Yocto.patch \
|
||||
file://0005-sapi-cli-config.m4-fix-build-directory.patch \
|
||||
file://0005-explicitly-not-generate-phar.php-during-cross-compil.patch \
|
||||
file://php-fpm.conf \
|
||||
file://php-fpm-apache.conf \
|
||||
file://70_mod_php${PHP_MAJOR_VERSION}.conf \
|
||||
|
|
@ -230,11 +230,10 @@ php_sysroot_preprocess () {
|
|||
|
||||
MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}"
|
||||
|
||||
PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-phpdbg ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-opcache ${PN}"
|
||||
PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-phpdbg ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-opcache ${PN}"
|
||||
|
||||
RDEPENDS:${PN} += "libgcc"
|
||||
RDEPENDS:${PN}-pear = "${PN}"
|
||||
RDEPENDS:${PN}-phar = "${PN}-cli"
|
||||
RDEPENDS:${PN}-cli = "${PN}"
|
||||
RDEPENDS:${PN}-modphp = "${PN} apache2"
|
||||
RDEPENDS:${PN}-opcache = "${PN}"
|
||||
|
|
@ -254,7 +253,6 @@ FILES:${PN}-dbg =+ "${bindir}/.debug \
|
|||
FILES:${PN}-doc += "${PHP_LIBDIR}/php/doc"
|
||||
FILES:${PN}-cli = "${bindir}/php"
|
||||
FILES:${PN}-phpdbg = "${bindir}/phpdbg"
|
||||
FILES:${PN}-phar = "${bindir}/phar*"
|
||||
FILES:${PN}-cgi = "${bindir}/php-cgi"
|
||||
FILES:${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${sysconfdir}/php-fpm.d/www.conf.default"
|
||||
FILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user