mirror of https://github.com/hak5/openwrt.git
build: remove sgid permission from tar
Otherwise tar will keep the sgid bit when running from a sgid-set directory, resulting in a different file being generated. Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [reworked commit message, removed DMARC]openwrt-19.07
parent
32a6c252db
commit
8252511dc0
|
@ -55,7 +55,8 @@ define dl_pack
|
||||||
$(if $(dl_pack/$(call ext,$(1))),$(dl_pack/$(call ext,$(1))),$(dl_pack/unknown))
|
$(if $(dl_pack/$(call ext,$(1))),$(dl_pack/$(call ext,$(1))),$(dl_pack/unknown))
|
||||||
endef
|
endef
|
||||||
define dl_tar_pack
|
define dl_tar_pack
|
||||||
$(TAR) --numeric-owner --owner=0 --group=0 --sort=name $$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c $(2) | $(call dl_pack,$(1))
|
$(TAR) --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name \
|
||||||
|
$$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c $(2) | $(call dl_pack,$(1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifdef CHECK
|
ifdef CHECK
|
||||||
|
|
|
@ -291,7 +291,7 @@ endef
|
||||||
|
|
||||||
ifdef CONFIG_TARGET_ROOTFS_TARGZ
|
ifdef CONFIG_TARGET_ROOTFS_TARGZ
|
||||||
define Image/Build/targz
|
define Image/Build/targz
|
||||||
$(TAR) -cp --numeric-owner --owner=0 --group=0 --sort=name \
|
$(TAR) -cp --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name \
|
||||||
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
||||||
-C $(TARGET_DIR)/ . | gzip -9n > $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))-rootfs.tar.gz
|
-C $(TARGET_DIR)/ . | gzip -9n > $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))-rootfs.tar.gz
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in New Issue