featurefmt: Extract PotentialNamespace

PotentialNamespace is feature namespace extracted while detecting
features in layer. It will server for special feature detector. The
current detectors return empty namespace.
This commit is contained in:
Ales Raszka 2019-02-28 10:59:49 +01:00
parent b3fe95e152
commit 34c2d96b36
9 changed files with 496 additions and 495 deletions

View File

@ -166,22 +166,23 @@ func NewNamespace(name string, versionFormat string) *Namespace {
// dpkg is the version format of the installer package manager, which in this // dpkg is the version format of the installer package manager, which in this
// case could be dpkg or apk. // case could be dpkg or apk.
type Feature struct { type Feature struct {
Name string `json:"name"` Name string `json:"name"`
Version string `json:"version"` Version string `json:"version"`
VersionFormat string `json:"versionFormat"` VersionFormat string `json:"versionFormat"`
Type FeatureType `json:"type"` Type FeatureType `json:"type"`
PotentialNamespace Namespace `json:"potentialNamespace"`
} }
func NewFeature(name string, version string, versionFormat string, featureType FeatureType) *Feature { func NewFeature(name string, version string, versionFormat string, featureType FeatureType, namespace Namespace) *Feature {
return &Feature{name, version, versionFormat, featureType} return &Feature{name, version, versionFormat, featureType, namespace}
} }
func NewBinaryPackage(name string, version string, versionFormat string) *Feature { func NewBinaryPackage(name string, version string, versionFormat string, namespace Namespace) *Feature {
return &Feature{name, version, versionFormat, BinaryPackage} return &Feature{name, version, versionFormat, BinaryPackage, namespace}
} }
func NewSourcePackage(name string, version string, versionFormat string) *Feature { func NewSourcePackage(name string, version string, versionFormat string, namespace Namespace) *Feature {
return &Feature{name, version, versionFormat, SourcePackage} return &Feature{name, version, versionFormat, SourcePackage, namespace}
} }
// NamespacedFeature is a feature with determined namespace and can be affected // NamespacedFeature is a feature with determined namespace and can be affected

View File

@ -65,7 +65,7 @@ func testGenRandomVulnerabilityAndNamespacedFeature(t *testing.T, store database
for i := 0; i < numFeatures; i++ { for i := 0; i < numFeatures; i++ {
version := rand.Intn(numFeatures) version := rand.Intn(numFeatures)
features[i] = *database.NewSourcePackage(featureName, strconv.Itoa(version), featureVersionFormat) features[i] = *database.NewSourcePackage(featureName, strconv.Itoa(version), featureVersionFormat, database.Namespace{})
nsFeatures[i] = database.NamespacedFeature{ nsFeatures[i] = database.NamespacedFeature{
Namespace: namespace, Namespace: namespace,
Feature: features[i], Feature: features[i],

View File

@ -28,7 +28,7 @@ func TestPersistFeatures(t *testing.T) {
defer cleanup() defer cleanup()
invalid := database.Feature{} invalid := database.Feature{}
valid := *database.NewBinaryPackage("mount", "2.31.1-0.4ubuntu3.1", "dpkg") valid := *database.NewBinaryPackage("mount", "2.31.1-0.4ubuntu3.1", "dpkg", database.Namespace{})
// invalid // invalid
require.NotNil(t, tx.PersistFeatures([]database.Feature{invalid})) require.NotNil(t, tx.PersistFeatures([]database.Feature{invalid}))
@ -45,9 +45,9 @@ func TestPersistNamespacedFeatures(t *testing.T) {
defer cleanup() defer cleanup()
// existing features // existing features
f1 := database.NewSourcePackage("ourchat", "0.5", "dpkg") f1 := database.NewSourcePackage("ourchat", "0.5", "dpkg", database.Namespace{})
// non-existing features // non-existing features
f2 := database.NewSourcePackage("fake!", "", "") f2 := database.NewSourcePackage("fake!", "", "", database.Namespace{})
// exising namespace // exising namespace
n1 := database.NewNamespace("debian:7", "dpkg") n1 := database.NewNamespace("debian:7", "dpkg")
// non-existing namespace // non-existing namespace

View File

@ -38,11 +38,11 @@ import (
// int keys must be the consistent with the database ID. // int keys must be the consistent with the database ID.
var ( var (
realFeatures = map[int]database.Feature{ realFeatures = map[int]database.Feature{
1: {"ourchat", "0.5", "dpkg", "source"}, 1: {"ourchat", "0.5", "dpkg", "source", database.Namespace{}},
2: {"openssl", "1.0", "dpkg", "source"}, 2: {"openssl", "1.0", "dpkg", "source", database.Namespace{}},
3: {"openssl", "2.0", "dpkg", "source"}, 3: {"openssl", "2.0", "dpkg", "source", database.Namespace{}},
4: {"fake", "2.0", "rpm", "source"}, 4: {"fake", "2.0", "rpm", "source", database.Namespace{}},
5: {"mount", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}, 5: {"mount", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
} }
realNamespaces = map[int]database.Namespace{ realNamespaces = map[int]database.Namespace{

View File

@ -28,17 +28,17 @@ func TestAPKFeatureDetection(t *testing.T) {
"valid case", "valid case",
map[string]string{"lib/apk/db/installed": "apk/testdata/valid"}, map[string]string{"lib/apk/db/installed": "apk/testdata/valid"},
[]database.Feature{ []database.Feature{
{"apk-tools", "2.6.7-r0", "dpkg", "binary"}, {"apk-tools", "2.6.7-r0", "dpkg", "binary", database.Namespace{}},
{"musl", "1.1.14-r10", "dpkg", "binary"}, {"musl", "1.1.14-r10", "dpkg", "binary", database.Namespace{}},
{"libssl1.0", "1.0.2h-r1", "dpkg", "binary"}, {"libssl1.0", "1.0.2h-r1", "dpkg", "binary", database.Namespace{}},
{"libc-utils", "0.7-r0", "dpkg", "binary"}, {"libc-utils", "0.7-r0", "dpkg", "binary", database.Namespace{}},
{"busybox", "1.24.2-r9", "dpkg", "binary"}, {"busybox", "1.24.2-r9", "dpkg", "binary", database.Namespace{}},
{"scanelf", "1.1.6-r0", "dpkg", "binary"}, {"scanelf", "1.1.6-r0", "dpkg", "binary", database.Namespace{}},
{"alpine-keys", "1.1-r0", "dpkg", "binary"}, {"alpine-keys", "1.1-r0", "dpkg", "binary", database.Namespace{}},
{"libcrypto1.0", "1.0.2h-r1", "dpkg", "binary"}, {"libcrypto1.0", "1.0.2h-r1", "dpkg", "binary", database.Namespace{}},
{"zlib", "1.2.8-r2", "dpkg", "binary"}, {"zlib", "1.2.8-r2", "dpkg", "binary", database.Namespace{}},
{"musl-utils", "1.1.14-r10", "dpkg", "binary"}, {"musl-utils", "1.1.14-r10", "dpkg", "binary", database.Namespace{}},
{"alpine-baselayout", "3.0.3-r0", "dpkg", "binary"}, {"alpine-baselayout", "3.0.3-r0", "dpkg", "binary", database.Namespace{}},
}, },
}, },
} { } {

View File

@ -123,7 +123,7 @@ func parseDpkgDB(scanner *bufio.Scanner) (binaryPackage *database.Feature, sourc
if err := versionfmt.Valid(dpkg.ParserName, version); err != nil { if err := versionfmt.Valid(dpkg.ParserName, version); err != nil {
log.WithError(err).WithFields(log.Fields{"name": name, "version": version}).Warning("skipped unparseable package") log.WithError(err).WithFields(log.Fields{"name": name, "version": version}).Warning("skipped unparseable package")
} else { } else {
binaryPackage = &database.Feature{name, version, dpkg.ParserName, database.BinaryPackage} binaryPackage = &database.Feature{name, version, dpkg.ParserName, database.BinaryPackage, database.Namespace{}}
} }
} }
@ -145,7 +145,7 @@ func parseDpkgDB(scanner *bufio.Scanner) (binaryPackage *database.Feature, sourc
if err := versionfmt.Valid(dpkg.ParserName, version); err != nil { if err := versionfmt.Valid(dpkg.ParserName, version); err != nil {
log.WithError(err).WithFields(log.Fields{"name": name, "version": version}).Warning("skipped unparseable package") log.WithError(err).WithFields(log.Fields{"name": name, "version": version}).Warning("skipped unparseable package")
} else { } else {
sourcePackage = &database.Feature{sourceName, sourceVersion, dpkg.ParserName, database.SourcePackage} sourcePackage = &database.Feature{sourceName, sourceVersion, dpkg.ParserName, database.SourcePackage, database.Namespace{}}
} }
} }

View File

@ -28,168 +28,168 @@ func TestListFeatures(t *testing.T) {
"valid status file", "valid status file",
map[string]string{"var/lib/dpkg/status": "dpkg/testdata/valid"}, map[string]string{"var/lib/dpkg/status": "dpkg/testdata/valid"},
[]database.Feature{ []database.Feature{
{"libapt-pkg5.0", "1.6.3ubuntu0.1", "dpkg", "binary"}, {"libapt-pkg5.0", "1.6.3ubuntu0.1", "dpkg", "binary", database.Namespace{}},
{"perl-base", "5.26.1-6ubuntu0.2", "dpkg", "binary"}, {"perl-base", "5.26.1-6ubuntu0.2", "dpkg", "binary", database.Namespace{}},
{"libmount1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}, {"libmount1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
{"perl", "5.26.1-6ubuntu0.2", "dpkg", "source"}, {"perl", "5.26.1-6ubuntu0.2", "dpkg", "source", database.Namespace{}},
{"libgnutls30", "3.5.18-1ubuntu1", "dpkg", "binary"}, {"libgnutls30", "3.5.18-1ubuntu1", "dpkg", "binary", database.Namespace{}},
{"liblzma5", "5.2.2-1.3", "dpkg", "binary"}, {"liblzma5", "5.2.2-1.3", "dpkg", "binary", database.Namespace{}},
{"ncurses-bin", "6.1-1ubuntu1.18.04", "dpkg", "binary"}, {"ncurses-bin", "6.1-1ubuntu1.18.04", "dpkg", "binary", database.Namespace{}},
{"lsb", "9.20170808ubuntu1", "dpkg", "source"}, {"lsb", "9.20170808ubuntu1", "dpkg", "source", database.Namespace{}},
{"sed", "4.4-2", "dpkg", "source"}, {"sed", "4.4-2", "dpkg", "source", database.Namespace{}},
{"libsystemd0", "237-3ubuntu10.3", "dpkg", "binary"}, {"libsystemd0", "237-3ubuntu10.3", "dpkg", "binary", database.Namespace{}},
{"procps", "2:3.3.12-3ubuntu1.1", "dpkg", "source"}, {"procps", "2:3.3.12-3ubuntu1.1", "dpkg", "source", database.Namespace{}},
{"login", "1:4.5-1ubuntu1", "dpkg", "binary"}, {"login", "1:4.5-1ubuntu1", "dpkg", "binary", database.Namespace{}},
{"libunistring2", "0.9.9-0ubuntu1", "dpkg", "binary"}, {"libunistring2", "0.9.9-0ubuntu1", "dpkg", "binary", database.Namespace{}},
{"sed", "4.4-2", "dpkg", "binary"}, {"sed", "4.4-2", "dpkg", "binary", database.Namespace{}},
{"libselinux", "2.7-2build2", "dpkg", "source"}, {"libselinux", "2.7-2build2", "dpkg", "source", database.Namespace{}},
{"libseccomp", "2.3.1-2.1ubuntu4", "dpkg", "source"}, {"libseccomp", "2.3.1-2.1ubuntu4", "dpkg", "source", database.Namespace{}},
{"libss2", "1.44.1-1", "dpkg", "binary"}, {"libss2", "1.44.1-1", "dpkg", "binary", database.Namespace{}},
{"liblz4-1", "0.0~r131-2ubuntu3", "dpkg", "binary"}, {"liblz4-1", "0.0~r131-2ubuntu3", "dpkg", "binary", database.Namespace{}},
{"libsemanage1", "2.7-2build2", "dpkg", "binary"}, {"libsemanage1", "2.7-2build2", "dpkg", "binary", database.Namespace{}},
{"libtasn1-6", "4.13-2", "dpkg", "source"}, {"libtasn1-6", "4.13-2", "dpkg", "source", database.Namespace{}},
{"libzstd1", "1.3.3+dfsg-2ubuntu1", "dpkg", "binary"}, {"libzstd1", "1.3.3+dfsg-2ubuntu1", "dpkg", "binary", database.Namespace{}},
{"fdisk", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}, {"fdisk", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
{"xz-utils", "5.2.2-1.3", "dpkg", "source"}, {"xz-utils", "5.2.2-1.3", "dpkg", "source", database.Namespace{}},
{"lsb-base", "9.20170808ubuntu1", "dpkg", "binary"}, {"lsb-base", "9.20170808ubuntu1", "dpkg", "binary", database.Namespace{}},
{"libpam-modules-bin", "1.1.8-3.6ubuntu2", "dpkg", "binary"}, {"libpam-modules-bin", "1.1.8-3.6ubuntu2", "dpkg", "binary", database.Namespace{}},
{"dash", "0.5.8-2.10", "dpkg", "binary"}, {"dash", "0.5.8-2.10", "dpkg", "binary", database.Namespace{}},
{"gnupg2", "2.2.4-1ubuntu1.1", "dpkg", "source"}, {"gnupg2", "2.2.4-1ubuntu1.1", "dpkg", "source", database.Namespace{}},
{"libfdisk1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}, {"libfdisk1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
{"lz4", "0.0~r131-2ubuntu3", "dpkg", "source"}, {"lz4", "0.0~r131-2ubuntu3", "dpkg", "source", database.Namespace{}},
{"libpam0g", "1.1.8-3.6ubuntu2", "dpkg", "binary"}, {"libpam0g", "1.1.8-3.6ubuntu2", "dpkg", "binary", database.Namespace{}},
{"libc-bin", "2.27-3ubuntu1", "dpkg", "binary"}, {"libc-bin", "2.27-3ubuntu1", "dpkg", "binary", database.Namespace{}},
{"libcap-ng", "0.7.7-3.1", "dpkg", "source"}, {"libcap-ng", "0.7.7-3.1", "dpkg", "source", database.Namespace{}},
{"libcom-err2", "1.44.1-1", "dpkg", "binary"}, {"libcom-err2", "1.44.1-1", "dpkg", "binary", database.Namespace{}},
{"libudev1", "237-3ubuntu10.3", "dpkg", "binary"}, {"libudev1", "237-3ubuntu10.3", "dpkg", "binary", database.Namespace{}},
{"debconf", "1.5.66", "dpkg", "binary"}, {"debconf", "1.5.66", "dpkg", "binary", database.Namespace{}},
{"tar", "1.29b-2", "dpkg", "binary"}, {"tar", "1.29b-2", "dpkg", "binary", database.Namespace{}},
{"diffutils", "1:3.6-1", "dpkg", "source"}, {"diffutils", "1:3.6-1", "dpkg", "source", database.Namespace{}},
{"gcc-8", "8-20180414-1ubuntu2", "dpkg", "source"}, {"gcc-8", "8-20180414-1ubuntu2", "dpkg", "source", database.Namespace{}},
{"e2fsprogs", "1.44.1-1", "dpkg", "source"}, {"e2fsprogs", "1.44.1-1", "dpkg", "source", database.Namespace{}},
{"bzip2", "1.0.6-8.1", "dpkg", "source"}, {"bzip2", "1.0.6-8.1", "dpkg", "source", database.Namespace{}},
{"diffutils", "1:3.6-1", "dpkg", "binary"}, {"diffutils", "1:3.6-1", "dpkg", "binary", database.Namespace{}},
{"grep", "3.1-2", "dpkg", "binary"}, {"grep", "3.1-2", "dpkg", "binary", database.Namespace{}},
{"libgcc1", "1:8-20180414-1ubuntu2", "dpkg", "binary"}, {"libgcc1", "1:8-20180414-1ubuntu2", "dpkg", "binary", database.Namespace{}},
{"bash", "4.4.18-2ubuntu1", "dpkg", "source"}, {"bash", "4.4.18-2ubuntu1", "dpkg", "source", database.Namespace{}},
{"libtinfo5", "6.1-1ubuntu1.18.04", "dpkg", "binary"}, {"libtinfo5", "6.1-1ubuntu1.18.04", "dpkg", "binary", database.Namespace{}},
{"procps", "2:3.3.12-3ubuntu1.1", "dpkg", "binary"}, {"procps", "2:3.3.12-3ubuntu1.1", "dpkg", "binary", database.Namespace{}},
{"bzip2", "1.0.6-8.1", "dpkg", "binary"}, {"bzip2", "1.0.6-8.1", "dpkg", "binary", database.Namespace{}},
{"init-system-helpers", "1.51", "dpkg", "binary"}, {"init-system-helpers", "1.51", "dpkg", "binary", database.Namespace{}},
{"libncursesw5", "6.1-1ubuntu1.18.04", "dpkg", "binary"}, {"libncursesw5", "6.1-1ubuntu1.18.04", "dpkg", "binary", database.Namespace{}},
{"init-system-helpers", "1.51", "dpkg", "source"}, {"init-system-helpers", "1.51", "dpkg", "source", database.Namespace{}},
{"libpam-modules", "1.1.8-3.6ubuntu2", "dpkg", "binary"}, {"libpam-modules", "1.1.8-3.6ubuntu2", "dpkg", "binary", database.Namespace{}},
{"libext2fs2", "1.44.1-1", "dpkg", "binary"}, {"libext2fs2", "1.44.1-1", "dpkg", "binary", database.Namespace{}},
{"libacl1", "2.2.52-3build1", "dpkg", "binary"}, {"libacl1", "2.2.52-3build1", "dpkg", "binary", database.Namespace{}},
{"hostname", "3.20", "dpkg", "binary"}, {"hostname", "3.20", "dpkg", "binary", database.Namespace{}},
{"libgpg-error", "1.27-6", "dpkg", "source"}, {"libgpg-error", "1.27-6", "dpkg", "source", database.Namespace{}},
{"acl", "2.2.52-3build1", "dpkg", "source"}, {"acl", "2.2.52-3build1", "dpkg", "source", database.Namespace{}},
{"apt", "1.6.3ubuntu0.1", "dpkg", "binary"}, {"apt", "1.6.3ubuntu0.1", "dpkg", "binary", database.Namespace{}},
{"base-files", "10.1ubuntu2.2", "dpkg", "source"}, {"base-files", "10.1ubuntu2.2", "dpkg", "source", database.Namespace{}},
{"libgpg-error0", "1.27-6", "dpkg", "binary"}, {"libgpg-error0", "1.27-6", "dpkg", "binary", database.Namespace{}},
{"audit", "1:2.8.2-1ubuntu1", "dpkg", "source"}, {"audit", "1:2.8.2-1ubuntu1", "dpkg", "source", database.Namespace{}},
{"hostname", "3.20", "dpkg", "source"}, {"hostname", "3.20", "dpkg", "source", database.Namespace{}},
{"gzip", "1.6-5ubuntu1", "dpkg", "binary"}, {"gzip", "1.6-5ubuntu1", "dpkg", "binary", database.Namespace{}},
{"libc6", "2.27-3ubuntu1", "dpkg", "binary"}, {"libc6", "2.27-3ubuntu1", "dpkg", "binary", database.Namespace{}},
{"libnettle6", "3.4-1", "dpkg", "binary"}, {"libnettle6", "3.4-1", "dpkg", "binary", database.Namespace{}},
{"sysvinit-utils", "2.88dsf-59.10ubuntu1", "dpkg", "binary"}, {"sysvinit-utils", "2.88dsf-59.10ubuntu1", "dpkg", "binary", database.Namespace{}},
{"debianutils", "4.8.4", "dpkg", "source"}, {"debianutils", "4.8.4", "dpkg", "source", database.Namespace{}},
{"libstdc++6", "8-20180414-1ubuntu2", "dpkg", "binary"}, {"libstdc++6", "8-20180414-1ubuntu2", "dpkg", "binary", database.Namespace{}},
{"libsepol", "2.7-1", "dpkg", "source"}, {"libsepol", "2.7-1", "dpkg", "source", database.Namespace{}},
{"libpcre3", "2:8.39-9", "dpkg", "binary"}, {"libpcre3", "2:8.39-9", "dpkg", "binary", database.Namespace{}},
{"libuuid1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}, {"libuuid1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
{"systemd", "237-3ubuntu10.3", "dpkg", "source"}, {"systemd", "237-3ubuntu10.3", "dpkg", "source", database.Namespace{}},
{"tar", "1.29b-2", "dpkg", "source"}, {"tar", "1.29b-2", "dpkg", "source", database.Namespace{}},
{"ubuntu-keyring", "2018.02.28", "dpkg", "source"}, {"ubuntu-keyring", "2018.02.28", "dpkg", "source", database.Namespace{}},
{"passwd", "1:4.5-1ubuntu1", "dpkg", "binary"}, {"passwd", "1:4.5-1ubuntu1", "dpkg", "binary", database.Namespace{}},
{"sysvinit", "2.88dsf-59.10ubuntu1", "dpkg", "source"}, {"sysvinit", "2.88dsf-59.10ubuntu1", "dpkg", "source", database.Namespace{}},
{"libidn2-0", "2.0.4-1.1build2", "dpkg", "binary"}, {"libidn2-0", "2.0.4-1.1build2", "dpkg", "binary", database.Namespace{}},
{"libhogweed4", "3.4-1", "dpkg", "binary"}, {"libhogweed4", "3.4-1", "dpkg", "binary", database.Namespace{}},
{"db5.3", "5.3.28-13.1ubuntu1", "dpkg", "source"}, {"db5.3", "5.3.28-13.1ubuntu1", "dpkg", "source", database.Namespace{}},
{"sensible-utils", "0.0.12", "dpkg", "source"}, {"sensible-utils", "0.0.12", "dpkg", "source", database.Namespace{}},
{"dpkg", "1.19.0.5ubuntu2", "dpkg", "source"}, {"dpkg", "1.19.0.5ubuntu2", "dpkg", "source", database.Namespace{}},
{"libp11-kit0", "0.23.9-2", "dpkg", "binary"}, {"libp11-kit0", "0.23.9-2", "dpkg", "binary", database.Namespace{}},
{"glibc", "2.27-3ubuntu1", "dpkg", "source"}, {"glibc", "2.27-3ubuntu1", "dpkg", "source", database.Namespace{}},
{"mount", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}, {"mount", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
{"libsemanage-common", "2.7-2build2", "dpkg", "binary"}, {"libsemanage-common", "2.7-2build2", "dpkg", "binary", database.Namespace{}},
{"libblkid1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}, {"libblkid1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
{"libdebconfclient0", "0.213ubuntu1", "dpkg", "binary"}, {"libdebconfclient0", "0.213ubuntu1", "dpkg", "binary", database.Namespace{}},
{"libffi", "3.2.1-8", "dpkg", "source"}, {"libffi", "3.2.1-8", "dpkg", "source", database.Namespace{}},
{"pam", "1.1.8-3.6ubuntu2", "dpkg", "source"}, {"pam", "1.1.8-3.6ubuntu2", "dpkg", "source", database.Namespace{}},
{"bsdutils", "1:2.31.1-0.4ubuntu3.1", "dpkg", "binary"}, {"bsdutils", "1:2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
{"libtasn1-6", "4.13-2", "dpkg", "binary"}, {"libtasn1-6", "4.13-2", "dpkg", "binary", database.Namespace{}},
{"libaudit-common", "1:2.8.2-1ubuntu1", "dpkg", "binary"}, {"libaudit-common", "1:2.8.2-1ubuntu1", "dpkg", "binary", database.Namespace{}},
{"gpgv", "2.2.4-1ubuntu1.1", "dpkg", "binary"}, {"gpgv", "2.2.4-1ubuntu1.1", "dpkg", "binary", database.Namespace{}},
{"libzstd", "1.3.3+dfsg-2ubuntu1", "dpkg", "source"}, {"libzstd", "1.3.3+dfsg-2ubuntu1", "dpkg", "source", database.Namespace{}},
{"base-passwd", "3.5.44", "dpkg", "source"}, {"base-passwd", "3.5.44", "dpkg", "source", database.Namespace{}},
{"adduser", "3.116ubuntu1", "dpkg", "binary"}, {"adduser", "3.116ubuntu1", "dpkg", "binary", database.Namespace{}},
{"libattr1", "1:2.4.47-2build1", "dpkg", "binary"}, {"libattr1", "1:2.4.47-2build1", "dpkg", "binary", database.Namespace{}},
{"libncurses5", "6.1-1ubuntu1.18.04", "dpkg", "binary"}, {"libncurses5", "6.1-1ubuntu1.18.04", "dpkg", "binary", database.Namespace{}},
{"coreutils", "8.28-1ubuntu1", "dpkg", "binary"}, {"coreutils", "8.28-1ubuntu1", "dpkg", "binary", database.Namespace{}},
{"base-passwd", "3.5.44", "dpkg", "binary"}, {"base-passwd", "3.5.44", "dpkg", "binary", database.Namespace{}},
{"ubuntu-keyring", "2018.02.28", "dpkg", "binary"}, {"ubuntu-keyring", "2018.02.28", "dpkg", "binary", database.Namespace{}},
{"adduser", "3.116ubuntu1", "dpkg", "source"}, {"adduser", "3.116ubuntu1", "dpkg", "source", database.Namespace{}},
{"libsmartcols1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}, {"libsmartcols1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
{"libunistring", "0.9.9-0ubuntu1", "dpkg", "source"}, {"libunistring", "0.9.9-0ubuntu1", "dpkg", "source", database.Namespace{}},
{"mawk", "1.3.3-17ubuntu3", "dpkg", "source"}, {"mawk", "1.3.3-17ubuntu3", "dpkg", "source", database.Namespace{}},
{"coreutils", "8.28-1ubuntu1", "dpkg", "source"}, {"coreutils", "8.28-1ubuntu1", "dpkg", "source", database.Namespace{}},
{"attr", "1:2.4.47-2build1", "dpkg", "source"}, {"attr", "1:2.4.47-2build1", "dpkg", "source", database.Namespace{}},
{"gmp", "2:6.1.2+dfsg-2", "dpkg", "source"}, {"gmp", "2:6.1.2+dfsg-2", "dpkg", "source", database.Namespace{}},
{"libsemanage", "2.7-2build2", "dpkg", "source"}, {"libsemanage", "2.7-2build2", "dpkg", "source", database.Namespace{}},
{"libselinux1", "2.7-2build2", "dpkg", "binary"}, {"libselinux1", "2.7-2build2", "dpkg", "binary", database.Namespace{}},
{"libseccomp2", "2.3.1-2.1ubuntu4", "dpkg", "binary"}, {"libseccomp2", "2.3.1-2.1ubuntu4", "dpkg", "binary", database.Namespace{}},
{"zlib1g", "1:1.2.11.dfsg-0ubuntu2", "dpkg", "binary"}, {"zlib1g", "1:1.2.11.dfsg-0ubuntu2", "dpkg", "binary", database.Namespace{}},
{"dash", "0.5.8-2.10", "dpkg", "source"}, {"dash", "0.5.8-2.10", "dpkg", "source", database.Namespace{}},
{"gnutls28", "3.5.18-1ubuntu1", "dpkg", "source"}, {"gnutls28", "3.5.18-1ubuntu1", "dpkg", "source", database.Namespace{}},
{"libpam-runtime", "1.1.8-3.6ubuntu2", "dpkg", "binary"}, {"libpam-runtime", "1.1.8-3.6ubuntu2", "dpkg", "binary", database.Namespace{}},
{"libgcrypt20", "1.8.1-4ubuntu1.1", "dpkg", "source"}, {"libgcrypt20", "1.8.1-4ubuntu1.1", "dpkg", "source", database.Namespace{}},
{"sensible-utils", "0.0.12", "dpkg", "binary"}, {"sensible-utils", "0.0.12", "dpkg", "binary", database.Namespace{}},
{"p11-kit", "0.23.9-2", "dpkg", "source"}, {"p11-kit", "0.23.9-2", "dpkg", "source", database.Namespace{}},
{"ncurses-base", "6.1-1ubuntu1.18.04", "dpkg", "binary"}, {"ncurses-base", "6.1-1ubuntu1.18.04", "dpkg", "binary", database.Namespace{}},
{"e2fsprogs", "1.44.1-1", "dpkg", "binary"}, {"e2fsprogs", "1.44.1-1", "dpkg", "binary", database.Namespace{}},
{"libgcrypt20", "1.8.1-4ubuntu1.1", "dpkg", "binary"}, {"libgcrypt20", "1.8.1-4ubuntu1.1", "dpkg", "binary", database.Namespace{}},
{"libprocps6", "2:3.3.12-3ubuntu1.1", "dpkg", "binary"}, {"libprocps6", "2:3.3.12-3ubuntu1.1", "dpkg", "binary", database.Namespace{}},
{"debconf", "1.5.66", "dpkg", "source"}, {"debconf", "1.5.66", "dpkg", "source", database.Namespace{}},
{"gcc-8-base", "8-20180414-1ubuntu2", "dpkg", "binary"}, {"gcc-8-base", "8-20180414-1ubuntu2", "dpkg", "binary", database.Namespace{}},
{"base-files", "10.1ubuntu2.2", "dpkg", "binary"}, {"base-files", "10.1ubuntu2.2", "dpkg", "binary", database.Namespace{}},
{"libbz2-1.0", "1.0.6-8.1", "dpkg", "binary"}, {"libbz2-1.0", "1.0.6-8.1", "dpkg", "binary", database.Namespace{}},
{"grep", "3.1-2", "dpkg", "source"}, {"grep", "3.1-2", "dpkg", "source", database.Namespace{}},
{"bash", "4.4.18-2ubuntu1", "dpkg", "binary"}, {"bash", "4.4.18-2ubuntu1", "dpkg", "binary", database.Namespace{}},
{"libgmp10", "2:6.1.2+dfsg-2", "dpkg", "binary"}, {"libgmp10", "2:6.1.2+dfsg-2", "dpkg", "binary", database.Namespace{}},
{"shadow", "1:4.5-1ubuntu1", "dpkg", "source"}, {"shadow", "1:4.5-1ubuntu1", "dpkg", "source", database.Namespace{}},
{"libidn2", "2.0.4-1.1build2", "dpkg", "source"}, {"libidn2", "2.0.4-1.1build2", "dpkg", "source", database.Namespace{}},
{"gzip", "1.6-5ubuntu1", "dpkg", "source"}, {"gzip", "1.6-5ubuntu1", "dpkg", "source", database.Namespace{}},
{"util-linux", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}, {"util-linux", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
{"libaudit1", "1:2.8.2-1ubuntu1", "dpkg", "binary"}, {"libaudit1", "1:2.8.2-1ubuntu1", "dpkg", "binary", database.Namespace{}},
{"libsepol1", "2.7-1", "dpkg", "binary"}, {"libsepol1", "2.7-1", "dpkg", "binary", database.Namespace{}},
{"pcre3", "2:8.39-9", "dpkg", "source"}, {"pcre3", "2:8.39-9", "dpkg", "source", database.Namespace{}},
{"apt", "1.6.3ubuntu0.1", "dpkg", "source"}, {"apt", "1.6.3ubuntu0.1", "dpkg", "source", database.Namespace{}},
{"nettle", "3.4-1", "dpkg", "source"}, {"nettle", "3.4-1", "dpkg", "source", database.Namespace{}},
{"util-linux", "2.31.1-0.4ubuntu3.1", "dpkg", "source"}, {"util-linux", "2.31.1-0.4ubuntu3.1", "dpkg", "source", database.Namespace{}},
{"libcap-ng0", "0.7.7-3.1", "dpkg", "binary"}, {"libcap-ng0", "0.7.7-3.1", "dpkg", "binary", database.Namespace{}},
{"debianutils", "4.8.4", "dpkg", "binary"}, {"debianutils", "4.8.4", "dpkg", "binary", database.Namespace{}},
{"ncurses", "6.1-1ubuntu1.18.04", "dpkg", "source"}, {"ncurses", "6.1-1ubuntu1.18.04", "dpkg", "source", database.Namespace{}},
{"libffi6", "3.2.1-8", "dpkg", "binary"}, {"libffi6", "3.2.1-8", "dpkg", "binary", database.Namespace{}},
{"cdebconf", "0.213ubuntu1", "dpkg", "source"}, {"cdebconf", "0.213ubuntu1", "dpkg", "source", database.Namespace{}},
{"findutils", "4.6.0+git+20170828-2", "dpkg", "source"}, {"findutils", "4.6.0+git+20170828-2", "dpkg", "source", database.Namespace{}},
{"libdb5.3", "5.3.28-13.1ubuntu1", "dpkg", "binary"}, {"libdb5.3", "5.3.28-13.1ubuntu1", "dpkg", "binary", database.Namespace{}},
{"zlib", "1:1.2.11.dfsg-0ubuntu2", "dpkg", "source"}, {"zlib", "1:1.2.11.dfsg-0ubuntu2", "dpkg", "source", database.Namespace{}},
{"findutils", "4.6.0+git+20170828-2", "dpkg", "binary"}, {"findutils", "4.6.0+git+20170828-2", "dpkg", "binary", database.Namespace{}},
{"dpkg", "1.19.0.5ubuntu2", "dpkg", "binary"}, {"dpkg", "1.19.0.5ubuntu2", "dpkg", "binary", database.Namespace{}},
{"mawk", "1.3.3-17ubuntu3", "dpkg", "binary"}, {"mawk", "1.3.3-17ubuntu3", "dpkg", "binary", database.Namespace{}},
}, },
}, },
{ {
"corrupted status file", "corrupted status file",
map[string]string{"var/lib/dpkg/status": "dpkg/testdata/corrupted"}, map[string]string{"var/lib/dpkg/status": "dpkg/testdata/corrupted"},
[]database.Feature{ []database.Feature{
{"libpam-modules-bin", "1.1.8-3.1ubuntu3", "dpkg", "binary"}, {"libpam-modules-bin", "1.1.8-3.1ubuntu3", "dpkg", "binary", database.Namespace{}},
{"gcc-5", "5.1.1-12ubuntu1", "dpkg", "source"}, {"gcc-5", "5.1.1-12ubuntu1", "dpkg", "source", database.Namespace{}},
{"makedev", "2.3.1-93ubuntu1", "dpkg", "binary"}, {"makedev", "2.3.1-93ubuntu1", "dpkg", "binary", database.Namespace{}},
{"libgcc1", "1:5.1.1-12ubuntu1", "dpkg", "binary"}, {"libgcc1", "1:5.1.1-12ubuntu1", "dpkg", "binary", database.Namespace{}},
{"pam", "1.1.8-3.1ubuntu3", "dpkg", "source"}, {"pam", "1.1.8-3.1ubuntu3", "dpkg", "source", database.Namespace{}},
{"makedev", "2.3.1-93ubuntu1", "dpkg", "source"}, {"makedev", "2.3.1-93ubuntu1", "dpkg", "source", database.Namespace{}},
{"libpam-runtime", "1.1.8-3.1ubuntu3", "dpkg", "binary"}, {"libpam-runtime", "1.1.8-3.1ubuntu3", "dpkg", "binary", database.Namespace{}},
}, },
}, },
} { } {

View File

@ -122,7 +122,7 @@ func parseRPMOutput(raw string) (rpmPackage *database.Feature, srpmPackage *data
return return
} }
rpmPackage = &database.Feature{name, version, rpm.ParserName, database.BinaryPackage} rpmPackage = &database.Feature{name, version, rpm.ParserName, database.BinaryPackage, database.Namespace{}}
srpmName, srpmVersion, srpmRelease, _, err := parseSourceRPM(srpm) srpmName, srpmVersion, srpmRelease, _, err := parseSourceRPM(srpm)
if err != nil { if err != nil {
log.WithError(err).WithFields(log.Fields{"name": name, "sourcerpm": srpm}).Warning("skipped unparseable package") log.WithError(err).WithFields(log.Fields{"name": name, "sourcerpm": srpm}).Warning("skipped unparseable package")
@ -134,7 +134,7 @@ func parseRPMOutput(raw string) (rpmPackage *database.Feature, srpmPackage *data
return return
} }
srpmPackage = &database.Feature{srpmName, srpmVersion, rpm.ParserName, database.SourcePackage} srpmPackage = &database.Feature{srpmName, srpmVersion, rpm.ParserName, database.SourcePackage, database.Namespace{}}
return return
} }

View File

@ -25,307 +25,307 @@ import (
) )
var expectedBigCaseInfo = []database.Feature{ var expectedBigCaseInfo = []database.Feature{
{"libmount", "2.32.1-1.fc28", "rpm", "binary"}, {"libmount", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
{"libffi", "3.1-16.fc28", "rpm", "binary"}, {"libffi", "3.1-16.fc28", "rpm", "binary", database.Namespace{}},
{"libunistring", "0.9.10-1.fc28", "rpm", "binary"}, {"libunistring", "0.9.10-1.fc28", "rpm", "binary", database.Namespace{}},
{"fedora-repos", "28-5", "rpm", "binary"}, {"fedora-repos", "28-5", "rpm", "binary", database.Namespace{}},
{"libarchive", "3.3.1-4.fc28", "rpm", "source"}, {"libarchive", "3.3.1-4.fc28", "rpm", "source", database.Namespace{}},
{"langpacks", "1.0-12.fc28", "rpm", "source"}, {"langpacks", "1.0-12.fc28", "rpm", "source", database.Namespace{}},
{"readline", "7.0-11.fc28", "rpm", "source"}, {"readline", "7.0-11.fc28", "rpm", "source", database.Namespace{}},
{"gzip", "1.9-3.fc28", "rpm", "source"}, {"gzip", "1.9-3.fc28", "rpm", "source", database.Namespace{}},
{"libverto", "0.3.0-5.fc28", "rpm", "source"}, {"libverto", "0.3.0-5.fc28", "rpm", "source", database.Namespace{}},
{"ncurses-base", "6.1-5.20180224.fc28", "rpm", "binary"}, {"ncurses-base", "6.1-5.20180224.fc28", "rpm", "binary", database.Namespace{}},
{"libfdisk", "2.32.1-1.fc28", "rpm", "binary"}, {"libfdisk", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
{"libselinux", "2.8-1.fc28", "rpm", "source"}, {"libselinux", "2.8-1.fc28", "rpm", "source", database.Namespace{}},
{"nss-util", "3.38.0-1.0.fc28", "rpm", "source"}, {"nss-util", "3.38.0-1.0.fc28", "rpm", "source", database.Namespace{}},
{"mpfr", "3.1.6-1.fc28", "rpm", "source"}, {"mpfr", "3.1.6-1.fc28", "rpm", "source", database.Namespace{}},
{"libunistring", "0.9.10-1.fc28", "rpm", "source"}, {"libunistring", "0.9.10-1.fc28", "rpm", "source", database.Namespace{}},
{"libpcap", "14:1.9.0-1.fc28", "rpm", "binary"}, {"libpcap", "14:1.9.0-1.fc28", "rpm", "binary", database.Namespace{}},
{"libarchive", "3.3.1-4.fc28", "rpm", "binary"}, {"libarchive", "3.3.1-4.fc28", "rpm", "binary", database.Namespace{}},
{"gmp", "1:6.1.2-7.fc28", "rpm", "binary"}, {"gmp", "1:6.1.2-7.fc28", "rpm", "binary", database.Namespace{}},
{"crypto-policies", "20180425-5.git6ad4018.fc28", "rpm", "source"}, {"crypto-policies", "20180425-5.git6ad4018.fc28", "rpm", "source", database.Namespace{}},
{"gzip", "1.9-3.fc28", "rpm", "binary"}, {"gzip", "1.9-3.fc28", "rpm", "binary", database.Namespace{}},
{"fedora-release", "28-2", "rpm", "source"}, {"fedora-release", "28-2", "rpm", "source", database.Namespace{}},
{"zlib", "1.2.11-8.fc28", "rpm", "binary"}, {"zlib", "1.2.11-8.fc28", "rpm", "binary", database.Namespace{}},
{"crypto-policies", "20180425-5.git6ad4018.fc28", "rpm", "binary"}, {"crypto-policies", "20180425-5.git6ad4018.fc28", "rpm", "binary", database.Namespace{}},
{"lz4", "1.8.1.2-4.fc28", "rpm", "source"}, {"lz4", "1.8.1.2-4.fc28", "rpm", "source", database.Namespace{}},
{"keyutils", "1.5.10-6.fc28", "rpm", "source"}, {"keyutils", "1.5.10-6.fc28", "rpm", "source", database.Namespace{}},
{"gpgme", "1.10.0-4.fc28", "rpm", "binary"}, {"gpgme", "1.10.0-4.fc28", "rpm", "binary", database.Namespace{}},
{"libgpg-error", "1.31-1.fc28", "rpm", "binary"}, {"libgpg-error", "1.31-1.fc28", "rpm", "binary", database.Namespace{}},
{"gnutls", "3.6.3-4.fc28", "rpm", "source"}, {"gnutls", "3.6.3-4.fc28", "rpm", "source", database.Namespace{}},
{"coreutils", "8.29-7.fc28", "rpm", "source"}, {"coreutils", "8.29-7.fc28", "rpm", "source", database.Namespace{}},
{"libsepol", "2.8-1.fc28", "rpm", "source"}, {"libsepol", "2.8-1.fc28", "rpm", "source", database.Namespace{}},
{"libssh", "0.8.2-1.fc28", "rpm", "binary"}, {"libssh", "0.8.2-1.fc28", "rpm", "binary", database.Namespace{}},
{"libpwquality", "1.4.0-7.fc28", "rpm", "binary"}, {"libpwquality", "1.4.0-7.fc28", "rpm", "binary", database.Namespace{}},
{"dnf-conf", "2.7.5-12.fc28", "rpm", "binary"}, {"dnf-conf", "2.7.5-12.fc28", "rpm", "binary", database.Namespace{}},
{"basesystem", "11-5.fc28", "rpm", "source"}, {"basesystem", "11-5.fc28", "rpm", "source", database.Namespace{}},
{"setup", "2.11.4-1.fc28", "rpm", "binary"}, {"setup", "2.11.4-1.fc28", "rpm", "binary", database.Namespace{}},
{"libmetalink", "0.1.3-6.fc28", "rpm", "source"}, {"libmetalink", "0.1.3-6.fc28", "rpm", "source", database.Namespace{}},
{"texinfo", "6.5-4.fc28", "rpm", "source"}, {"texinfo", "6.5-4.fc28", "rpm", "source", database.Namespace{}},
{"expat", "2.2.5-3.fc28", "rpm", "source"}, {"expat", "2.2.5-3.fc28", "rpm", "source", database.Namespace{}},
{"ncurses", "6.1-5.20180224.fc28", "rpm", "source"}, {"ncurses", "6.1-5.20180224.fc28", "rpm", "source", database.Namespace{}},
{"libpwquality", "1.4.0-7.fc28", "rpm", "source"}, {"libpwquality", "1.4.0-7.fc28", "rpm", "source", database.Namespace{}},
{"pcre", "8.42-3.fc28", "rpm", "binary"}, {"pcre", "8.42-3.fc28", "rpm", "binary", database.Namespace{}},
{"sssd", "1.16.3-2.fc28", "rpm", "source"}, {"sssd", "1.16.3-2.fc28", "rpm", "source", database.Namespace{}},
{"basesystem", "11-5.fc28", "rpm", "binary"}, {"basesystem", "11-5.fc28", "rpm", "binary", database.Namespace{}},
{"systemd-pam", "238-9.git0e0aa59.fc28", "rpm", "binary"}, {"systemd-pam", "238-9.git0e0aa59.fc28", "rpm", "binary", database.Namespace{}},
{"python3-six", "1.11.0-3.fc28", "rpm", "binary"}, {"python3-six", "1.11.0-3.fc28", "rpm", "binary", database.Namespace{}},
{"libcurl", "7.59.0-6.fc28", "rpm", "binary"}, {"libcurl", "7.59.0-6.fc28", "rpm", "binary", database.Namespace{}},
{"qrencode", "3.4.4-5.fc28", "rpm", "source"}, {"qrencode", "3.4.4-5.fc28", "rpm", "source", database.Namespace{}},
{"xz", "5.2.4-2.fc28", "rpm", "source"}, {"xz", "5.2.4-2.fc28", "rpm", "source", database.Namespace{}},
{"libpkgconf", "1.4.2-1.fc28", "rpm", "binary"}, {"libpkgconf", "1.4.2-1.fc28", "rpm", "binary", database.Namespace{}},
{"libzstd", "1.3.5-1.fc28", "rpm", "binary"}, {"libzstd", "1.3.5-1.fc28", "rpm", "binary", database.Namespace{}},
{"bash", "4.4.23-1.fc28", "rpm", "binary"}, {"bash", "4.4.23-1.fc28", "rpm", "binary", database.Namespace{}},
{"cyrus-sasl", "2.1.27-0.2rc7.fc28", "rpm", "source"}, {"cyrus-sasl", "2.1.27-0.2rc7.fc28", "rpm", "source", database.Namespace{}},
{"ncurses-libs", "6.1-5.20180224.fc28", "rpm", "binary"}, {"ncurses-libs", "6.1-5.20180224.fc28", "rpm", "binary", database.Namespace{}},
{"xz-libs", "5.2.4-2.fc28", "rpm", "binary"}, {"xz-libs", "5.2.4-2.fc28", "rpm", "binary", database.Namespace{}},
{"dbus", "1.12.10-1.fc28", "rpm", "source"}, {"dbus", "1.12.10-1.fc28", "rpm", "source", database.Namespace{}},
{"grep", "3.1-5.fc28", "rpm", "binary"}, {"grep", "3.1-5.fc28", "rpm", "binary", database.Namespace{}},
{"libusbx", "1.0.22-1.fc28", "rpm", "binary"}, {"libusbx", "1.0.22-1.fc28", "rpm", "binary", database.Namespace{}},
{"audit", "2.8.4-2.fc28", "rpm", "source"}, {"audit", "2.8.4-2.fc28", "rpm", "source", database.Namespace{}},
{"sed", "4.5-1.fc28", "rpm", "binary"}, {"sed", "4.5-1.fc28", "rpm", "binary", database.Namespace{}},
{"sqlite", "3.22.0-4.fc28", "rpm", "source"}, {"sqlite", "3.22.0-4.fc28", "rpm", "source", database.Namespace{}},
{"openldap", "2.4.46-3.fc28", "rpm", "binary"}, {"openldap", "2.4.46-3.fc28", "rpm", "binary", database.Namespace{}},
{"gawk", "4.2.1-1.fc28", "rpm", "binary"}, {"gawk", "4.2.1-1.fc28", "rpm", "binary", database.Namespace{}},
{"gpgme", "1.10.0-4.fc28", "rpm", "source"}, {"gpgme", "1.10.0-4.fc28", "rpm", "source", database.Namespace{}},
{"lvm2", "2.02.177-5.fc28", "rpm", "source"}, {"lvm2", "2.02.177-5.fc28", "rpm", "source", database.Namespace{}},
{"nspr", "4.19.0-1.fc28", "rpm", "source"}, {"nspr", "4.19.0-1.fc28", "rpm", "source", database.Namespace{}},
{"libsolv", "0.6.35-1.fc28", "rpm", "source"}, {"libsolv", "0.6.35-1.fc28", "rpm", "source", database.Namespace{}},
{"info", "6.5-4.fc28", "rpm", "binary"}, {"info", "6.5-4.fc28", "rpm", "binary", database.Namespace{}},
{"openssl-libs", "1:1.1.0h-3.fc28", "rpm", "binary"}, {"openssl-libs", "1:1.1.0h-3.fc28", "rpm", "binary", database.Namespace{}},
{"libxcrypt", "4.1.2-1.fc28", "rpm", "binary"}, {"libxcrypt", "4.1.2-1.fc28", "rpm", "binary", database.Namespace{}},
{"libselinux", "2.8-1.fc28", "rpm", "binary"}, {"libselinux", "2.8-1.fc28", "rpm", "binary", database.Namespace{}},
{"libgcc", "8.1.1-5.fc28", "rpm", "binary"}, {"libgcc", "8.1.1-5.fc28", "rpm", "binary", database.Namespace{}},
{"cracklib", "2.9.6-13.fc28", "rpm", "binary"}, {"cracklib", "2.9.6-13.fc28", "rpm", "binary", database.Namespace{}},
{"python3-libs", "3.6.6-1.fc28", "rpm", "binary"}, {"python3-libs", "3.6.6-1.fc28", "rpm", "binary", database.Namespace{}},
{"glibc-langpack-en", "2.27-32.fc28", "rpm", "binary"}, {"glibc-langpack-en", "2.27-32.fc28", "rpm", "binary", database.Namespace{}},
{"json-c", "0.13.1-2.fc28", "rpm", "binary"}, {"json-c", "0.13.1-2.fc28", "rpm", "binary", database.Namespace{}},
{"gnupg2", "2.2.8-1.fc28", "rpm", "source"}, {"gnupg2", "2.2.8-1.fc28", "rpm", "source", database.Namespace{}},
{"openssl", "1:1.1.0h-3.fc28", "rpm", "binary"}, {"openssl", "1:1.1.0h-3.fc28", "rpm", "binary", database.Namespace{}},
{"glibc-common", "2.27-32.fc28", "rpm", "binary"}, {"glibc-common", "2.27-32.fc28", "rpm", "binary", database.Namespace{}},
{"p11-kit-trust", "0.23.12-1.fc28", "rpm", "binary"}, {"p11-kit-trust", "0.23.12-1.fc28", "rpm", "binary", database.Namespace{}},
{"zstd", "1.3.5-1.fc28", "rpm", "source"}, {"zstd", "1.3.5-1.fc28", "rpm", "source", database.Namespace{}},
{"libxml2", "2.9.8-4.fc28", "rpm", "source"}, {"libxml2", "2.9.8-4.fc28", "rpm", "source", database.Namespace{}},
{"dbus", "1:1.12.10-1.fc28", "rpm", "binary"}, {"dbus", "1:1.12.10-1.fc28", "rpm", "binary", database.Namespace{}},
{"ca-certificates", "2018.2.24-1.0.fc28", "rpm", "binary"}, {"ca-certificates", "2018.2.24-1.0.fc28", "rpm", "binary", database.Namespace{}},
{"libcomps", "0.1.8-11.fc28", "rpm", "binary"}, {"libcomps", "0.1.8-11.fc28", "rpm", "binary", database.Namespace{}},
{"nss", "3.38.0-1.0.fc28", "rpm", "binary"}, {"nss", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
{"libcom_err", "1.44.2-0.fc28", "rpm", "binary"}, {"libcom_err", "1.44.2-0.fc28", "rpm", "binary", database.Namespace{}},
{"keyutils-libs", "1.5.10-6.fc28", "rpm", "binary"}, {"keyutils-libs", "1.5.10-6.fc28", "rpm", "binary", database.Namespace{}},
{"libseccomp", "2.3.3-2.fc28", "rpm", "binary"}, {"libseccomp", "2.3.3-2.fc28", "rpm", "binary", database.Namespace{}},
{"elfutils-libs", "0.173-1.fc28", "rpm", "binary"}, {"elfutils-libs", "0.173-1.fc28", "rpm", "binary", database.Namespace{}},
{"libuuid", "2.32.1-1.fc28", "rpm", "binary"}, {"libuuid", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
{"pkgconf", "1.4.2-1.fc28", "rpm", "source"}, {"pkgconf", "1.4.2-1.fc28", "rpm", "source", database.Namespace{}},
{"grep", "3.1-5.fc28", "rpm", "source"}, {"grep", "3.1-5.fc28", "rpm", "source", database.Namespace{}},
{"libpcap", "1.9.0-1.fc28", "rpm", "source"}, {"libpcap", "1.9.0-1.fc28", "rpm", "source", database.Namespace{}},
{"deltarpm", "3.6-25.fc28", "rpm", "binary"}, {"deltarpm", "3.6-25.fc28", "rpm", "binary", database.Namespace{}},
{"krb5-libs", "1.16.1-13.fc28", "rpm", "binary"}, {"krb5-libs", "1.16.1-13.fc28", "rpm", "binary", database.Namespace{}},
{"glibc", "2.27-32.fc28", "rpm", "binary"}, {"glibc", "2.27-32.fc28", "rpm", "binary", database.Namespace{}},
{"libseccomp", "2.3.3-2.fc28", "rpm", "source"}, {"libseccomp", "2.3.3-2.fc28", "rpm", "source", database.Namespace{}},
{"libsemanage", "2.8-2.fc28", "rpm", "binary"}, {"libsemanage", "2.8-2.fc28", "rpm", "binary", database.Namespace{}},
{"openssl-pkcs11", "0.4.8-1.fc28", "rpm", "binary"}, {"openssl-pkcs11", "0.4.8-1.fc28", "rpm", "binary", database.Namespace{}},
{"libxml2", "2.9.8-4.fc28", "rpm", "binary"}, {"libxml2", "2.9.8-4.fc28", "rpm", "binary", database.Namespace{}},
{"e2fsprogs", "1.44.2-0.fc28", "rpm", "source"}, {"e2fsprogs", "1.44.2-0.fc28", "rpm", "source", database.Namespace{}},
{"file-libs", "5.33-7.fc28", "rpm", "binary"}, {"file-libs", "5.33-7.fc28", "rpm", "binary", database.Namespace{}},
{"elfutils-default-yama-scope", "0.173-1.fc28", "rpm", "binary"}, {"elfutils-default-yama-scope", "0.173-1.fc28", "rpm", "binary", database.Namespace{}},
{"glibc", "2.27-32.fc28", "rpm", "source"}, {"glibc", "2.27-32.fc28", "rpm", "source", database.Namespace{}},
{"publicsuffix-list-dafsa", "20180514-1.fc28", "rpm", "binary"}, {"publicsuffix-list-dafsa", "20180514-1.fc28", "rpm", "binary", database.Namespace{}},
{"popt", "1.16-14.fc28", "rpm", "binary"}, {"popt", "1.16-14.fc28", "rpm", "binary", database.Namespace{}},
{"libnsl2", "1.2.0-2.20180605git4a062cf.fc28", "rpm", "binary"}, {"libnsl2", "1.2.0-2.20180605git4a062cf.fc28", "rpm", "binary", database.Namespace{}},
{"lua-libs", "5.3.4-10.fc28", "rpm", "binary"}, {"lua-libs", "5.3.4-10.fc28", "rpm", "binary", database.Namespace{}},
{"libsemanage", "2.8-2.fc28", "rpm", "source"}, {"libsemanage", "2.8-2.fc28", "rpm", "source", database.Namespace{}},
{"glibc-minimal-langpack", "2.27-32.fc28", "rpm", "binary"}, {"glibc-minimal-langpack", "2.27-32.fc28", "rpm", "binary", database.Namespace{}},
{"attr", "2.4.48-3.fc28", "rpm", "source"}, {"attr", "2.4.48-3.fc28", "rpm", "source", database.Namespace{}},
{"gdbm", "1.14.1-4.fc28", "rpm", "source"}, {"gdbm", "1.14.1-4.fc28", "rpm", "source", database.Namespace{}},
{"pkgconf", "1.4.2-1.fc28", "rpm", "binary"}, {"pkgconf", "1.4.2-1.fc28", "rpm", "binary", database.Namespace{}},
{"acl", "2.2.53-1.fc28", "rpm", "source"}, {"acl", "2.2.53-1.fc28", "rpm", "source", database.Namespace{}},
{"gnutls", "3.6.3-4.fc28", "rpm", "binary"}, {"gnutls", "3.6.3-4.fc28", "rpm", "binary", database.Namespace{}},
{"fedora-repos", "28-5", "rpm", "source"}, {"fedora-repos", "28-5", "rpm", "source", database.Namespace{}},
{"python3-pip", "9.0.3-2.fc28", "rpm", "binary"}, {"python3-pip", "9.0.3-2.fc28", "rpm", "binary", database.Namespace{}},
{"libnsl2", "1.2.0-2.20180605git4a062cf.fc28", "rpm", "source"}, {"libnsl2", "1.2.0-2.20180605git4a062cf.fc28", "rpm", "source", database.Namespace{}},
{"rpm", "4.14.1-9.fc28", "rpm", "binary"}, {"rpm", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
{"libutempter", "1.1.6-14.fc28", "rpm", "source"}, {"libutempter", "1.1.6-14.fc28", "rpm", "source", database.Namespace{}},
{"libdnf", "0.11.1-3.fc28", "rpm", "source"}, {"libdnf", "0.11.1-3.fc28", "rpm", "source", database.Namespace{}},
{"vim-minimal", "2:8.1.328-1.fc28", "rpm", "binary"}, {"vim-minimal", "2:8.1.328-1.fc28", "rpm", "binary", database.Namespace{}},
{"tzdata", "2018e-1.fc28", "rpm", "binary"}, {"tzdata", "2018e-1.fc28", "rpm", "binary", database.Namespace{}},
{"nettle", "3.4-2.fc28", "rpm", "binary"}, {"nettle", "3.4-2.fc28", "rpm", "binary", database.Namespace{}},
{"python-pip", "9.0.3-2.fc28", "rpm", "source"}, {"python-pip", "9.0.3-2.fc28", "rpm", "source", database.Namespace{}},
{"python-six", "1.11.0-3.fc28", "rpm", "source"}, {"python-six", "1.11.0-3.fc28", "rpm", "source", database.Namespace{}},
{"diffutils", "3.6-4.fc28", "rpm", "binary"}, {"diffutils", "3.6-4.fc28", "rpm", "binary", database.Namespace{}},
{"rpm-plugin-selinux", "4.14.1-9.fc28", "rpm", "binary"}, {"rpm-plugin-selinux", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
{"shadow-utils", "2:4.6-1.fc28", "rpm", "binary"}, {"shadow-utils", "2:4.6-1.fc28", "rpm", "binary", database.Namespace{}},
{"pkgconf-pkg-config", "1.4.2-1.fc28", "rpm", "binary"}, {"pkgconf-pkg-config", "1.4.2-1.fc28", "rpm", "binary", database.Namespace{}},
{"cracklib-dicts", "2.9.6-13.fc28", "rpm", "binary"}, {"cracklib-dicts", "2.9.6-13.fc28", "rpm", "binary", database.Namespace{}},
{"libblkid", "2.32.1-1.fc28", "rpm", "binary"}, {"libblkid", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
{"python-setuptools", "39.2.0-6.fc28", "rpm", "source"}, {"python-setuptools", "39.2.0-6.fc28", "rpm", "source", database.Namespace{}},
{"libsss_idmap", "1.16.3-2.fc28", "rpm", "binary"}, {"libsss_idmap", "1.16.3-2.fc28", "rpm", "binary", database.Namespace{}},
{"libksba", "1.3.5-7.fc28", "rpm", "source"}, {"libksba", "1.3.5-7.fc28", "rpm", "source", database.Namespace{}},
{"sssd-client", "1.16.3-2.fc28", "rpm", "binary"}, {"sssd-client", "1.16.3-2.fc28", "rpm", "binary", database.Namespace{}},
{"curl", "7.59.0-6.fc28", "rpm", "binary"}, {"curl", "7.59.0-6.fc28", "rpm", "binary", database.Namespace{}},
{"pam", "1.3.1-1.fc28", "rpm", "binary"}, {"pam", "1.3.1-1.fc28", "rpm", "binary", database.Namespace{}},
{"libsigsegv", "2.11-5.fc28", "rpm", "binary"}, {"libsigsegv", "2.11-5.fc28", "rpm", "binary", database.Namespace{}},
{"langpacks-en", "1.0-12.fc28", "rpm", "binary"}, {"langpacks-en", "1.0-12.fc28", "rpm", "binary", database.Namespace{}},
{"nss-softokn-freebl", "3.38.0-1.0.fc28", "rpm", "binary"}, {"nss-softokn-freebl", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
{"glib2", "2.56.1-4.fc28", "rpm", "binary"}, {"glib2", "2.56.1-4.fc28", "rpm", "binary", database.Namespace{}},
{"python3-gobject-base", "3.28.3-1.fc28", "rpm", "binary"}, {"python3-gobject-base", "3.28.3-1.fc28", "rpm", "binary", database.Namespace{}},
{"libffi", "3.1-16.fc28", "rpm", "source"}, {"libffi", "3.1-16.fc28", "rpm", "source", database.Namespace{}},
{"libmodulemd", "1.6.2-2.fc28", "rpm", "source"}, {"libmodulemd", "1.6.2-2.fc28", "rpm", "source", database.Namespace{}},
{"openssl", "1.1.0h-3.fc28", "rpm", "source"}, {"openssl", "1.1.0h-3.fc28", "rpm", "source", database.Namespace{}},
{"libyaml", "0.1.7-5.fc28", "rpm", "source"}, {"libyaml", "0.1.7-5.fc28", "rpm", "source", database.Namespace{}},
{"pam", "1.3.1-1.fc28", "rpm", "source"}, {"pam", "1.3.1-1.fc28", "rpm", "source", database.Namespace{}},
{"iptables", "1.6.2-3.fc28", "rpm", "source"}, {"iptables", "1.6.2-3.fc28", "rpm", "source", database.Namespace{}},
{"util-linux", "2.32.1-1.fc28", "rpm", "source"}, {"util-linux", "2.32.1-1.fc28", "rpm", "source", database.Namespace{}},
{"libsmartcols", "2.32.1-1.fc28", "rpm", "binary"}, {"libsmartcols", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
{"dnf", "2.7.5-12.fc28", "rpm", "binary"}, {"dnf", "2.7.5-12.fc28", "rpm", "binary", database.Namespace{}},
{"glib2", "2.56.1-4.fc28", "rpm", "source"}, {"glib2", "2.56.1-4.fc28", "rpm", "source", database.Namespace{}},
{"lua", "5.3.4-10.fc28", "rpm", "source"}, {"lua", "5.3.4-10.fc28", "rpm", "source", database.Namespace{}},
{"nss-softokn", "3.38.0-1.0.fc28", "rpm", "source"}, {"nss-softokn", "3.38.0-1.0.fc28", "rpm", "source", database.Namespace{}},
{"python3-dnf", "2.7.5-12.fc28", "rpm", "binary"}, {"python3-dnf", "2.7.5-12.fc28", "rpm", "binary", database.Namespace{}},
{"filesystem", "3.8-2.fc28", "rpm", "binary"}, {"filesystem", "3.8-2.fc28", "rpm", "binary", database.Namespace{}},
{"libsss_nss_idmap", "1.16.3-2.fc28", "rpm", "binary"}, {"libsss_nss_idmap", "1.16.3-2.fc28", "rpm", "binary", database.Namespace{}},
{"pcre2", "10.31-10.fc28", "rpm", "source"}, {"pcre2", "10.31-10.fc28", "rpm", "source", database.Namespace{}},
{"libyaml", "0.1.7-5.fc28", "rpm", "binary"}, {"libyaml", "0.1.7-5.fc28", "rpm", "binary", database.Namespace{}},
{"python3-rpm", "4.14.1-9.fc28", "rpm", "binary"}, {"python3-rpm", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
{"zlib", "1.2.11-8.fc28", "rpm", "source"}, {"zlib", "1.2.11-8.fc28", "rpm", "source", database.Namespace{}},
{"libutempter", "1.1.6-14.fc28", "rpm", "binary"}, {"libutempter", "1.1.6-14.fc28", "rpm", "binary", database.Namespace{}},
{"pcre2", "10.31-10.fc28", "rpm", "binary"}, {"pcre2", "10.31-10.fc28", "rpm", "binary", database.Namespace{}},
{"libtirpc", "1.0.3-3.rc2.fc28", "rpm", "source"}, {"libtirpc", "1.0.3-3.rc2.fc28", "rpm", "source", database.Namespace{}},
{"pkgconf-m4", "1.4.2-1.fc28", "rpm", "binary"}, {"pkgconf-m4", "1.4.2-1.fc28", "rpm", "binary", database.Namespace{}},
{"libreport", "2.9.5-1.fc28", "rpm", "source"}, {"libreport", "2.9.5-1.fc28", "rpm", "source", database.Namespace{}},
{"vim", "8.1.328-1.fc28", "rpm", "source"}, {"vim", "8.1.328-1.fc28", "rpm", "source", database.Namespace{}},
{"file", "5.33-7.fc28", "rpm", "source"}, {"file", "5.33-7.fc28", "rpm", "source", database.Namespace{}},
{"shadow-utils", "4.6-1.fc28", "rpm", "source"}, {"shadow-utils", "4.6-1.fc28", "rpm", "source", database.Namespace{}},
{"sqlite-libs", "3.22.0-4.fc28", "rpm", "binary"}, {"sqlite-libs", "3.22.0-4.fc28", "rpm", "binary", database.Namespace{}},
{"setup", "2.11.4-1.fc28", "rpm", "source"}, {"setup", "2.11.4-1.fc28", "rpm", "source", database.Namespace{}},
{"gcc", "8.1.1-5.fc28", "rpm", "source"}, {"gcc", "8.1.1-5.fc28", "rpm", "source", database.Namespace{}},
{"mpfr", "3.1.6-1.fc28", "rpm", "binary"}, {"mpfr", "3.1.6-1.fc28", "rpm", "binary", database.Namespace{}},
{"device-mapper", "1.02.146-5.fc28", "rpm", "binary"}, {"device-mapper", "1.02.146-5.fc28", "rpm", "binary", database.Namespace{}},
{"p11-kit", "0.23.12-1.fc28", "rpm", "source"}, {"p11-kit", "0.23.12-1.fc28", "rpm", "source", database.Namespace{}},
{"fedora-release", "28-2", "rpm", "binary"}, {"fedora-release", "28-2", "rpm", "binary", database.Namespace{}},
{"libnghttp2", "1.32.1-1.fc28", "rpm", "binary"}, {"libnghttp2", "1.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
{"libcap-ng", "0.7.9-4.fc28", "rpm", "source"}, {"libcap-ng", "0.7.9-4.fc28", "rpm", "source", database.Namespace{}},
{"iptables-libs", "1.6.2-3.fc28", "rpm", "binary"}, {"iptables-libs", "1.6.2-3.fc28", "rpm", "binary", database.Namespace{}},
{"audit-libs", "2.8.4-2.fc28", "rpm", "binary"}, {"audit-libs", "2.8.4-2.fc28", "rpm", "binary", database.Namespace{}},
{"libsigsegv", "2.11-5.fc28", "rpm", "source"}, {"libsigsegv", "2.11-5.fc28", "rpm", "source", database.Namespace{}},
{"rootfiles", "8.1-22.fc28", "rpm", "source"}, {"rootfiles", "8.1-22.fc28", "rpm", "source", database.Namespace{}},
{"kmod-libs", "25-2.fc28", "rpm", "binary"}, {"kmod-libs", "25-2.fc28", "rpm", "binary", database.Namespace{}},
{"lz4-libs", "1.8.1.2-4.fc28", "rpm", "binary"}, {"lz4-libs", "1.8.1.2-4.fc28", "rpm", "binary", database.Namespace{}},
{"libassuan", "2.5.1-3.fc28", "rpm", "source"}, {"libassuan", "2.5.1-3.fc28", "rpm", "source", database.Namespace{}},
{"p11-kit", "0.23.12-1.fc28", "rpm", "binary"}, {"p11-kit", "0.23.12-1.fc28", "rpm", "binary", database.Namespace{}},
{"nss-sysinit", "3.38.0-1.0.fc28", "rpm", "binary"}, {"nss-sysinit", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
{"libcap-ng", "0.7.9-4.fc28", "rpm", "binary"}, {"libcap-ng", "0.7.9-4.fc28", "rpm", "binary", database.Namespace{}},
{"bash", "4.4.23-1.fc28", "rpm", "source"}, {"bash", "4.4.23-1.fc28", "rpm", "source", database.Namespace{}},
{"pygobject3", "3.28.3-1.fc28", "rpm", "source"}, {"pygobject3", "3.28.3-1.fc28", "rpm", "source", database.Namespace{}},
{"dnf-yum", "2.7.5-12.fc28", "rpm", "binary"}, {"dnf-yum", "2.7.5-12.fc28", "rpm", "binary", database.Namespace{}},
{"nss-softokn", "3.38.0-1.0.fc28", "rpm", "binary"}, {"nss-softokn", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
{"expat", "2.2.5-3.fc28", "rpm", "binary"}, {"expat", "2.2.5-3.fc28", "rpm", "binary", database.Namespace{}},
{"libassuan", "2.5.1-3.fc28", "rpm", "binary"}, {"libassuan", "2.5.1-3.fc28", "rpm", "binary", database.Namespace{}},
{"libdb", "5.3.28-30.fc28", "rpm", "binary"}, {"libdb", "5.3.28-30.fc28", "rpm", "binary", database.Namespace{}},
{"tar", "2:1.30-3.fc28", "rpm", "binary"}, {"tar", "2:1.30-3.fc28", "rpm", "binary", database.Namespace{}},
{"sed", "4.5-1.fc28", "rpm", "source"}, {"sed", "4.5-1.fc28", "rpm", "source", database.Namespace{}},
{"libmetalink", "0.1.3-6.fc28", "rpm", "binary"}, {"libmetalink", "0.1.3-6.fc28", "rpm", "binary", database.Namespace{}},
{"python-smartcols", "0.3.0-2.fc28", "rpm", "source"}, {"python-smartcols", "0.3.0-2.fc28", "rpm", "source", database.Namespace{}},
{"systemd", "238-9.git0e0aa59.fc28", "rpm", "source"}, {"systemd", "238-9.git0e0aa59.fc28", "rpm", "source", database.Namespace{}},
{"python-iniparse", "0.4-30.fc28", "rpm", "source"}, {"python-iniparse", "0.4-30.fc28", "rpm", "source", database.Namespace{}},
{"libsepol", "2.8-1.fc28", "rpm", "binary"}, {"libsepol", "2.8-1.fc28", "rpm", "binary", database.Namespace{}},
{"libattr", "2.4.48-3.fc28", "rpm", "binary"}, {"libattr", "2.4.48-3.fc28", "rpm", "binary", database.Namespace{}},
{"python3-smartcols", "0.3.0-2.fc28", "rpm", "binary"}, {"python3-smartcols", "0.3.0-2.fc28", "rpm", "binary", database.Namespace{}},
{"libdb", "5.3.28-30.fc28", "rpm", "source"}, {"libdb", "5.3.28-30.fc28", "rpm", "source", database.Namespace{}},
{"libmodulemd", "1.6.2-2.fc28", "rpm", "binary"}, {"libmodulemd", "1.6.2-2.fc28", "rpm", "binary", database.Namespace{}},
{"python3-hawkey", "0.11.1-3.fc28", "rpm", "binary"}, {"python3-hawkey", "0.11.1-3.fc28", "rpm", "binary", database.Namespace{}},
{"dbus-libs", "1:1.12.10-1.fc28", "rpm", "binary"}, {"dbus-libs", "1:1.12.10-1.fc28", "rpm", "binary", database.Namespace{}},
{"chkconfig", "1.10-4.fc28", "rpm", "source"}, {"chkconfig", "1.10-4.fc28", "rpm", "source", database.Namespace{}},
{"libargon2", "20161029-5.fc28", "rpm", "binary"}, {"libargon2", "20161029-5.fc28", "rpm", "binary", database.Namespace{}},
{"openssl-pkcs11", "0.4.8-1.fc28", "rpm", "source"}, {"openssl-pkcs11", "0.4.8-1.fc28", "rpm", "source", database.Namespace{}},
{"libusbx", "1.0.22-1.fc28", "rpm", "source"}, {"libusbx", "1.0.22-1.fc28", "rpm", "source", database.Namespace{}},
{"python3-setuptools", "39.2.0-6.fc28", "rpm", "binary"}, {"python3-setuptools", "39.2.0-6.fc28", "rpm", "binary", database.Namespace{}},
{"chkconfig", "1.10-4.fc28", "rpm", "binary"}, {"chkconfig", "1.10-4.fc28", "rpm", "binary", database.Namespace{}},
{"openldap", "2.4.46-3.fc28", "rpm", "source"}, {"openldap", "2.4.46-3.fc28", "rpm", "source", database.Namespace{}},
{"bzip2", "1.0.6-26.fc28", "rpm", "source"}, {"bzip2", "1.0.6-26.fc28", "rpm", "source", database.Namespace{}},
{"npth", "1.5-4.fc28", "rpm", "source"}, {"npth", "1.5-4.fc28", "rpm", "source", database.Namespace{}},
{"libtirpc", "1.0.3-3.rc2.fc28", "rpm", "binary"}, {"libtirpc", "1.0.3-3.rc2.fc28", "rpm", "binary", database.Namespace{}},
{"util-linux", "2.32.1-1.fc28", "rpm", "binary"}, {"util-linux", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
{"nss", "3.38.0-1.0.fc28", "rpm", "source"}, {"nss", "3.38.0-1.0.fc28", "rpm", "source", database.Namespace{}},
{"elfutils", "0.173-1.fc28", "rpm", "source"}, {"elfutils", "0.173-1.fc28", "rpm", "source", database.Namespace{}},
{"libcomps", "0.1.8-11.fc28", "rpm", "source"}, {"libcomps", "0.1.8-11.fc28", "rpm", "source", database.Namespace{}},
{"libxcrypt", "4.1.2-1.fc28", "rpm", "source"}, {"libxcrypt", "4.1.2-1.fc28", "rpm", "source", database.Namespace{}},
{"gnupg2", "2.2.8-1.fc28", "rpm", "binary"}, {"gnupg2", "2.2.8-1.fc28", "rpm", "binary", database.Namespace{}},
{"libdnf", "0.11.1-3.fc28", "rpm", "binary"}, {"libdnf", "0.11.1-3.fc28", "rpm", "binary", database.Namespace{}},
{"cracklib", "2.9.6-13.fc28", "rpm", "source"}, {"cracklib", "2.9.6-13.fc28", "rpm", "source", database.Namespace{}},
{"libidn2", "2.0.5-1.fc28", "rpm", "source"}, {"libidn2", "2.0.5-1.fc28", "rpm", "source", database.Namespace{}},
{"bzip2-libs", "1.0.6-26.fc28", "rpm", "binary"}, {"bzip2-libs", "1.0.6-26.fc28", "rpm", "binary", database.Namespace{}},
{"json-c", "0.13.1-2.fc28", "rpm", "source"}, {"json-c", "0.13.1-2.fc28", "rpm", "source", database.Namespace{}},
{"gdbm", "1:1.14.1-4.fc28", "rpm", "binary"}, {"gdbm", "1:1.14.1-4.fc28", "rpm", "binary", database.Namespace{}},
{"pcre", "8.42-3.fc28", "rpm", "source"}, {"pcre", "8.42-3.fc28", "rpm", "source", database.Namespace{}},
{"systemd", "238-9.git0e0aa59.fc28", "rpm", "binary"}, {"systemd", "238-9.git0e0aa59.fc28", "rpm", "binary", database.Namespace{}},
{"cryptsetup-libs", "2.0.4-1.fc28", "rpm", "binary"}, {"cryptsetup-libs", "2.0.4-1.fc28", "rpm", "binary", database.Namespace{}},
{"dnf", "2.7.5-12.fc28", "rpm", "source"}, {"dnf", "2.7.5-12.fc28", "rpm", "source", database.Namespace{}},
{"ca-certificates", "2018.2.24-1.0.fc28", "rpm", "source"}, {"ca-certificates", "2018.2.24-1.0.fc28", "rpm", "source", database.Namespace{}},
{"libidn2", "2.0.5-1.fc28", "rpm", "binary"}, {"libidn2", "2.0.5-1.fc28", "rpm", "binary", database.Namespace{}},
{"libpsl", "0.20.2-2.fc28", "rpm", "binary"}, {"libpsl", "0.20.2-2.fc28", "rpm", "binary", database.Namespace{}},
{"gdbm-libs", "1:1.14.1-4.fc28", "rpm", "binary"}, {"gdbm-libs", "1:1.14.1-4.fc28", "rpm", "binary", database.Namespace{}},
{"kmod", "25-2.fc28", "rpm", "source"}, {"kmod", "25-2.fc28", "rpm", "source", database.Namespace{}},
{"libreport-filesystem", "2.9.5-1.fc28", "rpm", "binary"}, {"libreport-filesystem", "2.9.5-1.fc28", "rpm", "binary", database.Namespace{}},
{"ima-evm-utils", "1.1-2.fc28", "rpm", "source"}, {"ima-evm-utils", "1.1-2.fc28", "rpm", "source", database.Namespace{}},
{"nghttp2", "1.32.1-1.fc28", "rpm", "source"}, {"nghttp2", "1.32.1-1.fc28", "rpm", "source", database.Namespace{}},
{"cyrus-sasl-lib", "2.1.27-0.2rc7.fc28", "rpm", "binary"}, {"cyrus-sasl-lib", "2.1.27-0.2rc7.fc28", "rpm", "binary", database.Namespace{}},
{"libsolv", "0.6.35-1.fc28", "rpm", "binary"}, {"libsolv", "0.6.35-1.fc28", "rpm", "binary", database.Namespace{}},
{"cryptsetup", "2.0.4-1.fc28", "rpm", "source"}, {"cryptsetup", "2.0.4-1.fc28", "rpm", "source", database.Namespace{}},
{"filesystem", "3.8-2.fc28", "rpm", "source"}, {"filesystem", "3.8-2.fc28", "rpm", "source", database.Namespace{}},
{"libcap", "2.25-9.fc28", "rpm", "source"}, {"libcap", "2.25-9.fc28", "rpm", "source", database.Namespace{}},
{"libpsl", "0.20.2-2.fc28", "rpm", "source"}, {"libpsl", "0.20.2-2.fc28", "rpm", "source", database.Namespace{}},
{"deltarpm", "3.6-25.fc28", "rpm", "source"}, {"deltarpm", "3.6-25.fc28", "rpm", "source", database.Namespace{}},
{"fedora-gpg-keys", "28-5", "rpm", "binary"}, {"fedora-gpg-keys", "28-5", "rpm", "binary", database.Namespace{}},
{"ima-evm-utils", "1.1-2.fc28", "rpm", "binary"}, {"ima-evm-utils", "1.1-2.fc28", "rpm", "binary", database.Namespace{}},
{"nss-tools", "3.38.0-1.0.fc28", "rpm", "binary"}, {"nss-tools", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
{"libtasn1", "4.13-2.fc28", "rpm", "source"}, {"libtasn1", "4.13-2.fc28", "rpm", "source", database.Namespace{}},
{"elfutils-libelf", "0.173-1.fc28", "rpm", "binary"}, {"elfutils-libelf", "0.173-1.fc28", "rpm", "binary", database.Namespace{}},
{"device-mapper-libs", "1.02.146-5.fc28", "rpm", "binary"}, {"device-mapper-libs", "1.02.146-5.fc28", "rpm", "binary", database.Namespace{}},
{"gobject-introspection", "1.56.1-1.fc28", "rpm", "source"}, {"gobject-introspection", "1.56.1-1.fc28", "rpm", "source", database.Namespace{}},
{"publicsuffix-list", "20180514-1.fc28", "rpm", "source"}, {"publicsuffix-list", "20180514-1.fc28", "rpm", "source", database.Namespace{}},
{"libcap", "2.25-9.fc28", "rpm", "binary"}, {"libcap", "2.25-9.fc28", "rpm", "binary", database.Namespace{}},
{"librepo", "1.8.1-7.fc28", "rpm", "binary"}, {"librepo", "1.8.1-7.fc28", "rpm", "binary", database.Namespace{}},
{"rpm-sign-libs", "4.14.1-9.fc28", "rpm", "binary"}, {"rpm-sign-libs", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
{"coreutils-single", "8.29-7.fc28", "rpm", "binary"}, {"coreutils-single", "8.29-7.fc28", "rpm", "binary", database.Namespace{}},
{"libacl", "2.2.53-1.fc28", "rpm", "binary"}, {"libacl", "2.2.53-1.fc28", "rpm", "binary", database.Namespace{}},
{"popt", "1.16-14.fc28", "rpm", "source"}, {"popt", "1.16-14.fc28", "rpm", "source", database.Namespace{}},
{"libtasn1", "4.13-2.fc28", "rpm", "binary"}, {"libtasn1", "4.13-2.fc28", "rpm", "binary", database.Namespace{}},
{"gawk", "4.2.1-1.fc28", "rpm", "source"}, {"gawk", "4.2.1-1.fc28", "rpm", "source", database.Namespace{}},
{"diffutils", "3.6-4.fc28", "rpm", "source"}, {"diffutils", "3.6-4.fc28", "rpm", "source", database.Namespace{}},
{"libgpg-error", "1.31-1.fc28", "rpm", "source"}, {"libgpg-error", "1.31-1.fc28", "rpm", "source", database.Namespace{}},
{"libdb-utils", "5.3.28-30.fc28", "rpm", "binary"}, {"libdb-utils", "5.3.28-30.fc28", "rpm", "binary", database.Namespace{}},
{"python3-iniparse", "0.4-30.fc28", "rpm", "binary"}, {"python3-iniparse", "0.4-30.fc28", "rpm", "binary", database.Namespace{}},
{"acl", "2.2.53-1.fc28", "rpm", "binary"}, {"acl", "2.2.53-1.fc28", "rpm", "binary", database.Namespace{}},
{"libssh", "0.8.2-1.fc28", "rpm", "source"}, {"libssh", "0.8.2-1.fc28", "rpm", "source", database.Namespace{}},
{"python3-librepo", "1.8.1-7.fc28", "rpm", "binary"}, {"python3-librepo", "1.8.1-7.fc28", "rpm", "binary", database.Namespace{}},
{"gobject-introspection", "1.56.1-1.fc28", "rpm", "binary"}, {"gobject-introspection", "1.56.1-1.fc28", "rpm", "binary", database.Namespace{}},
{"rpm", "4.14.1-9.fc28", "rpm", "source"}, {"rpm", "4.14.1-9.fc28", "rpm", "source", database.Namespace{}},
{"libgcrypt", "1.8.3-1.fc28", "rpm", "source"}, {"libgcrypt", "1.8.3-1.fc28", "rpm", "source", database.Namespace{}},
{"curl", "7.59.0-6.fc28", "rpm", "source"}, {"curl", "7.59.0-6.fc28", "rpm", "source", database.Namespace{}},
{"tzdata", "2018e-1.fc28", "rpm", "source"}, {"tzdata", "2018e-1.fc28", "rpm", "source", database.Namespace{}},
{"krb5", "1.16.1-13.fc28", "rpm", "source"}, {"krb5", "1.16.1-13.fc28", "rpm", "source", database.Namespace{}},
{"librepo", "1.8.1-7.fc28", "rpm", "source"}, {"librepo", "1.8.1-7.fc28", "rpm", "source", database.Namespace{}},
{"python3-gpg", "1.10.0-4.fc28", "rpm", "binary"}, {"python3-gpg", "1.10.0-4.fc28", "rpm", "binary", database.Namespace{}},
{"nettle", "3.4-2.fc28", "rpm", "source"}, {"nettle", "3.4-2.fc28", "rpm", "source", database.Namespace{}},
{"libgcrypt", "1.8.3-1.fc28", "rpm", "binary"}, {"libgcrypt", "1.8.3-1.fc28", "rpm", "binary", database.Namespace{}},
{"python3", "3.6.6-1.fc28", "rpm", "binary"}, {"python3", "3.6.6-1.fc28", "rpm", "binary", database.Namespace{}},
{"python3-libcomps", "0.1.8-11.fc28", "rpm", "binary"}, {"python3-libcomps", "0.1.8-11.fc28", "rpm", "binary", database.Namespace{}},
{"rpm-libs", "4.14.1-9.fc28", "rpm", "binary"}, {"rpm-libs", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
{"nspr", "4.19.0-1.fc28", "rpm", "binary"}, {"nspr", "4.19.0-1.fc28", "rpm", "binary", database.Namespace{}},
{"argon2", "20161029-5.fc28", "rpm", "source"}, {"argon2", "20161029-5.fc28", "rpm", "source", database.Namespace{}},
{"tar", "1.30-3.fc28", "rpm", "source"}, {"tar", "1.30-3.fc28", "rpm", "source", database.Namespace{}},
{"qrencode-libs", "3.4.4-5.fc28", "rpm", "binary"}, {"qrencode-libs", "3.4.4-5.fc28", "rpm", "binary", database.Namespace{}},
{"gmp", "6.1.2-7.fc28", "rpm", "source"}, {"gmp", "6.1.2-7.fc28", "rpm", "source", database.Namespace{}},
{"libverto", "0.3.0-5.fc28", "rpm", "binary"}, {"libverto", "0.3.0-5.fc28", "rpm", "binary", database.Namespace{}},
{"python3", "3.6.6-1.fc28", "rpm", "source"}, {"python3", "3.6.6-1.fc28", "rpm", "source", database.Namespace{}},
{"libksba", "1.3.5-7.fc28", "rpm", "binary"}, {"libksba", "1.3.5-7.fc28", "rpm", "binary", database.Namespace{}},
{"readline", "7.0-11.fc28", "rpm", "binary"}, {"readline", "7.0-11.fc28", "rpm", "binary", database.Namespace{}},
{"rpm-build-libs", "4.14.1-9.fc28", "rpm", "binary"}, {"rpm-build-libs", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
{"npth", "1.5-4.fc28", "rpm", "binary"}, {"npth", "1.5-4.fc28", "rpm", "binary", database.Namespace{}},
{"rootfiles", "8.1-22.fc28", "rpm", "binary"}, {"rootfiles", "8.1-22.fc28", "rpm", "binary", database.Namespace{}},
{"rpm-plugin-systemd-inhibit", "4.14.1-9.fc28", "rpm", "binary"}, {"rpm-plugin-systemd-inhibit", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
{"systemd-libs", "238-9.git0e0aa59.fc28", "rpm", "binary"}, {"systemd-libs", "238-9.git0e0aa59.fc28", "rpm", "binary", database.Namespace{}},
{"nss-util", "3.38.0-1.0.fc28", "rpm", "binary"}, {"nss-util", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
} }
func TestRpmFeatureDetection(t *testing.T) { func TestRpmFeatureDetection(t *testing.T) {
@ -334,10 +334,10 @@ func TestRpmFeatureDetection(t *testing.T) {
"valid small case", "valid small case",
map[string]string{"var/lib/rpm/Packages": "rpm/testdata/valid"}, map[string]string{"var/lib/rpm/Packages": "rpm/testdata/valid"},
[]database.Feature{ []database.Feature{
{"centos-release", "7-1.1503.el7.centos.2.8", "rpm", "binary"}, {"centos-release", "7-1.1503.el7.centos.2.8", "rpm", "binary", database.Namespace{}},
{"filesystem", "3.2-18.el7", "rpm", "binary"}, {"filesystem", "3.2-18.el7", "rpm", "binary", database.Namespace{}},
{"centos-release", "7-1.1503.el7.centos.2.8", "rpm", "source"}, {"centos-release", "7-1.1503.el7.centos.2.8", "rpm", "source", database.Namespace{}},
{"filesystem", "3.2-18.el7", "rpm", "source"}, {"filesystem", "3.2-18.el7", "rpm", "source", database.Namespace{}},
}, },
}, },
{ {