Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Paul Barker" <pbarker@konsulko.com>
To: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v7 00/10] Fix permissions and embed-rotofs
Date: Wed, 22 Apr 2020 18:39:23 +0100	[thread overview]
Message-ID: <20200422183923.07fccbf1@ub1910> (raw)
In-Reply-To: <20200419063539.1467641-1-ricardo@ribalda.com>

On Sun, 19 Apr 2020 08:35:28 +0200
Ricardo Ribalda Delgado <ricardo@ribalda.com> wrote:

> 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
> 
> 
> 
> 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.
> 
> 
> Changelog v6->v7 (Thanks Paul):
>   - Use passwd instead of shadow for oetests
>   - For pseudo folder inside workdir
>   - Improve comments on tar
>   - Use line number on tar name
>   - Allow include-files of files in workdir
> 
> Changelog v5->v6:
>   - Allow two arguments to include-path
>   - Fix permission on include-path
>   - exec_native with ASSUME_PROVIDED
>   - More unittesting
> 
> Changelog v4->v5:
>   - Add unittesting
>   - wic: Avoid creating invalid pseudo directory
> 
> Ricardo Ribalda Delgado (10):
>   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
>   wic: Avoid creating invalid pseudo directory
>   oeqa: wic: Add tests for permissions and change-directory
>   wic: misc: Do not find for executables in ALREADY_PROVIDED
>   wic: root: Add an opt. destination on include-path
>   wic: rootfs: Combine path_validation in one function
>   oeqa: wic: Add more tests for include_path
> 
>  meta/classes/image_types_wic.bbclass     |   8 +-
>  meta/lib/oeqa/selftest/cases/wic.py      | 153 ++++++++++++++++++++++-
>  meta/recipes-core/meta/wic-tools.bb      |   2 +-
>  scripts/lib/wic/help.py                  |  26 ++--
>  scripts/lib/wic/ksparser.py              |   3 +-
>  scripts/lib/wic/misc.py                  |  14 ++-
>  scripts/lib/wic/partition.py             |  20 +--
>  scripts/lib/wic/plugins/source/rootfs.py | 133 +++++++++++++++++---
>  8 files changed, 318 insertions(+), 41 deletions(-)
> 

All looks good to me now, thanks for iterating on this :)

My knowledge on pseudo is a little limited so I can't guarantee I've caught
all the implications of these changes on that front. You've included tests
and it's going to go into master at the start of a development cycle so we'll
have time for anything I've missed to get shaken out. I think it's good to
merge now.

-- 
Paul Barker
Konsulko Group

  parent reply	other threads:[~2020-04-22 17:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-19  6:35 [PATCH v7 00/10] Fix permissions and embed-rotofs Ricardo Ribalda
2020-04-19  6:35 ` [PATCH v7 01/10] wic: Fix permissions when using exclude or include path Ricardo Ribalda
2020-04-19  6:35 ` [PATCH v7 02/10] wic: Fix multi images .wks with bitbake Ricardo Ribalda
2020-04-19  6:35 ` [PATCH v7 03/10] wic: Add --change-directory argument Ricardo Ribalda
2020-04-19  6:35 ` [PATCH v7 04/10] wic: Continue if excluded_path does not exist Ricardo Ribalda
2020-04-19  6:35 ` [PATCH v7 05/10] wic: Avoid creating invalid pseudo directory Ricardo Ribalda
2020-04-19  6:35 ` [PATCH v7 06/10] oeqa: wic: Add tests for permissions and change-directory Ricardo Ribalda
2020-04-19  6:35 ` [PATCH v7 07/10] wic: misc: Do not find for executables in ALREADY_PROVIDED Ricardo Ribalda
2020-04-26 12:59   ` [OE-core] " Richard Purdie
2020-04-19  6:35 ` [PATCH v7 08/10] wic: root: Add an opt. destination on include-path Ricardo Ribalda
2020-04-19  6:35 ` [PATCH v7 09/10] wic: rootfs: Combine path_validation in one function Ricardo Ribalda
2020-04-19  6:35 ` [PATCH v7 10/10] oeqa: wic: Add more tests for include_path Ricardo Ribalda
2020-04-22 17:39 ` Paul Barker [this message]
2020-04-23  8:54 ` [OE-core] [PATCH v7 00/10] Fix permissions and embed-rotofs Richard Purdie
2020-04-23  9:57   ` Ricardo Ribalda
2020-04-23 10:45     ` Richard Purdie
2020-04-23 10:47       ` Ricardo Ribalda
     [not found]       ` <16086D1E57B63D5A.14079@lists.openembedded.org>
2020-04-23 13:17         ` Ricardo Ribalda
2020-04-23 13:23           ` Richard Purdie
2020-04-23 13:26             ` Ricardo Ribalda
2020-04-25 21:07           ` Richard Purdie
2020-04-25 21:25             ` Ricardo Ribalda
2020-04-25 21:29               ` Richard Purdie
2020-04-25 21:35                 ` Ricardo Ribalda
2020-04-26 12:48                   ` Richard Purdie

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=20200422183923.07fccbf1@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox