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 8f35c32..61e495f 100644 (file)
@@ -53,6 +53,7 @@ define Package/Default
   HIDDEN:=
   URL:=
   VARIANT:=
+  USERID:=
 endef
 
 Build/Patch:=$(Build/Patch/Default)
index 9dc847d..0241580 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 5c83b3d..1caeaa2 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)"; ) \