* [PATCH] gzip: fix MakeMaker issues with using wrong SHELL/GREP
@ 2013-11-28 10:26 Ming Liu
2013-11-29 8:36 ` Ming Liu
0 siblings, 1 reply; 3+ messages in thread
From: Ming Liu @ 2013-11-28 10:26 UTC (permalink / raw)
To: openembedded-core
Paths of shell/grep is being determined by detecting from host at configure
stage, and then will be hard coded into scripts like zgrep, this would
cause a following runtime error:
"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
Fixed by using runtime paths instead.
Signed-off-by: Ming Liu <ming.liu@windriver.com>
---
meta/recipes-extended/gzip/gzip.inc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc
index 6ec1dae..4b265a6 100644
--- a/meta/recipes-extended/gzip/gzip.inc
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -12,6 +12,11 @@ SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
inherit autotools
+do_configure_prepend () {
+ sed '\#|/bin/sh|\$(SHELL)|#d' -i Makefile.am
+ sed 's#\(|\[@\]GREP@|\)\$(GREP)#\1/bin/grep#g' -i Makefile.am
+}
+
do_install_append () {
# Rename and move files into /bin (FHS), which is typical place for gzip
install -d ${D}${base_bindir}
--
1.8.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] gzip: fix MakeMaker issues with using wrong SHELL/GREP
2013-11-28 10:26 [PATCH] gzip: fix MakeMaker issues with using wrong SHELL/GREP Ming Liu
@ 2013-11-29 8:36 ` Ming Liu
0 siblings, 0 replies; 3+ messages in thread
From: Ming Liu @ 2013-11-29 8:36 UTC (permalink / raw)
To: openembedded-core
On 11/28/2013 06:26 PM, Ming Liu wrote:
> Paths of shell/grep is being determined by detecting from host at configure
> stage, and then will be hard coded into scripts like zgrep, this would
> cause a following runtime error:
> "/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
>
> Fixed by using runtime paths instead.
>
> Signed-off-by: Ming Liu <ming.liu@windriver.com>
> ---
> meta/recipes-extended/gzip/gzip.inc | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc
> index 6ec1dae..4b265a6 100644
> --- a/meta/recipes-extended/gzip/gzip.inc
> +++ b/meta/recipes-extended/gzip/gzip.inc
> @@ -12,6 +12,11 @@ SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
>
> inherit autotools
>
> +do_configure_prepend () {
> + sed '\#|/bin/sh|\$(SHELL)|#d' -i Makefile.am
> + sed 's#\(|\[@\]GREP@|\)\$(GREP)#\1/bin/grep#g' -i Makefile.am
There is a hardcode /bin/grep here, should be removed, and I am told
it's better to use patch instead of prepending to do_configure task, so
I will send the V2 soon.
//Ming Liu
> +}
> +
> do_install_append () {
> # Rename and move files into /bin (FHS), which is typical place for gzip
> install -d ${D}${base_bindir}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] gzip: fix MakeMaker issues with using wrong SHELL/GREP
@ 2014-11-21 9:50 jackie.huang
0 siblings, 0 replies; 3+ messages in thread
From: jackie.huang @ 2014-11-21 9:50 UTC (permalink / raw)
To: openembedded-core
From: Jackie Huang <jackie.huang@windriver.com>
A set of substitution is being processed to all target scripts with sed by
replacing some key words with the detected values at configure time, this
is exactly not compliant with cross compling, and will cause missing path
errors at run time like:
"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
Fixed by removing unneeded substitution and using real runtime paths
instead.
Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../gzip/gzip-1.6/wrong-path-fix.patch | 31 ++++++++++++++++++++++
meta/recipes-extended/gzip/gzip.inc | 1 +
2 files changed, 32 insertions(+)
create mode 100644 meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch
diff --git a/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch
new file mode 100644
index 0000000..92863d6
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch
@@ -0,0 +1,31 @@
+fix MakeMaker issues with using wrong SHELL/GREP
+
+A set of substitution is being processed to all target scripts with sed by
+replacing some key words with the detected values at configure time, this
+is exactly not compliant with cross compling, and will cause missing path
+errors at run time like:
+"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
+
+Fixed by removing unneeded substitution and using real runtime paths
+instead.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
+Upstream-Status: Pending
+
+Index: gzip-1.3.12/Makefile.am
+===================================================================
+diff -urpN a/Makefile.am b/Makefile.am
+--- a/Makefile.am 2013-11-30 10:06:09.402234871 +0800
++++ b/Makefile.am 2013-11-30 10:13:42.952236025 +0800
+@@ -81,9 +81,8 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS)
+ SUFFIXES = .in
+ .in:
+ $(AM_V_GEN)sed \
+- -e 's|/bin/sh|$(SHELL)|g' \
+ -e 's|[@]bindir@|'\''$(bindir)'\''|g' \
+- -e 's|[@]GREP@|$(GREP)|g' \
++ -e 's|[@]GREP@|$(base_bindir)/grep|g' \
+ -e 's|[@]VERSION@|$(VERSION)|g' \
+ $(srcdir)/$@.in >$@-t \
+ && chmod a+x $@-t \
diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc
index 671b1eb..b90856e 100644
--- a/meta/recipes-extended/gzip/gzip.inc
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
+SRC_URI_append_class-target = " file://wrong-path-fix.patch"
inherit autotools texinfo
--
2.0.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-21 9:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-28 10:26 [PATCH] gzip: fix MakeMaker issues with using wrong SHELL/GREP Ming Liu
2013-11-29 8:36 ` Ming Liu
-- strict thread matches above, loose matches on Subject: below --
2014-11-21 9:50 jackie.huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox