Message ID | 20200904224636.484105-2-mail@aparcar.org |
---|---|
State | Not Applicable |
Headers | show |
Series | [1/2] build: ipkg-build add -r option for all-root | expand |
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index 0b7a561edc..362fa25307 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -260,7 +260,13 @@ $(_endef) endif $(INSTALL_DIR) $$(PDIR_$(1)) +ifdef PKG_FILE_MODES + echo "Package $(1) is build with fakeroot" >&2 $(FAKEROOT) $(SCRIPT_DIR)/ipkg-build -m "$(PKG_FILE_MODES)" $$(IDIR_$(1)) $$(PDIR_$(1)) +else + echo "Package $(1) is build without fakeroot" >&2 + $(SCRIPT_DIR)/ipkg-build -r $$(IDIR_$(1)) $$(PDIR_$(1)) +endif @[ -f $$(IPKG_$(1)) ] $(1)-clean:
Fakeroot was recently wrapped around the `ipkg-build` script to allow arbitrary file modes for packages, like setting a SUID. However this slows down the building process while most packages don't make use of that (by defining `PKG_FILE_MODES`). This commit only uses fakeroot if `PKG_FILE_MODES` is set. If it is not defined the newly added *all root* option `-r` is used. Signed-off-by: Paul Spooren <mail@aparcar.org> --- include/package-ipkg.mk | 6 ++++++ 1 file changed, 6 insertions(+)