Patchwork [3/3] wic: add fakeroot to the populate-extfs step

login
register
mail settings
Submitter tom.zanussi@linux.intel.com
Date Oct. 16, 2013, 5:14 a.m.
Message ID <3e3f7120140dc606369f19fbfca3e222db06274d.1381898855.git.tom.zanussi@linux.intel.com>
Download mbox | patch
Permalink /patch/59983/
State New
Headers show

Comments

tom.zanussi@linux.intel.com - Oct. 16, 2013, 5:14 a.m.
Without this, files in the generated filesystem pick up the wrong
ownership.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Richard Purdie - Oct. 16, 2013, 12:09 p.m.
On Wed, 2013-10-16 at 00:14 -0500, Tom Zanussi wrote:
> Without this, files in the generated filesystem pick up the wrong
> ownership.
> 
> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> ---
>  scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
> index 302cace..309abee 100644
> --- a/scripts/lib/mic/kickstart/custom_commands/partition.py
> +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
> @@ -216,7 +216,7 @@ class Wic_PartData(Mic_PartData):
>          """
>          Prepare content for an ext2/3/4 rootfs partition.
>          """
> -        populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot
> +        populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot
>          image_extra_space = 10240
>  
>          image_rootfs = rootfs_dir

We don't use fakeroot, please use pseudo. If pseudo doesn't work, we
need to figure out why and fix it.

Cheers,

Richard
Darren Hart - Oct. 16, 2013, 3:10 p.m.
On Wed, 2013-10-16 at 13:09 +0100, Richard Purdie wrote:
> On Wed, 2013-10-16 at 00:14 -0500, Tom Zanussi wrote:
> > Without this, files in the generated filesystem pick up the wrong
> > ownership.
> > 
> > Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> > ---
> >  scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
> > index 302cace..309abee 100644
> > --- a/scripts/lib/mic/kickstart/custom_commands/partition.py
> > +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
> > @@ -216,7 +216,7 @@ class Wic_PartData(Mic_PartData):
> >          """
> >          Prepare content for an ext2/3/4 rootfs partition.
> >          """
> > -        populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot
> > +        populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot
> >          image_extra_space = 10240
> >  
> >          image_rootfs = rootfs_dir
> 
> We don't use fakeroot, please use pseudo. If pseudo doesn't work, we
> need to figure out why and fix it.
> 

Ultimately this needs to work independently from bitbake. Is that
practical if we use pseudo here?
Richard Purdie - Oct. 16, 2013, 3:36 p.m.
On Wed, 2013-10-16 at 08:10 -0700, Darren Hart wrote:
> On Wed, 2013-10-16 at 13:09 +0100, Richard Purdie wrote:
> > On Wed, 2013-10-16 at 00:14 -0500, Tom Zanussi wrote:
> > > Without this, files in the generated filesystem pick up the wrong
> > > ownership.
> > > 
> > > Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> > > ---
> > >  scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
> > > index 302cace..309abee 100644
> > > --- a/scripts/lib/mic/kickstart/custom_commands/partition.py
> > > +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
> > > @@ -216,7 +216,7 @@ class Wic_PartData(Mic_PartData):
> > >          """
> > >          Prepare content for an ext2/3/4 rootfs partition.
> > >          """
> > > -        populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot
> > > +        populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot
> > >          image_extra_space = 10240
> > >  
> > >          image_rootfs = rootfs_dir
> > 
> > We don't use fakeroot, please use pseudo. If pseudo doesn't work, we
> > need to figure out why and fix it.
> > 
> 
> Ultimately this needs to work independently from bitbake. Is that
> practical if we use pseudo here?

pseudo is an independent project and you can build and use it outside of
bitbake no problems at all. My worry is we didn't adopt fakeroot for
many good reasons. I don't want "fixing fakeroot" to suddenly appear on
the agenda. We did that and its called pseudo.

Cheers,

