diff options
author | Andy Fiddaman <omnios@citrus-it.co.uk> | 2020-04-25 12:54:29 +0000 |
---|---|---|
committer | Andy Fiddaman <omnios@citrus-it.co.uk> | 2020-06-02 22:47:31 +0000 |
commit | 069e6b7e31ba5dcbc5441b98af272714d9a5455c (patch) | |
tree | 67ffdd605a1793f2974dfeeff85b3c25f2f44049 | |
parent | 605d010da59abaf92279a7caed83515cbb3218dc (diff) | |
download | illumos-joyent-069e6b7e31ba5dcbc5441b98af272714d9a5455c.tar.gz |
12708 Packages could be linted
12717 Stop ignoring pkgdepend errors
Reviewed by: Rich Lowe <richlowe@richlowe.net>
Reviewed by: John Levon <john.levon@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
27 files changed, 270 insertions, 58 deletions
diff --git a/exception_lists/packaging.deps b/exception_lists/packaging.deps new file mode 100644 index 0000000000..4df18a2f46 --- /dev/null +++ b/exception_lists/packaging.deps @@ -0,0 +1,52 @@ +# +# This is a list of external dependencies referenced by packages in gate +# which are expected to be provided by the distribution. +# +# These are ignored during package lint runs. +# +pkg:/data/docbook +pkg:/developer/gnu-binutils +pkg:/developer/java/jdk +pkg:/developer/java/openjdk8 +pkg:/developer/lexer/flex +pkg:/developer/macro/cpp +pkg:/developer/macro/gnu-m4 +pkg:/developer/parser/bison +pkg:/developer/versioning/mercurial +pkg:/gnome/zenity +pkg:/library/expat +pkg:/library/glib2 +pkg:/library/libxml2 +pkg:/library/libxslt +pkg:/library/nspr +pkg:/library/nspr/header-nspr +pkg:/library/perl-5/xml-parser +pkg:/library/security/openssl +pkg:/library/security/trousers +pkg:/library/zlib +pkg:/package/pkg +pkg:/print/cups +pkg:/print/filter/ghostscript +pkg:/release/name +pkg:/runtime/java +pkg:/runtime/java/openjdk8 +pkg:/runtime/java/runtime64 +pkg:/security/sudo +pkg:/shell/bash +pkg:/shell/expect +pkg:/system/bhyve/firmware +pkg:/system/library/dbus +pkg:/system/library/g++-7-runtime +pkg:/system/library/g++-runtime +pkg:/system/library/gcc-7-runtime +pkg:/system/library/gcc-runtime +pkg:/system/library/libdbus +pkg:/system/library/libdbus-glib +pkg:/system/library/mozilla-nss +pkg:/system/library/mozilla-nss/header-nss +pkg:/system/management/snmp/net-snmp +pkg:/system/test/fio +pkg:/system/xvm/xvmstore +pkg:/text/gnu-gettext +pkg:/text/less +pkg:/web/wget diff --git a/usr/src/pkg/Makefile b/usr/src/pkg/Makefile index 18f7010b45..99f96af4f1 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 2019 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/Makefile.master @@ -167,6 +167,7 @@ sparc_ARCH64= sparcv9 # PM_TRANSFORMS= common_actions publish restart_fmri facets defaults \ extract_metadata +PM_FINAL_TRANSFORMS= strip_dependinfo PM_INC= transforms manifests JAVA_7_ONLY= @@ -266,6 +267,7 @@ $(BUILDPY3) MANIFESTS += \ PKGS= $(MANIFESTS:%.mf=%) DEP_PKGS= $(PKGS:%=$(PDIR)/%.dep) PROC_PKGS= $(PKGS:%=$(PDIR)/%.mog) +FIN_PKGS= $(PKGS:%=$(PDIR)/%.fin) # # Track the synthetic manifests separately so we can properly express @@ -320,7 +322,7 @@ PKGLISTS= \ .KEEP_STATE: .PARALLEL: $(PKGS) $(PROC_PKGS) $(DEP_PKGS) \ - $(PROC_SYNTH_PKGS) $(DEP_SYNTH_PKGS) $(PUB_PKGS) + $(PROC_SYNTH_PKGS) $(DEP_SYNTH_PKGS) $(FIN_PKGS) $(PUB_PKGS) # # For a single manifest, the dependency chain looks like this: @@ -339,6 +341,10 @@ PKGLISTS= \ # | # manifest with dependencies resolved (mypkg.res) # | +# | use pkgmogrify to apply final cleanups +# | +# cleaned up manifest (mypkg.fin) +# | # | use pkgsend to publish the package # | # placeholder to indicate successful publication (mypkg.pub) @@ -382,16 +388,19 @@ PKGLISTS= \ # | | # | | pkgsend publish # | | -# repositories resolved dependencies +# repositories final manifests # | | -# pkgsend | | pkgdepend resolve +# pkgsend | | pkgmogrify final # create-repository | -# | generated dependencies +# | resolved dependencies # repo directories | +# | pkgdepend resolve +# | +# generated dependencies +# | # | pkgdepend # | -# processed manifests -# +# processed manifests ALL_TARGETS= $(PROC_SYNTH_PKGS) proto_list_$(PKGMACH) @@ -408,12 +417,8 @@ $(PDIR): # # This rule resolves dependencies across all published manifests. # -# We shouldn't have to ignore the error from pkgdepend, but until -# 16012 and its dependencies are resolved, pkgdepend will always exit -# with an error. -# $(PDIR)/gendeps: $(DEP_SYNTH_PKGS) $(DEP_PKGS) - -$(PKGDEBUG)if [ "$(SUPPRESSPKGDEP)" = "true" ]; then \ + $(PKGDEBUG)if [ "$(SUPPRESSPKGDEP)" = "true" ]; then \ print "Suppressing dependency resolution"; \ for p in $(DEP_PKGS:%.dep=%); do \ $(CP) $$p.dep $$p.res; \ @@ -528,7 +533,7 @@ $(REPOS:%=$(PKGDEST)/repo.%): # pkgmogrify encounters an abort in the publish transforms. # -.SUFFIXES: .mf .mog .dep .res .pub +.SUFFIXES: .mf .mog .dep .res .fin .pub $(PDIR)/%.mog: manifests/%.mf @print "Processing manifest $(<F)" @@ -572,7 +577,17 @@ $(PDIR)/%.dep: $(PDIR)/%.mog # on a per-manifest basis. Instead, see the gendeps rule above. # -$(PDIR)/%.pub: $(PDIR)/%.res +$(PDIR)/%.fin: $(PDIR)/%.res + $(PKGDEBUG)$(RM) $(@) + $(PKGDEBUG)if [ -s $(<) ]; then \ + print "Running final transforms for $(<F)"; \ + $(PKGMOGRIFY) $(PKGMOG_VERBOSE) $(PM_INC:%= -I %) -O $(@) \ + $(<) $(PM_FINAL_TRANSFORMS); \ + else \ + $(TOUCH) $(@); \ + fi + +$(PDIR)/%.pub: $(PDIR)/%.fin $(PKGDEBUG)m=$$(basename $(@:%.pub=%).metadata.*); \ r=$${m#$(@F:%.pub=%.metadata.)+(?).}; \ if [ -s $(<) ]; then \ @@ -690,7 +705,27 @@ pmodes: makesilent @validate_pkg -a $(PKGMACH) -M -m $(PDIR) \ -e $(CODEMGR_WS)/exception_lists/pmodes -check: protocmp pmodes +pkglint: makesilent + $(PKGDEBUG)$(CP) etc/pkglintrc $(PDIR)/pkglintrc + $(PKGDEBUG)$(GREP) pkg:/ $(CODEMGR_WS)/exception_lists/packaging.deps \ + | sed 's/.*/ & \\/' >> $(PDIR)/pkglintrc + $(PKGDEBUG)echo " pkg:/runtime/python$(PYTHON_PKGVERS) \\" \ + >> $(PDIR)/pkglintrc + $(PKGDEBUG)echo " pkg:/runtime/python$(PYTHON3_PKGVERS) \\" \ + >> $(PDIR)/pkglintrc + $(PKGDEBUG) echo " pkg:/runtime/perl$(PERL_PKGVERS) \\" \ + >> $(PDIR)/pkglintrc + $(PKGDEBUG)echo >> $(PDIR)/pkglintrc + $(PKGDEBUG)$(RM) -rf $(PKGDEST)/lint.image + $(PKGDEBUG)for r in $(REPOS); do \ + pkglint \ + -f $(PDIR)/pkglintrc \ + -c $(PKGDEST)/lint.image \ + -r $(PKGDEST)/repo.$$r \ + `$(FIND) $(PDIR) -name \*.fin \! -size 0c -print`; \ + done + +check: protocmp pmodes pkglint protolist: proto_list_$(PKGMACH) diff --git a/usr/src/pkg/etc/pkglintrc b/usr/src/pkg/etc/pkglintrc new file mode 100644 index 0000000000..a7aa00e5e7 --- /dev/null +++ b/usr/src/pkg/etc/pkglintrc @@ -0,0 +1,26 @@ +# 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 2020 OmniOS Community Edition (OmniOSce) Association. + +[pkglint] +use_progress_tracker = False +log_level = INFO +do_pub_checks = True +version.pattern = *,5.11- +pkglint001.5.report-linted = False + +pkglint.exclude = \ + pkg.lint.pkglint_action.PkgActionChecker.linted \ + pkg.lint.pkglint_manifest.PkgManifestChecker.linted \ + pkg.lint.pkglint_manifest.PkgManifestChecker.bogus_description \ + pkg.lint.pkglint_manifest.PkgManifestChecker.naming \ + pkg.lint.pkglint_manifest.PkgManifestChecker.duplicate_deps + +pkglint.action005.1.missing-deps = \ diff --git a/usr/src/pkg/manifests/consolidation-l10n-l10n-incorporation.mf b/usr/src/pkg/manifests/consolidation-l10n-l10n-incorporation.mf index b866b30345..96a23f12f1 100644 --- a/usr/src/pkg/manifests/consolidation-l10n-l10n-incorporation.mf +++ b/usr/src/pkg/manifests/consolidation-l10n-l10n-incorporation.mf @@ -11,8 +11,10 @@ # Copyright 2011, Richard Lowe. # Copyright 2018 Alexander Pyhalov +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. set name=pkg.fmri value=pkg:/consolidation/l10n/l10n-incorporation@$(PKGVERS) +set name=pkg.linted value=True # Don't incorporate, as we were one and that would get deeply confusing set name=org.opensolaris.noincorp value=true set name=variant.arch value=$(ARCH) diff --git a/usr/src/pkg/manifests/consolidation-sunpro-sunpro-incorporation.mf b/usr/src/pkg/manifests/consolidation-sunpro-sunpro-incorporation.mf index 9c9afc945d..422653755f 100644 --- a/usr/src/pkg/manifests/consolidation-sunpro-sunpro-incorporation.mf +++ b/usr/src/pkg/manifests/consolidation-sunpro-sunpro-incorporation.mf @@ -10,9 +10,11 @@ # # Copyright 2011, Richard Lowe. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. set name=pkg.fmri \ value=pkg:/consolidation/sunpro/sunpro-incorporation@$(PKGVERS) +set name=pkg.linted value=True # Don't incorporate, as we were one and that would get deeply confusing set name=org.opensolaris.noincorp value=true set name=variant.arch value=$(ARCH) diff --git a/usr/src/pkg/manifests/developer-build-onbld.mf b/usr/src/pkg/manifests/developer-build-onbld.mf index 309ee71d4c..53a9df7eb8 100644 --- a/usr/src/pkg/manifests/developer-build-onbld.mf +++ b/usr/src/pkg/manifests/developer-build-onbld.mf @@ -26,7 +26,7 @@ # Copyright 2014 Garrett D'Amore <garrett@damore.org> # Copyright 2019 Joyent, Inc. # Copyright 2016 Toomas Soome <tsoome@me.com> -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri value=pkg:/developer/build/onbld@$(PKGVERS) @@ -105,22 +105,27 @@ file path=opt/onbld/bin/Install mode=0555 file path=opt/onbld/bin/bldenv mode=0555 file path=opt/onbld/bin/bringovercheck mode=0555 file path=opt/onbld/bin/build_cscope mode=0555 -file path=opt/onbld/bin/cddlchk mode=0555 +file path=opt/onbld/bin/cddlchk mode=0555 \ + pkg.depend.bypass-generate=.*(?:Checks|onbld|Cddl).* file path=opt/onbld/bin/check_rtime mode=0555 file path=opt/onbld/bin/checkpaths mode=0555 -file path=opt/onbld/bin/copyrightchk mode=0555 +file path=opt/onbld/bin/copyrightchk mode=0555 \ + pkg.depend.bypass-generate=.*(?:Checks|onbld|Copyright).* file path=opt/onbld/bin/cstyle mode=0555 file path=opt/onbld/bin/elfcmp mode=0555 file path=opt/onbld/bin/find_elf mode=0555 file path=opt/onbld/bin/findcrypto mode=0555 file path=opt/onbld/bin/flg.flp mode=0555 file path=opt/onbld/bin/genoffsets mode=0555 -file path=opt/onbld/bin/git-pbchk mode=0555 -file path=opt/onbld/bin/hdrchk mode=0555 +file path=opt/onbld/bin/git-pbchk mode=0555 \ + pkg.depend.bypass-generate=.*(?:Checks|onbld|cStringIO).* +file path=opt/onbld/bin/hdrchk mode=0555 \ + pkg.depend.bypass-generate=.*(?:Checks|onbld|HdrChk).* file path=opt/onbld/bin/interface_check mode=0555 file path=opt/onbld/bin/interface_cmp mode=0555 file path=opt/onbld/bin/jstyle mode=0555 -file path=opt/onbld/bin/mapfilechk mode=0555 +file path=opt/onbld/bin/mapfilechk mode=0555 \ + pkg.depend.bypass-generate=.*(?:Checks|onbld).* file path=opt/onbld/bin/nightly mode=0555 file path=opt/onbld/bin/onu mode=0555 file path=opt/onbld/bin/protocmp.terse mode=0555 @@ -134,8 +139,12 @@ file path=opt/onbld/bin/wdiff mode=0555 file path=opt/onbld/bin/webrev mode=0555 file path=opt/onbld/bin/which_scm mode=0555 file path=opt/onbld/bin/ws mode=0555 -file path=opt/onbld/bin/wscheck mode=0555 -file path=opt/onbld/bin/wsdiff mode=0555 +file path=opt/onbld/bin/wscheck mode=0555 \ + pkg.depend.bypass-generate=.*(?:Checks|onbld|WsCheck).* +# wsdiff does not import the commands module when run under python3 but +# pkgdepend still tries to resolve it, and fails. +file path=opt/onbld/bin/wsdiff mode=0555 \ + pkg.depend.bypass-generate=.*commands.* file path=opt/onbld/bin/xref mode=0555 file path=opt/onbld/bin/xref.mk file path=opt/onbld/env/illumos diff --git a/usr/src/pkg/manifests/driver-xvm-pv.mf b/usr/src/pkg/manifests/driver-xvm-pv.mf index c207dbc1f5..46a09b79c1 100644 --- a/usr/src/pkg/manifests/driver-xvm-pv.mf +++ b/usr/src/pkg/manifests/driver-xvm-pv.mf @@ -21,6 +21,7 @@ # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # # @@ -47,7 +48,9 @@ file path=platform/$(ARCH32)hvm/kernel/drv/$(ARCH64)/cmdk group=sys file path=platform/$(ARCH32)hvm/kernel/drv/$(ARCH64)/rtls group=sys file path=platform/$(ARCH32)hvm/kernel/drv/$(ARCH64)/xdf group=sys file path=platform/$(ARCH32)hvm/kernel/drv/$(ARCH64)/xnf group=sys -file path=platform/$(ARCH32)hvm/kernel/drv/$(ARCH64)/xpv group=sys +# pkgdepend does not know to also look for modules in the base platform +file path=platform/$(ARCH32)hvm/kernel/drv/$(ARCH64)/xpv group=sys \ + pkg.depend.runpath=$PKGDEPEND_RUNPATH:/platform/$(ARCH32)pc/kernel file path=platform/$(ARCH32)hvm/kernel/drv/$(ARCH64)/xpvd group=sys file path=platform/$(ARCH32)hvm/kernel/drv/xpv.conf group=sys file path=platform/$(ARCH32)hvm/kernel/drv/xpvd.conf group=sys diff --git a/usr/src/pkg/manifests/system-kernel-platform.mf b/usr/src/pkg/manifests/system-kernel-platform.mf index d306668d50..29538ccd9b 100644 --- a/usr/src/pkg/manifests/system-kernel-platform.mf +++ b/usr/src/pkg/manifests/system-kernel-platform.mf @@ -25,7 +25,7 @@ # Copyright 2014 Gary Mills # Copyright 2020 Peter Tribble. # Copyright 2019 Joyent, Inc. -# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # # @@ -691,7 +691,8 @@ $(sparc_ONLY)file \ group=sys mode=0755 $(sparc_ONLY)file path=platform/SUNW,UltraAX-i2/kernel/misc/$(ARCH64)/platmod \ group=sys mode=0755 -$(i386_ONLY)file path=platform/i86pc/kernel/$(ARCH64)/unix group=sys mode=0755 +$(i386_ONLY)file path=platform/i86pc/kernel/$(ARCH64)/unix group=sys mode=0755 \ + pkg.depend.bypass-generate=dtracestubs $(i386_ONLY)file path=platform/i86pc/kernel/cpu/$(ARCH64)/cpu.generic \ group=sys mode=0755 $(i386_ONLY)file path=platform/i86pc/kernel/cpu/$(ARCH64)/cpu_ms.AuthenticAMD \ @@ -732,7 +733,7 @@ $(i386_ONLY)file path=platform/i86pc/kernel/misc/$(ARCH64)/acpidev group=sys \ $(i386_ONLY)file path=platform/i86pc/kernel/misc/$(ARCH64)/gfx_private \ group=sys mode=0755 $(i386_ONLY)file path=platform/i86xpv/kernel/$(ARCH64)/unix group=sys \ - mode=0755 + mode=0755 pkg.depend.bypass-generate=dtracestubs $(i386_ONLY)file path=platform/i86xpv/kernel/cpu/$(ARCH64)/cpu.generic \ group=sys mode=0755 $(i386_ONLY)file path=platform/i86xpv/kernel/cpu/$(ARCH64)/cpu_ms.AuthenticAMD \ diff --git a/usr/src/pkg/manifests/system-library-libpcsc.mf b/usr/src/pkg/manifests/system-library-libpcsc.mf index fbf60f6595..b5a26a60d0 100644 --- a/usr/src/pkg/manifests/system-library-libpcsc.mf +++ b/usr/src/pkg/manifests/system-library-libpcsc.mf @@ -11,11 +11,13 @@ # # Copyright 2019, Joyent Inc. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri value=pkg:/system/library/libpcsc@$(PKGVERS) set name=pkg.description \ value="PC/SC compatible library for Smart Card access" +set name=pkg.summary value="PC/SC compatible library for Smart Card access" set name=info.classification \ value=org.opensolaris.category.2008:System/Libraries set name=variant.arch value=$(ARCH) diff --git a/usr/src/pkg/manifests/system-library-libutempter.mf b/usr/src/pkg/manifests/system-library-libutempter.mf index e883545383..82a1a526ea 100644 --- a/usr/src/pkg/manifests/system-library-libutempter.mf +++ b/usr/src/pkg/manifests/system-library-libutempter.mf @@ -15,7 +15,7 @@ set name=pkg.description \ set name=pkg.summary \ value="Interface to record user sessions in utmpx database" set name=info.classification \ - value=org.opensolaris.category.2008:System/Library + value=org.opensolaris.category.2008:System/Libraries set name=variant.arch value=$(ARCH) dir path=usr group=sys dir path=usr/include diff --git a/usr/src/pkg/manifests/system-library-math.mf b/usr/src/pkg/manifests/system-library-math.mf index 453a3ba585..55a2c02e67 100644 --- a/usr/src/pkg/manifests/system-library-math.mf +++ b/usr/src/pkg/manifests/system-library-math.mf @@ -11,7 +11,7 @@ # # Copyright (c) 2012, Igor Kozhukhov <ikozhukhov@gmail.com>. All rights reserved. -# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # <include system-library-math.man3m.inc> @@ -23,7 +23,6 @@ set name=description value="Math Libraries" set name=info.classification \ value=org.opensolaris.category.2008:System/Libraries set name=variant.arch value=$(ARCH) -set name=variant.opensolaris.zone value=global value=nonglobal dir path=lib dir path=lib/$(ARCH64) $(sparc_ONLY)dir path=lib/cpu diff --git a/usr/src/pkg/manifests/system-library-python-libbe-2.mf b/usr/src/pkg/manifests/system-library-python-libbe-2.mf index c4d108c5f9..6977994c6c 100644 --- a/usr/src/pkg/manifests/system-library-python-libbe-2.mf +++ b/usr/src/pkg/manifests/system-library-python-libbe-2.mf @@ -19,13 +19,15 @@ # CDDL HEADER END # # -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri \ value=pkg:/system/library/python/libbe$(PYTHON_PKGVERS)@$(PKGVERS) set name=pkg.description value="Boot Environment Management Python2 Module" set name=pkg.summary value="py_libbe module, python2" +set name=info.classification \ + value=org.opensolaris.category.2008:System/Libraries set name=variant.arch value=$(ARCH) dir path=usr group=sys dir path=usr/lib diff --git a/usr/src/pkg/manifests/system-library-python-libbe-3.mf b/usr/src/pkg/manifests/system-library-python-libbe-3.mf index 43ab32586b..28495e9aab 100644 --- a/usr/src/pkg/manifests/system-library-python-libbe-3.mf +++ b/usr/src/pkg/manifests/system-library-python-libbe-3.mf @@ -19,13 +19,15 @@ # CDDL HEADER END # # -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri \ value=pkg:/system/library/python/libbe$(PYTHON3_PKGVERS)@$(PKGVERS) set name=pkg.description value="Boot Environment Management Python3 Module" set name=pkg.summary value="py_libbe module, python3" +set name=info.classification \ + value=org.opensolaris.category.2008:System/Libraries set name=variant.arch value=$(ARCH) dir path=usr group=sys dir path=usr/lib diff --git a/usr/src/pkg/manifests/system-library-python-solaris-2.mf b/usr/src/pkg/manifests/system-library-python-solaris-2.mf index 4b2bced94e..503919e3ee 100644 --- a/usr/src/pkg/manifests/system-library-python-solaris-2.mf +++ b/usr/src/pkg/manifests/system-library-python-solaris-2.mf @@ -19,12 +19,14 @@ # CDDL HEADER END # -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. set name=pkg.fmri \ value=pkg:/system/library/python/solaris$(PYTHON_PKGVERS)@$(PKGVERS) set name=pkg.description value="Solaris Python2 Module" set name=pkg.summary value="solaris module, python2" +set name=info.classification \ + value=org.opensolaris.category.2008:System/Libraries set name=variant.arch value=$(ARCH) dir path=usr group=sys dir path=usr/lib diff --git a/usr/src/pkg/manifests/system-library-python-solaris-3.mf b/usr/src/pkg/manifests/system-library-python-solaris-3.mf index 92c3c3a9dd..f98edd3da5 100644 --- a/usr/src/pkg/manifests/system-library-python-solaris-3.mf +++ b/usr/src/pkg/manifests/system-library-python-solaris-3.mf @@ -19,12 +19,14 @@ # CDDL HEADER END # -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. set name=pkg.fmri \ value=pkg:/system/library/python/solaris$(PYTHON3_PKGVERS)@$(PKGVERS) set name=pkg.description value="Solaris Python3 Module" set name=pkg.summary value="solaris module, python3" +set name=info.classification \ + value=org.opensolaris.category.2008:System/Libraries set name=variant.arch value=$(ARCH) dir path=usr group=sys dir path=usr/lib diff --git a/usr/src/pkg/manifests/system-library-python-zfs-2.mf b/usr/src/pkg/manifests/system-library-python-zfs-2.mf index b95b383e76..f53029d45a 100644 --- a/usr/src/pkg/manifests/system-library-python-zfs-2.mf +++ b/usr/src/pkg/manifests/system-library-python-zfs-2.mf @@ -20,13 +20,15 @@ # # -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri \ value=pkg:/system/library/python/zfs$(PYTHON_PKGVERS)@$(PKGVERS) set name=pkg.description value="ZFS Python2 Module" set name=pkg.summary value="zfs module, python2" +set name=info.classification \ + value=org.opensolaris.category.2008:System/Libraries set name=variant.arch value=$(ARCH) dir path=usr group=sys dir path=usr/lib diff --git a/usr/src/pkg/manifests/system-library-python-zfs-3.mf b/usr/src/pkg/manifests/system-library-python-zfs-3.mf index 86236f5127..804dc80c64 100644 --- a/usr/src/pkg/manifests/system-library-python-zfs-3.mf +++ b/usr/src/pkg/manifests/system-library-python-zfs-3.mf @@ -20,13 +20,15 @@ # # -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri \ value=pkg:/system/library/python/zfs$(PYTHON3_PKGVERS)@$(PKGVERS) set name=pkg.description value="ZFS Python3 Module" set name=pkg.summary value="zfs module, python3" +set name=info.classification \ + value=org.opensolaris.category.2008:System/Libraries set name=variant.arch value=$(ARCH) dir path=usr group=sys dir path=usr/lib diff --git a/usr/src/pkg/manifests/system-microcode-amd.mf b/usr/src/pkg/manifests/system-microcode-amd.mf index 22d43700f8..7a15f6ea12 100644 --- a/usr/src/pkg/manifests/system-microcode-amd.mf +++ b/usr/src/pkg/manifests/system-microcode-amd.mf @@ -25,7 +25,7 @@ # Copyright 2014 Gary Mills # Copyright 2019 Peter Tribble. # Copyright 2019 Joyent, Inc. -# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # # @@ -37,6 +37,8 @@ set name=pkg.fmri \ value=pkg:/system/microcode/amd@201203,$(PKGVERS_BUILTON)-$(PKGVERS_BRANCH) set name=pkg.description value="Microcode for AMD CPUs" +set name=pkg.summary value="Microcode for AMD CPUs" +set name=info.classification value=org.opensolaris.category.2008:System/Core set name=org.opensolaris.incorp-facet value=true set name=variant.arch value=i386 dir path=platform group=sys diff --git a/usr/src/pkg/manifests/system-microcode-intel.mf b/usr/src/pkg/manifests/system-microcode-intel.mf index bac6419d24..70a0acb483 100644 --- a/usr/src/pkg/manifests/system-microcode-intel.mf +++ b/usr/src/pkg/manifests/system-microcode-intel.mf @@ -37,6 +37,8 @@ set name=pkg.fmri \ value=pkg:/system/microcode/intel@20200508,$(PKGVERS_BUILTON)-$(PKGVERS_BRANCH) set name=pkg.description value="Microcode for Intel CPUs" +set name=pkg.summary value="Microcode for Intel CPUs" +set name=info.classification value=org.opensolaris.category.2008:System/Core set name=org.opensolaris.incorp-facet value=true set name=variant.arch value=i386 dir path=platform group=sys diff --git a/usr/src/pkg/manifests/system-test-testrunner.mf b/usr/src/pkg/manifests/system-test-testrunner.mf index 2043b84ea6..0b011b7cf6 100644 --- a/usr/src/pkg/manifests/system-test-testrunner.mf +++ b/usr/src/pkg/manifests/system-test-testrunner.mf @@ -11,6 +11,7 @@ # # Copyright (c) 2012 by Delphix. All rights reserved. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri value=pkg:/system/test/testrunner@$(PKGVERS) @@ -27,7 +28,9 @@ dir path=opt/test-runner/stf dir path=opt/test-runner/stf/contrib dir path=opt/test-runner/stf/contrib/include dir path=opt/test-runner/stf/include -file path=opt/test-runner/bin/run mode=0555 +# In python2, the module is "ConfigParser" and in python3 it's "configparser" +file path=opt/test-runner/bin/run mode=0555 \ + pkg.depend.bypass-generate=.*[cC]onfig[pP]arser.* file path=opt/test-runner/man/man1/run.1 mode=0444 file path=opt/test-runner/stf/contrib/include/ctiutils.shlib mode=0555 file path=opt/test-runner/stf/contrib/include/logapi.shlib mode=0555 diff --git a/usr/src/pkg/osnet-incorporation.mf b/usr/src/pkg/osnet-incorporation.mf index bd079564cf..2528bd4d7a 100644 --- a/usr/src/pkg/osnet-incorporation.mf +++ b/usr/src/pkg/osnet-incorporation.mf @@ -23,12 +23,15 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. +# set name=pkg.fmri value=pkg:/consolidation/osnet/osnet-incorporation@$(PKGVERS) set name=variant.arch value=$(ARCH) set name=pkg.description value="This incorporation constrains packages from the OS/Net consolidation." set name=pkg.summary value="OS/Net consolidation incorporation" set name=pkg.depend.install-hold value=core-os.osnet +set name=pkg.linted.opensolaris.manifest001.1 value=True <include packages.redist.current> <include packages.redist.renamed> <include packages.redist.obsolete> diff --git a/usr/src/pkg/osnet-redist.mf b/usr/src/pkg/osnet-redist.mf index 7a20e0a9c0..ea2bf12f6f 100644 --- a/usr/src/pkg/osnet-redist.mf +++ b/usr/src/pkg/osnet-redist.mf @@ -23,9 +23,12 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. +# set name=pkg.fmri value=pkg:/consolidation/osnet/osnet-redistributable@$(PKGVERS) set name=variant.arch value=$(ARCH) set name=pkg.description value="This group package installs all packages from the OS/Net consolidation." +set name=pkg.linted.opensolaris.manifest001.1 value=True set name=pkg.summary value="OS/Net consolidation group package" <include packages.redist.current> diff --git a/usr/src/pkg/transforms/strip_dependinfo b/usr/src/pkg/transforms/strip_dependinfo new file mode 100644 index 0000000000..bf205008f6 --- /dev/null +++ b/usr/src/pkg/transforms/strip_dependinfo @@ -0,0 +1,29 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"). You may +# only use this file in accordance with the terms 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 2019 Alexander Pyhalov +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. +# + +# +# These transforms drop the information that we don't want to appear +# in final package versions. +# + +# Drop pkg.depend.bypass-generate attributes +<transform file -> delete pkg.depend.bypass-generate .*> + +# Drop pkg.depend.runpath attributes +<transform file -> delete pkg.depend.runpath .*> + +# Remove pkg debug information +<transform set name=pkg.debug.* -> drop> + diff --git a/usr/src/tools/scripts/nightly b/usr/src/tools/scripts/nightly index f6b536c924..760b549231 100755 --- a/usr/src/tools/scripts/nightly +++ b/usr/src/tools/scripts/nightly @@ -27,9 +27,9 @@ # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> # Copyright (c) 2017 by Delphix. All rights reserved. # Copyright 2020 Joyent, Inc. -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. # Copyright 2019 Peter Trible. # Copyright 2020 Oxide Computer Company +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # # Based on the nightly script from the integration folks, # Mostly modified and owned by mike_s. @@ -509,6 +509,7 @@ NIGHTLY_OPTIONS variable in the <env_file> as follows: -F do _not_ do a non-DEBUG build -G gate keeper default group of options (-au) -I integration engineer default group of options (-ampu) + -L do not run pkglint -M do not run pmodes (safe file permission checker) -N do not run protocmp -R default group of options for building a release (-mp) @@ -539,6 +540,7 @@ D_FLAG=n F_FLAG=n f_FLAG=n i_FLAG=n; i_CMD_LINE_FLAG=n +L_FLAG=n M_FLAG=n m_FLAG=n N_FLAG=n @@ -718,7 +720,7 @@ check_closed_bins # NIGHTLY_OPTIONS=-${NIGHTLY_OPTIONS#-} OPTIND=1 -while getopts +ABCDdFfGIiMmNnpRrtUuwW FLAG $NIGHTLY_OPTIONS +while getopts +ABCDdFfGIiLMmNnpRrtUuwW FLAG $NIGHTLY_OPTIONS do case $FLAG in A ) A_FLAG=y @@ -741,6 +743,8 @@ do ;; i ) i_FLAG=y ;; + L ) L_FLAG=y + ;; M ) M_FLAG=y ;; m ) m_FLAG=y @@ -1974,17 +1978,17 @@ if [ "$CHECK_PATHS" = y -a "$N_FLAG" != y ]; then fi fi +abspkg= +for d in $abssrcdirs; do + if [ -d "$d/pkg" ]; then + abspkg="$abspkg $d" + fi +done + if [ "$M_FLAG" != "y" -a "$build_ok" = y ]; then echo "\n==== Impact on file permissions ====\n" \ >> $mail_msg_file - abspkg= - for d in $abssrcdirs; do - if [ -d "$d/pkg" ]; then - abspkg="$abspkg $d" - fi - done - if [ -n "$abspkg" ]; then for d in "$abspkg"; do ( cd $d/pkg ; $MAKE -e pmodes ) >> $mail_msg_file @@ -1992,6 +1996,22 @@ if [ "$M_FLAG" != "y" -a "$build_ok" = y ]; then fi fi +if [ "$L_FLAG" != "y" -a "$build_ok" = y ]; then + echo "\n==== Linting packages ====\n" | \ + tee -a $LOGFILE >> $mail_msg_file + + if [ -n "$abspkg" ]; then + for d in "$abspkg"; do + ( cd $d/pkg ; $MAKE -e pkglint ) | \ + tee -a $LOGFILE | \ + egrep -v 'Lint engine setup|Starting lint run' + done 2>&1 | tee $TMPDIR/pkglint_noise >> $mail_msg_file + if [[ -s $TMPDIR/pkglint_noise ]]; then + build_extras_ok=n + fi + fi +fi + if [ "$w_FLAG" = "y" -a "$build_ok" = "y" ]; then if [[ "$MULTI_PROTO" = no || "$D_FLAG" = y ]]; then do_wsdiff DEBUG $ROOT.prev $ROOT diff --git a/usr/src/tools/scripts/nightly.1onbld b/usr/src/tools/scripts/nightly.1onbld index 51ce222862..d66e8247c0 100644 --- a/usr/src/tools/scripts/nightly.1onbld +++ b/usr/src/tools/scripts/nightly.1onbld @@ -19,15 +19,15 @@ .\" "Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. .\" "Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> .\" "Copyright 2019 Peter Tribble. +.\" "Copyright 2020 OmniOS Community Edition (OmniOSce) Association. .\" " -.TH NIGHTLY 1ONBLD "Jun 9, 2019" +.TH NIGHTLY 1ONBLD "May 12, 2020" .SH NAME .I nightly \- build an OS-Net consolidation overnight .SH SYNOPSIS \fBnightly [-in] [-V VERS] <env_file>\fP .SH DESCRIPTION -.LP .I nightly, the mother of all build scripts, can bringover, build, archive, package, error check, and @@ -85,6 +85,12 @@ check for unreferenced files report on which proto area objects have changed (since the last build) .TP \(bu +compare the proto area with package manifests +.TP +\(bu +lint the generated packages +.TP +\(bu report the total build time .TP \(bu @@ -128,6 +134,9 @@ Do a build with DEBUG on (non-DEBUG is built by default) .B \-F Do _not_ do a non-DEBUG build (use with -D to get just a DEBUG build) .TP +.B \-L +Do not run pkglint +.TP .B \-M Do not run pmodes (safe file permission checker) .TP @@ -170,7 +179,7 @@ Send mail to $MAILTO at end of build .B \-t Build and use the tools in $SRC/tools (default setting). .TP -.B \+t +.B +t Use the build tools in "$ONBLD_TOOLS/bin". .LP @@ -221,7 +230,6 @@ Default group of options for building a release (-mp) set the build version string to VERS, overriding VERSION .SH ENVIRONMENT VARIABLES -.LP Here is a list of prominent environment variables that .I nightly references and the meaning of each variable. @@ -446,7 +454,6 @@ the DEBUG build will go in $ROOT and the non-DEBUG build will go in $ROOT-nd. Other values will be treated as "no". .RE .SH NIGHTLY HOOK ENVIRONMENT VARIABLES -.LP Several optional environment variables may specify commands to run at various points during the build. Commands specified in the hook variable will be run in a subshell; command output will be appended to @@ -488,7 +495,6 @@ This is reserved for per-build-machine customizations, and runs immedately after POST_NIGHTLY. .RE .SH FILES -.LP .RS 5 /etc/nightly.conf .RE @@ -497,9 +503,8 @@ If present, nightly executes this file just prior to executing the .I env file. .SH EXAMPLES -.LP -Start with the example file in usr/src/tools/env/developer.sh -(or gatekeeper.sh), copy to myenv and make your changes. +Start with the example file in usr/src/tools/env/illumos.sh, +copy to myenv and make your changes. .LP .PD 0 # grep NIGHTLY_OPTIONS myenv diff --git a/usr/src/uts/intel/ipd/Makefile b/usr/src/uts/intel/ipd/Makefile index 27a0b6b79c..701e24cf73 100644 --- a/usr/src/uts/intel/ipd/Makefile +++ b/usr/src/uts/intel/ipd/Makefile @@ -12,6 +12,7 @@ # # Copyright 2012 Joyent, Inc. All rights reserved. # Use is subject to license terms. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # UTSBASE = ../.. @@ -28,7 +29,7 @@ ALL_TARGET = $(BINARY) $(SRC_CONFILE) LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) -LDFLAGS += -dy -Nmisc/neti -Nmisch/hook +LDFLAGS += -dy -Nmisc/neti -Nmisc/hook .KEEP_STATE: diff --git a/usr/src/uts/sparc/ipd/Makefile b/usr/src/uts/sparc/ipd/Makefile index 9239c97203..597bf0fb8d 100644 --- a/usr/src/uts/sparc/ipd/Makefile +++ b/usr/src/uts/sparc/ipd/Makefile @@ -13,6 +13,7 @@ # Copyright 2012 Joyent, Inc. All rights reserved. # Copyright (c) 2014 Igor Kozhukhov <ikozhukhov@gmail.com> # Use is subject to license terms. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # UTSBASE = ../.. @@ -29,7 +30,7 @@ ALL_TARGET = $(BINARY) $(SRC_CONFILE) LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) -LDFLAGS += -dy -Nmisc/neti -Nmisch/hook +LDFLAGS += -dy -Nmisc/neti -Nmisc/hook .KEEP_STATE: |