diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/common.mk | 4 | ||||
-rw-r--r-- | fs/ext2/ext2.mk | 11 | ||||
-rw-r--r-- | fs/ubifs/ubi.mk | 6 |
3 files changed, 11 insertions, 10 deletions
diff --git a/fs/common.mk b/fs/common.mk index 981dcb1aa..7515fdc77 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -43,7 +43,7 @@ ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES)) define ROOTFS_TARGET_INTERNAL # extra deps -ROOTFS_$(2)_DEPENDENCIES += host-pseudo host-makedevs \ +ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \ $$(if $$(PACKAGES_USERS)$$(ROOTFS_USERS_TABLES),host-mkpasswd) ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y) @@ -100,7 +100,7 @@ ifeq ($$(BR2_REPRODUCIBLE),y) endif $$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT) chmod a+x $$(FAKEROOT_SCRIPT) - PATH=$$(BR_PATH) $$(HOST_DIR)/usr/bin/pseudo -- $$(FAKEROOT_SCRIPT) + PATH=$$(BR_PATH) $$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT) $$(INSTALL) -m 0644 support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE) -@rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE) ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),) diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk index 7417f81cf..cfb34c456 100644 --- a/fs/ext2/ext2.mk +++ b/fs/ext2/ext2.mk @@ -20,12 +20,11 @@ ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),0) EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) endif -# Not qstrip-ing the variable, because it may contain spaces, but we must -# qstrip it when checking. Furthermore, we need to further quote it, so -# that the quotes do not get eaten by the echo statement when creating the -# fakeroot script -ifneq ($(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_LABEL)),) -EXT2_OPTS += -l '$(BR2_TARGET_ROOTFS_EXT2_LABEL)' +# qstrip results in stripping consecutive spaces into a single one. So the +# variable is not qstrip-ed to preserve the integrity of the string value. +EXT2_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL)) +ifneq ($(EXT2_LABEL),) +EXT2_OPTS += -l "$(EXT2_LABEL)" endif ROOTFS_EXT2_DEPENDENCIES = host-mke2img diff --git a/fs/ubifs/ubi.mk b/fs/ubifs/ubi.mk index cda4bf489..e488cb5f8 100644 --- a/fs/ubifs/ubi.mk +++ b/fs/ubifs/ubi.mk @@ -20,9 +20,11 @@ else UBINIZE_CONFIG_FILE_PATH = fs/ubifs/ubinize.cfg endif +# don't use sed -i as it misbehaves on systems with SELinux enabled when this is +# executed through fakeroot (see #9386) define ROOTFS_UBI_CMD - $(INSTALL) -m 0644 $(UBINIZE_CONFIG_FILE_PATH) $(BUILD_DIR)/ubinize.cfg - $(SED) 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' $(BUILD_DIR)/ubinize.cfg + sed 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' \ + $(UBINIZE_CONFIG_FILE_PATH) > $(BUILD_DIR)/ubinize.cfg $(HOST_DIR)/usr/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/ubinize.cfg rm $(BUILD_DIR)/ubinize.cfg endef |