Richard
Darren Hart - Oct. 16, 2013, 4:05 p.m.
On Wed, 2013-10-16 at 08:10 -0700, Darren Hart wrote:
> On Wed, 2013-10-16 at 13:09 +0100, Richard Purdie wrote:
> > On Wed, 2013-10-16 at 00:14 -0500, Tom Zanussi wrote:
> > > Without this, files in the generated filesystem pick up the wrong
> > > ownership.
> > > 
> > > Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> > > ---
> > >  scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
> > > index 302cace..309abee 100644
> > > --- a/scripts/lib/mic/kickstart/custom_commands/partition.py
> > > +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
> > > @@ -216,7 +216,7 @@ class Wic_PartData(Mic_PartData):
> > >          """
> > >          Prepare content for an ext2/3/4 rootfs partition.
> > >          """
> > > -        populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot
> > > +        populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot
> > >          image_extra_space = 10240
> > >  
> > >          image_rootfs = rootfs_dir
> > 
> > We don't use fakeroot, please use pseudo. If pseudo doesn't work, we
> > need to figure out why and fix it.
> > 
> 
> Ultimately this needs to work independently from bitbake. Is that
> practical if we use pseudo here?

Starting to get a bit out of scope for this discussion, but it does
impact the utility of the tool. I don't see a package for pseudo in
either Ubuntu or Fedora. The lack of a package would definitely increase
the barrier to use (lots of people really dislike having to build their
own sources and muck up their filesystem with non-package files).

Has any work already been kicked off to try and get pseudo packaged in
the major distributions? Who would the right people be to work with on
that?

BTW, I'm not arguing for using fakeroot here, just trying to look at the
big picture of using wic and what additional effort might be required to
make it successful.
Richard Purdie - Oct. 16, 2013, 4:32 p.m.
On Wed, 2013-10-16 at 09:05 -0700, Darren Hart wrote:
> On Wed, 2013-10-16 at 08:10 -0700, Darren Hart wrote:
> > On Wed, 2013-10-16 at 13:09 +0100, Richard Purdie wrote:
> > > On Wed, 2013-10-16 at 00:14 -0500, Tom Zanussi wrote:
> > > > Without this, files in the generated filesystem pick up the wrong
> > > > ownership.
> > > > 
> > > > Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> > > > ---
> > > >  scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
> > > > index 302cace..309abee 100644
> > > > --- a/scripts/lib/mic/kickstart/custom_commands/partition.py
> > > > +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
> > > > @@ -216,7 +216,7 @@ class Wic_PartData(Mic_PartData):
> > > >          """
> > > >          Prepare content for an ext2/3/4 rootfs partition.
> > > >          """
> > > > -        populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot
> > > > +        populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot
> > > >          image_extra_space = 10240
> > > >  
> > > >          image_rootfs = rootfs_dir
> > > 
> > > We don't use fakeroot, please use pseudo. If pseudo doesn't work, we
> > > need to figure out why and fix it.
> > > 
> > 
> > Ultimately this needs to work independently from bitbake. Is that
> > practical if we use pseudo here?
> 
> Starting to get a bit out of scope for this discussion, but it does
> impact the utility of the tool. I don't see a package for pseudo in
> either Ubuntu or Fedora. The lack of a package would definitely increase
> the barrier to use (lots of people really dislike having to build their
> own sources and muck up their filesystem with non-package files).
> 
> Has any work already been kicked off to try and get pseudo packaged in
> the major distributions? Who would the right people be to work with on
> that?
> 
> BTW, I'm not arguing for using fakeroot here, just trying to look at the
> big picture of using wic and what additional effort might be required to
> make it successful.

I understand that, I'd suggest one solution of pointing people at our
standalone buildtools tarball which we can easily include pseudo in. It
would also be nice to see it as a tool in its own right in distros.

My main worry is that we did used to run into a lot of weird fakeroot
bugs, I really don't want to end up there again...

Cheers,

Richard

Patch

diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
index 302cace..309abee 100644
--- a/scripts/lib/mic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
@@ -216,7 +216,7 @@  class Wic_PartData(Mic_PartData):
         """
         Prepare content for an ext2/3/4 rootfs partition.
         """
-        populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot
+        populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot
         image_extra_space = 10240
 
         image_rootfs = rootfs_dir