diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/pkg/Makefile | 39 | ||||
-rw-r--r-- | usr/src/pkg/manifests/system-data-hardware-registry.mf | 3 | ||||
-rw-r--r-- | usr/src/pkg/manifests/system-data-zoneinfo.mf | 1 | ||||
-rw-r--r-- | usr/src/pkg/scripts/pkglist.awk | 55 | ||||
-rw-r--r-- | usr/src/pkg/transforms/synthetic | 7 |
5 files changed, 70 insertions, 35 deletions
diff --git a/usr/src/pkg/Makefile b/usr/src/pkg/Makefile index 6a627b4e12..18f7010b45 100644 --- a/usr/src/pkg/Makefile +++ b/usr/src/pkg/Makefile @@ -24,7 +24,7 @@ # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com> # Copyright 2016 RackTop Systems. -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/Makefile.master @@ -627,16 +627,6 @@ clobber: clean # point to valid manifests, and will fail the make run if one # does not contain an fmri. # -# We do this in the BEGIN action instead of using pattern matching -# because we expect the fmri to be at or near the first line of each input -# file, and this way lets us avoid reading the rest of the file after we -# find what we need. -# -# We keep track of a failure to locate an fmri, so we can fail the -# make run, but we still attempt to process each package in the -# repo/pkgstat-specific subdir, in hopes of maybe giving some -# additional useful info. -# # The protolist is used for bfu archive creation, which may be invoked # interactively by the user. Both protolist and PKGLISTS targets # depend on $(PROC_PKGS), but protolist builds them recursively. @@ -647,33 +637,14 @@ clobber: clean # contents of the processed manifests, which can vary depending on build # environment. # -$(PKGLISTS): $(PROC_PKGS) +$(PKGLISTS): scripts/pkglist.awk $(PROC_PKGS) $(PKGDEBUG)sdotr=$(@F:packages.%=%); \ r=$${sdotr%.+(?)}; s=$${sdotr#+(?).}; \ print "Generating $$r $$s package list"; \ $(RM) $(@); $(TOUCH) $(@); \ - $(AWK) 'BEGIN { \ - if (ARGC < 2) { \ - exit; \ - } \ - retcode = 0; \ - for (i = 1; i < ARGC; i++) { \ - do { \ - e = getline f < ARGV[i]; \ - } while ((e == 1) && (f !~ /name=pkg.fmri/)); \ - close(ARGV[i]); \ - if (e == 1) { \ - l = split(f, a, "="); \ - print "depend fmri=" a[l], \ - "type=$$(PKGDEP_TYPE)"; \ - } else { \ - print "no fmri in " ARGV[i] >> "/dev/stderr"; \ - retcode = 2; \ - } \ - } \ - exit retcode; \ - }' `find $(PDIR) -type l -a \( $(PKGS:%=-name %.metadata.$$s.$$r -o) \ - -name NOSUCHFILE \)` >> $(@) + $(AWK) -f scripts/pkglist.awk \ + `find $(PDIR) -type l -a \( $(PKGS:%=-name %.metadata.$$s.$$r -o) \ + -name NOSUCHFILE \)` >> $(@) # # rules to validate proto area against manifests, check for safe diff --git a/usr/src/pkg/manifests/system-data-hardware-registry.mf b/usr/src/pkg/manifests/system-data-hardware-registry.mf index 66c1791c7d..2cbc143786 100644 --- a/usr/src/pkg/manifests/system-data-hardware-registry.mf +++ b/usr/src/pkg/manifests/system-data-hardware-registry.mf @@ -21,7 +21,7 @@ # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri value=pkg:/system/data/hardware-registry@$(PKGVERS) @@ -30,6 +30,7 @@ set name=pkg.description \ set name=pkg.summary value="Hardware data files" set name=info.classification \ value=org.opensolaris.category.2008:System/Hardware +set name=org.opensolaris.incorp-facet value=true set name=variant.arch value=$(ARCH) dir path=usr group=sys dir path=usr/share diff --git a/usr/src/pkg/manifests/system-data-zoneinfo.mf b/usr/src/pkg/manifests/system-data-zoneinfo.mf index 6c97d35adb..620600e7a4 100644 --- a/usr/src/pkg/manifests/system-data-zoneinfo.mf +++ b/usr/src/pkg/manifests/system-data-zoneinfo.mf @@ -21,6 +21,7 @@ set name=pkg.fmri \ set name=pkg.description value="timezone information" set name=pkg.summary value="Timezone Information" set name=info.classification value=org.opensolaris.category.2008:System/Core +set name=org.opensolaris.incorp-facet value=true set name=variant.arch value=$(ARCH) dir path=usr group=sys dir path=usr/lib diff --git a/usr/src/pkg/scripts/pkglist.awk b/usr/src/pkg/scripts/pkglist.awk new file mode 100644 index 0000000000..3cab39bd6b --- /dev/null +++ b/usr/src/pkg/scripts/pkglist.awk @@ -0,0 +1,55 @@ +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. + +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. + +# +# We do the work in the BEGIN action instead of using pattern matching because +# we expect the fmri to be at or near the first line of each input file, and +# this way lets us avoid reading the rest of the file after we find what we +# need. +# +# We keep track of a failure to locate an fmri, so we can exit with an error +# code which will cause the make run to fail, but we still attempt to process +# each package on the command line, in hope of maybe giving some additional +# useful info. +# + +BEGIN { + if (ARGC < 2) { + exit + } + retcode = 0 + for (i = 1; i < ARGC; i++) { + do { + e = getline f < ARGV[i] + } while ((e == 1) && (f !~ /name=pkg.fmri/)) + if (e == 1) { + l = split(f, a, "=") + fmri = a[l] + facet = 0 + do { + e = getline f < ARGV[i] + if (e == 1 && + f ~ /org.opensolaris.incorp-facet.*=true/) + facet = 1 + } while ((e == 1) && (f ~ /^set name=/)) + close(ARGV[i]) + printf("depend fmri=%s type=$(PKGDEP_TYPE)", fmri) + if (facet) + printf(" vlfacet=true") + print "" + } else { + print "no fmri in " ARGV[i] >> "/dev/stderr" + retcode = 2 + } + } + exit retcode +} diff --git a/usr/src/pkg/transforms/synthetic b/usr/src/pkg/transforms/synthetic index 546220be05..e94c1f517d 100644 --- a/usr/src/pkg/transforms/synthetic +++ b/usr/src/pkg/transforms/synthetic @@ -25,6 +25,10 @@ # # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# + +# # When we process the synthetic manifests, we don't know if a "make # clobber" was done or not. This keeps us from having silly, # self-referential dependencies in 'em, even when they make it into @@ -33,3 +37,6 @@ <transform depend fmri=pkg:/on_all@.+ -> drop> <transform depend fmri=pkg:/on_extra@.+ -> drop> <transform depend fmri=pkg:/consolidation/osnet/osnet-incorporation@.+ -> drop> +<transform depend vlfacet=true type=incorporate fmri=pkg:/([^@]+) -> \ + set facet.version-lock.%<1> true> +<transform depend vlfacet=. -> delete vlfacet .> |