All of lore.kernel.org
 help / color / mirror / Atom feed
* gatesgarth wic pseudo issue
@ 2021-03-19 23:06 aaron.brice
  2021-03-20 10:18 ` [poky] " Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: aaron.brice @ 2021-03-19 23:06 UTC (permalink / raw)
  To: poky

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

I recently upgraded from dunfell to gatesgarth and it is causing problems
with the .wic file.

Our .wks file contains:

part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align
1024 --use-uuid --extra-space 0 --overhead-factor 1
part /bk --source rootfs-tar --ondisk sda --fstype=ext4 --label archive
--align 1024 --use-uuid --extra-space 0 --overhead-factor 1

Where scripts/lib/wic/plugins/source/rootfs-tar.py wic plugin creates an
empty partition and puts a rootfs.tar.gz in it containing the contents of
the previous rootfs partition.  There is a script in the first partition
that does an install using the tar in the second partition.

On gatesgarth, the rootfs.tar.gz is created with incorrect uid/gid, the uid
and gid of the user running yocto.  It's caused by
commit c58711f0ea2a4d3b54e9f5f442abe3192f4697d0 which added PSEUDO_UNLOAD=1
to the wic command.  How can I get my plugin to work in this case?

Or generically, is there a better way to create a USB install wic file?

-- 

*Aaron Brice*
aaron.brice@nikolamotor.com

<https://nikolamotor.com>

*Nikola Corporation* | www.nikolamotor.com <https://nikolamotor.com/>
4141 E Broadway Rd | Phoenix | AZ | 85040
<https://goo.gl/maps/bKfEzApeDMErgi4e7>


INFORMATION CONTAINED IN THIS E-MAIL TRANSMISSION IS  CONFIDENTIAL. IF YOU
ARE NOT THE INTENDED RECIPIENT, DO NOT READ, DISTRIBUTE OR REPRODUCE THIS
TRANSMISSION (INCLUDING ANY ATTACHMENTS). IF YOU HAVE RECEIVED THIS E-MAIL
IN ERROR, PLEASE NOTIFY THE SENDER BY E-MAIL REPLY AND THEN DELETE THIS
E-MAIL.

[-- Attachment #2: Type: text/html, Size: 5019 bytes --]

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

* Re: [poky] gatesgarth wic pseudo issue
  2021-03-19 23:06 gatesgarth wic pseudo issue aaron.brice
@ 2021-03-20 10:18 ` Richard Purdie
  2021-03-22 18:42   ` Aaron Brice
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2021-03-20 10:18 UTC (permalink / raw)
  To: Aaron Brice, poky

Hi,

On Fri, 2021-03-19 at 16:06 -0700, Aaron Brice wrote:
> I recently upgraded from dunfell to gatesgarth and it is causing problems with the .wic file.
> 
> Our .wks file contains:
> 
> part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid --extra-space 0 --
> overhead-factor 1
> part /bk --source rootfs-tar --ondisk sda --fstype=ext4 --label archive --align 1024 --use-uuid --extra-space
> 0 --overhead-factor 1 
> 
> Where scripts/lib/wic/plugins/source/rootfs-tar.py wic plugin creates an empty partition and puts a
> rootfs.tar.gz in it containing the contents of the previous rootfs partition.  There is a script in the first
> partition that does an install using the tar in the second partition.
> 
> On gatesgarth, the rootfs.tar.gz is created with incorrect uid/gid, the uid and gid of the user running
> yocto.  It's caused by commit c58711f0ea2a4d3b54e9f5f442abe3192f4697d0 which added PSEUDO_UNLOAD=1 to the wic
> command.  How can I get my plugin to work in this case?
> 
> Or generically, is there a better way to create a USB install wic file?

The pseudo context needs to match the environment wic is working within
which may not be the same as the parent bitbake environment, hence the unload.

If you look at the pseudo scripts you'll see that some operations are run under 
pseudo. I suspect your plugin needs to do something like that and run the
operation under pseudo.

Cheers,

Richard


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

* Re: [poky] gatesgarth wic pseudo issue
  2021-03-20 10:18 ` [poky] " Richard Purdie
@ 2021-03-22 18:42   ` Aaron Brice
  0 siblings, 0 replies; 3+ messages in thread
From: Aaron Brice @ 2021-03-22 18:42 UTC (permalink / raw)
  To: Richard Purdie; +Cc: poky

[-- Attachment #1: Type: text/plain, Size: 2656 bytes --]

On Sat, Mar 20, 2021 at 3:19 AM Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> Hi,
>
> On Fri, 2021-03-19 at 16:06 -0700, Aaron Brice wrote:
> > I recently upgraded from dunfell to gatesgarth and it is causing
> problems with the .wic file.
> >
> > Our .wks file contains:
> >
> > part / --source rootfs --ondisk sda --fstype=ext4 --label platform
> --align 1024 --use-uuid --extra-space 0 --
> > overhead-factor 1
> > part /bk --source rootfs-tar --ondisk sda --fstype=ext4 --label archive
> --align 1024 --use-uuid --extra-space
> > 0 --overhead-factor 1
> >
> > Where scripts/lib/wic/plugins/source/rootfs-tar.py wic plugin creates an
> empty partition and puts a
> > rootfs.tar.gz in it containing the contents of the previous rootfs
> partition.  There is a script in the first
> > partition that does an install using the tar in the second partition.
> >
> > On gatesgarth, the rootfs.tar.gz is created with incorrect uid/gid, the
> uid and gid of the user running
> > yocto.  It's caused by commit c58711f0ea2a4d3b54e9f5f442abe3192f4697d0
> which added PSEUDO_UNLOAD=1 to the wic
> > command.  How can I get my plugin to work in this case?
> >
> > Or generically, is there a better way to create a USB install wic file?
>
> The pseudo context needs to match the environment wic is working within
> which may not be the same as the parent bitbake environment, hence the
> unload.
>
> If you look at the pseudo scripts you'll see that some operations are run
> under
> pseudo. I suspect your plugin needs to do something like that and run the
> operation under pseudo.
>
> Cheers,
>
> Richard
>
>
Thanks Richard.  Is there a pseudo python library and/or an example of
running a pseudo python plugin/script under pseudo context?  At the moment
there is just rootfs-tar.py which is called automatically by wic, and it
uses the python tarfile library to create the tar file.  How would I run
the tarfile module from the python plugin under pseudo?  Will I need to
remove the tarfile module code and call tar in a subprocess?

Thanks,
-- 

*Aaron Brice*
aaron.brice@nikolamotor.com

<https://nikolamotor.com>

*Nikola Corporation* | www.nikolamotor.com <https://nikolamotor.com/>
4141 E Broadway Rd | Phoenix | AZ | 85040
<https://goo.gl/maps/bKfEzApeDMErgi4e7>


INFORMATION CONTAINED IN THIS E-MAIL TRANSMISSION IS  CONFIDENTIAL. IF YOU
ARE NOT THE INTENDED RECIPIENT, DO NOT READ, DISTRIBUTE OR REPRODUCE THIS
TRANSMISSION (INCLUDING ANY ATTACHMENTS). IF YOU HAVE RECEIVED THIS E-MAIL
IN ERROR, PLEASE NOTIFY THE SENDER BY E-MAIL REPLY AND THEN DELETE THIS
E-MAIL.

[-- Attachment #2: Type: text/html, Size: 6094 bytes --]

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

end of thread, other threads:[~2021-03-22 18:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 23:06 gatesgarth wic pseudo issue aaron.brice
2021-03-20 10:18 ` [poky] " Richard Purdie
2021-03-22 18:42   ` Aaron Brice

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.