aboutsummaryrefslogtreecommitdiff
path: root/fs/common.mk
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2018-03-31 11:05:47 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-03-31 20:47:25 +0200
commit405f91200488dc8f4648acbdff5114d0af20b6b0 (patch)
tree03fc84d9311e56b5b107a601ce14d8446c7a5925 /fs/common.mk
parent14d43aea0a6a18878416bb4c5aa4d870d8377f5f (diff)
downloadbuildroot-405f91200488dc8f4648acbdff5114d0af20b6b0.tar.gz
buildroot-405f91200488dc8f4648acbdff5114d0af20b6b0.tar.bz2
fs: run filesystem hooks under fakeroot
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" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'fs/common.mk')
-rw-r--r--fs/common.mk3
1 files changed, 2 insertions, 1 deletions
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)