diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-01-07 14:52:47 +0000 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-01-08 12:04:26 +0100 |
commit | 4aafeeecefece5f43773961dde3f33487ac4f02d (patch) | |
tree | 7c34715ed09d1035d1a264a6bacb408e1d2983ec /meta-oe/recipes-devtools/php | |
parent | 061b7f1263cb134ead27e59bb795f0c00b274828 (diff) | |
download | meta-openembedded-4aafeeecefece5f43773961dde3f33487ac4f02d.tar.gz |
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>
Diffstat (limited to 'meta-oe/recipes-devtools/php')
-rw-r--r-- | meta-oe/recipes-devtools/php/php/phar-makefile.patch | 29 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/php/php_5.5.20.bb | 4 |
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 8a1136da5..2851b0f8d 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 @@ | |||
1 | Upstream-status: Unknown | 1 | Fix phar packaging |
2 | |||
3 | Inherited from OE-Classic, with some additions to fix host paths leaking | ||
4 | into the target package. | ||
5 | |||
6 | Upstream-Status: Inappropriate [config] | ||
2 | 7 | ||
3 | diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag | 8 | diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag |
4 | old mode 100644 | 9 | index 6516ddf..36e6cf4 100644 |
5 | new mode 100755 | ||
6 | index ed6de9f..9d03198 | ||
7 | --- a/ext/phar/Makefile.frag | 10 | --- a/ext/phar/Makefile.frag |
8 | +++ b/ext/phar/Makefile.frag | 11 | +++ b/ext/phar/Makefile.frag |
9 | @@ -5,19 +5,8 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar | 12 | @@ -5,20 +5,9 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar |
10 | 13 | ||
11 | PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' | 14 | PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' |
12 | PHP_PHARCMD_EXECUTABLE = ` \ | 15 | PHP_PHARCMD_EXECUTABLE = ` \ |
@@ -23,11 +26,19 @@ index ed6de9f..9d03198 | |||
23 | - else \ | 26 | - else \ |
24 | - $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \ | 27 | - $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \ |
25 | - fi;` | 28 | - fi;` |
29 | -PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` | ||
26 | + $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; ` | 30 | + $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; ` |
27 | + | 31 | + |
28 | PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` | 32 | +PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` |
29 | 33 | ||
30 | $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc | 34 | $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc |
31 | -- | 35 | -@test -d $(builddir)/phar || mkdir $(builddir)/phar |
32 | 1.9.3 | 36 | @@ -39,7 +28,7 @@ install-pharcmd: pharcmd |
33 | 37 | -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) | |
38 | $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir) | ||
39 | -@rm -f $(INSTALL_ROOT)$(bindir)/phar | ||
40 | - $(LN_S) -f $(INSTALL_ROOT)$(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar | ||
41 | + $(LN_S) -f $(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar | ||
42 | @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1 | ||
43 | @$(INSTALL_DATA) $(builddir)/phar.1 $(INSTALL_ROOT)$(mandir)/man1/phar.1 | ||
44 | @$(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 7f11b7fd7..7821f0aec 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 () { | |||
183 | 183 | ||
184 | MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}" | 184 | MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}" |
185 | 185 | ||
186 | PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}" | 186 | 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}" |
187 | 187 | ||
188 | RDEPENDS_${PN}-pear = "${PN}" | 188 | RDEPENDS_${PN}-pear = "${PN}" |
189 | RDEPENDS_${PN}-phar = "${PN}-cli" | ||
189 | RDEPENDS_${PN}-cli = "${PN}" | 190 | RDEPENDS_${PN}-cli = "${PN}" |
190 | RDEPENDS_${PN}-modphp = "${PN} apache2" | 191 | RDEPENDS_${PN}-modphp = "${PN} apache2" |
191 | RDEPENDS_${PN}-dev = "${PN}" | 192 | RDEPENDS_${PN}-dev = "${PN}" |
@@ -197,6 +198,7 @@ FILES_${PN}-dbg =+ "${bindir}/.debug \ | |||
197 | ${libdir}/apache2/modules/.debug" | 198 | ${libdir}/apache2/modules/.debug" |
198 | FILES_${PN}-doc += "${PHP_LIBDIR}/php/doc" | 199 | FILES_${PN}-doc += "${PHP_LIBDIR}/php/doc" |
199 | FILES_${PN}-cli = "${bindir}/php" | 200 | FILES_${PN}-cli = "${bindir}/php" |
201 | FILES_${PN}-phar = "${bindir}/phar*" | ||
200 | FILES_${PN}-cgi = "${bindir}/php-cgi" | 202 | FILES_${PN}-cgi = "${bindir}/php-cgi" |
201 | FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm" | 203 | FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm" |
202 | FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" | 204 | FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" |