Patchwork [meta-oe,v2] lvm2: Add dependency on bash

login
register
mail settings
Submitter Mihai Prica
Date July 26, 2013, 2:25 p.m.
Message ID <1374848729-19835-1-git-send-email-mihai.prica@intel.com>
Download mbox | patch
Permalink /patch/54601/
State Changes Requested, archived
Headers show

Comments

Mihai Prica - July 26, 2013, 2:25 p.m.
Fixes rootfs generation error if bash is not included in the image.

Signed-off-by: Mihai Prica <mihai.prica@intel.com>
---
 meta-oe/recipes-support/lvm2/lvm2.inc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Martin Jansa - July 26, 2013, 5:43 p.m.
On Fri, Jul 26, 2013 at 05:25:29PM +0300, Mihai Prica wrote:
> Fixes rootfs generation error if bash is not included in the image.

With rpm right?

Find which script it has in shebang and add bash only to that package
RDEPENDS, if it's something which isn't always needed put it in separate
package.

> 
> Signed-off-by: Mihai Prica <mihai.prica@intel.com>
> ---
>  meta-oe/recipes-support/lvm2/lvm2.inc |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
> index 1f3b62e..cd5a339 100644
> --- a/meta-oe/recipes-support/lvm2/lvm2.inc
> +++ b/meta-oe/recipes-support/lvm2/lvm2.inc
> @@ -1,10 +1,10 @@
>  SECTION = "utils"
>  DESCRIPTION = "LVM2 is a set of utilities to manage logical volumes in Linux."
> -DEPENDS = "udev"
> +DEPENDS = "udev bash"
>  LICENSE = "GPLv2 & LGPLv2"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
>                      file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24"
> -INC_PR = "r1"
> +INC_PR = "r2"
>  
>  
>  S = "${WORKDIR}/LVM2.${PV}"
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Paul Eggleton - July 30, 2013, 11:15 a.m.
On Friday 26 July 2013 19:43:45 Martin Jansa wrote:
> On Fri, Jul 26, 2013 at 05:25:29PM +0300, Mihai Prica wrote:
> > Fixes rootfs generation error if bash is not included in the image.
> 
> With rpm right?

If it's what you're suggesting technically it's broken with any package 
backend, to some degree.
 
> Find which script it has in shebang and add bash only to that package
> RDEPENDS, if it's something which isn't always needed put it in separate
> package.

Or if practical patch the script(s) to remove the bashisms and change the 
shebang to #!/bin/sh instead.

Cheers,
Paul
Mihai Prica - July 30, 2013, 2:47 p.m.
> -----Original Message-----
> From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com]
> 
> On Friday 26 July 2013 19:43:45 Martin Jansa wrote:
> > On Fri, Jul 26, 2013 at 05:25:29PM +0300, Mihai Prica wrote:
> > > Fixes rootfs generation error if bash is not included in the image.
> >
> > With rpm right?
> 
> If it's what you're suggesting technically it's broken with any package backend, to
> some degree.

For the tests I used rpm.

> 
> > Find which script it has in shebang and add bash only to that package
> > RDEPENDS, if it's something which isn't always needed put it in
> > separate package.
> 
> Or if practical patch the script(s) to remove the bashisms and change the shebang
> to #!/bin/sh instead.

I've looked over the scripts and there seem to be 4 files which are using bash. The files 
are part of the core lvm2 package. I've used checkbashism and there are not many 
changes that need to be done to switch to /bin/sh. I'll send an updated patch. 

Thanks,
Mihai

> 
> Cheers,
> Paul
> 
> --
> 
> Paul Eggleton
> Intel Open Source Technology Centre
Martin Jansa - July 30, 2013, 9:22 p.m.
On Tue, Jul 30, 2013 at 12:15:19PM +0100, Paul Eggleton wrote:
> On Friday 26 July 2013 19:43:45 Martin Jansa wrote:
> > On Fri, Jul 26, 2013 at 05:25:29PM +0300, Mihai Prica wrote:
> > > Fixes rootfs generation error if bash is not included in the image.
> > 
> > With rpm right?
> 
> If it's what you're suggesting technically it's broken with any package 
> backend, to some degree.

Agreed, I was just commenting on it because "rootfs generation error if
bash is not included" is quite vague and it could be also bashism in
postinst script.

> > Find which script it has in shebang and add bash only to that package
> > RDEPENDS, if it's something which isn't always needed put it in separate
> > package.
> 
> Or if practical patch the script(s) to remove the bashisms and change the 
> shebang to #!/bin/sh instead.
> 
> Cheers,
> Paul
> 
> -- 
> 
> Paul Eggleton
> Intel Open Source Technology Centre
Mihai Prica - Aug. 5, 2013, 12:04 p.m.
>-----Original Message-----
>From: openembedded-devel-bounces@lists.openembedded.org
>[mailto:openembedded-devel-bounces@lists.openembedded.org] On Behalf Of
>Prica, Mihai
>> -----Original Message-----
>> From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com]
>>
>> On Friday 26 July 2013 19:43:45 Martin Jansa wrote:
>> > On Fri, Jul 26, 2013 at 05:25:29PM +0300, Mihai Prica wrote:
>> > > Fixes rootfs generation error if bash is not included in the image.
>> >
>> > With rpm right?
>>
>> If it's what you're suggesting technically it's broken with any
>> package backend, to some degree.
>
>For the tests I used rpm.
>
>>
>> > Find which script it has in shebang and add bash only to that
>> > package RDEPENDS, if it's something which isn't always needed put it
>> > in separate package.

From what I discovered, the scripts in question provide some of the core functionality
for the package so there is no point in splitting them.

>>
>> Or if practical patch the script(s) to remove the bashisms and change
>> the shebang to #!/bin/sh instead.
>
>I've looked over the scripts and there seem to be 4 files which are using bash. The
>files are part of the core lvm2 package. I've used checkbashism and there are not
>many changes that need to be done to switch to /bin/sh. I'll send an updated
>patch.

I've taken a deeper look into the problem and it seems there are some specific 
bashisms that are hard to replace and that might break the functionality. 

I've sent an updated patch changing the DEPENDS to an RDEPENDS.

Thanks,
Mihai

>
>Thanks,
>Mihai
>
>>
>> Cheers,
>> Paul
>>
>> --
>>
>> Paul Eggleton
>> Intel Open Source Technology Centre
>_______________________________________________
>Openembedded-devel mailing list
>Openembedded-devel@lists.openembedded.org
>http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Patch

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 1f3b62e..cd5a339 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -1,10 +1,10 @@ 
 SECTION = "utils"
 DESCRIPTION = "LVM2 is a set of utilities to manage logical volumes in Linux."
-DEPENDS = "udev"
+DEPENDS = "udev bash"
 LICENSE = "GPLv2 & LGPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
                     file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24"
-INC_PR = "r1"
+INC_PR = "r2"
 
 
 S = "${WORKDIR}/LVM2.${PV}"