include: add a meta data field for required system user:group
authorJohn Crispin <john@openwrt.org>
Thu, 11 Sep 2014 12:27:26 +0000 (12:27 +0000)
committerJohn Crispin <john@openwrt.org>
Thu, 11 Sep 2014 12:27:26 +0000 (12:27 +0000)
this is in preparation of having services run as !root with
ACL'ed access to ubus.

Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 42469

include/package-defaults.mk
include/package-dumpinfo.mk
include/package-ipkg.mk

index 8f35c3293e6902a9fb732770c679cb37aae4c20b..61e495f50f201235e5e1d935b9014fa82d713858 100644 (file)
@@ -53,6 +53,7 @@ define Package/Default
   HIDDEN:=
   URL:=
   VARIANT:=
+  USERID:=
 endef
 
 Build/Patch:=$(Build/Patch/Default)
index 9dc847dc1dede5cfe342c9450bdb86da095a424c..024158052294e77f667e692c690d0232d8066ea5 100644 (file)
@@ -41,7 +41,8 @@ $(if $(VARIANT),Build-Variant: $(VARIANT)
 Category: $(CATEGORY)
 Title: $(TITLE)
 Maintainer: $(MAINTAINER)
-Source: $(PKG_SOURCE)
+$(if $(USERID),Require-User: $(USERID)
+)Source: $(PKG_SOURCE)
 Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))
 $(if $(KCONFIG),Kernel-Config: $(KCONFIG)
 )$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
index 5c83b3d58bac37e5b83b4c3a0a212604eba05346..1caeaa25b63bc4b1be94b0d465a59c2b85c8e2b5 100644 (file)
@@ -165,6 +165,7 @@ ifeq ($(DUMP),)
                $(if $(PKG_LICENSE), echo "License: $(PKG_LICENSE)"; ) \
                $(if $(PKG_LICENSE_FILES), echo "LicenseFiles: $(PKG_LICENSE_FILES)"; ) \
                echo "Section: $(SECTION)"; \
+               $(if $(USERID),echo "Require-User: $(USERID)"; ) \
                $(if $(filter hold,$(PKG_FLAGS)),echo "Status: unknown hold not-installed"; ) \
                $(if $(filter essential,$(PKG_FLAGS)), echo "Essential: yes"; ) \
                $(if $(MAINTAINER),echo "Maintainer: $(MAINTAINER)"; ) \