diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-03-31 15:13:27 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-03-31 15:13:27 +0000 |
commit | a42b37dd86f41b02617c691fd0a8633dfbc7cb16 (patch) | |
tree | 45a93c619d9136555203f4890b420e1a8f5ee786 /include | |
parent | 95bf947c5355862616bbb363f00506abbe9189d7 (diff) | |
download | upstream-a42b37dd86f41b02617c691fd0a8633dfbc7cb16.tar.gz upstream-a42b37dd86f41b02617c691fd0a8633dfbc7cb16.tar.bz2 upstream-a42b37dd86f41b02617c691fd0a8633dfbc7cb16.zip |
build: ensure that preinst and postrm are executable (fixes #19372)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45187 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r-- | include/package-ipkg.mk | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index 943b383b62..d370644e98 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -16,11 +16,12 @@ IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg # 1: package name # 2: variable name # 3: variable suffix +# 4: file is a script define BuildIPKGVariable ifdef Package/$(1)/$(2) $$(IPKG_$(1)) : VAR_$(2)$(3)=$$(Package/$(1)/$(2)) $(call shexport,Package/$(1)/$(2)) - $(1)_COMMANDS += echo "$$$$$$$$$(call shvar,Package/$(1)/$(2))" > $(2)$(3); + $(1)_COMMANDS += echo "$$$$$$$$$(call shvar,Package/$(1)/$(2))" > $(2)$(3); $(if $(4),chmod 0755 $(2)$(3)) endif endef @@ -125,10 +126,10 @@ ifeq ($(DUMP),) $(FixupReverseDependencies) $(eval $(call BuildIPKGVariable,$(1),conffiles)) - $(eval $(call BuildIPKGVariable,$(1),preinst)) - $(eval $(call BuildIPKGVariable,$(1),postinst,-pkg)) - $(eval $(call BuildIPKGVariable,$(1),prerm,-pkg)) - $(eval $(call BuildIPKGVariable,$(1),postrm)) + $(eval $(call BuildIPKGVariable,$(1),preinst,,1)) + $(eval $(call BuildIPKGVariable,$(1),postinst,-pkg,1)) + $(eval $(call BuildIPKGVariable,$(1),prerm,-pkg,1)) + $(eval $(call BuildIPKGVariable,$(1),postrm,1)) $(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(STAMP_BUILT) rm -rf $(STAGING_DIR_ROOT)/tmp-$(1) |