aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-01-07 14:52:47 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2015-01-08 12:04:26 +0100
commit4aafeeecefece5f43773961dde3f33487ac4f02d (patch)
tree7c34715ed09d1035d1a264a6bacb408e1d2983ec
parent061b7f1263cb134ead27e59bb795f0c00b274828 (diff)
downloadmeta-openembedded-contrib-4aafeeecefece5f43773961dde3f33487ac4f02d.tar.gz
meta-openembedded-contrib-4aafeeecefece5f43773961dde3f33487ac4f02d.tar.bz2
meta-openembedded-contrib-4aafeeecefece5f43773961dde3f33487ac4f02d.zip
php: fix phar script packaging
Fix several issues with how the phar package is installed and packaged: * The symlink was pointing to an absolute path on the host, which naturally does not work on the target * The script itself had a shebang pointing to a path on the host * A file-rdeps warning was occurring due to rpmdeps detecting that the script requires the php binary; in order to prevent the main php package depending on php-cli which provides the php binary, move the phar script to its own package (I suspect most people won't need it anyway). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--meta-oe/recipes-devtools/php/php/phar-makefile.patch29
-rw-r--r--meta-oe/recipes-devtools/php/php_5.5.20.bb4
2 files changed, 23 insertions, 10 deletions
diff --git a/meta-oe/recipes-devtools/php/php/phar-makefile.patch b/meta-oe/recipes-devtools/php/php/phar-makefile.patch
index 8a1136da51..2851b0f8df 100644
--- a/meta-oe/recipes-devtools/php/php/phar-makefile.patch
+++ b/meta-oe/recipes-devtools/php/php/phar-makefile.patch
@@ -1,12 +1,15 @@
-Upstream-status: Unknown
+Fix phar packaging
+
+Inherited from OE-Classic, with some additions to fix host paths leaking
+into the target package.
+
+Upstream-Status: Inappropriate [config]
diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag
-old mode 100644
-new mode 100755
-index ed6de9f..9d03198
+index 6516ddf..36e6cf4 100644
--- a/ext/phar/Makefile.frag
+++ b/ext/phar/Makefile.frag
-@@ -5,19 +5,8 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
+@@ -5,20 +5,9 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0'
PHP_PHARCMD_EXECUTABLE = ` \
@@ -23,11 +26,19 @@ index ed6de9f..9d03198
- else \
- $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \
- fi;`
+-PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
+ $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; `
+
- PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
++PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
$(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc
---
-1.9.3
-
+ -@test -d $(builddir)/phar || mkdir $(builddir)/phar
+@@ -39,7 +28,7 @@ install-pharcmd: pharcmd
+ -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
+ $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)
+ -@rm -f $(INSTALL_ROOT)$(bindir)/phar
+- $(LN_S) -f $(INSTALL_ROOT)$(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar
++ $(LN_S) -f $(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar
+ @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
+ @$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.1
+ @$(INSTALL_DATA) $(builddir)/phar.phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.phar.1
diff --git a/meta-oe/recipes-devtools/php/php_5.5.20.bb b/meta-oe/recipes-devtools/php/php_5.5.20.bb
index 7f11b7fd7d..7821f0aec1 100644
--- a/meta-oe/recipes-devtools/php/php_5.5.20.bb
+++ b/meta-oe/recipes-devtools/php/php_5.5.20.bb
@@ -183,9 +183,10 @@ php_sysroot_preprocess () {
MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}"
-PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
+PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
RDEPENDS_${PN}-pear = "${PN}"
+RDEPENDS_${PN}-phar = "${PN}-cli"
RDEPENDS_${PN}-cli = "${PN}"
RDEPENDS_${PN}-modphp = "${PN} apache2"
RDEPENDS_${PN}-dev = "${PN}"
@@ -197,6 +198,7 @@ FILES_${PN}-dbg =+ "${bindir}/.debug \
${libdir}/apache2/modules/.debug"
FILES_${PN}-doc += "${PHP_LIBDIR}/php/doc"
FILES_${PN}-cli = "${bindir}/php"
+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"
FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"