Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] a few wic fixes
@ 2013-10-16  5:14 Tom Zanussi
  2013-10-16  5:14 ` [PATCH 1/3] wic: check for build artifacts Tom Zanussi
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Tom Zanussi @ 2013-10-16  5:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tom Zanussi

For problems noticed while testing.

The following changes since commit 2b5bac02196b8bd30d223d508f5f7d4300889fd7:

  poky: Update Version post release (2013-10-14 16:59:12 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib.git tzanussi/wic-fixes-0
  http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/wic-fixes-0

Tom Zanussi (3):
  wic: check for build artifacts
  wic: check passed-in build artifact directories
  wic: add fakeroot to the populate-extfs step

 .../lib/mic/kickstart/custom_commands/partition.py   |  2 +-
 scripts/wic                                          | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

-- 
1.7.11.4



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] wic: check for build artifacts
  2013-10-16  5:14 [PATCH 0/3] a few wic fixes Tom Zanussi
@ 2013-10-16  5:14 ` Tom Zanussi
  2013-10-16  5:14 ` [PATCH 2/3] wic: check passed-in build artifact directories Tom Zanussi
  2013-10-16  5:14 ` [PATCH 3/3] wic: add fakeroot to the populate-extfs step Tom Zanussi
  2 siblings, 0 replies; 9+ messages in thread
From: Tom Zanussi @ 2013-10-16  5:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tom Zanussi

wic needs to be given one form of build artifacts or another -
complain if the user doesn't do that.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 scripts/wic | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/scripts/wic b/scripts/wic
index 06e72bb..aa2791a 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -75,6 +75,14 @@ def wic_create_subcommand(args, usage_str):
         parser.print_help()
         sys.exit(1)
 
+    if not options.image_name and not (options.rootfs_dir and
+                                       options.bootimg_dir and
+                                       options.kernel_dir and
+                                       options.native_sysroot):
+        print "Build artifacts not completely specified, exiting."
+        print "  (Use 'wic -e' or 'wic -r -b -k -n' to specify artifacts)"
+        sys.exit(1)
+
     if not options.image_name:
         options.build_check = False
 
-- 
1.7.11.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] wic: check passed-in build artifact directories
  2013-10-16  5:14 [PATCH 0/3] a few wic fixes Tom Zanussi
  2013-10-16  5:14 ` [PATCH 1/3] wic: check for build artifacts Tom Zanussi
@ 2013-10-16  5:14 ` Tom Zanussi
  2013-10-16  5:14 ` [PATCH 3/3] wic: add fakeroot to the populate-extfs step Tom Zanussi
  2 siblings, 0 replies; 9+ messages in thread
From: Tom Zanussi @ 2013-10-16  5:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tom Zanussi

Make sure they exist - complain if they don't.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 scripts/wic | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/wic b/scripts/wic
index aa2791a..425b665 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -119,6 +119,18 @@ def wic_create_subcommand(args, usage_str):
         bootimg_dir = options.bootimg_dir
         kernel_dir = options.kernel_dir
         native_sysroot = options.native_sysroot
+        if not os.path.isdir(rootfs_dir):
+            print "--roofs-dir (-r) not found, exiting\n"
+            sys.exit(1)
+        if not os.path.isdir(bootimg_dir):
+            print "--bootimg-dir (-b) not found, exiting\n"
+            sys.exit(1)
+        if not os.path.isdir(kernel_dir):
+            print "--kernel-dir (-k) not found, exiting\n"
+            sys.exit(1)
+        if not os.path.isdir(native_sysroot):
+            print "--native-sysroot (-n) not found, exiting\n"
+            sys.exit(1)
 
     wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
                native_sysroot, hdddir, staging_data_dir, scripts_path,
-- 
1.7.11.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] wic: add fakeroot to the populate-extfs step
  2013-10-16  5:14 [PATCH 0/3] a few wic fixes Tom Zanussi
  2013-10-16  5:14 ` [PATCH 1/3] wic: check for build artifacts Tom Zanussi
  2013-10-16  5:14 ` [PATCH 2/3] wic: check passed-in build artifact directories Tom Zanussi
@ 2013-10-16  5:14 ` Tom Zanussi
  2013-10-16 12:09   ` Richard Purdie
  2 siblings, 1 reply; 9+ messages in thread
From: Tom Zanussi @ 2013-10-16  5:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tom Zanussi

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
-- 
1.7.11.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] wic: add fakeroot to the populate-extfs step
  2013-10-16  5:14 ` [PATCH 3/3] wic: add fakeroot to the populate-extfs step Tom Zanussi
@ 2013-10-16 12:09   ` Richard Purdie
  2013-10-16 15:10     ` Darren Hart
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2013-10-16 12:09 UTC (permalink / raw)
  To: Tom Zanussi; +Cc: openembedded-core

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] wic: add fakeroot to the populate-extfs step
  2013-10-16 12:09   ` Richard Purdie
@ 2013-10-16 15:10     ` Darren Hart
  2013-10-16 15:36       ` Richard Purdie
  2013-10-16 16:05       ` Darren Hart
  0 siblings, 2 replies; 9+ messages in thread
From: Darren Hart @ 2013-10-16 15:10 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Tom Zanussi, openembedded-core

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?

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] wic: add fakeroot to the populate-extfs step
  2013-10-16 15:10     ` Darren Hart
@ 2013-10-16 15:36       ` Richard Purdie
  2013-10-16 16:05       ` Darren Hart
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2013-10-16 15:36 UTC (permalink / raw)
  To: Darren Hart; +Cc: Tom Zanussi, openembedded-core

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] wic: add fakeroot to the populate-extfs step
  2013-10-16 15:10     ` Darren Hart
  2013-10-16 15:36       ` Richard Purdie
@ 2013-10-16 16:05       ` Darren Hart
  2013-10-16 16:32         ` Richard Purdie
  1 sibling, 1 reply; 9+ messages in thread
From: Darren Hart @ 2013-10-16 16:05 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Tom Zanussi, openembedded-core

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.

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] wic: add fakeroot to the populate-extfs step
  2013-10-16 16:05       ` Darren Hart
@ 2013-10-16 16:32         ` Richard Purdie
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2013-10-16 16:32 UTC (permalink / raw)
  To: Darren Hart; +Cc: Tom Zanussi, openembedded-core

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







^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-16 16:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-16  5:14 [PATCH 0/3] a few wic fixes Tom Zanussi
2013-10-16  5:14 ` [PATCH 1/3] wic: check for build artifacts Tom Zanussi
2013-10-16  5:14 ` [PATCH 2/3] wic: check passed-in build artifact directories Tom Zanussi
2013-10-16  5:14 ` [PATCH 3/3] wic: add fakeroot to the populate-extfs step Tom Zanussi
2013-10-16 12:09   ` Richard Purdie
2013-10-16 15:10     ` Darren Hart
2013-10-16 15:36       ` Richard Purdie
2013-10-16 16:05       ` Darren Hart
2013-10-16 16:32         ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox