From patchwork Thu Mar 8 21:15:25 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: 883344 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@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; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JzsV7kdT"; 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 3zy3G12J6pz9slR for ; Fri, 9 Mar 2018 08:15:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2ED5C89076; Thu, 8 Mar 2018 21:15:48 +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 WuZ1z8y3C2dS; Thu, 8 Mar 2018 21:15:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 6C12A89030; Thu, 8 Mar 2018 21:15:45 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 13E9F1BFD7B for ; Thu, 8 Mar 2018 21:15:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0D25F226C7 for ; Thu, 8 Mar 2018 21:15:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TcRBjrVtxxu6 for ; Thu, 8 Mar 2018 21:15:43 +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 silver.osuosl.org (Postfix) with ESMTPS id BBCDC226AD for ; Thu, 8 Mar 2018 21:15:42 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id s206so834048wme.0 for ; Thu, 08 Mar 2018 13:15:42 -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=JzsV7kdTYcMl0XQ7W0k7WPWKzCoWXdgF8F1jFB0yhPzf1qRwpg6zmDEMh4wEiw7mn1 +olDMbU2PBoKKgifazTZSYGq/j/TJi2MinsTcGVvVg8OsdKHRyckigcw54OppKBUG0Cl pGRqi6mTQWcOxMFYU/ZXKys4q/3LKya1mBUMsL/PotBL03bZCZg5gyQypncsOvxUiWZu 6qtW6hGyIHpN6Ei2FEkNUHPwcGRPg/MNV9MP9p+0+gFjiGj3Ly1s6zI0TekZRnGz7NR+ P241R4drLRAl4HO0zcmlLofyK2SFtEbt3kwWcNAVyDUg89DUSrm/G3TUrVZzVZbur+n3 PIvw== 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=HFx0/dcddTM8lZtgf0FBoSCTueXdOzmBdTBI+bdcrU2YKiEO+MFwOyUwKVWQFxBPBO d10Th6yt0c5ak3f6a0HWZreok3UlzafINa6wHg/ReAwBWn8o1bBqjZkZbBzLtzHsC1fp z4tiGbyiJGDsOCbJ436eVYRbcUFfD6GkLw5YRhQEp9wvHAY1NhJ1FY07v0q4yKsAYNRY OveBVfCloRi/qNT3srTvn20sJWGvU7Lt3VSgI7TbXvGfed1+rJXg5FFOdYqeh6Kftn0v VAR2Ilmu7CenikUk8e2cCof8DaibAD4ZT54NL3uqqMVZvKIhG6ZkWvZVuU3aOCTjMIWj kkDA== X-Gm-Message-State: AElRT7EOsZNDCFRbpUDS5UCBRvM8ooefVzdnzsQBE3/Tl1ehDEloS627 mlPqQ3ey7xnEyrvrN1JqK0axxQ== X-Google-Smtp-Source: AG47ELsGxWCrBVyoKrf7RVvWC4I//gHInY27W8w8G0oRBkNZZGyRGbfMRVvMCGavb1a9j7jopRZ3HQ== X-Received: by 10.28.18.2 with SMTP id 2mr164843wms.108.1520543740855; Thu, 08 Mar 2018 13:15:40 -0800 (PST) Received: from scaer.bzh.lan (2a01cb0886107300cdb563d68552a6f1.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:cdb5:63d6:8552:a6f1]) by smtp.gmail.com with ESMTPSA id a72sm14458233wme.28.2018.03.08.13.15.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 13:15:39 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Thu, 8 Mar 2018 22:15:25 +0100 Message-Id: <18c94b8c34eff55fd5997dafc1435d8006a7d6b2.1520543724.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Subject: [Buildroot] [PATCH 01/15 v3] 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)