All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Steve Sakoman" <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][dunfell 17/47] wic: Handle new PSEUDO_IGNORE_PATHS variable
Date: Mon, 25 Jan 2021 04:50:49 -1000	[thread overview]
Message-ID: <5a91101eda920968f23e52b05991504db1bcbda6.1611585425.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1611585425.git.steve@sakoman.com>

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Adjust wic to correctly handle the new PSEUDO_IGNORE_PATH variable and avoid
inode corruption issues.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 13500f5234361385c365c7c35e83f99435500481)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/classes/image_types_wic.bbclass |  2 +-
 scripts/lib/wic/partition.py         | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/meta/classes/image_types_wic.bbclass b/meta/classes/image_types_wic.bbclass
index 82f0985eeb..f27f29c663 100644
--- a/meta/classes/image_types_wic.bbclass
+++ b/meta/classes/image_types_wic.bbclass
@@ -5,7 +5,7 @@ WICVARS ?= "\
            IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \
            ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS \
            KERNEL_IMAGETYPE MACHINE INITRAMFS_IMAGE INITRAMFS_IMAGE_BUNDLE INITRAMFS_LINK_NAME APPEND \
-           ASSUME_PROVIDED"
+           ASSUME_PROVIDED PSEUDO_IGNORE_PATHS"
 
 inherit ${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', 'kernel-artifact-names', '', d)}
 
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 1347571aa0..4ec0608fe4 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -198,21 +198,23 @@ class Partition():
 
         Currently handles ext2/3/4, btrfs, vfat and squashfs.
         """
+
+        rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label,
+                                         self.lineno, self.fstype)
+        if os.path.isfile(rootfs):
+            os.remove(rootfs)
+
         p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot)
         if (pseudo_dir):
             pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix
             pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % pseudo_dir
             pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir
             pseudo += "export PSEUDO_NOSYMLINKEXP=1;"
+            pseudo += "export PSEUDO_IGNORE_PATHS=%s;" % (rootfs + "," + (get_bitbake_var("PSEUDO_IGNORE_PATHS") or ""))
             pseudo += "%s " % get_bitbake_var("FAKEROOTCMD")
         else:
             pseudo = None
 
-        rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label,
-                                         self.lineno, self.fstype)
-        if os.path.isfile(rootfs):
-            os.remove(rootfs)
-
         if not self.size and real_rootfs:
             # The rootfs size is not set in .ks file so try to get it
             # from bitbake variable
-- 
2.25.1


  parent reply	other threads:[~2021-01-25 14:52 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 14:50 [OE-core][dunfell 00/47] Patch review - pseudo file mode corruption fix V2 Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 01/47] pseudo: Switch to oe-core branch in git repo Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 02/47] pseudo: merge in fixes for setfacl issue Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 03/47] pseudo: Update to add OFC fcntl lock updates Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 04/47] pseudo: fix renaming to self Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 05/47] pseudo: Ignore mismatched inodes from the db Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 06/47] pseudo: Add support for ignoring paths from the pseudo DB Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 07/47] pseudo: Abort on mismatch patch Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 08/47] psuedo: Add tracking of linked files for fds Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 09/47] pseudo: Fix xattr segfault Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 10/47] pseudo: Add may unlink patch Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 11/47] pseudo: Add pathfix patch Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 12/47] bitbake.conf: Remove TERM from default BB_HASHBASE_WHITELIST Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 13/47] base/bitbake.conf: Enable pseudo path filtering Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 14/47] wic: Fix permissions when using exclude or include path Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 15/47] wic: Fix multi images .wks with bitbake Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 16/47] wic: Avoid creating invalid pseudo directory Steve Sakoman
2021-01-25 14:50 ` Steve Sakoman [this message]
2021-01-25 14:50 ` [OE-core][dunfell 18/47] pseudo: Fix statx function usage Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 19/47] bitbake.conf: Extend PSEUDO_IGNORE_PATHS to ${COREBASE}/meta Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 20/47] abi_version,sanity: Tell users TMPDIR must be clean after pseudo changes Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 21/47] pseudo: Update to account for patches merged on branch Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 22/47] pseudo: Upgrade to include mkostemp64 wrapper Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 23/47] base.bbclass: use os.path.normpath instead of just comparing WORKDIR and S as strings Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 24/47] oeqa/selftest/runtime_test: Exclude gpg directory from pseudo database Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 25/47] tcl: adapt to potential pseudo changes Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 26/47] bitbake.conf: Exclude ${CCACHE_DIR} from pseudo database Steve Sakoman
2021-01-25 14:50 ` [OE-core][dunfell 27/47] uninative: Don't use single sstate for pseudo-native Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 28/47] pseudo: Simplify pseudo_client_ignore_path_chroot() Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 29/47] pseudo: Update to print PSEUDO_LOGFILE in abort message on path mismatches Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 30/47] distutils3: allow setup.py to be run from a different directory to ${S} Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 31/47] pseudo: Drop patches merged into upstream branch Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 32/47] lib/oe/path: Add canonicalize() Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 33/47] bitbake.conf: Canonicalize paths in PSEUDO_IGNORE_PATHS Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 34/47] wic: Pass canonicalized " Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 35/47] bitbake.conf: Prevent pyc file generation in pseudo context Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 36/47] license.bbclass: Add COMMON_LICENSE_DIR and LICENSE_PATH dirs to PSEUDO_IGNORE_PATHS Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 37/47] bitbake.conf: Add /run/ " Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 38/47] pseudo: Add lchmod wrapper Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 39/47] pseudo: Update for arm host and memleak fixes/cleanup Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 40/47] wic: Add workdir argument Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 41/47] wic: Allow exec_native_cmd to run HOSTTOOLS Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 42/47] wic: Ensure internal workdir is not reused Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 43/47] image_types_wic: Move wic working directory Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 44/47] wic: Update pseudo db when excluding content from rootfs Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 45/47] wic: Add --change-directory argument Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 46/47] wic: Copy rootfs dir if fstab needs updating Steve Sakoman
2021-01-25 14:51 ` [OE-core][dunfell 47/47] wic: Optimise fstab modification for ext2/3/4 and msdos partitions Steve Sakoman
2021-01-25 15:42 ` [OE-core][dunfell 00/47] Patch review - pseudo file mode corruption fix V2 Paul Barker
2021-01-25 16:25   ` Steve Sakoman
2021-01-25 16:32     ` Paul Barker
2021-01-27  3:19 ` Anuj Mittal
2021-01-27 15:01   ` Steve Sakoman
2021-01-27 16:17     ` 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=5a91101eda920968f23e52b05991504db1bcbda6.1611585425.git.steve@sakoman.com \
    --to=steve@sakoman.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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.