2046N/A# The contents of this file are subject to the terms of the 2046N/A# Common Development and Distribution License (the "License"). 2046N/A# You may not use this file except in compliance with the License. 2046N/A# See the License for the specific language governing permissions 2046N/A# and limitations under the License. 2046N/A# When distributing Covered Code, include this CDDL HEADER in each 2046N/A# If applicable, add the following below this CDDL HEADER, with the 2046N/A# fields enclosed by brackets "[]" replaced with your own identifying 2046N/A# information: Portions Copyright [yyyy] [name of copyright owner] 3307N/A# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. 2147N/A "pkglint.action002.1",
"pkglint.action002.4",
"pkglint.action002.4",
2477N/A # 5 errors corresponding to the broken group checks above 2477N/A "pkglint.action002.3",
"pkglint.action009",
"pkglint.action009",
2477N/A "pkglint.action009",
"pkglint.action009"]
2147N/A# We deliver prtdiag as a link on one platform, as a file on another, which is 2147N/A# allowed, testing variant combinations, the unusual permissions are not. 2147N/A# they being, broken mode 991, a mode where we have more access as the group and 2147N/A# world than we have as the user, and an underspecified mode 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=variant.arch value=i386 value=sparc 3382N/Afile 1d5eac1aab628317f9c088d21e4afda9c754bb76 chash=43dbb3e0bc142f399b61d171f926e8f91adcffe2 elfarch=i386 elfbits=64 elfhash=64c67b16be970380cd5840dd9753828e0c5ada8c group=sys mode=2755 owner=root path=usr/sbin/prtdiag pkg.csize=5490 pkg.size=13572 variant.arch=i386 2046N/A# declaring overlapping variants variant.arch 2597N/A# We deliver prtdiag as a dir on one platform, as a file on another 2597N/A# but have forgotten to set the variant properly on the file action 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2597N/Aset name=pkg.summary value="Core Solaris Kernel" 2597N/Aset name=variant.arch value=i386 value=sparc 3382N/Afile 1d5eac1aab628317f9c088d21e4afda9c754bb76 chash=43dbb3e0bc142f399b61d171f926e8f91adcffe2 elfarch=i386 elfbits=64 elfhash=64c67b16be970380cd5840dd9753828e0c5ada8c group=sys mode=2755 owner=root path=usr/sbin/prtdiag pkg.csize=5490 pkg.size=13572 variant.arch=sparc 2597N/A# attributes across actions in 2597N/A# types for potentially mediated links across 2597N/A# declaring overlapping variants variant.arch=sparc 2597N/A "pkglint.dupaction001.2",
"pkglint.dupaction010.1"]
2046N/A# We deliver prtdiag as a link on one platform, as a file on another 2597N/A# but have forgotten to set the variant properly on the file action. 2597N/A# The errors are similar to combo_variants_broken, but becase the user has 2597N/A# included links, we don't know whether they intended to use mediated links 2597N/A# or not, so we report additional errors. 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=variant.arch value=i386 value=sparc 3382N/Afile 1d5eac1aab628317f9c088d21e4afda9c754bb76 chash=43dbb3e0bc142f399b61d171f926e8f91adcffe2 elfarch=i386 elfbits=64 elfhash=64c67b16be970380cd5840dd9753828e0c5ada8c group=sys mode=2755 owner=root path=usr/sbin/prtdiag pkg.csize=5490 pkg.size=13572 variant.arch=sparc 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.other value=carrots 2046N/Aset name=variant.arch value=i386 value=sparc 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 2046N/Afile nohash group=bin mode=0755 owner=root path=usr/sbin/fsadmin pkg.csize=953 pkg.size=1572 variant.other=carrots 2046N/Afile nohash group=bin mode=0755 owner=root path=usr/sbin/fsadmin pkg.csize=1234 pkg.size=1234 variant.other=carrots 3382N/Afile nohash elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 2081N/A "pkglint.action005.1",
"pkglint.action005.1",
2046N/A# we declare dependencies on the same package name twice, with variants 2046N/Aset name=org.opensolaris.consolidation value=sfw 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.arch value=sparc value=i386 2046N/Aset name=variant.foo value=bar value=baz 2046N/A# There are 2 dependencies on sfw-incorporation, but only one is a require 2081N/A# incorporation, so this should not generate errors, other than us not being 2081N/A# able to find the dependency warning. 2046N/Aset name=pkg.depend.install-hold value=core-os 2046N/Aset name=pkg.description value="This package constrains system package versions to the same build. WARNING: Proper system update and correct package selection depend on the presence of this incorporation. Removing this package will result in an unsupported system." 2046N/Aset name=description value="incorporation to lock all system packages to same build" 2046N/Aset name=pkg.summary value="incorporation to lock all system packages to same build" 2046N/Aset name=variant.arch value=sparc value=i386 2046N/Aset name=org.opensolaris.consolidation value=None 2081N/A "pkglint.action005.1",
"pkglint.action005.1"]
2081N/A# as we're declaring complimentary variants, we shouldn't report errors, 2081N/A# other than the 3 lint warnings for the missing dependencies 2046N/Aset name=org.opensolaris.consolidation value=sfw 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 2046N/Aset name=variant.arch value=sparc value=i386 2046N/Aset name=variant.other value=other value=thing 2046N/Aset name=variant.foo value=bar value=baz 2434N/A# We deliver duplicate dependencies, one coming from a require-any dep 2434N/Aset name=variant.arch value=i386 value=sparc 2434N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=pkg.summary value="Core Solaris Kernel" 2434N/Adepend fmri=foo/bar type=require pkg.linted.pkglint.manifest005.2=True 2434N/A# We deliver duplicate dependencies, one coming from a require-any dep 2434N/Aset name=variant.arch value=i386 value=sparc 2434N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=pkg.summary value="Core Solaris Kernel" 3467N/A# Should use all values of fmri attribute for duplicate depends check 3467N/Aset name=variant.arch value=i386 value=sparc 3467N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 3467N/Aset name=org.opensolaris.consolidation value=osnet 3467N/Aset name=pkg.summary value="Core Solaris Kernel" 3467N/A# Should use all values of fmri attribute for duplicate depends check 3467N/Aset name=variant.arch value=i386 value=sparc 3467N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 3467N/Aset name=org.opensolaris.consolidation value=osnet 3467N/Aset name=pkg.summary value="Core Solaris Kernel" 3467N/A# Should use all values of fmri attribute for duplicate depends check 3467N/Aset name=variant.arch value=i386 value=sparc 3467N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 3467N/Aset name=org.opensolaris.consolidation value=osnet 3467N/Aset name=pkg.summary value="Core Solaris Kernel" 3467N/A# Should use all values of fmri attribute for duplicate depends check 3467N/Aset name=variant.arch value=i386 value=sparc 3467N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 3467N/Aset name=org.opensolaris.consolidation value=osnet 3467N/Aset name=pkg.summary value="Core Solaris Kernel" 3467N/A# Should use all values of fmri attribute for duplicate depends check 3467N/Aset name=variant.arch value=i386 value=sparc 3467N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 3467N/Aset name=org.opensolaris.consolidation value=osnet 3467N/Aset name=pkg.summary value="Core Solaris Kernel" 3467N/A# Should use all values of fmri attribute for duplicate depends check 3467N/Aset name=variant.arch value=i386 value=sparc 3467N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 3467N/Aset name=org.opensolaris.consolidation value=osnet 3467N/Aset name=pkg.summary value="Core Solaris Kernel" 2434N/A# We deliver a license action that also specifies a path 2434N/Aset name=variant.arch value=i386 value=sparc 2434N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.arch value=i386 value=sparc 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 3382N/Afile nohash elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 2046N/A# we deliver some duplicate ref-counted actions (dir, link, hardlink) with differing 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.other value=carrots 2046N/Aset name=variant.arch value=i386 value=sparc 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 2597N/A# we deliver some duplicate ref-counted actions (dir, link, hardlink) with differing 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=variant.other value=carrots 2597N/Aset name=variant.arch value=i386 value=sparc 2597N/Aset name=pkg.description value="Description of pkglint test package" 2597N/Aset name=description value="Pkglint test package" 2597N/Aset name=pkg.summary value="Pkglint test package" 2597N/A# we deliver two legacy actions with mismatched attributes 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=variant.other value=carrots 2597N/Aset name=variant.arch value=i386 value=sparc 2597N/Aset name=pkg.description value="Description of pkglint test package" 2597N/Aset name=description value="Pkglint test package" 2597N/Aset name=pkg.summary value="Pkglint test package" 2597N/Alegacy category=system desc="The Apache HTTP Server Version (usr components)" \ 2597N/A hotline="Please contact your local service provider" \ 2597N/A name="Apache Web Server (usr)" pkg=SUNWapch22u vendor="Oracle Corporation" \ 2597N/A version=11.11.0,REV=2010.05.25.01.00 2597N/Alegacy category=system desc="The Apache HTTP Server (usr components)" \ 2597N/A hotline="Please contact your local service provider" \ 2597N/A name="Apache Web Server (usr)" pkg=SUNWapch22u vendor="Oracle Corporation" \ 2597N/A version=11.11.0,REV=2010.05.25.01.00 2046N/A# 3 errors get reported for this manifest: 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Aset name=variant.other value=carrots 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 2046N/Afile nohash group=bin mode=0755 owner=root path=usr/sbin/fsadmin pkg.csize=1234 pkg.size=1234 variant.other=carrots 3382N/Afile nohash elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.arch value=i386 value=sparc 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 3382N/Afile nohash elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 2046N/A# We try to deliver the same set action twice 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/A# We try to deliver the same set action twice, with different variants 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Aset name=test value=i386 variant.arch=sparc 2046N/Aset name=test value=i386 variant.arch=i386 2046N/A# We try to deliver the same set action twice, with variants 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Aset name=test value=i386 variant.arch=sparc 2046N/Aset name=test value=i386 variant.arch=sparc 2434N/A# We try to deliver the same set action twice, the second time we do this, 2434N/A# we mark one of the actions as linted 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2434N/Aset name=pkg.summary value="Core Solaris Kernel" 2434N/Aset name=variant.arch value=i386 value=sparc 2434N/Aset name=foo value=bar pkg.linted.pkglint.manifest006=True 2434N/A# We try to deliver the same set action twice, the second time we do this, 2434N/A# we mark one of the actions as linted, but still should have a broken manifest 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2434N/Aset name=pkg.summary value="Core Solaris Kernel" 2434N/Aset name=variant.arch value=i386 value=sparc 2434N/Aset name=foo value=bar pkg.linted.pkglint.manifest006=True 2085N/A# A perfectly valid manifest with a correct info.classification key 2085N/Aset name=org.opensolaris.consolidation value=osnet 2085N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2085N/Aset name=description value="Pkglint test package" 2085N/Aset name=pkg.summary value="Pkglint test package" 2085N/Aset name=variant.arch value=i386 value=sparc 2085N/A# we deliver package with no info.classification key 2085N/Aset name=org.opensolaris.consolidation value=osnet 2085N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2213N/Aset name=description value="Pkglint test package" 2213N/Aset name=pkg.summary value="Pkglint test package" 2213N/Aset name=variant.arch value=i386 value=sparc 2213N/A# we deliver package where the description is the same as the summary 2213N/Aset name=org.opensolaris.consolidation value=osnet 2213N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2085N/Aset name=pkg.description value="Pkglint test package" 2085N/Aset name=pkg.summary value="Pkglint test package" 2085N/Aset name=variant.arch value=i386 value=sparc 2731N/A# we deliver package where the description is empty 2731N/Aset name=org.opensolaris.consolidation value=osnet 2731N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2731N/Aset name=pkg.description value="" 2731N/Aset name=pkg.summary value="Pkglint test package" 2731N/Aset name=variant.arch value=i386 value=sparc 2731N/A# we deliver package where the summary is empty 2731N/Aset name=org.opensolaris.consolidation value=osnet 2731N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2731N/Aset name=pkg.description value="Pkglint test package" 2731N/Aset name=pkg.summary value="" 2731N/Aset name=variant.arch value=i386 value=sparc 2085N/A# we deliver a directory with multiple info.classification keys, one of which 2085N/Aset name=org.opensolaris.consolidation value=osnet 2085N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2085N/Aset name=description value="Pkglint test package" 2085N/Aset name=pkg.summary value="Pkglint test package" 2085N/Aset name=variant.arch value=i386 value=sparc 2085N/A# we deliver a directory with an incorrect info.classification key 2085N/Aset name=org.opensolaris.consolidation value=osnet 2085N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2085N/Aset name=description value="Pkglint test package" 2085N/Aset name=pkg.summary value="Pkglint test package" 2085N/Aset name=variant.arch value=i386 value=sparc 2085N/A# we deliver a directory with an incorrect info.classification key, 2085N/Aset name=org.opensolaris.consolidation value=osnet 2085N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2085N/Aset name=description value="Pkglint test package" 2085N/Aset name=info.classification value=org.opensolaris.category.2008: 2085N/Aset name=pkg.summary value="Pkglint test package" 2085N/Aset name=variant.arch value=i386 value=sparc 2085N/Aset name=org.opensolaris.consolidation value=osnet 2085N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2085N/Aset name=description value="Pkglint test package" 2085N/Aset name=pkg.summary value="Pkglint test package" 2085N/Aset name=variant.arch value=i386 value=sparc 2481N/A "pkglint.action006",
"pkglint.action009",
"pkglint.action009"]
2434N/A# We deliver some broken fmri values 2434N/Aset name=variant.arch value=i386 value=sparc 2434N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=pkg.summary value="Core Solaris Kernel" 2481N/A "pkglint.action006",
"pkglint001.6",
"pkglint001.6",
"pkglint.manifest007",
2481N/A "pkglint.action009",
"pkglint.action009"]
2434N/A# We have a broken pkg.linted action, so we report both broken depend actions 2434N/A# due to the corrupt FMRI values. We also report two failed attempts 2434N/A# to use the pkg.linted.pkglint.action006 value, as well as the existence of a 2434N/Aset name=variant.arch value=i386 value=sparc 2434N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=pkg.summary value="Core Solaris Kernel" 2434N/Aset name=pkg.linted.pkglint.action006 value=True value=False 3254N/A "pkglint.action010.2",
"pkglint.action010.3",
"pkglint.action010.1",
2046N/A# We try to deliver a series of invalid usernames, some result in multiple 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=variant.arch value=i386 value=sparc 3356N/Auser gcos-field="pkg(7) server UID" group=pkg5srv uid=97 username="" 3356N/Auser gcos-field="pkg(7) server UID" group=pkg5srv uid=98 username=1pkg5srv 3356N/Auser gcos-field="pkg(7) server UID" group=pkg5srv uid=99 username=pkg5srv_giant_pacific_octopus_arm 3356N/Auser gcos-field="pkg(7) server UID" group=pkg5srv uid=100 username=pkg5s:v 3356N/Auser gcos-field="pkg(7) server UID" group=pkg5srv uid=101 username=pkg5-_. 2046N/A# We deliver a license action that also specifies a path 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2434N/A# We actually emit 10 messages here in testing, 3 for the legitmate errors, 2434N/A# 5 saying that we've found pkg.linted attributes in these actions, and 2 2434N/A# for the errors that would be thrown were they not marked as linted. 2434N/A "pkglint.dupaction003.1",
"pkglint.dupaction007",
2434N/A "pkglint.action008",
"pkglint.action008",
"pkglint.action008",
2434N/A "pkglint.action008",
"pkglint.action008",
"pkglint001.5",
"pkglint001.5"]
2434N/A# we deliver some duplicate ref-counted actions (dir, link, hardlink) with 2434N/A# differing attributes, but since they're marked as linted, we should get no 2434N/A# output, we should still get the duplicate user though. 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.other value=carrots 2046N/Aset name=variant.arch value=i386 value=sparc 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 2434N/A# underscores in the name and another attr, but only bypassing the name check 2434N/Aset name=here_be_underscores value=nothing underscore_attr=Foo pkg.linted.pkglint.action001.1=True 2434N/A# completely linting these actions. No errors for the first, because 2434N/A# the other duplicate paths are linted. The second will result in us logging 2434N/A# a message saying we're ignoring the strange mode. 2434N/A# only linting this action against a specific dupaction check 2434N/Adir group=staff mode=0751 owner=root path=/usr/lib/X11 pkg.linted.pkglint.dupaction007=True 2434N/A# only linting this action against the dupaction group 2434N/Adir group=staff mode=0751 owner=root path=/usr/lib/X11 pkg.linted.pkglint.dupaction=True 2434N/A# we should still report this error: 2046N/Auser ftpuser=false gcos-field="Network Configuration Admin" group=netadm uid=17 username=netcfg 2046N/Auser ftpuser=false gcos-field="Network Configuration Admin" group=netadm uid=19 username=netcfg 2434N/A# We'll actually report two lint messages here, the existence of the 2434N/A# pkg.linted attribute in the manifest, and the message bypassing 2434N/A# the duplicate user action error. 2046N/A# - the default log handler used by the pkglint CLI only marks 2046N/A# a failure if it's > level.INFO, but for testing, we record all 2046N/A# This manifest is marked as pkg.linted, and should not have manifest 2046N/A# checks run on it. In particular, we should not complain about the lack 2046N/A# of variant.arch nor the unusual permission, 0751 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.other value=carrots 2046N/A# set name=variant.arch value=i386 value=sparc 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 2046N/Aset name=pkg.linted value=True 2046N/Auser ftpuser=false gcos-field="Network Configuration Admin" group=netadm uid=17 username=netcfg 2046N/Auser ftpuser=false gcos-field="Network Configuration Admin" group=netadm uid=19 username=netcfg 2434N/A "pkglint.manifest007",
"pkglint.action008"]
2434N/A# This manifest is delivers a weird info.classification value 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2434N/Aset name=variant.other value=carrots 2434N/A# set name=variant.arch value=i386 value=sparc 2434N/Aset name=pkg.description value="Description of pkglint test package" 2434N/Aset name=description value="Pkglint test package" 2731N/Aset name=info.classification value=org.opensolaris.category.2008:System/Noodles pkg.linted.pkglint.manifest008.6=True 2434N/Aset name=pkg.summary value="Pkglint test package" 2434N/Aset name=pkg.linted value=True 2434N/A "pkglint001.5",
"pkglint001.5",
"pkglint.manifest007",
"pkglint.action008"]
2434N/A# This manifest delivers actions with underscores in attribute names 2434N/A# and values, but they're all marked linted because we have a manifest-level 2434N/A# pkg.linted key that covers just that check. This produces info messages 2434N/A# for each action that we're not running the pkglint.action001 check on. 2434N/A# So we report 3 linted actions INFO messages, and INFO messages about the 2434N/A# presence of pkg.linted attributes in one action and the manifest. 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2434N/A# an underscore in they key "under_score", linted 2434N/Aset name=variant.other value=carrots under_score=oh_yes 2434N/A# set name=variant.arch value=i386 value=sparc 2434N/Aset name=pkg.linted.pkglint.action001 value=True 2434N/Aset name=pkg.description value="Description of pkglint test package" 2434N/Aset name=description value="Pkglint test package" 2434N/A# this is linted due to our our action attribute 2731N/Aset name=info.classification value=org.opensolaris.category.2008:System/Noodles pkg.linted.pkglint.manifest008.6=True 2434N/A# an underscore the key "foo_name" 2434N/Aset name=pkg.summary value="Pkglint test package" foo_name=bar 2434N/A# this action is ok, underscores in attribute values are fine 2434N/A "pkglint.manifest007",
"pkglint.action001.1",
"pkglint.action001.1",
2434N/A "pkglint001.5",
"pkglint001.5"]
2434N/A# This manifest delivers lots of actions with underscores in attribute names 2434N/A# and values, but we have a manifest-level check that bypasses only one 2434N/A# of the checks within that method. We should still catch the errors for 2434N/A# underscores in 'set' action 'name' values, but not in other attribute names 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2434N/Aset name=variant.other value=carrots under_score=oh_yes 2434N/A# set name=variant.arch value=i386 value=sparc 2434N/Aset name=pkg.linted.pkglint.action001.2 value=True 2434N/Aset name=pkg.description value="Description of pkglint test package" 2434N/Aset name=description value="Pkglint test package" 2731N/Aset name=info.classification value=org.opensolaris.category.2008:System/Noodles pkg.linted.pkglint.manifest008.6=True 2434N/Aset name=pkg.summary value="Pkglint test package" foo_name=bar 2434N/A# We don't care we don't have a summary 2434N/Aset name=org.opensolaris.consolidation value=osnet 2731N/Aset name=pkg.linted.pkglint.manifest010.2 value=True 2434N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2434N/Aset name=variant.arch value=i386 value=sparc 2434N/Aset name=pkg.description value="Description of pkglint test package" 2434N/A# We don't care that the description matches the summary 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2434N/Aset name=variant.arch value=i386 value=sparc 2434N/Aset name=pkg.description value="Description of pkglint test package" 2731N/Aset name=pkg.summary value="Description of pkglint test package" pkg.linted.pkglint.manifest009.2=True 2434N/A "pkglint.action008",
"pkglint.manifest007"]
2434N/A# We don't care that usr/bin/ls is a different type across two actions, but 2434N/A# make sure we still complain about the duplicate path attribute 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2434N/Aset name=variant.arch value=i386 value=sparc 2731N/Aset name=pkg.linted.pkglint.manifest010.2 value=True 2434N/Aset name=pkg.summary value="Summary of pkglint test package" 2434N/Afile path=usr/bin/ls owner=root group=staff mode=755 pkg.linted.pkglint.dupaction008=True 2434N/A# three messages: saying we're linting the duplicate attribute path, that we've 2434N/A# got a manifest with linted attributes, and an action with a linted attribute. 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2434N/Aset name=variant.arch value=i386 value=sparc 2731N/Aset name=pkg.linted.pkglint.manifest010.2 value=True 2434N/Aset name=pkg.summary value="Summary of pkglint test package" 2434N/Afile path=usr/bin/ls owner=root group=staff mode=755 pkg.linted.pkglint.dupaction001.1=True 2597N/A# We don't care that usr/bin/ls are duplicate links, the only output here 2597N/A# should be pkglint.action008, reporting on the use of each linted action. 2597N/A# Despite avoiding pkglint(1) errors here, pkg(1) will still refuse to 2597N/A# install this manifest due to the duplicate links. Don't say we didn't warn you 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=variant.arch value=i386 value=sparc 2597N/Aset name=pkg.summary value="Summary of pkglint test package" 2597N/Alink path=usr/bin/ls target=baz pkg.linted.pkglint.dupaction010.2=true 2597N/Alink path=usr/bin/ls target=foo pkg.linted.pkglint.dupaction010.2=true 2046N/A# We deliver a legacy actions without a required attribute, "desc". Since we 2046N/A# can't find the package pointed to by the legacy 'pkg' attribute, we should 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2597N/Aset name=variant.arch value=i386 value=sparc 2046N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Alegacy variant.arch=i386 arch=i386 category=system hotline="Please contact your local service provider" name="Core Solaris Kernel (Root)" pkg=SUNWckr vendor="Sun Microsystems, Inc." version=11.11,REV=2009.11.11 2597N/Alegacy variant.arch=sparc arch=sparc category=system desc="core kernel software for a specific instruction-set architecture" hotline="Please contact your local service provider" name="Core Solaris Kernel (Root)" pkg=SUNWckr vendor="Sun Microsystems, Inc." version=11.11,REV=2009.11.11 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Aset name=variant.other value="carrots" value="turnips" 2046N/Afile nohash group=bin mode=0755 owner=root path=usr/sbin/fsadmin pkg.csize=953 pkg.size=1572 variant.other=carrots 2046N/Afile nohash group=bin mode=0755 owner=root path=usr/sbin/fsadmin pkg.csize=1234 pkg.size=1234 variant.other=turnips 3382N/Afile nohash elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 2046N/A# delivering to the same path name. Ref-counted actions, but 2046N/A# different variants, this should not be reported as an error 2046N/A# doesn't result in lint errors. 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Aset name=variant.bar value=other value=foo 3382N/Afile nohash elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 2081N/A# our obsolete depend lint check should complain about not being able to find 2081N/A# manifests, but we shouldn't trigger the duplicate dependency error 2081N/A "pkglint.action005.1",
"pkglint.action005.1"]
2046N/A# as we're declaring complimentary variants, we shouldn't report errors 2046N/Aset name=org.opensolaris.consolidation value=sfw 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 2046N/Aset name=variant.arch value=sparc value=i386 2046N/Aset name=variant.other value=other value=thing 2046N/Aset name=variant.foo value=bar value=baz 2081N/A "pkglint.action005.1",
"pkglint.action005.1"]
2081N/A# we don't have a variant.arch attribute set, and are delivering a file with 2081N/Aset name=org.opensolaris.consolidation value=sfw 2081N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2081N/Aset name=description value="Pkglint test package" 2081N/Aset name=pkg.summary value="Pkglint test package" 2081N/Aset name=variant.other value=other value=thing 2081N/Aset name=variant.foo value=bar value=baz 3382N/Afile nohash elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 2046N/A# We deliver an obsolete package that has a pkg.description 2046N/Aset name=pkg.obsolete value=true variant.arch=i386 2046N/Aset name=pkg.description value="This is a package description" 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal variant.arch=i386 2046N/Aset name=variant.arch value=i386 2046N/A# We deliver an obsolete package that has actions other than 'set'. 2046N/A# (bogus signature on this manifest, just for testing) 2046N/Aset name=pkg.obsolete value=true variant.arch=i386 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal variant.arch=i386 2046N/Aset name=variant.arch value=i386 2046N/Asignature algorithm=sha256 value=75b662e14a4ea8f0fa0507d40133b0347a36bc1f63112487f4738073edf4455d version=0 2046N/A# This is a perfectly valid example of an obsolete package 2046N/Aset name=pkg.obsolete value=true variant.arch=i386 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal variant.arch=i386 2046N/Aset name=variant.arch value=i386 2328N/Asignature algorithm=sha256 value=75b662e14a4ea8f0fa0507d40133b0347a36bc1f63112487f4738073edf4455d version=0 2434N/A# We deliver an obsolete package that has a pkg.description 2434N/Aset name=pkg.obsolete value=true variant.arch=i386 2434N/Aset name=pkg.description value="This is a package description" pkg.linted.pkglint.manifest001.1=True 2434N/Aset name=variant.opensolaris.zone value=global value=nonglobal variant.arch=i386 2434N/Aset name=variant.arch value=i386 2434N/A# We deliver an obsolete package that has actions other than 'set'. 2434N/A# (bogus signature on this manifest, just for testing) 2434N/Aset name=pkg.obsolete value=true variant.arch=i386 2434N/Aset name=variant.opensolaris.zone value=global value=nonglobal variant.arch=i386 2434N/Aset name=variant.arch value=i386 2434N/Adir mode=0555 owner=root group=sys path=/usr/bin pkg.linted.pkglint.action005.1=True 2434N/Asignature algorithm=sha256 value=75b662e14a4ea8f0fa0507d40133b0347a36bc1f63112487f4738073edf4455d version=0 2477N/A# This manifest declares multiple overlay=true action, each under a different 2477N/A# variant, and multiple overlay=allow actions, one of our variants declares a 2477N/A# different mode, which here, should be ok. 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc 2477N/Aset name=variant.bar value=other value=new value=baz 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0755 overlay=allow owner=timf path=foo preserve=true variant.arch=sparc 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 variant.bar=other 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 variant.bar=new 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 variant.bar=baz 2477N/Afile NOHASH group=staff mode=0755 overlay=true owner=timf path=foo variant.arch=sparc 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.arch=i386 2477N/A# This manifest declares multiple overlay=true action, each under a different 2477N/A# variant, and multiple overlay=allow actions. 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc 2477N/Aset name=variant.bar value=other value=new value=baz 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 variant.bar=other 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 variant.bar=new 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 variant.bar=baz 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=sparc 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.arch=i386 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.arch=sparc 2477N/A# We have an overlay attribute, but no overlay=allow attribute on the 2nd 2477N/A# action, but since we use use variants, the first action never needs to overlay 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc 2477N/Aset name=variant.bar value=other value=new 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.arch=i386 variant.bar=other 2477N/A# A valid manifest which declares two overlay=allow actions across different 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc 2477N/Aset name=variant.bar value=other value=new 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0655 overlay=allow owner=timf path=foo preserve=true variant.arch=sparc 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.arch=i386 2477N/A# A valid manifest which just declares an overlay=true action 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 2477N/A# A basic valid manifest that uses overlays 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc 2477N/Aset name=variant.bar value=other value=new 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo 2477N/Afile NOHASH group=staff mode=0644 overlay=allow preserve=true owner=timf path=foo 2477N/A# A valid manifest which has a single overlay=true action, and multiple 2477N/A# overlay=allow actions, each in a different variant. 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 2477N/Aset name=variant.bar value=other value=new value=baz 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.bar=other 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.bar=new 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.bar=baz 2477N/A# This manifest declares multiple overlay=true attributes, each under a 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc 2477N/Aset name=variant.bar value=other value=new value=baz 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 variant.bar=other 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 variant.bar=new 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 variant.bar=baz 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.arch=i386 2477N/A# We declare overlays, but have mismatching attributes between them 2477N/A# blah=foo differs, but shouldn't matter. 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc value=ppc 2477N/Aset name=variant.timf value=foo value=bar 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0755 overlay=true owner=timf path=foo variant.arch=ppc variant.timf=foo blah=foo 2477N/Afile NOHASH group=staff mode=0755 overlay=allow owner=timf path=foo preserve=rename variant.arch=ppc variant.timf=foo 2477N/A# We declare overlays, but have mismatching attributes between them 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc value=ppc 2477N/Aset name=variant.timf value=foo value=bar 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0755 overlay=true owner=timf path=foo variant.arch=ppc variant.timf=foo blah=foo 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=rename variant.arch=ppc variant.timf=foo 2477N/A# Duplicate overlay=allow actions, with no overlay=true action. 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc value=ppc 2477N/Aset name=variant.timf value=foo value=bar 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=rename variant.arch=ppc 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=rename variant.arch=ppc 2477N/A# We have duplicate overlay actions 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc value=ppc 2477N/Aset name=variant.timf value=foo value=bar 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=ppc 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=ppc 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=rename variant.arch=ppc 2477N/A [
"pkglint.dupaction009.4",
"pkglint.dupaction009.2"]
2477N/A# ensure that depite complimentary pairs of overlay actions, 2477N/A# we still catch the duplicate one 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc value=ppc 2477N/Aset name=variant.timf value=foo value=bar 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=ppc 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=rename variant.arch=ppc 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=ppc 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=rename variant.arch=ppc 2477N/A [
"pkglint.dupaction001.2",
"pkglint.dupaction009.7",
2477N/A# we have an overlay attribute, but no overlay=allow attribute 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc 2477N/Aset name=variant.bar value=other value=new 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 2477N/Afile NOHASH group=staff mode=0644 owner=timf path=foo preserve=true variant.arch=i386 2477N/A [
"pkglint.dupaction001.1",
"pkglint.dupaction009.7",
2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo 2477N/Afile NOHASH group=staff mode=0644 owner=timf path=foo preserve=rename 2477N/A [
"pkglint.dupaction009.1",
"pkglint.dupaction009.5"]
2477N/A# we don't delcare a 'preserve' attribute on our overlay=allow action 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc value=ppc 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo 2477N/A [
"pkglint.dupaction001.1",
"pkglint.dupaction009.7"]
2477N/A# we're missing an overlay=true action, resulting in a duplicate 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=org.opensolaris.consolidation value=ips 2477N/Aset name=variant.arch value=i386 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true 2477N/Afile NOHASH group=staff mode=0644 owner=timf path=foo preserve=rename 2477N/A# this package declares overlay actions, but we have duplicate 2477N/A# overlay='allow' attributes for variant.foo=foo1 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 2477N/Aset name=variant.bar value=other value=new value=baz 2477N/Aset name=variant.foo value=foo1 value=foo2 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.bar=other 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.bar=new variant.foo=foo1 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.bar=new variant.foo=foo2 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.arch=i386 variant.bar=new variant.foo=foo1 2477N/A# this manifest has multiple overlay=allow variants, but the last is 2477N/A# duplicated across variant.bar variants 2477N/Aset name=pkg.summary value="Image Packaging System" 2477N/Aset name=pkg.description value="overlay checks" 2477N/Aset name=variant.arch value=i386 value=sparc 2477N/Aset name=variant.bar value=other value=new value=baz 2477N/Aset name=org.opensolaris.consolidation value=pkg 2477N/Afile NOHASH group=staff mode=0644 overlay=true owner=timf path=foo variant.arch=i386 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.arch=i386 variant.bar=other 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.arch=i386 variant.bar=new 2477N/Afile NOHASH group=staff mode=0644 overlay=allow owner=timf path=foo preserve=true variant.arch=i386 2731N/A# This manifest delivers /usr/bin as a symlink to /bin, but tries to install 2731N/A# a file through that symlink. 2731N/Aset name=pkg.summary value="Image Packaging System" 2731N/Aset name=pkg.description value="overlay checks" 2731N/Aset name=variant.arch value=i386 value=sparc 2731N/Aset name=org.opensolaris.consolidation value=pkg 2731N/Adir path=/bin owner=root group=sys mode=0755 2731N/A# This manifest delivers /usr/bin as a symlink to /bin, but tries to install 2731N/A# a file through that symlink. However, since the symlink and the file are 2731N/A# delivered under different variants, this is acceptable 2731N/Aset name=pkg.summary value="Image Packaging System" 2731N/Aset name=pkg.description value="overlay checks" 2731N/Aset name=variant.arch value=i386 value=sparc 2731N/Aset name=variant.bar value=other value=new value=baz 2731N/Aset name=org.opensolaris.consolidation value=pkg 2731N/Adir path=/bin owner=root group=sys mode=0755 2731N/Alink target=../bin path=usr/bin group=sys owner=root variant.bar=other 2046N/A# We've reported a package as having been renamed, yet try to deliver 2046N/A# actions other than 'set' and 'depend' 2046N/A# (bogus signature on this manifest, just for testing) 2046N/Aset name=org.opensolaris.consolidation value=sfw 2046N/Aset name=pkg.renamed value=true 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.arch value=sparc value=i386 2046N/Asignature algorithm=sha256 value=75b662e14a4ea8f0fa0507d40133b0347a36bc1f63112487f4738073edf4455d version=0 2434N/A "pkglint.action008",
"pkglint001.5"]
2434N/A# We've reported a package as having been renamed, yet try to deliver 2434N/A# actions other than 'set' and 'depend'. The additional actions are marked 2434N/A# (bogus signature on this manifest, just for testing) 2434N/Aset name=org.opensolaris.consolidation value=sfw 2434N/Aset name=pkg.renamed value=true 2434N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2434N/Aset name=variant.arch value=sparc value=i386 2434N/Adir mode=0555 owner=root group=sys path=/usr/bin pkg.linted.pkglint.manifest002.1=True 2434N/Asignature algorithm=sha256 value=75b662e14a4ea8f0fa0507d40133b0347a36bc1f63112487f4738073edf4455d version=0 2434N/A [
"pkglint.manifest002.1",
"pkglint.manifest002.3",
"pkglint.action008"]
2434N/A# We've reported a package as having been renamed, yet try to deliver 2434N/A# actions other than 'set' and 'depend'. One of these additional actions 2434N/A# is linted, but not all of them, so we still throw pkglint.manifest002.1 2434N/A# (bogus signature on this manifest, just for testing) 2434N/Aset name=org.opensolaris.consolidation value=sfw 2434N/Aset name=pkg.renamed value=true 2434N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2434N/Aset name=variant.arch value=sparc value=i386 2434N/Adir mode=0555 owner=root group=sys path=/usr/bin pkg.linted.pkglint.manifest002.1=True 2434N/Asignature algorithm=sha256 value=75b662e14a4ea8f0fa0507d40133b0347a36bc1f63112487f4738073edf4455d version=0 2046N/A# This is a perfectly valid example of a renamed package 2046N/A# (bogus signature on this manifest, just for testing) 2046N/Aset name=org.opensolaris.consolidation value=sfw 2046N/Aset name=pkg.renamed value=true 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.arch value=sparc value=i386 2046N/Asignature algorithm=sha256 value=75b662e14a4ea8f0fa0507d40133b0347a36bc1f63112487f4738073edf4455d version=0 2715N/A# We try to rename to ourself. 2715N/Aset name=pkg.description value="additional reference actions for pkglint" 2715N/Aset name=pkg.summary value="Core Solaris Kernel" 2715N/Aset name=org.opensolaris.consolidation value=osnet 2715N/Aset name=variant.arch value=i386 value=sparc 2715N/Aset name=pkg.renamed value=true 2715N/Adepend fmri=renamed-ancestor-new type=require 2731N/A# We deliver SMF manifests, with correct org.opensolaris.smf.fmri tags 2731N/Aset name=pkg.description value="additional reference actions for pkglint" 2731N/Aset name=pkg.summary value="Core Solaris Kernel" 2731N/Aset name=org.opensolaris.consolidation value=osnet 2731N/Aset name=variant.arch value=i386 value=sparc 2731N/A# We deliver SMF manifests, but don't declare an org.opensolaris.smf.fmri tag 2731N/A# We should get one warning, rather than one per-SMF-manifest 2731N/Aset name=pkg.description value="additional reference actions for pkglint" 2731N/Aset name=pkg.summary value="Core Solaris Kernel" 2731N/Aset name=org.opensolaris.consolidation value=osnet 2731N/Aset name=variant.arch value=i386 value=sparc 2731N/A# these files are a red herrings - they deliver to the manifest dirs, but do not 2731N/A# have ".xml" file extensions 3307N/A "pkglint.action001.3",
"pkglint.action001.2",
"pkglint.action001.1"]
2147N/A# We try to deliver attributes with underscores. 2147N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2147N/Aset name=pkg.summary value="Core Solaris Kernel" 2147N/Aset name=org.opensolaris.consolidation value=osnet 2147N/Aset name=variant.arch value=i386 value=sparc 2147N/Aset name=test value=i386 variant.arch=sparc 2147N/Aset name=this_underscore_check value=i386 another_attribute=False 3307N/A# reboot_needed is a typo (should be reboot-needed); so should cause a warning 2046N/A# we try to set a variant we've never described in the manifest 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.arch value=i386 value=sparc 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 3382N/Afile nohash elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 2046N/A# we try to deliver an action with a variant value we haven't described 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2046N/Aset name=variant.arch value=i386 value=sparc 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 3382N/Afile nohash elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 2597N/A# we deliver an undefined, but ignorable variant 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=variant.arch value=i386 value=sparc 2597N/Aset name=pkg.description value="Description of pkglint test package" 2597N/Aset name=description value="Pkglint test package" 2597N/Aset name=pkg.summary value="Pkglint test package" 3382N/Afile nohash variant.debug.osnet=True elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 2597N/A# we try to deliver an action with a variant value we haven't described, 2597N/A# as well as an ignorable variant - we should still get an error 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=variant.arch value=i386 value=sparc 2597N/Aset name=pkg.description value="Description of pkglint test package" 2597N/Aset name=description value="Pkglint test package" 2597N/Aset name=pkg.summary value="Pkglint test package" 3382N/Afile nohash variant.debug.osnet=True elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 2046N/A# We try to deliver an 'unknown' action 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/A# we deliver a directory with an unexecutable mode 0422 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2213N/Aset name=pkg.description value="Description of pkglint test package" 2046N/Aset name=description value="Pkglint test package" 2046N/Aset name=pkg.summary value="Pkglint test package" 2046N/Aset name=variant.arch value=i386 value=sparc 3382N/Afile nohash elfarch=i386 elfbits=64 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 2477N/A# We deliver an intentionally broken file action 2477N/Aset name=org.opensolaris.consolidation value=osnet 2477N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2477N/Aset name=pkg.description value="A pkglint test" 2477N/Aset name=pkg.summary value="Yet another test" 2477N/Aset name=variant.arch value=i386 value=sparc 2434N/A# We declare a pkg.lint.pkglint.action005.1 parameter to a depend action that 2434N/A# tells the check to ignore any missing dependencies, as part of its package 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2434N/Aset name=pkg.summary value="Core Solaris Kernel" 2434N/Aset name=variant.arch value=i386 value=sparc 2434N/A# We declare a pkg.lint.pkglint.action005.1 parameter that tells the check to 2434N/A# ignore any missing dependencies, as part of its package obsoletion test 2434N/Aset name=org.opensolaris.consolidation value=osnet 2434N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2434N/Aset name=pkg.summary value="Core Solaris Kernel" 2434N/Aset name=variant.arch value=i386 value=sparc 2498N/A# Underscores in attribute names generate warnings, except for a few that are 2498N/A# grandfathered in, locale facets, which have locale names in them, and 2498N/A# version-lock facets, which take package names. 2498N/Aset name=org.opensolaris.consolidation value=osnet 2498N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2498N/Aset name=pkg.summary value="Core Solaris Kernel" 2498N/Aset name=variant.arch value=i386 value=sparc 2597N/A# A perfectly valid manifest that uses mediated links 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=pkg.description value="A pkglint test" 2597N/Aset name=pkg.summary value="Yet another test" 2597N/Aset name=variant.arch value=i386 value=sparc 2597N/A# We use mediated links, but also try to deliver a file using the same path as 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=pkg.description value="A pkglint test" 2597N/Aset name=pkg.summary value="Yet another test" 2597N/Aset name=variant.arch value=i386 value=sparc 2597N/A# We use mediated links, but then also try to deliver a directory over that link 2597N/A# this is similar to the last test, but ensures that reference-counted 2597N/A# duplicates are treated the same way as non-reference counted duplicates. 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=pkg.description value="A pkglint test" 2597N/Aset name=pkg.summary value="Yet another test" 2597N/Aset name=variant.arch value=i386 value=sparc 2597N/A# We use mediated links, but only in the nonglobal zone, with a file 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=pkg.description value="A pkglint test" 2597N/Aset name=pkg.summary value="Yet another test" 2597N/Aset name=variant.arch value=i386 value=sparc 2597N/Afile path=usr/bin/perl owner=root group=sys mode=0755 variant.opensolaris.zone=global 2597N/A# We're missing mediated link attributes on one of our links 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=pkg.description value="A pkglint test" 2597N/Aset name=pkg.summary value="Yet another test" 2597N/Aset name=variant.arch value=i386 value=sparc 2597N/A# Our mediated links deliver the same path to different namespaces 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=pkg.description value="A pkglint test" 2597N/Aset name=pkg.summary value="Yet another test" 2597N/Aset name=variant.arch value=i386 value=sparc 2597N/A# general action validation error. 2597N/Aset name=org.opensolaris.consolidation value=osnet 2597N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2597N/Aset name=pkg.description value="A pkglint test" 2597N/Aset name=pkg.summary value="Yet another test" 2597N/Aset name=variant.arch value=i386 value=sparc 2861N/A# We deliver an 'incorporate' dependency without specifying the version. 2861N/Aset name=org.opensolaris.consolidation value=osnet 2861N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2861N/Aset name=pkg.description value="A pkglint test" 2861N/Aset name=pkg.summary value="Yet another test" 2861N/Aset name=variant.arch value=i386 value=sparc 2943N/A# Intentionally set facet into a value other than 'true', 'false' or 'all' 2943N/Aset name=org.opensolaris.consolidation value=osnet 2943N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2943N/Aset name=pkg.description value="A pkglint test" 2943N/Aset name=pkg.summary value="Yet another test" 2943N/Aset name=variant.arch value=i386 value=sparc 3382N/A# One of the file has elfbits=32, causing an elfbits validation error. 3382N/Aset name=org.opensolaris.consolidation value=osnet 3382N/Aset name=variant.opensolaris.zone value=global value=nonglobal 3382N/Aset name=pkg.description value="A pkglint test" 3382N/Aset name=pkg.summary value="Yet another test" 3382N/Aset name=variant.arch value=i386 value=sparc 3382N/Afile nohash elfarch=i386 elfbits=32 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/bin/xfs pkg.csize=68397 pkg.size=177700 variant.arch=i386 3382N/A# Should not cause validation error if an so file has elfbits=32. 3382N/Aset name=org.opensolaris.consolidation value=osnet 3382N/Aset name=variant.opensolaris.zone value=global value=nonglobal 3382N/Aset name=pkg.description value="A pkglint test" 3382N/Aset name=pkg.summary value="Yet another test" 3382N/Aset name=variant.arch value=i386 value=sparc 3382N/Afile nohash elfarch=i386 elfbits=32 elfhash=2d5abc9b99e65c52c1afde443e9c5da7a6fcdb1e group=bin mode=0755 owner=root path=usr/lib/xfs.so pkg.csize=68397 pkg.size=177700 variant.arch=i386 3466N/A# Usernames are allowed to contain digit zero. 3466N/Aset name=org.opensolaris.consolidation value=osnet 3466N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 3466N/Aset name=pkg.summary value="Core Solaris Kernel" 3466N/Aset name=variant.arch value=i386 value=sparc 3466N/Auser gcos-field="pkg(7) server UID" group=pkg5srv uid=97 username="pkg5s0v" 2046N/A """Records log messages to a buffer""" 2046N/A """Ensure that lint checks are functioning.""" 2434N/A # look for pkglint001.3 in the output, regardless 2434N/A # of whether we marked that as linted, since it 2434N/A # indicates we caught an exception in one of the 2085N/A "Differences in reported vs. " 3158N/A "expected lint ids for {0}: " 2085N/A """info.classification check can deal with bad data files.""" 2046N/A """Tests that exercise reference vs. lint repository checks 2046N/A and test linting of multiple packages at once.""" 2046N/A# A sample package which delivers several actions, to an earlier release than 2046N/A# 0.140. This manifest has an intentional error, which we should detect when 2046N/A# linting against build 139. 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Adir group=sys mode=0755 owner=root path=etc 2046N/A# A sample package which delivers several actions, to an earlier release than 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Adir group=sys mode=0755 owner=root path=etc 2046N/A# A sample package which delivers several actions, to 0.141 2046N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Adir group=sys mode=0755 owner=root path=etc 2046N/A# A sample package which delivers several actions 2046N/Aset name=pkg.description value="additional reference actions for pkglint" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Adir group=sys mode=0755 owner=root path=etc 2046N/Adir group=sys mode=0755 owner=root path=etc 2046N/A# A sample package which delivers several actions 2046N/Aset name=pkg.description value="additional reference actions for pkglint" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Adir group=sys mode=0755 owner=root path=etc 2081N/A# This is not an obsolete package - used to check versioning 2081N/Aset name=variant.opensolaris.zone value=global value=nonglobal variant.arch=i386 2081N/Aset name=variant.arch value=i386 2081N/A# This is a perfectly valid example of an obsolete package 2081N/Aset name=pkg.obsolete value=true variant.arch=i386 2081N/Aset name=variant.opensolaris.zone value=global value=nonglobal variant.arch=i386 2081N/Aset name=variant.arch value=i386 2046N/A# This is a dummy package designed trip a lint of no-ancestor-legacy.mf 2147N/A# we don't declare a dependency on the package delivering the legacy action. 2046N/Aset name=pkg.description value="additional reference actions for pkglint" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2147N/Aset name=pkg.renamed value=true 2046N/Aset name=variant.arch value=i386 value=sparc 2091N/A# set of variants for both the action and the package. This should not cause 2091N/A# an assertion to be raised. 2091N/Aset name=variant.arch value=sparc value=i386 2091N/Aset name=pkg.summary value="A packge with two variant values" 2091N/Aset name=pkg.description value="A package with two values for variant.arch." 2091N/Aset name=org.opensolaris.consolidation value=osnet 2091N/Aset name=variant.opensolaris.zone value=global value=nonglobal 2147N/A# This is a dummy package designed trip a lint of no-ancestor-legacy.mf 2147N/A# we don't declare a dependency on the FMRI delivered by it. 2147N/Aset name=pkg.description value="additional reference actions for pkglint" 2147N/Aset name=pkg.summary value="Core Solaris Kernel" 2147N/Aset name=org.opensolaris.consolidation value=osnet 2147N/Aset name=variant.arch value=i386 value=sparc 2147N/A# A package with a legacy action that points to a renamed ancestor 2147N/Aset name=pkg.description value="additional reference actions for pkglint" 2147N/Aset name=pkg.summary value="Core Solaris Kernel" 2147N/Aset name=org.opensolaris.consolidation value=osnet 2147N/Aset name=variant.arch value=i386 value=sparc 2147N/Alegacy pkg="renamed-ancestor-old" desc="core kernel software for a specific instruction-set architecture" arch=i386 category=system hotline="Please contact your local service provider" name="Core Solaris Kernel (Root)" vendor="Sun Microsystems, Inc." version=11.11,REV=2009.11.11 2147N/A# The ancestor referred to above, but we've renamed it 2147N/Aset name=pkg.description value="additional reference actions for pkglint" 2147N/Aset name=pkg.summary value="Core Solaris Kernel" 2147N/Aset name=org.opensolaris.consolidation value=osnet 2147N/Aset name=variant.arch value=i386 value=sparc 2147N/Aset name=pkg.renamed value=true 2147N/Adepend fmri=renamed-ancestor-new type=require 2147N/A# The renamed legacy ancestor - this correctly depends on the latest 2147N/Aset name=pkg.description value="additional reference actions for pkglint" 2147N/Aset name=pkg.summary value="Core Solaris Kernel" 2147N/Aset name=org.opensolaris.consolidation value=osnet 2147N/Aset name=variant.arch value=i386 value=sparc 2147N/Aset name=pkg.renamed value=true 2147N/Adepend fmri=legacy-uses-renamed-ancestor type=require 2776N/A# A package with a legacy action that points to a package name that has the 2776N/A# leaf name that matches the 'pkg' attribute of the legacy action that it 2776N/A# delivers. A real-world example of this is the legacy action in 2776N/Aset name=pkg.description value="additional reference actions for pkglint" 2776N/Aset name=pkg.summary value="Core Solaris Kernel" 2776N/Aset name=org.opensolaris.consolidation value=osnet 2776N/Aset name=variant.arch value=i386 value=sparc 2776N/A# (normally a compatibility package would contain dependencies on the 2776N/A# packages that now deliver content previously delivered by the SVR4 pkg 2776N/A# 'renamed-ancestor-old'. They're not necessary for this test.) 2776N/Alegacy pkg="renamed-ancestor-old" desc="core kernel software for a specific instruction-set architecture" arch=i386 category=system hotline="Please contact your local service provider" name="Core Solaris Kernel (Root)" vendor="Sun Microsystems, Inc." version=11.11,REV=2009.11.11 2715N/A# We declare a dependency on a package that we intend to make obsolete 2715N/A# in the lint repository, though this package itself is perfectly valid. 2715N/Aset name=pkg.description value="additional reference actions for pkglint" 2715N/Aset name=pkg.summary value="Core Solaris Kernel" 2715N/Aset name=org.opensolaris.consolidation value=osnet 2715N/Aset name=variant.arch value=i386 value=sparc 2715N/A# we mark this linted because we know this package does not exist in the 2046N/A # A set of manifests to be linted. Note that these are all self 2046N/A # consistent, passing all lint checks on their own. 2046N/A # Errors are designed to show up when linted against the ref_* 2046N/A # manifests, as imported to our reference repository. 2046N/A# We deliver something a package older version than our ref_repo has, 2046N/A# 0.140 instead of 0.141, this should cause errors unless we're 2046N/A# linting against the 0.140 build in the repository. 2046N/A# duplicate of the 0.141 package) 2081N/Aset name=pkg.description value="core kernel" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Adir group=sys mode=0755 owner=root path=etc 2046N/A# We deliver a newer version than our reference repo has 2081N/Aset name=pkg.description value="core kernel" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Adir group=sys mode=0755 owner=root path=etc 2046N/A# We deliver a newer version than our reference repo has, intentionally 2081N/A# duplicating a file our reference repository has in sample3 2081N/Aset name=pkg.description value="core kernel" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Adir group=sys mode=0755 owner=root path=etc 2046N/A# We deliver a legacy action, but declare a package in the legacy action pkg= 2046N/A# field from the ref repo which doesn't depend on us. Only one failure, 2046N/A# because the 2nd legacy action below points to a non-existent package. 2081N/Aset name=pkg.description value="core kernel" 2046N/Aset name=pkg.summary value="Core Solaris Kernel" 2046N/Aset name=variant.arch value=i386 value=sparc 2046N/Aset name=org.opensolaris.consolidation value=osnet 2046N/Alegacy arch=i386 category=system desc="core kernel software for a specific instruction-set architecture" hotline="Please contact your local service provider" name="Core Solaris Kernel (Root)" pkg=SUNWckr variant.arch=i386 vendor="Sun Microsystems, Inc." version=11.11,REV=2009.11.11 2046N/Alegacy arch=sparc category=system desc="core kernel software for a specific instruction-set architecture" hotline="Please contact your local service provider" name="Core Solaris Kernel (Root)" pkg=SUNWthisdoesnotexist variant.arch=sparc vendor="Sun Microsystems, Inc." version=11.11,REV=2009.11.11 2081N/A# We declare a dependency without a version number, on an obsolete package 2081N/A# this should result in a lint error 2081N/Aset name=pkg.description value="core kernel" 2081N/Aset name=pkg.summary value="Core Solaris Kernel" 2081N/Aset name=org.opensolaris.consolidation value=osnet 2081N/Aset name=variant.arch value=i386 value=sparc 2081N/A# We declare a dependency on a version known to be obsolete 2081N/Aset name=pkg.description value="core kernel" 2081N/Aset name=pkg.summary value="Core Solaris Kernel" 2081N/Aset name=org.opensolaris.consolidation value=osnet 2081N/Aset name=variant.arch value=i386 value=sparc 2081N/A# We have dependency on an older version of the packages which was recently 2081N/A# made obsolete. Even though we declared the dependency on the non-obsolete 2081N/A# version, because we published a later, obsoleted version of that package, 2081N/A# we should get the lint warning. 2081N/Aset name=pkg.description value="core kernel" 2081N/Aset name=pkg.summary value="Core Solaris Kernel" 2081N/Aset name=org.opensolaris.consolidation value=osnet 2081N/Aset name=variant.arch value=i386 value=sparc 2091N/A# Test that a package which is only published against one variant value doesn't 2091N/A# cause an assertion failure when it shares an action with another package. 2091N/Aset name=pkg.summary value="A package with one variant" variant.arch=i386 2091N/Aset name=org.opensolaris.consolidation value=osnet variant.arch=i386 2091N/Aset name=info.classification value="org.opensolaris.category.2008:Drivers/Other Peripherals" variant.arch=i386 2091N/Aset name=variant.arch value=i386 2091N/Aset name=variant.opensolaris.zone value=global value=nonglobal variant.arch=i386 2091N/Aset name=pkg.description value="A package published against only one variant value" variant.arch=i386 2091N/Adir group=sys mode=0755 owner=root path=kernel/strmod variant.arch=i386 variant.opensolaris.zone=global 2147N/A# A new version of one of the packages in the rename chain for 2147N/A# legacy-has-renamed-ancestor, which should result in an error. 2147N/A# When tested on its own, this package results in just the 'missing rename' 2147N/A# error, pkglint.manifest002.3 When tested as part of a checking a legacy 2147N/A# action which has a pkg attribute pointing to an old package that gets renamed, 2147N/A# we should get pkglint.action003.4 2147N/Aset name=pkg.description value="additional reference actions for pkglint" 2147N/Aset name=pkg.summary value="Core Solaris Kernel" 2147N/Aset name=org.opensolaris.consolidation value=osnet 2147N/Aset name=variant.arch value=i386 value=sparc 2147N/Aset name=pkg.renamed value=true 2147N/Adepend fmri=renamed-ancestor-missing type=require 2147N/A# A new version of one of the packages in the rename chain for 2147N/A# legacy-has-renamed-ancestor, which should result in an error. 2147N/A# When tested on its own, this package results in the 'looping rename' 2147N/A# error, pkglint.manifest002.4 When tested as part of a checking a legacy action 2147N/A# which has a pkg attribute point to an old package that gets renamed, 2147N/A# we should get pkglint.action003.5, since we're trying to depend on ourselves 2147N/Aset name=pkg.description value="additional reference actions for pkglint" 2147N/Aset name=pkg.summary value="Core Solaris Kernel" 2147N/Aset name=org.opensolaris.consolidation value=osnet 2147N/Aset name=variant.arch value=i386 value=sparc 2147N/Aset name=pkg.renamed value=true 2147N/Adepend fmri=renamed-ancestor-new type=require 2715N/A# We try to rename ourselves to an obsolete package. 2715N/Aset name=pkg.description value="additional reference actions for pkglint" 2715N/Aset name=pkg.summary value="Core Solaris Kernel" 2715N/Aset name=org.opensolaris.consolidation value=osnet 2715N/Aset name=variant.arch value=i386 value=sparc 2715N/Aset name=pkg.renamed value=true 2715N/A# Make this package obsolete. Since it has a dependency in the ref_repository, 2715N/A# we should get a warning, but only when linting against that repo. 2715N/Aset name=pkg.obsolete value=true variant.arch=i386 2715N/Aset name=variant.opensolaris.zone value=global value=nonglobal variant.arch=i386 2715N/Aset name=variant.arch value=i386 2290N/A# A sample package which delivers several actions, to 0.161. We no longer 2290N/A# deliver etc/passwd, moving that to the package in move-sample2.mf below. 2290N/Aset name=pkg.summary value="Core Solaris Kernel" 2290N/Aset name=org.opensolaris.consolidation value=osnet 2290N/Aset name=variant.arch value=i386 value=sparc 2290N/Adir group=sys mode=0755 owner=root path=etc 2290N/A# A sample package which delivers several actions, we now deliver etc/passwd 2290N/Aset name=pkg.summary value="additional content" 2290N/Aset name=org.opensolaris.consolidation value=osnet 2290N/Aset name=variant.arch value=i386 value=sparc 2290N/Adir group=sys mode=0755 owner=root path=etc 2290N/Adir group=sys mode=0755 owner=root path=etc 2046N/A [
"opensolaris.org",
"opensolaris.org",
"opensolaris.org"],
2328N/A # we should sign the repositories for additional coverage 2046N/A """Test basic handling of repo URIs with the lint engine, 2046N/A reference repo is error free, cache dir torn down appropriately. 2715N/A # prune out the missing dependency warnings 2046N/A "Unexpected lint errors messages reported against " 2046N/A "Cache dir does not exist after teardown!")
2046N/A "lint image dir still existed after teardown!")
2046N/A # This shouldn't appear when we're not using a reference repo 2046N/A "Cache dir was not torn down as expected")
2046N/A """Ensure we can lint an empty repository""" 2081N/A # prune out the missing dependency warnings 2046N/A "Lint messages reported from a clean reference repository.")
2046N/A # this should be an empty test: we have no packages in the 2046N/A # lint repository, so we end up doing nothing 2046N/A "Lint messages reported from a empty lint repository.")
2046N/A """Package version handling during lint runs. 2046N/A In particular, it verifies that packages for linting are merged 2046N/A correctly into pkglint's view of what the ref repository would 2046N/A look like, were the lint package to be published to the 2081N/A "Differences in reported vs. expected" 2046N/A # this manifest should report duplicates when 2046N/A # linted against a 0.141 repository, but none 2046N/A # when linted against a 0.140 repository. The duplicates 2046N/A # were tested when 'deliver-old-sample1.mf' was linted 2046N/A # above - this time, we lint against 0.140 and expect 2046N/A "Unexpected lint messages when linting against old " 2046N/A # ensure we detect the error when linting against the reference 2046N/A "No lint messages produced when linting the " 2046N/A "contents of an old repository")
2046N/A "Expected exactly 1 lint message when linting the " 2046N/A "Expected pkglint.dupaction001.1 message when " 2046N/A "linting the contents of an old repository, got " 2046N/A """The lint manifests in this test class should be lint-clean 2046N/A themselves - they should only report errors when linting against 2046N/A our reference repository.""" 2147N/A # prune missing dependency and missing rename warnings 2046N/A "Unexpected lint messages when linting individual " 3158N/A "manifests that should contain no errors: {0} {1}".
format(
2147N/A """Tests that linting a package where we break the renaming 2147N/A of a legacy package, we'll get an error.""" 2147N/A "legacy-uses-renamed-ancestor.mf")
2147N/A "broken-renamed-ancestor-new.mf")
2147N/A "self-depend-renamed-ancestor-new.mf")
2776N/A "compat-renamed-ancestor-old.mf")
2147N/A # look for a rename that didn't ultimately resolve to the 2147N/A # package that contained the legacy action 3158N/A "{0} produced when linting broken renaming with legacy " 2147N/A if i ==
"pkglint.manifest002.3":
2147N/A if i ==
"pkglint.action003.4":
2147N/A "Missing expected broken renaming legacy errors, " 2147N/A # make sure we spot renames that depend upon themselves 2147N/A "produced when linting broken self-dependent renaming with " 2147N/A if i ==
"pkglint.manifest002.4":
2147N/A if i ==
"pkglint.action003.5":
2147N/A "Missing expected broken renaming self-dependent errors " 2776N/A # make sure we can deal with compatibility packages. We include 2776N/A # the 'renamed_old' package as well as the 'compat_legacy' 2776N/A # to ensure that pkglint is satisfied by the compatability 2776N/A # package, rather that trying to follow renames from the 2776N/A # 'renamed_old' package. (otherwise, if a package pointed to by 2776N/A # the legacy 'pkg' attribute doesn't exist, pkglint wouldn't 2776N/A "produced when linting a compatibility legacy package")
2776N/A # the 'legacy' package includes a legacy action which should 2776N/A # also be satisfied by the compat_legacy being installed. 2776N/A "produced when linting a compatibility legacy package")
2090N/A """The engine can start with a relative path to its cache.""" 2290N/A """The dupaction checks can cope with a file that moves between 2290N/A packages, where the old package was delivered in our reference 2290N/A repository and we're linting both new packages: the package 2290N/A from which the file was moved, as well as the package to which 2290N/A It should report an error when we only lint the new version 2290N/A of the package to which the file is moving, but not the new 2290N/A version of package from which the file was moved.""" 2290N/A # first check that file moves work properly, that is, 2290N/A # we should report no errors here. 2290N/A # next check that when delivering only the moved-to package, 2290N/A # we report a duplicate error. 2290N/A "error not seen when moving file between packages, but " 2838N/A """Tests that exercise reference vs. lint repository checks and tests 2838N/A linting of multiple packages at once, similar to TestLintEngineDepot, 2838N/A but with less overhead during setUp (this test class is not marked 2838N/A as persistent_setup = True, so test methods are responsible for their 2838N/A # used by test_get_manifest(..) 2838N/A# The following two manifests check that given a package in the lint repository, 2838N/A# that we can access the latest version of that package from the reference 2838N/A# repository using LintEngine.get_manifest(.., reference=True) 2838N/Aset name=variant.arch value=i386 value=sparc 2838N/Aset name=pkg.summary value="additional content" 2838N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2838N/Aset name=org.opensolaris.consolidation value=osnet 2838N/Aset name=variant.arch value=i386 value=sparc 2838N/Aset name=pkg.summary value="additional content" 2838N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2838N/Aset name=org.opensolaris.consolidation value=osnet 2838N/A# This is the manifest that should appear in the lint repository. 2838N/Aset name=variant.arch value=i386 value=sparc 2838N/Aset name=pkg.summary value="additional content" 2838N/Aset name=pkg.description value="core kernel software for a specific instruction-set architecture" 2838N/Aset name=org.opensolaris.consolidation value=osnet 2838N/A [
"opensolaris.org",
"opensolaris.org"],
2838N/A """Check that <LintEngine>.get_manifest works ensuring 2838N/A it returns appropriate manifests for the lint and reference 2838N/A # try retrieving a few names that should match our lint manifest 2838N/A # try retrieving a few names that should match our parent 2838N/A # manifest when using LATEST_SUCCESSOR mode 2838N/A # try retrieving a few names that should not match when using 2838N/A # try retrieving a specific version of the manifest from the 2838N/A # test that we raise an exception when no reference repo is 2838N/A # configured, but that searches for a non-existent package from 2838N/A # the lint manifests do still return None. 2147N/A """lint_fmri_successor reports lint successors correctly. 2147N/A The lint fmri_successor check has a biase for new FMRIs and 2147N/A acts differently to the pkg.fmri.PkgFmri is_successor check, 2147N/A favouring the new fmri if it is missing information not present 2147N/A We also include some tests for the standard is_successor 2147N/A check, which is used in the implementation of 2147N/A """baseline the standard fmri.is_successor check""" 2147N/A """test that new succeeds old and old succeeds new.""" 2147N/A """test that new succeeds old, but old does not succeed new""" 2147N/A # messages used in assertions 2147N/A # 4 differing timestamps, same version (identical, in pkglint's view) 2147N/A # 5 missing timestamps, same version 2147N/A # 6 missing timestamps, different version 2147N/A # 8 different versions (where string comparisons won't work since 2147N/A # with string comparisons, '0.133' < '0.99' which is not desired 2147N/A # Now the same set of tests, this time with different publishers 2147N/A # 4.1 differing timestamps, same version (identical, in pkglint's 2147N/A # view unless we specifically look at the timestamp) 2147N/A # 5.1 missing timestamps, same version 2147N/A # 6.1 missing timestamps, different version 2147N/A # 8.1 different versions (where string comparisons won't work 2147N/A # with string comparisons, '0.133' < '0.99' which is not desired 2147N/A # different publishers, missing timestmap, same version 2147N/A # different publishers, missing timestmap 2046N/A "Read a list of filenames, return a list of Manifest objects"