Patchwork gzip: Avoid host contamination during build

login
register
mail settings
Submitter danismostlikely@gmail.com
Date May 27, 2014, 11:38 p.m.
Message ID <CACS+7ZSGKFG06F_jFOJZu7FJqLh2F+FgkW30PSMRQ8Xdio51Qw@mail.gmail.com>
Download mbox | patch
Permalink /patch/72839/
State New
Headers show

Comments

danismostlikely@gmail.com - May 27, 2014, 11:38 p.m.
From: Dan McGregor <dan.mcgregor@usask.ca>

On systems with /bin and /usr/bin merged the gzip recipe may find grep
in /usr/bin, while OE puts it in /bin. Force the recipe to find grep in
the correct place.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
---
 meta/recipes-extended/gzip/gzip.inc | 2 ++
 1 file changed, 2 insertions(+)
Khem Raj - May 28, 2014, 8:29 p.m.
On Tue, May 27, 2014 at 4:38 PM, Dan McGregor <danismostlikely@gmail.com> wrote:
> +EXTRA_OEMAKE = "GREP=${base_bindir}/grep"

is this grep path encoded into gzip and then referred when running ?
danismostlikely@gmail.com - May 28, 2014, 9:23 p.m.
It's encoded in zgrep, which is part of the gzip package.

On 28 May 2014 14:29, Khem Raj <raj.khem@gmail.com> wrote:
> On Tue, May 27, 2014 at 4:38 PM, Dan McGregor <danismostlikely@gmail.com> wrote:
>> +EXTRA_OEMAKE = "GREP=${base_bindir}/grep"
>
> is this grep path encoded into gzip and then referred when running ?
Richard Purdie - May 28, 2014, 11:09 p.m.
On Tue, 2014-05-27 at 17:38 -0600, Dan McGregor wrote:
> From: Dan McGregor <dan.mcgregor@usask.ca>
> 
> On systems with /bin and /usr/bin merged the gzip recipe may find grep
> in /usr/bin, while OE puts it in /bin. Force the recipe to find grep in
> the correct place.
> 
> Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
> ---
>  meta/recipes-extended/gzip/gzip.inc | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-extended/gzip/gzip.inc
> b/meta/recipes-extended/gzip/gzip.inc
> index 920b256..57873cb 100644
> --- a/meta/recipes-extended/gzip/gzip.inc
> +++ b/meta/recipes-extended/gzip/gzip.inc
> @@ -12,6 +12,8 @@ SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
> 
>  inherit autotools texinfo
> 
> +EXTRA_OEMAKE = "GREP=${base_bindir}/grep"
> +
>  do_install_append () {
>   # Rename and move files into /bin (FHS), which is typical place for gzip
>   install -d ${D}${base_bindir}

My worry is what happens to gzip-native. Do we have to encode a path?

Cheers,

Richard
danismostlikely@gmail.com - May 29, 2014, 5:41 p.m.
On May 28, 2014 5:09 PM, "Richard Purdie" <
richard.purdie@linuxfoundation.org> wrote:
>
> On Tue, 2014-05-27 at 17:38 -0600, Dan McGregor wrote:
> > From: Dan McGregor <dan.mcgregor@usask.ca>
> >
> > On systems with /bin and /usr/bin merged the gzip recipe may find grep
> > in /usr/bin, while OE puts it in /bin. Force the recipe to find grep in
> > the correct place.
> >
> > Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
> > ---
> >  meta/recipes-extended/gzip/gzip.inc | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/meta/recipes-extended/gzip/gzip.inc
> > b/meta/recipes-extended/gzip/gzip.inc
> > index 920b256..57873cb 100644
> > --- a/meta/recipes-extended/gzip/gzip.inc
> > +++ b/meta/recipes-extended/gzip/gzip.inc
> > @@ -12,6 +12,8 @@ SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
> >
> >  inherit autotools texinfo
> >
> > +EXTRA_OEMAKE = "GREP=${base_bindir}/grep"
> > +
> >  do_install_append () {
> >   # Rename and move files into /bin (FHS), which is typical place for
gzip
> >   install -d ${D}${base_bindir}
>
> My worry is what happens to gzip-native. Do we have to encode a path?
>
> Cheers,
>
> Richard
>
gzip native does encode a path, but what it encodes should probably be what
gets automatically configured. Would making the EXTRA_OEMAKE variable be
EXTRA_OEMAKE_class-target then?

Patch

diff --git a/meta/recipes-extended/gzip/gzip.inc
b/meta/recipes-extended/gzip/gzip.inc
index 920b256..57873cb 100644
--- a/meta/recipes-extended/gzip/gzip.inc
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -12,6 +12,8 @@  SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"

 inherit autotools texinfo

+EXTRA_OEMAKE = "GREP=${base_bindir}/grep"
+
 do_install_append () {
  # Rename and move files into /bin (FHS), which is typical place for gzip
  install -d ${D}${base_bindir}