From: "Paul Barker" <pbarker@konsulko.com>
To: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v4 0/4] wic: Fix permissions
Date: Thu, 9 Apr 2020 12:10:31 +0100 [thread overview]
Message-ID: <20200409121031.0efee461@ub1910> (raw)
In-Reply-To: <20200409104951.948242-1-ricardo@ribalda.com>
On Thu, 9 Apr 2020 12:49:47 +0200
Ricardo Ribalda Delgado <ricardo@ribalda.com> wrote:
> Hi
>
>
> Today wic behaves differently if we run it from bitbake of directly from the
> commandline.
>
> When it is run from bitbake, the permissions/usersnames are handled by the
> pseudo database of the main image.
>
> When it is run from the comandline , it is run outside the main image database.
>
> This results on permissions/usernames not working ok on some usecases on both
> bitbake and wic.
>
>
> This is an attempt to fix all the permission bugs that I am aware from wic.
> Using the following usecases
>
>
> #exclude-path
> part / --source rootfs --fstype=ext4 --exclude-path=home
>
> #split_partition
> part / --source rootfs --ondisk sda --fstype=ext4 --exclude-path=etc/
> part /etc --source rootfs --rootfs-dir=tmp/work/qt5222-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/ --fstype=ext4
>
> #multi_partition
> part / --source rootfs --ondisk sda --fstype=ext4
> part /export --source rootfs --rootfs=core-image-minimal-mtdutils --fstype=ext4
>
>
> With the current master:
> -------------------------
> #exclude-path
> From Bitbake: OK
> wic cmdline: FAIL
>
> #split_partition
> From Bitbake: OK
> wic cmdline: FAIL, permissions invalid on both partitions
>
> #multi_partition
> From Bitbake: FAIL second partition
> wic cmdline: OK
>
>
> After: wic: Fix permissions when using exclude or include path
> --------------------------------------------------------------------
> #exclude-path
> From Bitbake: OK
> wic cmdline: OK
>
> #split_partition
> From Bitbake: OK
> wic cmdline: FAIL, permissions invalid on second partition
>
> #multi_partition
> From Bitbake: FAIL second partition
> wic cmdline: OK
>
>
> After: wic: Fix multi images .wks with bitbake
> ----------------------------------------------
> #exclude-path
> From Bitbake: OK
> wic cmdline: OK
>
> #split_partition
> From Bitbake: FAIL, permissions invalid on second partition
> wic cmdline: FAIL, permissions invalid on second partition
>
> #multi_partition
> From Bitbake: OK
> wic cmdline: OK
>
This looks really good, are you able to automate any of these tests and put
them in meta/lib/oeqa/selftest/cases/wic.py?
>
>
> After: wic: Add --change-directory argument
> --------------------------------------------
>
> we can have a .wks like:
> part / --source rootfs --ondisk sda --fstype=ext4 --exclude-path=etc/
> part /etc --source rootfs --fstype=ext4 --change-directory=/etc
>
>
> Wich works fine from bitbake and from cmdline, and has the same functionality as
> split_partition.
>
>
> Ricardo Ribalda Delgado (4):
> wic: Fix permissions when using exclude or include path
> wic: Fix multi images .wks with bitbake
> wic: Add --change-directory argument
> wic: Continue if excluded_path does not exist
>
> meta/classes/image_types_wic.bbclass | 8 +++-
> scripts/lib/wic/help.py | 6 +++
> scripts/lib/wic/ksparser.py | 1 +
> scripts/lib/wic/partition.py | 15 ++++---
> scripts/lib/wic/plugins/source/rootfs.py | 52 ++++++++++++++++++++++--
> 5 files changed, 68 insertions(+), 14 deletions(-)
>
I'll give this a detailed review over the weekend. Looks good at first
glance, though I may suggest renaming `--change-directory` to something else
so it's more obvious what it's doing when you just read that in a wks file.
Perhaps `--part-subdir`, I don't know. Let's not bikeshed it too much though.
Thanks,
--
Paul Barker
Konsulko Group
next prev parent reply other threads:[~2020-04-09 11:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 10:49 [PATCH v4 0/4] wic: Fix permissions Ricardo Ribalda
2020-04-09 10:49 ` [PATCH v4 1/4] wic: Fix permissions when using exclude or include path Ricardo Ribalda
2020-04-09 10:49 ` [PATCH v4 2/4] wic: Fix multi images .wks with bitbake Ricardo Ribalda
2020-04-09 10:49 ` [PATCH v4 3/4] wic: Add --change-directory argument Ricardo Ribalda
2020-04-09 10:49 ` [PATCH v4 4/4] wic: Continue if excluded_path does not exist Ricardo Ribalda
2020-04-09 11:10 ` Paul Barker [this message]
2020-04-09 11:32 ` [PATCH v4 0/4] wic: Fix permissions Ricardo Ribalda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200409121031.0efee461@ub1910 \
--to=pbarker@konsulko.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ricardo@ribalda.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.