From patchwork Mon Aug 24 02:59:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijai Kumar K X-Patchwork-Id: 13 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a05:7000:4605:0:0:0:0 with SMTP id b5csp2195678mae; Mon, 24 Aug 2020 03:59:33 -0700 (PDT) X-Received: by 2002:aa7:c246:: with SMTP id y6mr4943703edo.78.1598266773473; Mon, 24 Aug 2020 03:59:33 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1598266773; cv=pass; d=google.com; s=arc-20160816; b=IRZ+DFMJUS03kW1qq6leH99sMgJuQ6lTkNffNVW0/LupnhrHzZls1MI9tAAJP2zCvA y4OfPMckQ9J3sd/9rVHXjJV2zCYC81vo1J8Gc5X8xpPsMu9IAROE53w093Ycbinl8yIh SeR/Vu1GD66paCSg7JYlPbxpnlj5YxqQhbODg10tdRTxFta+907Nx3gzGOuXZTOWn+S2 aPZFyXoXq/mpGwYn+BPnvJMH7JVbRgI8zKhvq65uLaDhSmBnK2dfcKHK0DBZpQhS6QzQ osCCccy93e5Aas2o4SrL67pV+S2ZPCKQDy/X6x8u+u/VRdEKLC21G2YiqRXCTE1Lldsk 4qgg== ARC-Message-Signature: i=3; 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:references:in-reply-to :message-id:date:subject:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=AvYdSJMeqBvw8dn+GJx4Amnk0Z9IchCgMAPtzuOvLBY=; b=qQsTeE+oKLsbGsolfeTlhk2D7k2CHpa9ceD6YrM49i/8fEpZujXzuEqGzFwe45X/W8 6YBIqrhcCO69L/CWOW6tYrryw20L0n9/vbfvtpdlq1ucRVjGX5lIh1SFUKOFGXoHWVVX dwOIN7h7DBF1ms4cdEQMB3/0KZi5WdasZi/Ek1aDkBFe/oxOLWaA/ZQ0+ClQaQ9fC9JS LrLY4hu6XMvjWwkhUpopKBF4GQ1XwQ76gPb3+4kI9ywSHfOmAjs5nrqfuCyPK2MgA0CI ofEv/jaABhGBAlna/fkm0pBaQQhl0b0bzf6+J82qTIsE88Tcoa0CtklZ/V/FETESJtx5 XBTg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=lZDeB++x; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcw7ho6fuybrbff3r35akgqek76qogq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCW7HO6FUYBRBFF3R35AKGQEK76QOGQ@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id g12sor4672313ejd.50.2020.08.24.03.59.33 (Google Transport Security); Mon, 24 Aug 2020 03:59:33 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcw7ho6fuybrbff3r35akgqek76qogq@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=lZDeB++x; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcw7ho6fuybrbff3r35akgqek76qogq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCW7HO6FUYBRBFF3R35AKGQEK76QOGQ@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1598266773; cv=pass; d=google.com; s=arc-20160816; b=bmmJ2AC3Jzdu3J8MqAAVctG2ffhuHrC5sO4YxKBcpBlcLyAax7++WeXpk6HiqsKyD9 enfoF0pPn8hVylem5QT8kWL9ZsMXG0gYkTQIObf26/nMuMZ2+5jQFr+kj5Qal+k2iE8R 3nqv4FiHrsokSY71rVsHRChGpcQ3IauKTTUqN5wg5p2aMWJu9Kf5Xu0W/tPIL3wbFlpG n4j5z7zVBIYOrTcVrN6Q5KqqIlEArrO8fT1tHh1dmXp5/h5Vga+N0ZvVtu2ZpVWjoMXz +49AL+lGxkkTHfAmE57179IrPQiOXFm8gzz/ddNGAeAYDUpg/Cgy3NUxLsSikITAkRSk Eo5Q== 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:references:in-reply-to :message-id:date:subject:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=AvYdSJMeqBvw8dn+GJx4Amnk0Z9IchCgMAPtzuOvLBY=; b=0OGaajq0l/By5iPb/GNBtaN2J9JCaca/j5MPDAIqaUXIjNvUWWx9r5gVRoeWiszXmD MxFrq3SoZMPnz99NM/+aKJgcQ2YrsQirhMy36krbrBewLHuRQ4OPS9y8V0QK88Cc4tvR Bxa2637j7uTQ353YHeKfoCzRZr0KcJgjv2dfcpGfjEKP4hv3y30xbHMZ7p3+oWWsUS+C ihJjex3sDIj1gA2gGZm0fSbgwuu7lOo48l98caBX34bCvcZASQzDxYB16RG3OPJTbFEn +xI/X43PwJU3P7Yc2V6ibd7rl2Y75e3o5VFYL+6MTj5Z+s+ysF6M8zOB0waGLGyNi5Zi PSpQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:subject:date:message-id :in-reply-to:references: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=AvYdSJMeqBvw8dn+GJx4Amnk0Z9IchCgMAPtzuOvLBY=; b=lZDeB++xgmTtsLXA8Egkms93HSwulax6WnmsyGSvUqNzEqjYpwi15CySRlkxOahPJ3 yRsGbV2zaILihk193Yy/w0IP4AcT1HdWSyvQy/0OhoO2KbuZHJOUH84RCRyfWJgoOxp7 EXbhNOZMK01QoN8mPFHGq7mlSysGhJ9kl+jTSXHNfUNIMeVBtH3eT442rye7+UJ+rlBx ATP07DY2Fyc/aGZc266qwcJI4CiPNFnKlit5HCrngmLVB32wcMtlk5mHzdFz1KYcVoS4 +HV2PV3vADaZ+hZYftBZW2yQ3O0RYpzITkHOm51SGBJ+eC2Dhwwz4Umx5B0fiskb69zI tj2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:ironport-sdr:ironport-sdr:from:to:subject :date:message-id:in-reply-to:references: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=AvYdSJMeqBvw8dn+GJx4Amnk0Z9IchCgMAPtzuOvLBY=; b=XNg35nW8IQcAUCELR4IPgJEKRMahD+Tse1MHoQeUBGhFHuNmMSOeQmcLcpGo3jGXLp 0Ugbke7ySlzQc3dVNkfwh8Gm/bogJr40gw4C4quAFVBi/aHMn8ovEWFCvcrrQPBj+4oh KLIK4fFwAd+j+JGPlPFihn6waMSZbPYYmt09CfedZ6AF1OmMGEL0dGHb2LgiX2Ml1gs9 SyIdQ/jLHBVCkkGE+JEyf16alLDioDT3GvC70mqcUuk+gyZ2SFv3Okr/Kf3NXhVyRjy0 iQg/AzZxjyNXX5rLNYjx6eBUv7a+fln0HvWaxmz4Tf5jXkQdAfvb0aYDH4/wwY3KX9J0 rMaA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532tIPqUPPo93GIcZJ4bokX9bOiN1Jxnu8BxCOgEP7MXzG7FJMJM cFq6DP+5+GAnOWYffIJ4p6Q= X-Google-Smtp-Source: ABdhPJxymUJb/kug1OEAd8onwio0rnI9guwJ7QGiMuWm7ABsxxVic8iwlAqz/WX4Y+YiJZbQaOD5Wg== X-Received: by 2002:a17:906:19db:: with SMTP id h27mr2750101ejd.154.1598266773090; Mon, 24 Aug 2020 03:59:33 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b01a:: with SMTP id v26ls4388434ejy.8.gmail; Mon, 24 Aug 2020 03:59:32 -0700 (PDT) X-Received: by 2002:adf:c64d:: with SMTP id u13mr5525183wrg.114.1598266772447; Mon, 24 Aug 2020 03:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598266772; cv=none; d=google.com; s=arc-20160816; b=Ts/VQomeTbO6KOOy72bytcuVfB4koRq+HmXjTe+V9BWNMgNAxO97OlD7yi7c/ihm6x 03o6nLSlYTyCHj2HcNhqICo72AZgLQHmCYpNZRDW0yfbYC3LTDU7q6tLyfsY8ABpqGhi u/GTiiuVgzkb2uyJfHyALlNQxEBSEZ7HAzzbDuuHXd9GjMcD8JerIuOFZUZ/YMZQD6ug 2+fH3aRkz2xYW086k6pJF5AVXmEsNoGsAbTBEHYgA6SS//LMYSyDfa8ap5FlvMZBeESQ alJTIDHqDYVdZFtrem7KiRm8pVs9Lg87+mPDFRZOnZsjCWNhmFyBNlYD5XSUg2G5ZlJN qEjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:to:from :ironport-sdr:ironport-sdr; bh=U1wItO/Rwqipy5D9WgxJeXhDu7GNPLbUyaWObE6DJpM=; b=lusiCR1afZm5E1OySTnbDfbVA12dq3YI22jJnwtUozlBcDYa8abUyxI1dDhm3fFXoF i8V5n5JJE4NCfNk3JdDy6omj/sch64cuawjVYE+3evYZSdfcyqZEvALa6SJHZvwf3xAS XRKh6yKELcDE/ZxWbVN5fP9+5/15ljaMHsxYxvKWrYkyZIy/pw0ZjRdMLqukyQa8NPHd UIpqdTZbhVbiKzLsNef5YSyso5VafhET1GTzu/AcevuYY/rXnhIXw6JC41tKInb9XYvc Zr65PmPxUWXdNzAdpZ6rK9tiXqlpud0IwxY5R6ahxnYdTI0s8b58j9g4dCS72Ai7ie80 GpQQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id i11si331160wra.3.2020.08.24.03.59.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Aug 2020 03:59:32 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) client-ip=68.232.137.252; IronPort-SDR: OKFmO5JR4o8SdJ7VTgC+S4TaRZCXwUsxZSvkfHZKBXWl/ve+SczK6TYbHRCvzQB27MKsW6SSaA zpFkpsFsxYze1HZ4s75ZYCz9tTzFV480PYReBS4LoZjfwyYXZZafEsxb7aM9t0TC0fKs7rFl/r JQBJtYLD6x9eMp7guu5s3XI1iYag4qA6/xLIZkWSfqmsAiaY7lSx9xkV8KP8U0yLE+JYt3fSWm iizIe5yEXs7b9rvggz+hYkhBVQA+W46nDnG/r8Q7JO3IJGQ1QjgkbdnOnnKkEcd1jFJ2jdqgxf HiI= X-IronPort-AV: E=Sophos;i="5.76,348,1592899200"; d="scan'208";a="52309711" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 24 Aug 2020 02:59:31 -0800 IronPort-SDR: EnWzviNc82sWkv3RBD9CNJrgAJlVZ6aduEOsnkl3aJpvYs2gfhugfNh6tbec2ItbxPvaG9Gr4O TNQyCyi82srD9dEybBOdhm6Ks9evGs6bQPl5I5L9PXMbJwhHaPPmz9KEt8RzqamqLJxPmXebVQ ZLUV+9aweQPCi57lDn6L4XBDyJw9NlgnJeOXymmxmYxzMwIOjH9i7t2+Qqi0DHO3ZoW5qllgNX S1Q5I1lQqar4OLWVYiQIQDIdO0k1HavUdotSo0y7e6CVzPRc66b1dAHNYnrCegyvV0wsZVAyLx gjY= From: Vijai Kumar K To: , Subject: [RFC PATCH 06/10] wic_fakeroot: Handle standalone pseudo invocations Date: Mon, 24 Aug 2020 16:29:01 +0530 Message-ID: <20200824105905.21110-2-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200824105905.21110-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200824092750.19642-5-Vijaikumar_Kanagarajan@mentor.com> <20200824105905.21110-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-08.mgc.mentorg.com (147.34.90.208) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.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 X-GMAIL-THRID: =?utf-8?q?1675904180265565355?= X-GMAIL-MSGID: =?utf-8?q?1675904180265565355?= When using --exclude-path option wic copies the rootfs to a new location and invokes pseudo as a standalone command to rebuild the database in the new rootfs. This is not applicable when using wic_fakeroot. Return 0 for such standalone invocations in wic_fakeroot. It also looks for files.db inside the pseudo directory and throws an exception if it is not found. Handle that too. Signed-off-by: Vijai Kumar K --- meta/classes/wic-img.bbclass | 1 + scripts/wic_fakeroot | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass index a2c9627..b1a7259 100644 --- a/meta/classes/wic-img.bbclass +++ b/meta/classes/wic-img.bbclass @@ -144,6 +144,7 @@ EOSUDO export BUILDDIR=${BUILDDIR} export MTOOLS_SKIP_CHECK=1 mkdir -p ${IMAGE_ROOTFS}/../pseudo + touch ${IMAGE_ROOTFS}/../pseudo/files.db # create the temp dir in the buildchroot to ensure uniqueness WICTMP=$(cd ${BUILDCHROOT_DIR}; mktemp -d -p tmp) diff --git a/scripts/wic_fakeroot b/scripts/wic_fakeroot index 88a03fa..16b011e 100755 --- a/scripts/wic_fakeroot +++ b/scripts/wic_fakeroot @@ -25,6 +25,11 @@ cmd = args[0] # rootfs/root ... assert os.geteuid() == 0, "wic_fakeroot must be run as root!" +# Check if we are calling the pseudo command itself. Return 1 +# for standalone pseudo operations. +if cmd.startswith('-'): + sys.exit(0) + # e2fsck <= 1.43.5 returns 1 on non-errors (stretch and before affected) # treat 1 as safe ... the filesystem was successfully repaired and is OK if cmd.startswith('fsck.'):