From patchwork Wed Nov 3 02:53:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "MOESSBAUER, Felix" X-Patchwork-Id: 989 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3) with LMTPA; Wed, 03 Nov 2021 13:53:22 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f60.google.com (mail-wm1-f60.google.com [209.85.128.60]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPS id 1A3CrJpn013941 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 3 Nov 2021 13:53:19 +0100 Received: by mail-wm1-f60.google.com with SMTP id u14-20020a05600c19ce00b0030d8549d49asf1560365wmq.0 for ; Wed, 03 Nov 2021 05:53:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1635943994; cv=pass; d=google.com; s=arc-20160816; b=FJW4UK2ZEbuzGMJ7XAA33tN44/5ICEYYdJAp0qlsB3tY0Ia8hvmc2lebTCUMlP6IZ2 crKyVgyJiUS/0AeklJbSpoOJgmhp+rGuGxQTGmnaMNxg3hCZGVqk5g0XudiIoH/Qf11V Gnlm2iMoB0OD41VL+QfBv5Ztq38s78cx/QMB+pvqGpU+oWlTWeskIgIqfnL2ftLeRpkC sMcuq6BJFXSVWVbUT2o09iLuj78narI9ycqAbvdZ8NKboUm8m9kDzWhF9JR8kHSEUv/x mKmUqk241vkvbg7aRywQtWANehprf6J/qc6Nk0E5xg+nFw0uB7aOmbO+7XoLvCr2wLkN Q4xA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=p70yve/roTZ/6a/GuAJqCUjIHTLI3rNjX+fUDzAB+co=; b=tK0WpjuXzOcfFWm/SFBZUUJ4PV8UYK6cHI2vM6KVZparH2/lIDyz0h+v3xrDXagaDv ybO0ztq3TNGIm7hmTnpSmSXfpBsFumpOTOzMU7DNPECYLkr+2FlQ2RVBGZzEyPGebwJE i2+STzCphGL414VZSGtFgYSyi55lK3C57wXrHmgJRjZZCwlMc6EMcYDtO15bdeD8tZI4 R/8U2ye0g8GCkw/LuhcUK0X27Kluutcy+2oOPeaCWZTbyyRaXq4BbCY5Kn8t1QTJGe5L oxvKyqbce3+NfBNI6D8psm+Pyl0S8yPiBvcKcd0CsxldZ+5bf0xHC/kFyIxKpYZtriwt kc+g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=felix.moessbauer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=p70yve/roTZ/6a/GuAJqCUjIHTLI3rNjX+fUDzAB+co=; b=sHo/Db8sECkpIrswpdcktDa7iN+syQyARRwoJ9n7uuQbFEZYVf5UvI8rstkXbP9cHz AJCF1SefbwcHOK5u2oz+V646EVpEEchxlAkT+xRcF54Wmn3pO4ESPVPZc6DoTe3f1w1j HIs3i4W3h40Ffz4wb8HbKGAIKiFPkYKgYpgPZhhZ5bZdyWBYl0qaKJwL7Ysc1lziNrRl yQ/qUg80LYdQhnM3GPrJvG8FLnV5V3KYHG0P9bsnhp7MOaXM0PcuEf8SqINLpL0RD4Gl CuY4yHL/bZUhba77Qgs2UmhLXP2+Q8funL0NT3xGT3MHolVtkp0Ah32/yhDx5sa312cI +aMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=p70yve/roTZ/6a/GuAJqCUjIHTLI3rNjX+fUDzAB+co=; b=Fb7xrjGWkHHVXL3K2BP9lLPQ9bGBakODTtmn5swHXzOH+gw1R1EKfjrBh5jwxbrCQW vkQHuPLmE/58k/hEVz91va9cp/eBBdgE1gXIiy9xqJ09+oMO0G42vOKVzr+INE+fuKJ1 a3r3m6FxrC2By1Xlv3rnG1e2vJ3nyXfA3CUcgapFIy+kbM+TuwXZZ0PrO4S788xFx+My j7GPfKYJSdfsty6/FCxteC029N6KsHgbwehNHgK8xsMByJy6mZ5/rRso/5uIps8a0msv tdW2imWV6MQjbqzCpBTgmNr5vUV+9FG6hGE0oPLkV7bC0Rqg7NqZUeeyiXyIGy2iuChe 9CiA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530IFCUX8emnK9QXjnm848vu6e1kD46otWCkl0nxuX7YBUJoG2K+ +Qk4hGYYvP950WlTSl68ESc= X-Google-Smtp-Source: ABdhPJz7kn47iWrVN4BxURC6R0yfHF1TcmQxbd5QRBskKc7L6bydZl5WsKni/Re3IqJjiP+YlAovnw== X-Received: by 2002:a05:600c:4f16:: with SMTP id l22mr14422682wmq.152.1635943994537; Wed, 03 Nov 2021 05:53:14 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:2983:: with SMTP id p125ls2714879wmp.2.canary-gmail; Wed, 03 Nov 2021 05:53:13 -0700 (PDT) X-Received: by 2002:a1c:f405:: with SMTP id z5mr15000293wma.72.1635943993585; Wed, 03 Nov 2021 05:53:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635943993; cv=none; d=google.com; s=arc-20160816; b=fVehw/Meg3FTipg1TSh81c2pBk4xBD5vxgSDf477JMMk6lE0mTOnYQ7qWI7gV6Zfu6 OspRJP8jkXy+iRLohX9BEaN+H9oBVIW/3Rfqs1CTzmwK0dPW0s3LWkCbC7LQaW7g/n3R shapHEbUeZgvL28hXo+NNqWf/Q91F0nsvnZolU3ZMiNwKShBIDogHui78y5zJEA/zdo3 fyODoCGkPgYlsoufMgzWJeh5aeUy9iSfGzfw1S32/TwgrdoIkUqI3LIGHA6v9W6wX5i1 NyWHp6/PFl8hSOBOuasEo9grKkRZlomkeOhCu6ge9X0RXHScVEPIs86AN6LiDsUUFBW7 nuUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=Fq1TdY6puxQ06h4QpMat/1rYstD6uU5iWqAg4rRL7no=; b=u0XHe7EhUTjOgtfWbiuzOkaSbi92uJflGjXt/9rA592Zah3ttgK/FcY03gUnQtysya WkBAsz8ovMCVMLmeK5a9wQPEgtTNILI9maicvLPGWF6SIU/YevY37Vz/+zsB+T/Bbl92 T027g8JkMA4qFpS5idCipKu+JiHJaygHZ+a/YltIFEI/y5SVjfaq1OcYYJ/ehEQVEPSs 4hqAM8YrZr6PnaLSpsqKAhqv9UjPTnb+Ofe2V9+ajrrcGuseiLr06iIuJkIT+eCX62dD NQDL2rrcGJdUJEu4o0f4bPYSrTQpM7PaSjm6ww7nPDPQ6U60d+rSg+zwR5JnaROWyOuW DLWA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=felix.moessbauer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id g130si146089wmg.0.2021.11.03.05.53.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Nov 2021 05:53:13 -0700 (PDT) Received-SPF: pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id 1A3CrD8t022664 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 3 Nov 2021 13:53:13 +0100 Received: from MD1T0KAC-VM.ad001.siemens.net (md1t0kac.ad001.siemens.net [139.25.68.224]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 1A3CrCRt025363; Wed, 3 Nov 2021 13:53:12 +0100 From: Felix Moessbauer To: isar-users@googlegroups.com Cc: henning.schild@siemens.com, adriaan.schmidt@siemens.com, Felix Moessbauer Subject: [PATCH v1 1/1] Fix permissions when splitting rootfs folders across partitions. Date: Wed, 3 Nov 2021 13:53:05 +0100 Message-Id: <20211103125305.3021016-1-felix.moessbauer@siemens.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Original-Sender: felix.moessbauer@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=felix.moessbauer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX This patches ensures that the file database containing the file and folder usernames and permissions is always located relative to the source and not to the appended rootfs-dir. Prior to this patch, the database was not found when using -rootfs-dir in the WIC script, leading to erronous file permissions and ownership. Signed-off-by: Felix Moessbauer --- scripts/lib/wic/plugins/source/rootfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index 96d940a..5ab771e 100644 --- a/scripts/lib/wic/plugins/source/rootfs.py +++ b/scripts/lib/wic/plugins/source/rootfs.py @@ -95,7 +95,7 @@ class RootfsPlugin(SourcePlugin): part.rootfs_dir = cls.__get_rootfs_dir(rootfs_dir) part.has_fstab = os.path.exists(os.path.join(part.rootfs_dir, "etc/fstab")) - pseudo_dir = os.path.join(part.rootfs_dir, "../pseudo") + pseudo_dir = os.path.join(krootfs_dir['ROOTFS_DIR'], "../pseudo") if not os.path.lexists(pseudo_dir): logger.warn("%s folder does not exist. " "Usernames and permissions will be invalid " % pseudo_dir)