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>
This commit is contained in:
Paul Eggleton
2015-01-07 14:52:47 +00:00
committed by Martin Jansa
parent 061b7f1263
commit 4aafeeecef
2 changed files with 23 additions and 10 deletions
@@ -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
+3 -1
View File
@@ -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"