summaryrefslogtreecommitdiffstats
path: root/target/ext2/ext2root.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2005-08-04 06:32:52 +0000
committerEric Andersen <andersen@codepoet.org>2005-08-04 06:32:52 +0000
commitd1345f067e18a2967638eb888c7ff5010d523acf (patch)
tree209a7f9055e89cd63d6f0a7994ae923b12312cb5 /target/ext2/ext2root.mk
parent1172dbb8b15c2ccddfa9492850d2f6fbb61e2263 (diff)
downloadbuildroot-novena-d1345f067e18a2967638eb888c7ff5010d523acf.tar.gz
buildroot-novena-d1345f067e18a2967638eb888c7ff5010d523acf.zip
Allow packages to use fakeroot. To accomodate this, convert all
target filesystem creation tools to also use fakeroot.
Diffstat (limited to 'target/ext2/ext2root.mk')
-rw-r--r--target/ext2/ext2root.mk21
1 files changed, 19 insertions, 2 deletions
diff --git a/target/ext2/ext2root.mk b/target/ext2/ext2root.mk
index 8056fafcd..a934c5a5a 100644
--- a/target/ext2/ext2root.mk
+++ b/target/ext2/ext2root.mk
@@ -71,6 +71,19 @@ $(EXT2_BASE): genext2fs
@rm -rf $(TARGET_DIR)/usr/share/man
@rm -rf $(TARGET_DIR)/usr/info
/sbin/ldconfig -r $(TARGET_DIR)
+ # Use fakeroot to pretend all target binaries are owned by root
+ $(STAGING_DIR)/usr/bin/fakeroot \
+ -i $(STAGING_DIR)/fakeroot.env \
+ -s $(STAGING_DIR)/fakeroot.env -- \
+ chown -R root:root $(TARGET_DIR)
+ # Use fakeroot to pretend to create all needed device nodes
+ $(STAGING_DIR)/usr/bin/fakeroot \
+ -i $(STAGING_DIR)/fakeroot.env \
+ -s $(STAGING_DIR)/fakeroot.env -- \
+ $(STAGING_DIR)/bin/makedevs \
+ -d $(TARGET_DEVICE_TABLE) \
+ $(TARGET_DIR)
+ # Use fakeroot so genext2fs believes the previous fakery
ifeq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
GENEXT2_REALSIZE=`LANG=C du -l -s -c -k $(TARGET_DIR) | grep total | sed -e "s/total//"`; \
GENEXT2_ADDTOROOTSIZE=`if [ $$GENEXT2_REALSIZE -ge 20000 ] ; then echo 16384; else echo 2400; fi`; \
@@ -78,16 +91,20 @@ ifeq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
GENEXT2_ADDTOINODESIZE=`find $(TARGET_DIR) | wc -l`; \
GENEXT2_INODES=`expr $$GENEXT2_ADDTOINODESIZE + 400`; \
set -x; \
+ $(STAGING_DIR)/usr/bin/fakeroot \
+ -i $(STAGING_DIR)/fakeroot.env \
+ -s $(STAGING_DIR)/fakeroot.env -- \
$(GENEXT2_DIR)/genext2fs \
-b $$GENEXT2_SIZE \
-i $$GENEXT2_INODES \
-d $(TARGET_DIR) \
- -D $(TARGET_DEVICE_TABLE) \
$(EXT2_OPTS) $(EXT2_BASE)
else
+ $(STAGING_DIR)/usr/bin/fakeroot \
+ -i $(STAGING_DIR)/fakeroot.env \
+ -s $(STAGING_DIR)/fakeroot.env -- \
$(GENEXT2_DIR)/genext2fs \
-d $(TARGET_DIR) \
- -D $(TARGET_DEVICE_TABLE) \
$(EXT2_OPTS) \
$(EXT2_BASE)
endif