From patchwork Mon Feb 5 08:42:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 869198 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XjNKw5A+"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zZh1M1zk9z9sRm for ; Mon, 5 Feb 2018 19:42:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 862CA87528; Mon, 5 Feb 2018 08:42:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tmepp8W66Y5i; Mon, 5 Feb 2018 08:42:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 4F62187522; Mon, 5 Feb 2018 08:42:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D43271C0C93 for ; Mon, 5 Feb 2018 08:42:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CA18987FD9 for ; Mon, 5 Feb 2018 08:42:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MvW+jqA4KzHf for ; Mon, 5 Feb 2018 08:42:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by hemlock.osuosl.org (Postfix) with ESMTPS id 61E5187889 for ; Mon, 5 Feb 2018 08:42:37 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id t74so24466887wme.3 for ; Mon, 05 Feb 2018 00:42:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=UxssPJ0JTNRMds/KwT1hJjo5bE12vWeFcKsTph8A4Cs=; b=XjNKw5A++6UCirtJNxrtNPBIcoNKTKewWVhNW36AZYUga3nRpuKzMsKoK5t+KUFkju e8FJLvjX4tM/sQZGPKvuzAUphkgtDgFZBhLW/70PzvyUQ4SAVkwvt+RmvNrKiD5cRpdI 7wayFQE9e++iADEkp8Z5xtvzWzP+AodahTSwA8iQ5U6Gah/MtWOSh6eRYGglxIay3mBl QQCpE5qaiaDjXvvWBrMQ0k8c22C7axApj8DBwf3ApF0v3474S56u4kF5BUSU/b5knjEv YuVCVmvPalaDqjyG22bKPUZhHIWYpFOLC2hp18F7Vq09HxkrIVmnGda0PNLNTvyBGjfy ezHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=UxssPJ0JTNRMds/KwT1hJjo5bE12vWeFcKsTph8A4Cs=; b=gUNWwnYhPob46eZ7ZtYvl7n2kCyJa9FbYsbaY/WSs1q1c0jkNW2U8+N5ehAJgJgFZd 8DBvCWk6pbBc5agSXARut7r7cCL2NqG0WYq8XwrIZ+FcJ4oVgow9q0eTatraMm9Pf8vc K36eyFAehyselXGMaA7dSzndOQaVgpnldUTgRdfmZVzYDn3Uz3Tk12DgbzGz7n6xTeNR Jfw/3+/gAOEZ7INCjRJMgUeWOqaNqWqkDi2xlC+gqXd9t9+fPqYprB6bkceiAwlTzKe0 Fp0+B/op9eU42VxDiKK4DZ6XMxmbjmfezHhPidPxLlaxnxfBc9VjguZJNutTn3Ll3ykz pSzg== X-Gm-Message-State: AKwxyteMOhWaZ6/ftLR4ltxPMk5L90Js7yl8rj+aldK+4o+S/hIcmQnF hNFusQCq0izZ8WZgn0QNqRrTAg== X-Google-Smtp-Source: AH8x225FlPXBsvC3xPazAbzr7LkstWpqcqwlGiIXJ76dlhXB38zfzSAMLdoPB3lNJVvueERpCfsCpA== X-Received: by 10.28.108.4 with SMTP id h4mr32845600wmc.161.1517820155588; Mon, 05 Feb 2018 00:42:35 -0800 (PST) Received: from scaer.bzh.lan (2a01cb088610730099f5a5e9cd1d4384.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:99f5:a5e9:cd1d:4384]) by smtp.gmail.com with ESMTPSA id q195sm9181624wmb.33.2018.02.05.00.42.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Feb 2018 00:42:34 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 5 Feb 2018 09:42:19 +0100 Message-Id: X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Subject: [Buildroot] [PATCH 01/15 v2] fs: run filesystem hooks under fakeroot X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently, the pre-gen hooks of the various filesystems are run before we enter the fakeroot. However, this precludes those hooks from doing actions that require root, like creating a pseudo-device or the likes. So, move those pre-gen hooks under fakeroot. This has currently no side-effect, as they are still called before everything else in the fakeroot script, even the system-wide chown call. Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni Cc: Arnout Vandecappelle --- fs/common.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/common.mk b/fs/common.mk index 6d579db810..274a3e9c7b 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -76,9 +76,10 @@ $$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES) @$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)") rm -rf $(FS_DIR) mkdir -p $(FS_DIR) - $$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep)) echo '#!/bin/sh' > $$(FAKEROOT_SCRIPT) echo "set -e" >> $$(FAKEROOT_SCRIPT) + $$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),\ + $$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep)) echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT) ifneq ($$(ROOTFS_USERS_TABLES),) cat $$(ROOTFS_USERS_TABLES) >> $$(USERS_TABLE)