From f6642fc2bfc7d6a6d56c65fe74585dd97da6a785 Mon Sep 17 00:00:00 2001
From: Marcel Telka <marcel@telka.sk>
Date: Wed, 17 Jan 2024 08:27:23 +0100
Subject: [PATCH] pkg: add pkg.human-version and userland.info.component to all packages

---
 components/openindiana/pkg/pkg5     |   11 ++++++++---
 components/openindiana/pkg/Makefile |   26 +++++++++++++-------------
 2 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/components/openindiana/pkg/Makefile b/components/openindiana/pkg/Makefile
index 96637be..933ee34 100644
--- a/components/openindiana/pkg/Makefile
+++ b/components/openindiana/pkg/Makefile
@@ -31,6 +31,7 @@
 DEVBOOK=$(SOURCE_DIR)/proto/dev-guide/book.pdf
 
 CLEAN_PATHS += $(BUILD_DIR)
+CLOBBER_PATHS += $(SOURCE_DIR)
 
 COMPONENT_PREP_GIT=no
 include $(WS_TOP)/make-rules/prep.mk
@@ -81,6 +82,11 @@
 	echo "<transform set name=pkg.fmri -> emit set name=pkg5.info.git-rev value=$(shell cd $(COMPONENT_SRC); git rev-parse HEAD)>" >> \
 	  $(BUILD_DIR)/$(MACH)/publish.transforms
 
+	echo "<transform set name=pkg.fmri -> emit set name=pkg.human-version value=$(shell cd $(COMPONENT_SRC); git rev-parse HEAD | cut -c1-8)>" >> \
+	  $(BUILD_DIR)/$(MACH)/publish.transforms
+	echo "<transform set name=pkg.fmri -> emit set name=userland.info.component value=$(COMPONENT)>" >> \
+	  $(BUILD_DIR)/$(MACH)/publish.transforms
+
 
 $(BUILD_DIR)/$(MACH)/.published: $(BUILD_DIR)/$(MACH)/publish.transforms
 	if [ -d $(@D)/pkgrecv.dir ]; then $(RM) -r $(@D)/pkgrecv.dir; fi
@@ -100,20 +106,14 @@
 
 .NOTPARALLEL:
 
-publish: update $(BUILD_DIR)/$(MACH)/.published
+publish: update $(BUILD_DIR)/$(MACH)/.published update-metadata
 
-PACKAGE_NAMES  = consolidation/ips/ips-incorporation
-PACKAGE_NAMES += consolidation/ips/ips-message-files
-PACKAGE_NAMES += developer/opensolaris/pkg5
-PACKAGE_NAMES += package/pkg
-PACKAGE_NAMES += package/pkg/depot
-PACKAGE_NAMES += package/pkg/package-manager
-PACKAGE_NAMES += package/pkg/system-repository
-PACKAGE_NAMES += package/pkg/update-manager
-PACKAGE_NAMES += package/pkg/zones-proxy
-PACKAGE_NAMES += system/zones/brand/ipkg
-PACKAGE_NAMES += system/zones/brand/kvm
-PACKAGE_NAMES += system/zones/brand/nlipkg
+print-package-names:
+	if test -d $(PKG_REPO); then \
+		pkgrepo list -H -F tsv -s $(PKG_REPO) \
+		    | cut -f 2 \
+		    | $(SORT) -u ; \
+	fi
 
 # Manually added dependencies
 REQUIRED_PACKAGES += developer/opensolaris/pkg5
diff --git a/components/openindiana/pkg/pkg5 b/components/openindiana/pkg/pkg5
index 8ef8d29..1e9c688 100644
--- a/components/openindiana/pkg/pkg5
+++ b/components/openindiana/pkg/pkg5
@@ -1,8 +1,11 @@
 {
     "dependencies": [
-        "SUNWcs",
         "developer/opensolaris/pkg5",
-        "system/library",
+        "library/python/cherrypy-39",
+        "library/python/jsonrpclib-pelix-39",
+        "library/python/jsonschema-39",
+        "library/python/python-rapidjson-39",
+        "library/python/six-39",
         "system/zones/internal"
     ],
     "fmris": [
@@ -10,14 +13,16 @@
         "consolidation/ips/ips-message-files",
         "developer/opensolaris/pkg5",
         "package/pkg",
+        "package/pkg-35",
         "package/pkg/depot",
         "package/pkg/package-manager",
         "package/pkg/system-repository",
         "package/pkg/update-manager",
         "package/pkg/zones-proxy",
+        "system/zones/brand/bhyve",
         "system/zones/brand/ipkg",
         "system/zones/brand/kvm",
         "system/zones/brand/nlipkg"
     ],
     "name": "pkg"
-}
\ No newline at end of file
+}

--
Gitblit v1.9.3