* [PATCH 0/1] wic populate-ext fix @ 2013-10-16 20:25 Tom Zanussi 2013-10-16 20:25 ` [PATCH 1/1] wic: add pseudo to the populate-extfs step Tom Zanussi 0 siblings, 1 reply; 6+ messages in thread From: Tom Zanussi @ 2013-10-16 20:25 UTC (permalink / raw) To: openembedded-core; +Cc: Tom Zanussi This is the pseudo version of the previously submitted fakeroot fix to the wic populate-ext bug. The following changes since commit 68a41d2afd3392c59f78398913aa3855225cc52d: glib-2.0: fix build on Aarch64 (2013-10-16 13:33:59 +0100) are available in the git repository at: git://git.yoctoproject.org/poky-contrib.git tzanussi/wic-fixes-1 http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/wic-fixes-1 Tom Zanussi (1): wic: add pseudo to the populate-extfs step scripts/lib/mic/kickstart/custom_commands/partition.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 1.7.11.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] wic: add pseudo to the populate-extfs step 2013-10-16 20:25 [PATCH 0/1] wic populate-ext fix Tom Zanussi @ 2013-10-16 20:25 ` Tom Zanussi 2013-10-16 21:13 ` Darren Hart 2013-10-18 15:04 ` Richard Purdie 0 siblings, 2 replies; 6+ messages in thread From: Tom Zanussi @ 2013-10-16 20:25 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py index 302cace..0eb0671 100644 --- a/scripts/lib/mic/kickstart/custom_commands/partition.py +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py @@ -216,7 +216,14 @@ 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 = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot + populate_script += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir + populate_script += "export PSEUDO_PASSWD=%s;" % rootfs_dir + populate_script += "export PSEUDO_NOSYMLINKEXP=1;" + populate_script += "export PSEUDO_DISABLED=0;" + populate_script += "%s/usr/bin/pseudo %s/usr/bin/populate-extfs.sh" % \ + (native_sysroot, native_sysroot) + image_extra_space = 10240 image_rootfs = rootfs_dir -- 1.7.11.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] wic: add pseudo to the populate-extfs step 2013-10-16 20:25 ` [PATCH 1/1] wic: add pseudo to the populate-extfs step Tom Zanussi @ 2013-10-16 21:13 ` Darren Hart 2013-10-18 15:04 ` Richard Purdie 1 sibling, 0 replies; 6+ messages in thread From: Darren Hart @ 2013-10-16 21:13 UTC (permalink / raw) To: Tom Zanussi; +Cc: openembedded-core On Wed, 2013-10-16 at 15:25 -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 | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py > index 302cace..0eb0671 100644 > --- a/scripts/lib/mic/kickstart/custom_commands/partition.py > +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py > @@ -216,7 +216,14 @@ 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 = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot > + populate_script += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir > + populate_script += "export PSEUDO_PASSWD=%s;" % rootfs_dir > + populate_script += "export PSEUDO_NOSYMLINKEXP=1;" > + populate_script += "export PSEUDO_DISABLED=0;" > + populate_script += "%s/usr/bin/pseudo %s/usr/bin/populate-extfs.sh" % \ > + (native_sysroot, native_sysroot) > + > image_extra_space = 10240 > > image_rootfs = rootfs_dir This resolved the failure to login permissions issue. Acked-by: Darren Hart <dvhart@linux.intel.com> -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] wic: add pseudo to the populate-extfs step 2013-10-16 20:25 ` [PATCH 1/1] wic: add pseudo to the populate-extfs step Tom Zanussi 2013-10-16 21:13 ` Darren Hart @ 2013-10-18 15:04 ` Richard Purdie 2013-10-18 15:10 ` Mark Hatle 2013-10-18 20:03 ` Peter Seebach 1 sibling, 2 replies; 6+ messages in thread From: Richard Purdie @ 2013-10-18 15:04 UTC (permalink / raw) To: Tom Zanussi; +Cc: openembedded-core On Wed, 2013-10-16 at 15:25 -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 | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py > index 302cace..0eb0671 100644 > --- a/scripts/lib/mic/kickstart/custom_commands/partition.py > +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py > @@ -216,7 +216,14 @@ 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 = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot > + populate_script += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir > + populate_script += "export PSEUDO_PASSWD=%s;" % rootfs_dir > + populate_script += "export PSEUDO_NOSYMLINKEXP=1;" > + populate_script += "export PSEUDO_DISABLED=0;" > + populate_script += "%s/usr/bin/pseudo %s/usr/bin/populate-extfs.sh" % \ > + (native_sysroot, native_sysroot) > + > image_extra_space = 10240 > > image_rootfs = rootfs_dir I've merged this but I would like to figure out why pseudo can't manage more sane defaults rather than needing all of those variables... Cheers, Richard ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] wic: add pseudo to the populate-extfs step 2013-10-18 15:04 ` Richard Purdie @ 2013-10-18 15:10 ` Mark Hatle 2013-10-18 20:03 ` Peter Seebach 1 sibling, 0 replies; 6+ messages in thread From: Mark Hatle @ 2013-10-18 15:10 UTC (permalink / raw) To: openembedded-core On 10/18/13 10:04 AM, Richard Purdie wrote: > On Wed, 2013-10-16 at 15:25 -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 | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py >> index 302cace..0eb0671 100644 >> --- a/scripts/lib/mic/kickstart/custom_commands/partition.py >> +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py >> @@ -216,7 +216,14 @@ 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 = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot >> + populate_script += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir >> + populate_script += "export PSEUDO_PASSWD=%s;" % rootfs_dir Location of the passwd file, if we are in a chroot, it will use the chroot'd version, otherwise you need to tell pseudo where it is. >> + populate_script += "export PSEUDO_NOSYMLINKEXP=1;" This controls how the symlinks are populated from the point of view of non-pseudo environment. If you intend to manipulate the results (and make them useful) -outside- of the pseudo environment, you need this. If you do all of your operations from within pseudo, the defaults are correct. Otherwise you can get links such as "/bin/sh -> /bin/bash" and it points to the host's bash, not the chroot's /bin/bash. >> + populate_script += "export PSEUDO_DISABLED=0;" This shouldn't have to be set, unless the disabled has been previously set in the environment. >> + populate_script += "%s/usr/bin/pseudo %s/usr/bin/populate-extfs.sh" % \ >> + (native_sysroot, native_sysroot) >> + >> image_extra_space = 10240 >> >> image_rootfs = rootfs_dir > > I've merged this but I would like to figure out why pseudo can't manage > more sane defaults rather than needing all of those variables... > > Cheers, > > Richard > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] wic: add pseudo to the populate-extfs step 2013-10-18 15:04 ` Richard Purdie 2013-10-18 15:10 ` Mark Hatle @ 2013-10-18 20:03 ` Peter Seebach 1 sibling, 0 replies; 6+ messages in thread From: Peter Seebach @ 2013-10-18 20:03 UTC (permalink / raw) To: Richard Purdie; +Cc: Tom Zanussi, openembedded-core On Fri, 18 Oct 2013 16:04:30 +0100 Richard Purdie <richard.purdie@linuxfoundation.org> wrote: > > - populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot > > + populate_script = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot > > + populate_script += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir > > + populate_script += "export PSEUDO_PASSWD=%s;" % rootfs_dir > > + populate_script += "export PSEUDO_NOSYMLINKEXP=1;" > > + populate_script += "export PSEUDO_DISABLED=0;" > > + populate_script += "%s/usr/bin/pseudo %s/usr/bin/populate-extfs.sh" % \ > > + (native_sysroot, native_sysroot) > > + > > image_extra_space = 10240 > > > > image_rootfs = rootfs_dir > > I've merged this but I would like to figure out why pseudo can't manage > more sane defaults rather than needing all of those variables... Good question. Historical answer: You need PREFIX to figure out where libpseudo.so is. LOCALSTATEDIR is there becaus one copy of libpseudo.so can correspond to several different state dirs. PASSWD is an optional feature, and not enabled by default; maybe it should be, but the question of what path to use for it is not obvious. I suppose it could be changed to default to / or the current chroot directory, but I don't know that that would help. NOSYMLINKEXP is behavior which may be desireable or undesireable, and it's really usage-specific. Not sure why DISABLED=0 is needed here. In a lot of these cases, there's no meaningful way to make a sane default. I suppose in theory we could search through LD_LIBRARY_PATH to find a libpseudo.so and guess PREFIX from that, the other bits are pretty hard to define good defaults for. Arguably, NOSYMLINKEXP has a sane default, it's just that this is the use case for which the sane default isn't the right choice. And I was thinking a bit about a config file, but that wouldn't really work for several of these; you don't necessarily want NOSYMLINKEXP shared between different clients running against the same tree. -s -- Listen, get this. Nobody with a good compiler needs to be justified. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-10-18 20:04 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-10-16 20:25 [PATCH 0/1] wic populate-ext fix Tom Zanussi 2013-10-16 20:25 ` [PATCH 1/1] wic: add pseudo to the populate-extfs step Tom Zanussi 2013-10-16 21:13 ` Darren Hart 2013-10-18 15:04 ` Richard Purdie 2013-10-18 15:10 ` Mark Hatle 2013-10-18 20:03 ` Peter Seebach
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox