Move PotentialNamespace to LayerFeature
PotentialNamespace should be in LayerFeature instead of Feature struct. Feature extractors were updated to return LayerFeature instead of Feature.
This commit is contained in:
parent
44c4a6f3ce
commit
60ef726677
@ -60,6 +60,19 @@ func ConvertFeatureSetToFeatures(features mapset.Set) []Feature {
|
|||||||
return uniqueFeatures
|
return uniqueFeatures
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ConvertFeatureSerToLayerFeatures(features mapset.Set) []LayerFeature {
|
||||||
|
uniqueLayerFeatures := make([]LayerFeature, 0, features.Cardinality())
|
||||||
|
for f := range features.Iter() {
|
||||||
|
feature := f.(Feature)
|
||||||
|
layerFeature := LayerFeature{
|
||||||
|
Feature: feature,
|
||||||
|
}
|
||||||
|
uniqueLayerFeatures = append(uniqueLayerFeatures, layerFeature)
|
||||||
|
}
|
||||||
|
|
||||||
|
return uniqueLayerFeatures
|
||||||
|
}
|
||||||
|
|
||||||
// FindKeyValueAndRollback wraps session FindKeyValue function with begin and
|
// FindKeyValueAndRollback wraps session FindKeyValue function with begin and
|
||||||
// roll back.
|
// roll back.
|
||||||
func FindKeyValueAndRollback(datastore Datastore, key string) (value string, ok bool, err error) {
|
func FindKeyValueAndRollback(datastore Datastore, key string) (value string, ok bool, err error) {
|
||||||
|
@ -129,7 +129,9 @@ func (l *Layer) GetNamespaces() []Namespace {
|
|||||||
namespaces = append(namespaces, ns.Namespace)
|
namespaces = append(namespaces, ns.Namespace)
|
||||||
}
|
}
|
||||||
for _, f := range l.Features {
|
for _, f := range l.Features {
|
||||||
namespaces = append(namespaces, f.Feature.PotentialNamespace)
|
if f.PotentialNamespace.Valid() {
|
||||||
|
namespaces = append(namespaces, f.PotentialNamespace)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return namespaces
|
return namespaces
|
||||||
@ -148,7 +150,8 @@ type LayerFeature struct {
|
|||||||
Feature `json:"feature"`
|
Feature `json:"feature"`
|
||||||
|
|
||||||
// By is the detector found the feature.
|
// By is the detector found the feature.
|
||||||
By Detector `json:"by"`
|
By Detector `json:"by"`
|
||||||
|
PotentialNamespace Namespace `json:"potentialNamespace"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Namespace is the contextual information around features.
|
// Namespace is the contextual information around features.
|
||||||
@ -163,6 +166,13 @@ func NewNamespace(name string, versionFormat string) *Namespace {
|
|||||||
return &Namespace{name, versionFormat}
|
return &Namespace{name, versionFormat}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ns *Namespace) Valid() bool {
|
||||||
|
if ns.Name == "" || ns.VersionFormat == "" {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
// Feature represents a package detected in a layer but the namespace is not
|
// Feature represents a package detected in a layer but the namespace is not
|
||||||
// determined.
|
// determined.
|
||||||
//
|
//
|
||||||
@ -170,23 +180,22 @@ 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, namespace Namespace) *Feature {
|
func NewFeature(name string, version string, versionFormat string, featureType FeatureType) *Feature {
|
||||||
return &Feature{name, version, versionFormat, featureType, namespace}
|
return &Feature{name, version, versionFormat, featureType}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewBinaryPackage(name string, version string, versionFormat string, namespace Namespace) *Feature {
|
func NewBinaryPackage(name string, version string, versionFormat string) *Feature {
|
||||||
return &Feature{name, version, versionFormat, BinaryPackage, namespace}
|
return &Feature{name, version, versionFormat, BinaryPackage}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSourcePackage(name string, version string, versionFormat string, namespace Namespace) *Feature {
|
func NewSourcePackage(name string, version string, versionFormat string) *Feature {
|
||||||
return &Feature{name, version, versionFormat, SourcePackage, namespace}
|
return &Feature{name, version, versionFormat, SourcePackage}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NamespacedFeature is a feature with determined namespace and can be affected
|
// NamespacedFeature is a feature with determined namespace and can be affected
|
||||||
|
@ -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, database.Namespace{})
|
features[i] = *database.NewSourcePackage(featureName, strconv.Itoa(version), featureVersionFormat)
|
||||||
nsFeatures[i] = database.NamespacedFeature{
|
nsFeatures[i] = database.NamespacedFeature{
|
||||||
Namespace: namespace,
|
Namespace: namespace,
|
||||||
Feature: features[i],
|
Feature: features[i],
|
||||||
|
@ -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", database.Namespace{})
|
valid := *database.NewBinaryPackage("mount", "2.31.1-0.4ubuntu3.1", "dpkg")
|
||||||
|
|
||||||
// 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", database.Namespace{})
|
f1 := database.NewSourcePackage("ourchat", "0.5", "dpkg")
|
||||||
// non-existing features
|
// non-existing features
|
||||||
f2 := database.NewSourcePackage("fake!", "", "", database.Namespace{})
|
f2 := database.NewSourcePackage("fake!", "", "")
|
||||||
// exising namespace
|
// exising namespace
|
||||||
n1 := database.NewNamespace("debian:7", "dpkg")
|
n1 := database.NewNamespace("debian:7", "dpkg")
|
||||||
// non-existing namespace
|
// non-existing namespace
|
||||||
@ -182,7 +182,7 @@ func TestFindNamespacedFeatureIDs(t *testing.T) {
|
|||||||
expectedIDs = append(expectedIDs, 1)
|
expectedIDs = append(expectedIDs, 1)
|
||||||
|
|
||||||
namespace := realNamespaces[1]
|
namespace := realNamespaces[1]
|
||||||
features = append(features, *database.NewNamespacedFeature(&namespace, database.NewBinaryPackage("not-found", "1.0", "dpkg", database.Namespace{}))) // test not found feature
|
features = append(features, *database.NewNamespacedFeature(&namespace, database.NewBinaryPackage("not-found", "1.0", "dpkg"))) // test not found feature
|
||||||
|
|
||||||
ids, err := tx.findNamespacedFeatureIDs(features)
|
ids, err := tx.findNamespacedFeatureIDs(features)
|
||||||
require.Nil(t, err)
|
require.Nil(t, err)
|
||||||
|
@ -65,7 +65,7 @@ type dbLayerFeature struct {
|
|||||||
layerID int64
|
layerID int64
|
||||||
featureID int64
|
featureID int64
|
||||||
detectorID int64
|
detectorID int64
|
||||||
namespaceID int64
|
namespaceID sql.NullInt64
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tx *pgSession) FindLayer(hash string) (database.Layer, bool, error) {
|
func (tx *pgSession) FindLayer(hash string) (database.Layer, bool, error) {
|
||||||
@ -210,14 +210,16 @@ func (tx *pgSession) persistAllLayerFeatures(layerID int64, features []database.
|
|||||||
rawFeatures := make([]database.Feature, 0, len(features))
|
rawFeatures := make([]database.Feature, 0, len(features))
|
||||||
for i, f := range features {
|
for i, f := range features {
|
||||||
rawFeatures = append(rawFeatures, f.Feature)
|
rawFeatures = append(rawFeatures, f.Feature)
|
||||||
featureNamespaceMap[f.PotentialNamespace] = nameSpaceIDs[i]
|
if f.PotentialNamespace.Valid() {
|
||||||
|
featureNamespaceMap[f.PotentialNamespace] = nameSpaceIDs[i]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
featureIDs, err := tx.findFeatureIDs(rawFeatures)
|
featureIDs, err := tx.findFeatureIDs(rawFeatures)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
var namespaceID sql.NullInt64
|
||||||
dbFeatures := make([]dbLayerFeature, 0, len(features))
|
dbFeatures := make([]dbLayerFeature, 0, len(features))
|
||||||
for i, f := range features {
|
for i, f := range features {
|
||||||
detectorID := detectorMap.byValue[f.By]
|
detectorID := detectorMap.byValue[f.By]
|
||||||
@ -225,10 +227,7 @@ func (tx *pgSession) persistAllLayerFeatures(layerID int64, features []database.
|
|||||||
return database.ErrMissingEntities
|
return database.ErrMissingEntities
|
||||||
}
|
}
|
||||||
featureID := featureIDs[i].Int64
|
featureID := featureIDs[i].Int64
|
||||||
if !featureNamespaceMap[f.PotentialNamespace].Valid {
|
namespaceID = featureNamespaceMap[f.PotentialNamespace]
|
||||||
return database.ErrMissingEntities
|
|
||||||
}
|
|
||||||
namespaceID := featureNamespaceMap[f.PotentialNamespace].Int64
|
|
||||||
|
|
||||||
dbFeatures = append(dbFeatures, dbLayerFeature{layerID, featureID, detectorID, namespaceID})
|
dbFeatures = append(dbFeatures, dbLayerFeature{layerID, featureID, detectorID, namespaceID})
|
||||||
}
|
}
|
||||||
@ -249,6 +248,7 @@ func (tx *pgSession) persistLayerFeatures(features []dbLayerFeature) error {
|
|||||||
return features[i].featureID < features[j].featureID
|
return features[i].featureID < features[j].featureID
|
||||||
})
|
})
|
||||||
keys := make([]interface{}, 0, len(features)*4)
|
keys := make([]interface{}, 0, len(features)*4)
|
||||||
|
|
||||||
for _, f := range features {
|
for _, f := range features {
|
||||||
keys = append(keys, f.layerID, f.featureID, f.detectorID, f.namespaceID)
|
keys = append(keys, f.layerID, f.featureID, f.detectorID, f.namespaceID)
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ var persistLayerTests = []struct {
|
|||||||
name: "random-forest",
|
name: "random-forest",
|
||||||
by: []database.Detector{realDetectors[2]},
|
by: []database.Detector{realDetectors[2]},
|
||||||
features: []database.LayerFeature{
|
features: []database.LayerFeature{
|
||||||
{realFeatures[1], realDetectors[1]},
|
{realFeatures[1], realDetectors[1], database.Namespace{}},
|
||||||
},
|
},
|
||||||
err: "parameters are not valid",
|
err: "parameters are not valid",
|
||||||
},
|
},
|
||||||
@ -51,7 +51,7 @@ var persistLayerTests = []struct {
|
|||||||
err: "associated immutable entities are missing in the database",
|
err: "associated immutable entities are missing in the database",
|
||||||
by: []database.Detector{realDetectors[2]},
|
by: []database.Detector{realDetectors[2]},
|
||||||
features: []database.LayerFeature{
|
features: []database.LayerFeature{
|
||||||
{fakeFeatures[1], realDetectors[2]},
|
{fakeFeatures[1], realDetectors[2], database.Namespace{}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -74,8 +74,8 @@ var persistLayerTests = []struct {
|
|||||||
name: "hamsterhouse",
|
name: "hamsterhouse",
|
||||||
by: []database.Detector{realDetectors[1], realDetectors[2]},
|
by: []database.Detector{realDetectors[1], realDetectors[2]},
|
||||||
features: []database.LayerFeature{
|
features: []database.LayerFeature{
|
||||||
{realFeatures[1], realDetectors[2]},
|
{realFeatures[1], realDetectors[2], database.Namespace{}},
|
||||||
{realFeatures[2], realDetectors[2]},
|
{realFeatures[2], realDetectors[2], database.Namespace{}},
|
||||||
},
|
},
|
||||||
namespaces: []database.LayerNamespace{
|
namespaces: []database.LayerNamespace{
|
||||||
{realNamespaces[1], realDetectors[1]},
|
{realNamespaces[1], realDetectors[1]},
|
||||||
@ -84,8 +84,8 @@ var persistLayerTests = []struct {
|
|||||||
Hash: "hamsterhouse",
|
Hash: "hamsterhouse",
|
||||||
By: []database.Detector{realDetectors[1], realDetectors[2]},
|
By: []database.Detector{realDetectors[1], realDetectors[2]},
|
||||||
Features: []database.LayerFeature{
|
Features: []database.LayerFeature{
|
||||||
{realFeatures[1], realDetectors[2]},
|
{realFeatures[1], realDetectors[2], database.Namespace{}},
|
||||||
{realFeatures[2], realDetectors[2]},
|
{realFeatures[2], realDetectors[2], database.Namespace{}},
|
||||||
},
|
},
|
||||||
Namespaces: []database.LayerNamespace{
|
Namespaces: []database.LayerNamespace{
|
||||||
{realNamespaces[1], realDetectors[1]},
|
{realNamespaces[1], realDetectors[1]},
|
||||||
@ -97,7 +97,7 @@ var persistLayerTests = []struct {
|
|||||||
name: "layer-1",
|
name: "layer-1",
|
||||||
by: []database.Detector{realDetectors[3], realDetectors[4]},
|
by: []database.Detector{realDetectors[3], realDetectors[4]},
|
||||||
features: []database.LayerFeature{
|
features: []database.LayerFeature{
|
||||||
{realFeatures[4], realDetectors[3]},
|
{realFeatures[4], realDetectors[3], database.Namespace{}},
|
||||||
},
|
},
|
||||||
namespaces: []database.LayerNamespace{
|
namespaces: []database.LayerNamespace{
|
||||||
{realNamespaces[3], realDetectors[4]},
|
{realNamespaces[3], realDetectors[4]},
|
||||||
@ -106,9 +106,9 @@ var persistLayerTests = []struct {
|
|||||||
Hash: "layer-1",
|
Hash: "layer-1",
|
||||||
By: []database.Detector{realDetectors[1], realDetectors[2], realDetectors[3], realDetectors[4]},
|
By: []database.Detector{realDetectors[1], realDetectors[2], realDetectors[3], realDetectors[4]},
|
||||||
Features: []database.LayerFeature{
|
Features: []database.LayerFeature{
|
||||||
{realFeatures[1], realDetectors[2]},
|
{realFeatures[1], realDetectors[2], database.Namespace{}},
|
||||||
{realFeatures[2], realDetectors[2]},
|
{realFeatures[2], realDetectors[2], database.Namespace{}},
|
||||||
{realFeatures[4], realDetectors[3]},
|
{realFeatures[4], realDetectors[3], database.Namespace{}},
|
||||||
},
|
},
|
||||||
Namespaces: []database.LayerNamespace{
|
Namespaces: []database.LayerNamespace{
|
||||||
{realNamespaces[1], realDetectors[1]},
|
{realNamespaces[1], realDetectors[1]},
|
||||||
|
@ -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", database.Namespace{}},
|
1: {"ourchat", "0.5", "dpkg", "source"},
|
||||||
2: {"openssl", "1.0", "dpkg", "source", database.Namespace{}},
|
2: {"openssl", "1.0", "dpkg", "source"},
|
||||||
3: {"openssl", "2.0", "dpkg", "source", database.Namespace{}},
|
3: {"openssl", "2.0", "dpkg", "source"},
|
||||||
4: {"fake", "2.0", "rpm", "source", database.Namespace{}},
|
4: {"fake", "2.0", "rpm", "source"},
|
||||||
5: {"mount", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
|
5: {"mount", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"},
|
||||||
}
|
}
|
||||||
|
|
||||||
realNamespaces = map[int]database.Namespace{
|
realNamespaces = map[int]database.Namespace{
|
||||||
@ -70,8 +70,8 @@ var (
|
|||||||
Hash: "layer-1",
|
Hash: "layer-1",
|
||||||
By: []database.Detector{realDetectors[1], realDetectors[2]},
|
By: []database.Detector{realDetectors[1], realDetectors[2]},
|
||||||
Features: []database.LayerFeature{
|
Features: []database.LayerFeature{
|
||||||
{realFeatures[1], realDetectors[2]},
|
{realFeatures[1], realDetectors[2], database.Namespace{}},
|
||||||
{realFeatures[2], realDetectors[2]},
|
{realFeatures[2], realDetectors[2], database.Namespace{}},
|
||||||
},
|
},
|
||||||
Namespaces: []database.LayerNamespace{
|
Namespaces: []database.LayerNamespace{
|
||||||
{realNamespaces[1], realDetectors[1]},
|
{realNamespaces[1], realDetectors[1]},
|
||||||
@ -81,8 +81,8 @@ var (
|
|||||||
Hash: "layer-4",
|
Hash: "layer-4",
|
||||||
By: []database.Detector{realDetectors[1], realDetectors[2], realDetectors[3], realDetectors[4]},
|
By: []database.Detector{realDetectors[1], realDetectors[2], realDetectors[3], realDetectors[4]},
|
||||||
Features: []database.LayerFeature{
|
Features: []database.LayerFeature{
|
||||||
{realFeatures[4], realDetectors[3]},
|
{realFeatures[4], realDetectors[3], database.Namespace{}},
|
||||||
{realFeatures[3], realDetectors[2]},
|
{realFeatures[3], realDetectors[2], database.Namespace{}},
|
||||||
},
|
},
|
||||||
Namespaces: []database.LayerNamespace{
|
Namespaces: []database.LayerNamespace{
|
||||||
{realNamespaces[1], realDetectors[1]},
|
{realNamespaces[1], realDetectors[1]},
|
||||||
|
@ -39,10 +39,10 @@ func valid(pkg *database.Feature) bool {
|
|||||||
return pkg.Name != "" && pkg.Version != ""
|
return pkg.Name != "" && pkg.Version != ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.Feature, error) {
|
func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.LayerFeature, error) {
|
||||||
file, exists := files["lib/apk/db/installed"]
|
file, exists := files["lib/apk/db/installed"]
|
||||||
if !exists {
|
if !exists {
|
||||||
return []database.Feature{}, nil
|
return []database.LayerFeature{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iterate over each line in the "installed" file attempting to parse each
|
// Iterate over each line in the "installed" file attempting to parse each
|
||||||
@ -86,7 +86,7 @@ func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.Feature, error)
|
|||||||
packages.Add(pkg)
|
packages.Add(pkg)
|
||||||
}
|
}
|
||||||
|
|
||||||
return database.ConvertFeatureSetToFeatures(packages), nil
|
return database.ConvertFeatureSerToLayerFeatures(packages), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l lister) RequiredFilenames() []string {
|
func (l lister) RequiredFilenames() []string {
|
||||||
|
@ -27,18 +27,18 @@ 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.LayerFeature{
|
||||||
{"apk-tools", "2.6.7-r0", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"apk-tools", "2.6.7-r0", "dpkg", "binary"}},
|
||||||
{"musl", "1.1.14-r10", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"musl", "1.1.14-r10", "dpkg", "binary"}},
|
||||||
{"libssl1.0", "1.0.2h-r1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libssl1.0", "1.0.2h-r1", "dpkg", "binary"}},
|
||||||
{"libc-utils", "0.7-r0", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libc-utils", "0.7-r0", "dpkg", "binary"}},
|
||||||
{"busybox", "1.24.2-r9", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"busybox", "1.24.2-r9", "dpkg", "binary"}},
|
||||||
{"scanelf", "1.1.6-r0", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"scanelf", "1.1.6-r0", "dpkg", "binary"}},
|
||||||
{"alpine-keys", "1.1-r0", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"alpine-keys", "1.1-r0", "dpkg", "binary"}},
|
||||||
{"libcrypto1.0", "1.0.2h-r1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libcrypto1.0", "1.0.2h-r1", "dpkg", "binary"}},
|
||||||
{"zlib", "1.2.8-r2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"zlib", "1.2.8-r2", "dpkg", "binary"}},
|
||||||
{"musl-utils", "1.1.14-r10", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"musl-utils", "1.1.14-r10", "dpkg", "binary"}},
|
||||||
{"alpine-baselayout", "3.0.3-r0", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"alpine-baselayout", "3.0.3-r0", "dpkg", "binary"}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} {
|
} {
|
||||||
|
@ -45,10 +45,10 @@ func init() {
|
|||||||
featurefmt.RegisterLister("dpkg", "1.0", &lister{})
|
featurefmt.RegisterLister("dpkg", "1.0", &lister{})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.Feature, error) {
|
func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.LayerFeature, error) {
|
||||||
f, hasFile := files["var/lib/dpkg/status"]
|
f, hasFile := files["var/lib/dpkg/status"]
|
||||||
if !hasFile {
|
if !hasFile {
|
||||||
return []database.Feature{}, nil
|
return []database.LayerFeature{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
packages := mapset.NewSet()
|
packages := mapset.NewSet()
|
||||||
@ -69,7 +69,7 @@ func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.Feature, error)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return database.ConvertFeatureSetToFeatures(packages), nil
|
return database.ConvertFeatureSerToLayerFeatures(packages), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseDpkgDB consumes the status file scanner exactly one package info, until
|
// parseDpkgDB consumes the status file scanner exactly one package info, until
|
||||||
@ -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, database.Namespace{}}
|
binaryPackage = &database.Feature{name, version, dpkg.ParserName, database.BinaryPackage}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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, database.Namespace{}}
|
sourcePackage = &database.Feature{sourceName, sourceVersion, dpkg.ParserName, database.SourcePackage}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,169 +27,169 @@ 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.LayerFeature{
|
||||||
{"libapt-pkg5.0", "1.6.3ubuntu0.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libapt-pkg5.0", "1.6.3ubuntu0.1", "dpkg", "binary"}},
|
||||||
{"perl-base", "5.26.1-6ubuntu0.2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"perl-base", "5.26.1-6ubuntu0.2", "dpkg", "binary"}},
|
||||||
{"libmount1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libmount1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}},
|
||||||
{"perl", "5.26.1-6ubuntu0.2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"perl", "5.26.1-6ubuntu0.2", "dpkg", "source"}},
|
||||||
{"libgnutls30", "3.5.18-1ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libgnutls30", "3.5.18-1ubuntu1", "dpkg", "binary"}},
|
||||||
{"liblzma5", "5.2.2-1.3", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"liblzma5", "5.2.2-1.3", "dpkg", "binary"}},
|
||||||
{"ncurses-bin", "6.1-1ubuntu1.18.04", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"ncurses-bin", "6.1-1ubuntu1.18.04", "dpkg", "binary"}},
|
||||||
{"lsb", "9.20170808ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"lsb", "9.20170808ubuntu1", "dpkg", "source"}},
|
||||||
{"sed", "4.4-2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"sed", "4.4-2", "dpkg", "source"}},
|
||||||
{"libsystemd0", "237-3ubuntu10.3", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsystemd0", "237-3ubuntu10.3", "dpkg", "binary"}},
|
||||||
{"procps", "2:3.3.12-3ubuntu1.1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"procps", "2:3.3.12-3ubuntu1.1", "dpkg", "source"}},
|
||||||
{"login", "1:4.5-1ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"login", "1:4.5-1ubuntu1", "dpkg", "binary"}},
|
||||||
{"libunistring2", "0.9.9-0ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libunistring2", "0.9.9-0ubuntu1", "dpkg", "binary"}},
|
||||||
{"sed", "4.4-2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"sed", "4.4-2", "dpkg", "binary"}},
|
||||||
{"libselinux", "2.7-2build2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libselinux", "2.7-2build2", "dpkg", "source"}},
|
||||||
{"libseccomp", "2.3.1-2.1ubuntu4", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libseccomp", "2.3.1-2.1ubuntu4", "dpkg", "source"}},
|
||||||
{"libss2", "1.44.1-1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libss2", "1.44.1-1", "dpkg", "binary"}},
|
||||||
{"liblz4-1", "0.0~r131-2ubuntu3", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"liblz4-1", "0.0~r131-2ubuntu3", "dpkg", "binary"}},
|
||||||
{"libsemanage1", "2.7-2build2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsemanage1", "2.7-2build2", "dpkg", "binary"}},
|
||||||
{"libtasn1-6", "4.13-2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libtasn1-6", "4.13-2", "dpkg", "source"}},
|
||||||
{"libzstd1", "1.3.3+dfsg-2ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libzstd1", "1.3.3+dfsg-2ubuntu1", "dpkg", "binary"}},
|
||||||
{"fdisk", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"fdisk", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}},
|
||||||
{"xz-utils", "5.2.2-1.3", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"xz-utils", "5.2.2-1.3", "dpkg", "source"}},
|
||||||
{"lsb-base", "9.20170808ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"lsb-base", "9.20170808ubuntu1", "dpkg", "binary"}},
|
||||||
{"libpam-modules-bin", "1.1.8-3.6ubuntu2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libpam-modules-bin", "1.1.8-3.6ubuntu2", "dpkg", "binary"}},
|
||||||
{"dash", "0.5.8-2.10", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"dash", "0.5.8-2.10", "dpkg", "binary"}},
|
||||||
{"gnupg2", "2.2.4-1ubuntu1.1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"gnupg2", "2.2.4-1ubuntu1.1", "dpkg", "source"}},
|
||||||
{"libfdisk1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libfdisk1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}},
|
||||||
{"lz4", "0.0~r131-2ubuntu3", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"lz4", "0.0~r131-2ubuntu3", "dpkg", "source"}},
|
||||||
{"libpam0g", "1.1.8-3.6ubuntu2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libpam0g", "1.1.8-3.6ubuntu2", "dpkg", "binary"}},
|
||||||
{"libc-bin", "2.27-3ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libc-bin", "2.27-3ubuntu1", "dpkg", "binary"}},
|
||||||
{"libcap-ng", "0.7.7-3.1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libcap-ng", "0.7.7-3.1", "dpkg", "source"}},
|
||||||
{"libcom-err2", "1.44.1-1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libcom-err2", "1.44.1-1", "dpkg", "binary"}},
|
||||||
{"libudev1", "237-3ubuntu10.3", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libudev1", "237-3ubuntu10.3", "dpkg", "binary"}},
|
||||||
{"debconf", "1.5.66", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"debconf", "1.5.66", "dpkg", "binary"}},
|
||||||
{"tar", "1.29b-2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"tar", "1.29b-2", "dpkg", "binary"}},
|
||||||
{"diffutils", "1:3.6-1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"diffutils", "1:3.6-1", "dpkg", "source"}},
|
||||||
{"gcc-8", "8-20180414-1ubuntu2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"gcc-8", "8-20180414-1ubuntu2", "dpkg", "source"}},
|
||||||
{"e2fsprogs", "1.44.1-1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"e2fsprogs", "1.44.1-1", "dpkg", "source"}},
|
||||||
{"bzip2", "1.0.6-8.1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"bzip2", "1.0.6-8.1", "dpkg", "source"}},
|
||||||
{"diffutils", "1:3.6-1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"diffutils", "1:3.6-1", "dpkg", "binary"}},
|
||||||
{"grep", "3.1-2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"grep", "3.1-2", "dpkg", "binary"}},
|
||||||
{"libgcc1", "1:8-20180414-1ubuntu2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libgcc1", "1:8-20180414-1ubuntu2", "dpkg", "binary"}},
|
||||||
{"bash", "4.4.18-2ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"bash", "4.4.18-2ubuntu1", "dpkg", "source"}},
|
||||||
{"libtinfo5", "6.1-1ubuntu1.18.04", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libtinfo5", "6.1-1ubuntu1.18.04", "dpkg", "binary"}},
|
||||||
{"procps", "2:3.3.12-3ubuntu1.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"procps", "2:3.3.12-3ubuntu1.1", "dpkg", "binary"}},
|
||||||
{"bzip2", "1.0.6-8.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"bzip2", "1.0.6-8.1", "dpkg", "binary"}},
|
||||||
{"init-system-helpers", "1.51", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"init-system-helpers", "1.51", "dpkg", "binary"}},
|
||||||
{"libncursesw5", "6.1-1ubuntu1.18.04", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libncursesw5", "6.1-1ubuntu1.18.04", "dpkg", "binary"}},
|
||||||
{"init-system-helpers", "1.51", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"init-system-helpers", "1.51", "dpkg", "source"}},
|
||||||
{"libpam-modules", "1.1.8-3.6ubuntu2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libpam-modules", "1.1.8-3.6ubuntu2", "dpkg", "binary"}},
|
||||||
{"libext2fs2", "1.44.1-1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libext2fs2", "1.44.1-1", "dpkg", "binary"}},
|
||||||
{"libacl1", "2.2.52-3build1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libacl1", "2.2.52-3build1", "dpkg", "binary"}},
|
||||||
{"hostname", "3.20", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"hostname", "3.20", "dpkg", "binary"}},
|
||||||
{"libgpg-error", "1.27-6", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libgpg-error", "1.27-6", "dpkg", "source"}},
|
||||||
{"acl", "2.2.52-3build1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"acl", "2.2.52-3build1", "dpkg", "source"}},
|
||||||
{"apt", "1.6.3ubuntu0.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"apt", "1.6.3ubuntu0.1", "dpkg", "binary"}},
|
||||||
{"base-files", "10.1ubuntu2.2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"base-files", "10.1ubuntu2.2", "dpkg", "source"}},
|
||||||
{"libgpg-error0", "1.27-6", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libgpg-error0", "1.27-6", "dpkg", "binary"}},
|
||||||
{"audit", "1:2.8.2-1ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"audit", "1:2.8.2-1ubuntu1", "dpkg", "source"}},
|
||||||
{"hostname", "3.20", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"hostname", "3.20", "dpkg", "source"}},
|
||||||
{"gzip", "1.6-5ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gzip", "1.6-5ubuntu1", "dpkg", "binary"}},
|
||||||
{"libc6", "2.27-3ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libc6", "2.27-3ubuntu1", "dpkg", "binary"}},
|
||||||
{"libnettle6", "3.4-1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libnettle6", "3.4-1", "dpkg", "binary"}},
|
||||||
{"sysvinit-utils", "2.88dsf-59.10ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"sysvinit-utils", "2.88dsf-59.10ubuntu1", "dpkg", "binary"}},
|
||||||
{"debianutils", "4.8.4", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"debianutils", "4.8.4", "dpkg", "source"}},
|
||||||
{"libstdc++6", "8-20180414-1ubuntu2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libstdc++6", "8-20180414-1ubuntu2", "dpkg", "binary"}},
|
||||||
{"libsepol", "2.7-1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libsepol", "2.7-1", "dpkg", "source"}},
|
||||||
{"libpcre3", "2:8.39-9", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libpcre3", "2:8.39-9", "dpkg", "binary"}},
|
||||||
{"libuuid1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libuuid1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}},
|
||||||
{"systemd", "237-3ubuntu10.3", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"systemd", "237-3ubuntu10.3", "dpkg", "source"}},
|
||||||
{"tar", "1.29b-2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"tar", "1.29b-2", "dpkg", "source"}},
|
||||||
{"ubuntu-keyring", "2018.02.28", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"ubuntu-keyring", "2018.02.28", "dpkg", "source"}},
|
||||||
{"passwd", "1:4.5-1ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"passwd", "1:4.5-1ubuntu1", "dpkg", "binary"}},
|
||||||
{"sysvinit", "2.88dsf-59.10ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"sysvinit", "2.88dsf-59.10ubuntu1", "dpkg", "source"}},
|
||||||
{"libidn2-0", "2.0.4-1.1build2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libidn2-0", "2.0.4-1.1build2", "dpkg", "binary"}},
|
||||||
{"libhogweed4", "3.4-1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libhogweed4", "3.4-1", "dpkg", "binary"}},
|
||||||
{"db5.3", "5.3.28-13.1ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"db5.3", "5.3.28-13.1ubuntu1", "dpkg", "source"}},
|
||||||
{"sensible-utils", "0.0.12", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"sensible-utils", "0.0.12", "dpkg", "source"}},
|
||||||
{"dpkg", "1.19.0.5ubuntu2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"dpkg", "1.19.0.5ubuntu2", "dpkg", "source"}},
|
||||||
{"libp11-kit0", "0.23.9-2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libp11-kit0", "0.23.9-2", "dpkg", "binary"}},
|
||||||
{"glibc", "2.27-3ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"glibc", "2.27-3ubuntu1", "dpkg", "source"}},
|
||||||
{"mount", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"mount", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}},
|
||||||
{"libsemanage-common", "2.7-2build2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsemanage-common", "2.7-2build2", "dpkg", "binary"}},
|
||||||
{"libblkid1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libblkid1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}},
|
||||||
{"libdebconfclient0", "0.213ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libdebconfclient0", "0.213ubuntu1", "dpkg", "binary"}},
|
||||||
{"libffi", "3.2.1-8", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libffi", "3.2.1-8", "dpkg", "source"}},
|
||||||
{"pam", "1.1.8-3.6ubuntu2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"pam", "1.1.8-3.6ubuntu2", "dpkg", "source"}},
|
||||||
{"bsdutils", "1:2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"bsdutils", "1:2.31.1-0.4ubuntu3.1", "dpkg", "binary"}},
|
||||||
{"libtasn1-6", "4.13-2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libtasn1-6", "4.13-2", "dpkg", "binary"}},
|
||||||
{"libaudit-common", "1:2.8.2-1ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libaudit-common", "1:2.8.2-1ubuntu1", "dpkg", "binary"}},
|
||||||
{"gpgv", "2.2.4-1ubuntu1.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gpgv", "2.2.4-1ubuntu1.1", "dpkg", "binary"}},
|
||||||
{"libzstd", "1.3.3+dfsg-2ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libzstd", "1.3.3+dfsg-2ubuntu1", "dpkg", "source"}},
|
||||||
{"base-passwd", "3.5.44", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"base-passwd", "3.5.44", "dpkg", "source"}},
|
||||||
{"adduser", "3.116ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"adduser", "3.116ubuntu1", "dpkg", "binary"}},
|
||||||
{"libattr1", "1:2.4.47-2build1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libattr1", "1:2.4.47-2build1", "dpkg", "binary"}},
|
||||||
{"libncurses5", "6.1-1ubuntu1.18.04", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libncurses5", "6.1-1ubuntu1.18.04", "dpkg", "binary"}},
|
||||||
{"coreutils", "8.28-1ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"coreutils", "8.28-1ubuntu1", "dpkg", "binary"}},
|
||||||
{"base-passwd", "3.5.44", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"base-passwd", "3.5.44", "dpkg", "binary"}},
|
||||||
{"ubuntu-keyring", "2018.02.28", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"ubuntu-keyring", "2018.02.28", "dpkg", "binary"}},
|
||||||
{"adduser", "3.116ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"adduser", "3.116ubuntu1", "dpkg", "source"}},
|
||||||
{"libsmartcols1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsmartcols1", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}},
|
||||||
{"libunistring", "0.9.9-0ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libunistring", "0.9.9-0ubuntu1", "dpkg", "source"}},
|
||||||
{"mawk", "1.3.3-17ubuntu3", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"mawk", "1.3.3-17ubuntu3", "dpkg", "source"}},
|
||||||
{"coreutils", "8.28-1ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"coreutils", "8.28-1ubuntu1", "dpkg", "source"}},
|
||||||
{"attr", "1:2.4.47-2build1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"attr", "1:2.4.47-2build1", "dpkg", "source"}},
|
||||||
{"gmp", "2:6.1.2+dfsg-2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"gmp", "2:6.1.2+dfsg-2", "dpkg", "source"}},
|
||||||
{"libsemanage", "2.7-2build2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libsemanage", "2.7-2build2", "dpkg", "source"}},
|
||||||
{"libselinux1", "2.7-2build2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libselinux1", "2.7-2build2", "dpkg", "binary"}},
|
||||||
{"libseccomp2", "2.3.1-2.1ubuntu4", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libseccomp2", "2.3.1-2.1ubuntu4", "dpkg", "binary"}},
|
||||||
{"zlib1g", "1:1.2.11.dfsg-0ubuntu2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"zlib1g", "1:1.2.11.dfsg-0ubuntu2", "dpkg", "binary"}},
|
||||||
{"dash", "0.5.8-2.10", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"dash", "0.5.8-2.10", "dpkg", "source"}},
|
||||||
{"gnutls28", "3.5.18-1ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"gnutls28", "3.5.18-1ubuntu1", "dpkg", "source"}},
|
||||||
{"libpam-runtime", "1.1.8-3.6ubuntu2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libpam-runtime", "1.1.8-3.6ubuntu2", "dpkg", "binary"}},
|
||||||
{"libgcrypt20", "1.8.1-4ubuntu1.1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libgcrypt20", "1.8.1-4ubuntu1.1", "dpkg", "source"}},
|
||||||
{"sensible-utils", "0.0.12", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"sensible-utils", "0.0.12", "dpkg", "binary"}},
|
||||||
{"p11-kit", "0.23.9-2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"p11-kit", "0.23.9-2", "dpkg", "source"}},
|
||||||
{"ncurses-base", "6.1-1ubuntu1.18.04", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"ncurses-base", "6.1-1ubuntu1.18.04", "dpkg", "binary"}},
|
||||||
{"e2fsprogs", "1.44.1-1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"e2fsprogs", "1.44.1-1", "dpkg", "binary"}},
|
||||||
{"libgcrypt20", "1.8.1-4ubuntu1.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libgcrypt20", "1.8.1-4ubuntu1.1", "dpkg", "binary"}},
|
||||||
{"libprocps6", "2:3.3.12-3ubuntu1.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libprocps6", "2:3.3.12-3ubuntu1.1", "dpkg", "binary"}},
|
||||||
{"debconf", "1.5.66", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"debconf", "1.5.66", "dpkg", "source"}},
|
||||||
{"gcc-8-base", "8-20180414-1ubuntu2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gcc-8-base", "8-20180414-1ubuntu2", "dpkg", "binary"}},
|
||||||
{"base-files", "10.1ubuntu2.2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"base-files", "10.1ubuntu2.2", "dpkg", "binary"}},
|
||||||
{"libbz2-1.0", "1.0.6-8.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libbz2-1.0", "1.0.6-8.1", "dpkg", "binary"}},
|
||||||
{"grep", "3.1-2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"grep", "3.1-2", "dpkg", "source"}},
|
||||||
{"bash", "4.4.18-2ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"bash", "4.4.18-2ubuntu1", "dpkg", "binary"}},
|
||||||
{"libgmp10", "2:6.1.2+dfsg-2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libgmp10", "2:6.1.2+dfsg-2", "dpkg", "binary"}},
|
||||||
{"shadow", "1:4.5-1ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"shadow", "1:4.5-1ubuntu1", "dpkg", "source"}},
|
||||||
{"libidn2", "2.0.4-1.1build2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"libidn2", "2.0.4-1.1build2", "dpkg", "source"}},
|
||||||
{"gzip", "1.6-5ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"gzip", "1.6-5ubuntu1", "dpkg", "source"}},
|
||||||
{"util-linux", "2.31.1-0.4ubuntu3.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"util-linux", "2.31.1-0.4ubuntu3.1", "dpkg", "binary"}},
|
||||||
{"libaudit1", "1:2.8.2-1ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libaudit1", "1:2.8.2-1ubuntu1", "dpkg", "binary"}},
|
||||||
{"libsepol1", "2.7-1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsepol1", "2.7-1", "dpkg", "binary"}},
|
||||||
{"pcre3", "2:8.39-9", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"pcre3", "2:8.39-9", "dpkg", "source"}},
|
||||||
{"apt", "1.6.3ubuntu0.1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"apt", "1.6.3ubuntu0.1", "dpkg", "source"}},
|
||||||
{"nettle", "3.4-1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"nettle", "3.4-1", "dpkg", "source"}},
|
||||||
{"util-linux", "2.31.1-0.4ubuntu3.1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"util-linux", "2.31.1-0.4ubuntu3.1", "dpkg", "source"}},
|
||||||
{"libcap-ng0", "0.7.7-3.1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libcap-ng0", "0.7.7-3.1", "dpkg", "binary"}},
|
||||||
{"debianutils", "4.8.4", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"debianutils", "4.8.4", "dpkg", "binary"}},
|
||||||
{"ncurses", "6.1-1ubuntu1.18.04", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"ncurses", "6.1-1ubuntu1.18.04", "dpkg", "source"}},
|
||||||
{"libffi6", "3.2.1-8", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libffi6", "3.2.1-8", "dpkg", "binary"}},
|
||||||
{"cdebconf", "0.213ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"cdebconf", "0.213ubuntu1", "dpkg", "source"}},
|
||||||
{"findutils", "4.6.0+git+20170828-2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"findutils", "4.6.0+git+20170828-2", "dpkg", "source"}},
|
||||||
{"libdb5.3", "5.3.28-13.1ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libdb5.3", "5.3.28-13.1ubuntu1", "dpkg", "binary"}},
|
||||||
{"zlib", "1:1.2.11.dfsg-0ubuntu2", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"zlib", "1:1.2.11.dfsg-0ubuntu2", "dpkg", "source"}},
|
||||||
{"findutils", "4.6.0+git+20170828-2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"findutils", "4.6.0+git+20170828-2", "dpkg", "binary"}},
|
||||||
{"dpkg", "1.19.0.5ubuntu2", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"dpkg", "1.19.0.5ubuntu2", "dpkg", "binary"}},
|
||||||
{"mawk", "1.3.3-17ubuntu3", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"mawk", "1.3.3-17ubuntu3", "dpkg", "binary"}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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.LayerFeature{
|
||||||
{"libpam-modules-bin", "1.1.8-3.1ubuntu3", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libpam-modules-bin", "1.1.8-3.1ubuntu3", "dpkg", "binary"}},
|
||||||
{"gcc-5", "5.1.1-12ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"gcc-5", "5.1.1-12ubuntu1", "dpkg", "source"}},
|
||||||
{"makedev", "2.3.1-93ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"makedev", "2.3.1-93ubuntu1", "dpkg", "binary"}},
|
||||||
{"libgcc1", "1:5.1.1-12ubuntu1", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libgcc1", "1:5.1.1-12ubuntu1", "dpkg", "binary"}},
|
||||||
{"pam", "1.1.8-3.1ubuntu3", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"pam", "1.1.8-3.1ubuntu3", "dpkg", "source"}},
|
||||||
{"makedev", "2.3.1-93ubuntu1", "dpkg", "source", database.Namespace{}},
|
{Feature: database.Feature{"makedev", "2.3.1-93ubuntu1", "dpkg", "source"}},
|
||||||
{"libpam-runtime", "1.1.8-3.1ubuntu3", "dpkg", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libpam-runtime", "1.1.8-3.1ubuntu3", "dpkg", "binary"}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} {
|
} {
|
||||||
|
@ -33,7 +33,7 @@ var (
|
|||||||
// Lister represents an ability to list the features present in an image layer.
|
// Lister represents an ability to list the features present in an image layer.
|
||||||
type Lister interface {
|
type Lister interface {
|
||||||
// ListFeatures produces a list of Features present in an image layer.
|
// ListFeatures produces a list of Features present in an image layer.
|
||||||
ListFeatures(tarutil.FilesMap) ([]database.Feature, error)
|
ListFeatures(tarutil.FilesMap) ([]database.LayerFeature, error)
|
||||||
|
|
||||||
// RequiredFilenames returns the list of files required to be in the FilesMap
|
// RequiredFilenames returns the list of files required to be in the FilesMap
|
||||||
// provided to the ListFeatures method.
|
// provided to the ListFeatures method.
|
||||||
@ -89,12 +89,10 @@ func ListFeatures(files tarutil.FilesMap, toUse []database.Detector) ([]database
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, f := range fs {
|
for i := range fs {
|
||||||
features = append(features, database.LayerFeature{
|
fs[i].By = lister.info
|
||||||
Feature: f,
|
|
||||||
By: lister.info,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
features = append(features, fs...)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
log.WithField("Name", d).Fatal("unknown feature detector")
|
log.WithField("Name", d).Fatal("unknown feature detector")
|
||||||
|
@ -59,10 +59,10 @@ func isIgnored(packageName string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.Feature, error) {
|
func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.LayerFeature, error) {
|
||||||
f, hasFile := files["var/lib/rpm/Packages"]
|
f, hasFile := files["var/lib/rpm/Packages"]
|
||||||
if !hasFile {
|
if !hasFile {
|
||||||
return []database.Feature{}, nil
|
return []database.LayerFeature{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the required "Packages" file to disk
|
// Write the required "Packages" file to disk
|
||||||
@ -70,13 +70,13 @@ func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.Feature, error)
|
|||||||
defer os.RemoveAll(tmpDir)
|
defer os.RemoveAll(tmpDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithError(err).Error("could not create temporary folder for RPM detection")
|
log.WithError(err).Error("could not create temporary folder for RPM detection")
|
||||||
return []database.Feature{}, commonerr.ErrFilesystem
|
return []database.LayerFeature{}, commonerr.ErrFilesystem
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ioutil.WriteFile(tmpDir+"/Packages", f, 0700)
|
err = ioutil.WriteFile(tmpDir+"/Packages", f, 0700)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithError(err).Error("could not create temporary file for RPM detection")
|
log.WithError(err).Error("could not create temporary file for RPM detection")
|
||||||
return []database.Feature{}, commonerr.ErrFilesystem
|
return []database.LayerFeature{}, commonerr.ErrFilesystem
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract binary package names because RHSA refers to binary package names.
|
// Extract binary package names because RHSA refers to binary package names.
|
||||||
@ -85,7 +85,7 @@ func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.Feature, error)
|
|||||||
log.WithError(err).WithField("output", string(out)).Error("failed to query RPM")
|
log.WithError(err).WithField("output", string(out)).Error("failed to query RPM")
|
||||||
// Do not bubble up because we probably won't be able to fix it,
|
// Do not bubble up because we probably won't be able to fix it,
|
||||||
// the database must be corrupted
|
// the database must be corrupted
|
||||||
return []database.Feature{}, nil
|
return []database.LayerFeature{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
packages := mapset.NewSet()
|
packages := mapset.NewSet()
|
||||||
@ -101,7 +101,7 @@ func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.Feature, error)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return database.ConvertFeatureSetToFeatures(packages), nil
|
return database.ConvertFeatureSerToLayerFeatures(packages), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseRPMOutput(raw string) (rpmPackage *database.Feature, srpmPackage *database.Feature) {
|
func parseRPMOutput(raw string) (rpmPackage *database.Feature, srpmPackage *database.Feature) {
|
||||||
@ -122,7 +122,7 @@ func parseRPMOutput(raw string) (rpmPackage *database.Feature, srpmPackage *data
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
rpmPackage = &database.Feature{name, version, rpm.ParserName, database.BinaryPackage, database.Namespace{}}
|
rpmPackage = &database.Feature{name, version, rpm.ParserName, database.BinaryPackage}
|
||||||
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, database.Namespace{}}
|
srpmPackage = &database.Feature{srpmName, srpmVersion, rpm.ParserName, database.SourcePackage}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,308 +24,308 @@ import (
|
|||||||
"github.com/coreos/clair/ext/versionfmt/rpm"
|
"github.com/coreos/clair/ext/versionfmt/rpm"
|
||||||
)
|
)
|
||||||
|
|
||||||
var expectedBigCaseInfo = []database.Feature{
|
var expectedBigCaseInfo = []database.LayerFeature{
|
||||||
{"libmount", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libmount", "2.32.1-1.fc28", "rpm", "binary"}},
|
||||||
{"libffi", "3.1-16.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libffi", "3.1-16.fc28", "rpm", "binary"}},
|
||||||
{"libunistring", "0.9.10-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libunistring", "0.9.10-1.fc28", "rpm", "binary"}},
|
||||||
{"fedora-repos", "28-5", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"fedora-repos", "28-5", "rpm", "binary"}},
|
||||||
{"libarchive", "3.3.1-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libarchive", "3.3.1-4.fc28", "rpm", "source"}},
|
||||||
{"langpacks", "1.0-12.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"langpacks", "1.0-12.fc28", "rpm", "source"}},
|
||||||
{"readline", "7.0-11.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"readline", "7.0-11.fc28", "rpm", "source"}},
|
||||||
{"gzip", "1.9-3.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"gzip", "1.9-3.fc28", "rpm", "source"}},
|
||||||
{"libverto", "0.3.0-5.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libverto", "0.3.0-5.fc28", "rpm", "source"}},
|
||||||
{"ncurses-base", "6.1-5.20180224.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"ncurses-base", "6.1-5.20180224.fc28", "rpm", "binary"}},
|
||||||
{"libfdisk", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libfdisk", "2.32.1-1.fc28", "rpm", "binary"}},
|
||||||
{"libselinux", "2.8-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libselinux", "2.8-1.fc28", "rpm", "source"}},
|
||||||
{"nss-util", "3.38.0-1.0.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"nss-util", "3.38.0-1.0.fc28", "rpm", "source"}},
|
||||||
{"mpfr", "3.1.6-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"mpfr", "3.1.6-1.fc28", "rpm", "source"}},
|
||||||
{"libunistring", "0.9.10-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libunistring", "0.9.10-1.fc28", "rpm", "source"}},
|
||||||
{"libpcap", "14:1.9.0-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libpcap", "14:1.9.0-1.fc28", "rpm", "binary"}},
|
||||||
{"libarchive", "3.3.1-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libarchive", "3.3.1-4.fc28", "rpm", "binary"}},
|
||||||
{"gmp", "1:6.1.2-7.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gmp", "1:6.1.2-7.fc28", "rpm", "binary"}},
|
||||||
{"crypto-policies", "20180425-5.git6ad4018.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"crypto-policies", "20180425-5.git6ad4018.fc28", "rpm", "source"}},
|
||||||
{"gzip", "1.9-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gzip", "1.9-3.fc28", "rpm", "binary"}},
|
||||||
{"fedora-release", "28-2", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"fedora-release", "28-2", "rpm", "source"}},
|
||||||
{"zlib", "1.2.11-8.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"zlib", "1.2.11-8.fc28", "rpm", "binary"}},
|
||||||
{"crypto-policies", "20180425-5.git6ad4018.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"crypto-policies", "20180425-5.git6ad4018.fc28", "rpm", "binary"}},
|
||||||
{"lz4", "1.8.1.2-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"lz4", "1.8.1.2-4.fc28", "rpm", "source"}},
|
||||||
{"keyutils", "1.5.10-6.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"keyutils", "1.5.10-6.fc28", "rpm", "source"}},
|
||||||
{"gpgme", "1.10.0-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gpgme", "1.10.0-4.fc28", "rpm", "binary"}},
|
||||||
{"libgpg-error", "1.31-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libgpg-error", "1.31-1.fc28", "rpm", "binary"}},
|
||||||
{"gnutls", "3.6.3-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"gnutls", "3.6.3-4.fc28", "rpm", "source"}},
|
||||||
{"coreutils", "8.29-7.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"coreutils", "8.29-7.fc28", "rpm", "source"}},
|
||||||
{"libsepol", "2.8-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libsepol", "2.8-1.fc28", "rpm", "source"}},
|
||||||
{"libssh", "0.8.2-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libssh", "0.8.2-1.fc28", "rpm", "binary"}},
|
||||||
{"libpwquality", "1.4.0-7.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libpwquality", "1.4.0-7.fc28", "rpm", "binary"}},
|
||||||
{"dnf-conf", "2.7.5-12.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"dnf-conf", "2.7.5-12.fc28", "rpm", "binary"}},
|
||||||
{"basesystem", "11-5.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"basesystem", "11-5.fc28", "rpm", "source"}},
|
||||||
{"setup", "2.11.4-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"setup", "2.11.4-1.fc28", "rpm", "binary"}},
|
||||||
{"libmetalink", "0.1.3-6.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libmetalink", "0.1.3-6.fc28", "rpm", "source"}},
|
||||||
{"texinfo", "6.5-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"texinfo", "6.5-4.fc28", "rpm", "source"}},
|
||||||
{"expat", "2.2.5-3.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"expat", "2.2.5-3.fc28", "rpm", "source"}},
|
||||||
{"ncurses", "6.1-5.20180224.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"ncurses", "6.1-5.20180224.fc28", "rpm", "source"}},
|
||||||
{"libpwquality", "1.4.0-7.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libpwquality", "1.4.0-7.fc28", "rpm", "source"}},
|
||||||
{"pcre", "8.42-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"pcre", "8.42-3.fc28", "rpm", "binary"}},
|
||||||
{"sssd", "1.16.3-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"sssd", "1.16.3-2.fc28", "rpm", "source"}},
|
||||||
{"basesystem", "11-5.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"basesystem", "11-5.fc28", "rpm", "binary"}},
|
||||||
{"systemd-pam", "238-9.git0e0aa59.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"systemd-pam", "238-9.git0e0aa59.fc28", "rpm", "binary"}},
|
||||||
{"python3-six", "1.11.0-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-six", "1.11.0-3.fc28", "rpm", "binary"}},
|
||||||
{"libcurl", "7.59.0-6.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libcurl", "7.59.0-6.fc28", "rpm", "binary"}},
|
||||||
{"qrencode", "3.4.4-5.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"qrencode", "3.4.4-5.fc28", "rpm", "source"}},
|
||||||
{"xz", "5.2.4-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"xz", "5.2.4-2.fc28", "rpm", "source"}},
|
||||||
{"libpkgconf", "1.4.2-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libpkgconf", "1.4.2-1.fc28", "rpm", "binary"}},
|
||||||
{"libzstd", "1.3.5-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libzstd", "1.3.5-1.fc28", "rpm", "binary"}},
|
||||||
{"bash", "4.4.23-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"bash", "4.4.23-1.fc28", "rpm", "binary"}},
|
||||||
{"cyrus-sasl", "2.1.27-0.2rc7.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"cyrus-sasl", "2.1.27-0.2rc7.fc28", "rpm", "source"}},
|
||||||
{"ncurses-libs", "6.1-5.20180224.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"ncurses-libs", "6.1-5.20180224.fc28", "rpm", "binary"}},
|
||||||
{"xz-libs", "5.2.4-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"xz-libs", "5.2.4-2.fc28", "rpm", "binary"}},
|
||||||
{"dbus", "1.12.10-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"dbus", "1.12.10-1.fc28", "rpm", "source"}},
|
||||||
{"grep", "3.1-5.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"grep", "3.1-5.fc28", "rpm", "binary"}},
|
||||||
{"libusbx", "1.0.22-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libusbx", "1.0.22-1.fc28", "rpm", "binary"}},
|
||||||
{"audit", "2.8.4-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"audit", "2.8.4-2.fc28", "rpm", "source"}},
|
||||||
{"sed", "4.5-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"sed", "4.5-1.fc28", "rpm", "binary"}},
|
||||||
{"sqlite", "3.22.0-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"sqlite", "3.22.0-4.fc28", "rpm", "source"}},
|
||||||
{"openldap", "2.4.46-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"openldap", "2.4.46-3.fc28", "rpm", "binary"}},
|
||||||
{"gawk", "4.2.1-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gawk", "4.2.1-1.fc28", "rpm", "binary"}},
|
||||||
{"gpgme", "1.10.0-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"gpgme", "1.10.0-4.fc28", "rpm", "source"}},
|
||||||
{"lvm2", "2.02.177-5.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"lvm2", "2.02.177-5.fc28", "rpm", "source"}},
|
||||||
{"nspr", "4.19.0-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"nspr", "4.19.0-1.fc28", "rpm", "source"}},
|
||||||
{"libsolv", "0.6.35-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libsolv", "0.6.35-1.fc28", "rpm", "source"}},
|
||||||
{"info", "6.5-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"info", "6.5-4.fc28", "rpm", "binary"}},
|
||||||
{"openssl-libs", "1:1.1.0h-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"openssl-libs", "1:1.1.0h-3.fc28", "rpm", "binary"}},
|
||||||
{"libxcrypt", "4.1.2-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libxcrypt", "4.1.2-1.fc28", "rpm", "binary"}},
|
||||||
{"libselinux", "2.8-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libselinux", "2.8-1.fc28", "rpm", "binary"}},
|
||||||
{"libgcc", "8.1.1-5.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libgcc", "8.1.1-5.fc28", "rpm", "binary"}},
|
||||||
{"cracklib", "2.9.6-13.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"cracklib", "2.9.6-13.fc28", "rpm", "binary"}},
|
||||||
{"python3-libs", "3.6.6-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-libs", "3.6.6-1.fc28", "rpm", "binary"}},
|
||||||
{"glibc-langpack-en", "2.27-32.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"glibc-langpack-en", "2.27-32.fc28", "rpm", "binary"}},
|
||||||
{"json-c", "0.13.1-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"json-c", "0.13.1-2.fc28", "rpm", "binary"}},
|
||||||
{"gnupg2", "2.2.8-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"gnupg2", "2.2.8-1.fc28", "rpm", "source"}},
|
||||||
{"openssl", "1:1.1.0h-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"openssl", "1:1.1.0h-3.fc28", "rpm", "binary"}},
|
||||||
{"glibc-common", "2.27-32.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"glibc-common", "2.27-32.fc28", "rpm", "binary"}},
|
||||||
{"p11-kit-trust", "0.23.12-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"p11-kit-trust", "0.23.12-1.fc28", "rpm", "binary"}},
|
||||||
{"zstd", "1.3.5-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"zstd", "1.3.5-1.fc28", "rpm", "source"}},
|
||||||
{"libxml2", "2.9.8-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libxml2", "2.9.8-4.fc28", "rpm", "source"}},
|
||||||
{"dbus", "1:1.12.10-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"dbus", "1:1.12.10-1.fc28", "rpm", "binary"}},
|
||||||
{"ca-certificates", "2018.2.24-1.0.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"ca-certificates", "2018.2.24-1.0.fc28", "rpm", "binary"}},
|
||||||
{"libcomps", "0.1.8-11.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libcomps", "0.1.8-11.fc28", "rpm", "binary"}},
|
||||||
{"nss", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"nss", "3.38.0-1.0.fc28", "rpm", "binary"}},
|
||||||
{"libcom_err", "1.44.2-0.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libcom_err", "1.44.2-0.fc28", "rpm", "binary"}},
|
||||||
{"keyutils-libs", "1.5.10-6.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"keyutils-libs", "1.5.10-6.fc28", "rpm", "binary"}},
|
||||||
{"libseccomp", "2.3.3-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libseccomp", "2.3.3-2.fc28", "rpm", "binary"}},
|
||||||
{"elfutils-libs", "0.173-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"elfutils-libs", "0.173-1.fc28", "rpm", "binary"}},
|
||||||
{"libuuid", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libuuid", "2.32.1-1.fc28", "rpm", "binary"}},
|
||||||
{"pkgconf", "1.4.2-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"pkgconf", "1.4.2-1.fc28", "rpm", "source"}},
|
||||||
{"grep", "3.1-5.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"grep", "3.1-5.fc28", "rpm", "source"}},
|
||||||
{"libpcap", "1.9.0-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libpcap", "1.9.0-1.fc28", "rpm", "source"}},
|
||||||
{"deltarpm", "3.6-25.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"deltarpm", "3.6-25.fc28", "rpm", "binary"}},
|
||||||
{"krb5-libs", "1.16.1-13.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"krb5-libs", "1.16.1-13.fc28", "rpm", "binary"}},
|
||||||
{"glibc", "2.27-32.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"glibc", "2.27-32.fc28", "rpm", "binary"}},
|
||||||
{"libseccomp", "2.3.3-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libseccomp", "2.3.3-2.fc28", "rpm", "source"}},
|
||||||
{"libsemanage", "2.8-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsemanage", "2.8-2.fc28", "rpm", "binary"}},
|
||||||
{"openssl-pkcs11", "0.4.8-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"openssl-pkcs11", "0.4.8-1.fc28", "rpm", "binary"}},
|
||||||
{"libxml2", "2.9.8-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libxml2", "2.9.8-4.fc28", "rpm", "binary"}},
|
||||||
{"e2fsprogs", "1.44.2-0.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"e2fsprogs", "1.44.2-0.fc28", "rpm", "source"}},
|
||||||
{"file-libs", "5.33-7.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"file-libs", "5.33-7.fc28", "rpm", "binary"}},
|
||||||
{"elfutils-default-yama-scope", "0.173-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"elfutils-default-yama-scope", "0.173-1.fc28", "rpm", "binary"}},
|
||||||
{"glibc", "2.27-32.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"glibc", "2.27-32.fc28", "rpm", "source"}},
|
||||||
{"publicsuffix-list-dafsa", "20180514-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"publicsuffix-list-dafsa", "20180514-1.fc28", "rpm", "binary"}},
|
||||||
{"popt", "1.16-14.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"popt", "1.16-14.fc28", "rpm", "binary"}},
|
||||||
{"libnsl2", "1.2.0-2.20180605git4a062cf.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libnsl2", "1.2.0-2.20180605git4a062cf.fc28", "rpm", "binary"}},
|
||||||
{"lua-libs", "5.3.4-10.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"lua-libs", "5.3.4-10.fc28", "rpm", "binary"}},
|
||||||
{"libsemanage", "2.8-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libsemanage", "2.8-2.fc28", "rpm", "source"}},
|
||||||
{"glibc-minimal-langpack", "2.27-32.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"glibc-minimal-langpack", "2.27-32.fc28", "rpm", "binary"}},
|
||||||
{"attr", "2.4.48-3.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"attr", "2.4.48-3.fc28", "rpm", "source"}},
|
||||||
{"gdbm", "1.14.1-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"gdbm", "1.14.1-4.fc28", "rpm", "source"}},
|
||||||
{"pkgconf", "1.4.2-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"pkgconf", "1.4.2-1.fc28", "rpm", "binary"}},
|
||||||
{"acl", "2.2.53-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"acl", "2.2.53-1.fc28", "rpm", "source"}},
|
||||||
{"gnutls", "3.6.3-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gnutls", "3.6.3-4.fc28", "rpm", "binary"}},
|
||||||
{"fedora-repos", "28-5", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"fedora-repos", "28-5", "rpm", "source"}},
|
||||||
{"python3-pip", "9.0.3-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-pip", "9.0.3-2.fc28", "rpm", "binary"}},
|
||||||
{"libnsl2", "1.2.0-2.20180605git4a062cf.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libnsl2", "1.2.0-2.20180605git4a062cf.fc28", "rpm", "source"}},
|
||||||
{"rpm", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"rpm", "4.14.1-9.fc28", "rpm", "binary"}},
|
||||||
{"libutempter", "1.1.6-14.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libutempter", "1.1.6-14.fc28", "rpm", "source"}},
|
||||||
{"libdnf", "0.11.1-3.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libdnf", "0.11.1-3.fc28", "rpm", "source"}},
|
||||||
{"vim-minimal", "2:8.1.328-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"vim-minimal", "2:8.1.328-1.fc28", "rpm", "binary"}},
|
||||||
{"tzdata", "2018e-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"tzdata", "2018e-1.fc28", "rpm", "binary"}},
|
||||||
{"nettle", "3.4-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"nettle", "3.4-2.fc28", "rpm", "binary"}},
|
||||||
{"python-pip", "9.0.3-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"python-pip", "9.0.3-2.fc28", "rpm", "source"}},
|
||||||
{"python-six", "1.11.0-3.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"python-six", "1.11.0-3.fc28", "rpm", "source"}},
|
||||||
{"diffutils", "3.6-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"diffutils", "3.6-4.fc28", "rpm", "binary"}},
|
||||||
{"rpm-plugin-selinux", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"rpm-plugin-selinux", "4.14.1-9.fc28", "rpm", "binary"}},
|
||||||
{"shadow-utils", "2:4.6-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"shadow-utils", "2:4.6-1.fc28", "rpm", "binary"}},
|
||||||
{"pkgconf-pkg-config", "1.4.2-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"pkgconf-pkg-config", "1.4.2-1.fc28", "rpm", "binary"}},
|
||||||
{"cracklib-dicts", "2.9.6-13.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"cracklib-dicts", "2.9.6-13.fc28", "rpm", "binary"}},
|
||||||
{"libblkid", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libblkid", "2.32.1-1.fc28", "rpm", "binary"}},
|
||||||
{"python-setuptools", "39.2.0-6.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"python-setuptools", "39.2.0-6.fc28", "rpm", "source"}},
|
||||||
{"libsss_idmap", "1.16.3-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsss_idmap", "1.16.3-2.fc28", "rpm", "binary"}},
|
||||||
{"libksba", "1.3.5-7.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libksba", "1.3.5-7.fc28", "rpm", "source"}},
|
||||||
{"sssd-client", "1.16.3-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"sssd-client", "1.16.3-2.fc28", "rpm", "binary"}},
|
||||||
{"curl", "7.59.0-6.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"curl", "7.59.0-6.fc28", "rpm", "binary"}},
|
||||||
{"pam", "1.3.1-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"pam", "1.3.1-1.fc28", "rpm", "binary"}},
|
||||||
{"libsigsegv", "2.11-5.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsigsegv", "2.11-5.fc28", "rpm", "binary"}},
|
||||||
{"langpacks-en", "1.0-12.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"langpacks-en", "1.0-12.fc28", "rpm", "binary"}},
|
||||||
{"nss-softokn-freebl", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"nss-softokn-freebl", "3.38.0-1.0.fc28", "rpm", "binary"}},
|
||||||
{"glib2", "2.56.1-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"glib2", "2.56.1-4.fc28", "rpm", "binary"}},
|
||||||
{"python3-gobject-base", "3.28.3-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-gobject-base", "3.28.3-1.fc28", "rpm", "binary"}},
|
||||||
{"libffi", "3.1-16.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libffi", "3.1-16.fc28", "rpm", "source"}},
|
||||||
{"libmodulemd", "1.6.2-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libmodulemd", "1.6.2-2.fc28", "rpm", "source"}},
|
||||||
{"openssl", "1.1.0h-3.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"openssl", "1.1.0h-3.fc28", "rpm", "source"}},
|
||||||
{"libyaml", "0.1.7-5.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libyaml", "0.1.7-5.fc28", "rpm", "source"}},
|
||||||
{"pam", "1.3.1-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"pam", "1.3.1-1.fc28", "rpm", "source"}},
|
||||||
{"iptables", "1.6.2-3.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"iptables", "1.6.2-3.fc28", "rpm", "source"}},
|
||||||
{"util-linux", "2.32.1-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"util-linux", "2.32.1-1.fc28", "rpm", "source"}},
|
||||||
{"libsmartcols", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsmartcols", "2.32.1-1.fc28", "rpm", "binary"}},
|
||||||
{"dnf", "2.7.5-12.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"dnf", "2.7.5-12.fc28", "rpm", "binary"}},
|
||||||
{"glib2", "2.56.1-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"glib2", "2.56.1-4.fc28", "rpm", "source"}},
|
||||||
{"lua", "5.3.4-10.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"lua", "5.3.4-10.fc28", "rpm", "source"}},
|
||||||
{"nss-softokn", "3.38.0-1.0.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"nss-softokn", "3.38.0-1.0.fc28", "rpm", "source"}},
|
||||||
{"python3-dnf", "2.7.5-12.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-dnf", "2.7.5-12.fc28", "rpm", "binary"}},
|
||||||
{"filesystem", "3.8-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"filesystem", "3.8-2.fc28", "rpm", "binary"}},
|
||||||
{"libsss_nss_idmap", "1.16.3-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsss_nss_idmap", "1.16.3-2.fc28", "rpm", "binary"}},
|
||||||
{"pcre2", "10.31-10.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"pcre2", "10.31-10.fc28", "rpm", "source"}},
|
||||||
{"libyaml", "0.1.7-5.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libyaml", "0.1.7-5.fc28", "rpm", "binary"}},
|
||||||
{"python3-rpm", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-rpm", "4.14.1-9.fc28", "rpm", "binary"}},
|
||||||
{"zlib", "1.2.11-8.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"zlib", "1.2.11-8.fc28", "rpm", "source"}},
|
||||||
{"libutempter", "1.1.6-14.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libutempter", "1.1.6-14.fc28", "rpm", "binary"}},
|
||||||
{"pcre2", "10.31-10.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"pcre2", "10.31-10.fc28", "rpm", "binary"}},
|
||||||
{"libtirpc", "1.0.3-3.rc2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libtirpc", "1.0.3-3.rc2.fc28", "rpm", "source"}},
|
||||||
{"pkgconf-m4", "1.4.2-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"pkgconf-m4", "1.4.2-1.fc28", "rpm", "binary"}},
|
||||||
{"libreport", "2.9.5-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libreport", "2.9.5-1.fc28", "rpm", "source"}},
|
||||||
{"vim", "8.1.328-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"vim", "8.1.328-1.fc28", "rpm", "source"}},
|
||||||
{"file", "5.33-7.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"file", "5.33-7.fc28", "rpm", "source"}},
|
||||||
{"shadow-utils", "4.6-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"shadow-utils", "4.6-1.fc28", "rpm", "source"}},
|
||||||
{"sqlite-libs", "3.22.0-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"sqlite-libs", "3.22.0-4.fc28", "rpm", "binary"}},
|
||||||
{"setup", "2.11.4-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"setup", "2.11.4-1.fc28", "rpm", "source"}},
|
||||||
{"gcc", "8.1.1-5.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"gcc", "8.1.1-5.fc28", "rpm", "source"}},
|
||||||
{"mpfr", "3.1.6-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"mpfr", "3.1.6-1.fc28", "rpm", "binary"}},
|
||||||
{"device-mapper", "1.02.146-5.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"device-mapper", "1.02.146-5.fc28", "rpm", "binary"}},
|
||||||
{"p11-kit", "0.23.12-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"p11-kit", "0.23.12-1.fc28", "rpm", "source"}},
|
||||||
{"fedora-release", "28-2", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"fedora-release", "28-2", "rpm", "binary"}},
|
||||||
{"libnghttp2", "1.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libnghttp2", "1.32.1-1.fc28", "rpm", "binary"}},
|
||||||
{"libcap-ng", "0.7.9-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libcap-ng", "0.7.9-4.fc28", "rpm", "source"}},
|
||||||
{"iptables-libs", "1.6.2-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"iptables-libs", "1.6.2-3.fc28", "rpm", "binary"}},
|
||||||
{"audit-libs", "2.8.4-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"audit-libs", "2.8.4-2.fc28", "rpm", "binary"}},
|
||||||
{"libsigsegv", "2.11-5.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libsigsegv", "2.11-5.fc28", "rpm", "source"}},
|
||||||
{"rootfiles", "8.1-22.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"rootfiles", "8.1-22.fc28", "rpm", "source"}},
|
||||||
{"kmod-libs", "25-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"kmod-libs", "25-2.fc28", "rpm", "binary"}},
|
||||||
{"lz4-libs", "1.8.1.2-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"lz4-libs", "1.8.1.2-4.fc28", "rpm", "binary"}},
|
||||||
{"libassuan", "2.5.1-3.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libassuan", "2.5.1-3.fc28", "rpm", "source"}},
|
||||||
{"p11-kit", "0.23.12-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"p11-kit", "0.23.12-1.fc28", "rpm", "binary"}},
|
||||||
{"nss-sysinit", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"nss-sysinit", "3.38.0-1.0.fc28", "rpm", "binary"}},
|
||||||
{"libcap-ng", "0.7.9-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libcap-ng", "0.7.9-4.fc28", "rpm", "binary"}},
|
||||||
{"bash", "4.4.23-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"bash", "4.4.23-1.fc28", "rpm", "source"}},
|
||||||
{"pygobject3", "3.28.3-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"pygobject3", "3.28.3-1.fc28", "rpm", "source"}},
|
||||||
{"dnf-yum", "2.7.5-12.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"dnf-yum", "2.7.5-12.fc28", "rpm", "binary"}},
|
||||||
{"nss-softokn", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"nss-softokn", "3.38.0-1.0.fc28", "rpm", "binary"}},
|
||||||
{"expat", "2.2.5-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"expat", "2.2.5-3.fc28", "rpm", "binary"}},
|
||||||
{"libassuan", "2.5.1-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libassuan", "2.5.1-3.fc28", "rpm", "binary"}},
|
||||||
{"libdb", "5.3.28-30.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libdb", "5.3.28-30.fc28", "rpm", "binary"}},
|
||||||
{"tar", "2:1.30-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"tar", "2:1.30-3.fc28", "rpm", "binary"}},
|
||||||
{"sed", "4.5-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"sed", "4.5-1.fc28", "rpm", "source"}},
|
||||||
{"libmetalink", "0.1.3-6.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libmetalink", "0.1.3-6.fc28", "rpm", "binary"}},
|
||||||
{"python-smartcols", "0.3.0-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"python-smartcols", "0.3.0-2.fc28", "rpm", "source"}},
|
||||||
{"systemd", "238-9.git0e0aa59.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"systemd", "238-9.git0e0aa59.fc28", "rpm", "source"}},
|
||||||
{"python-iniparse", "0.4-30.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"python-iniparse", "0.4-30.fc28", "rpm", "source"}},
|
||||||
{"libsepol", "2.8-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsepol", "2.8-1.fc28", "rpm", "binary"}},
|
||||||
{"libattr", "2.4.48-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libattr", "2.4.48-3.fc28", "rpm", "binary"}},
|
||||||
{"python3-smartcols", "0.3.0-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-smartcols", "0.3.0-2.fc28", "rpm", "binary"}},
|
||||||
{"libdb", "5.3.28-30.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libdb", "5.3.28-30.fc28", "rpm", "source"}},
|
||||||
{"libmodulemd", "1.6.2-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libmodulemd", "1.6.2-2.fc28", "rpm", "binary"}},
|
||||||
{"python3-hawkey", "0.11.1-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-hawkey", "0.11.1-3.fc28", "rpm", "binary"}},
|
||||||
{"dbus-libs", "1:1.12.10-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"dbus-libs", "1:1.12.10-1.fc28", "rpm", "binary"}},
|
||||||
{"chkconfig", "1.10-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"chkconfig", "1.10-4.fc28", "rpm", "source"}},
|
||||||
{"libargon2", "20161029-5.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libargon2", "20161029-5.fc28", "rpm", "binary"}},
|
||||||
{"openssl-pkcs11", "0.4.8-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"openssl-pkcs11", "0.4.8-1.fc28", "rpm", "source"}},
|
||||||
{"libusbx", "1.0.22-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libusbx", "1.0.22-1.fc28", "rpm", "source"}},
|
||||||
{"python3-setuptools", "39.2.0-6.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-setuptools", "39.2.0-6.fc28", "rpm", "binary"}},
|
||||||
{"chkconfig", "1.10-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"chkconfig", "1.10-4.fc28", "rpm", "binary"}},
|
||||||
{"openldap", "2.4.46-3.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"openldap", "2.4.46-3.fc28", "rpm", "source"}},
|
||||||
{"bzip2", "1.0.6-26.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"bzip2", "1.0.6-26.fc28", "rpm", "source"}},
|
||||||
{"npth", "1.5-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"npth", "1.5-4.fc28", "rpm", "source"}},
|
||||||
{"libtirpc", "1.0.3-3.rc2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libtirpc", "1.0.3-3.rc2.fc28", "rpm", "binary"}},
|
||||||
{"util-linux", "2.32.1-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"util-linux", "2.32.1-1.fc28", "rpm", "binary"}},
|
||||||
{"nss", "3.38.0-1.0.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"nss", "3.38.0-1.0.fc28", "rpm", "source"}},
|
||||||
{"elfutils", "0.173-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"elfutils", "0.173-1.fc28", "rpm", "source"}},
|
||||||
{"libcomps", "0.1.8-11.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libcomps", "0.1.8-11.fc28", "rpm", "source"}},
|
||||||
{"libxcrypt", "4.1.2-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libxcrypt", "4.1.2-1.fc28", "rpm", "source"}},
|
||||||
{"gnupg2", "2.2.8-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gnupg2", "2.2.8-1.fc28", "rpm", "binary"}},
|
||||||
{"libdnf", "0.11.1-3.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libdnf", "0.11.1-3.fc28", "rpm", "binary"}},
|
||||||
{"cracklib", "2.9.6-13.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"cracklib", "2.9.6-13.fc28", "rpm", "source"}},
|
||||||
{"libidn2", "2.0.5-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libidn2", "2.0.5-1.fc28", "rpm", "source"}},
|
||||||
{"bzip2-libs", "1.0.6-26.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"bzip2-libs", "1.0.6-26.fc28", "rpm", "binary"}},
|
||||||
{"json-c", "0.13.1-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"json-c", "0.13.1-2.fc28", "rpm", "source"}},
|
||||||
{"gdbm", "1:1.14.1-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gdbm", "1:1.14.1-4.fc28", "rpm", "binary"}},
|
||||||
{"pcre", "8.42-3.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"pcre", "8.42-3.fc28", "rpm", "source"}},
|
||||||
{"systemd", "238-9.git0e0aa59.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"systemd", "238-9.git0e0aa59.fc28", "rpm", "binary"}},
|
||||||
{"cryptsetup-libs", "2.0.4-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"cryptsetup-libs", "2.0.4-1.fc28", "rpm", "binary"}},
|
||||||
{"dnf", "2.7.5-12.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"dnf", "2.7.5-12.fc28", "rpm", "source"}},
|
||||||
{"ca-certificates", "2018.2.24-1.0.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"ca-certificates", "2018.2.24-1.0.fc28", "rpm", "source"}},
|
||||||
{"libidn2", "2.0.5-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libidn2", "2.0.5-1.fc28", "rpm", "binary"}},
|
||||||
{"libpsl", "0.20.2-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libpsl", "0.20.2-2.fc28", "rpm", "binary"}},
|
||||||
{"gdbm-libs", "1:1.14.1-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gdbm-libs", "1:1.14.1-4.fc28", "rpm", "binary"}},
|
||||||
{"kmod", "25-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"kmod", "25-2.fc28", "rpm", "source"}},
|
||||||
{"libreport-filesystem", "2.9.5-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libreport-filesystem", "2.9.5-1.fc28", "rpm", "binary"}},
|
||||||
{"ima-evm-utils", "1.1-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"ima-evm-utils", "1.1-2.fc28", "rpm", "source"}},
|
||||||
{"nghttp2", "1.32.1-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"nghttp2", "1.32.1-1.fc28", "rpm", "source"}},
|
||||||
{"cyrus-sasl-lib", "2.1.27-0.2rc7.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"cyrus-sasl-lib", "2.1.27-0.2rc7.fc28", "rpm", "binary"}},
|
||||||
{"libsolv", "0.6.35-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libsolv", "0.6.35-1.fc28", "rpm", "binary"}},
|
||||||
{"cryptsetup", "2.0.4-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"cryptsetup", "2.0.4-1.fc28", "rpm", "source"}},
|
||||||
{"filesystem", "3.8-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"filesystem", "3.8-2.fc28", "rpm", "source"}},
|
||||||
{"libcap", "2.25-9.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libcap", "2.25-9.fc28", "rpm", "source"}},
|
||||||
{"libpsl", "0.20.2-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libpsl", "0.20.2-2.fc28", "rpm", "source"}},
|
||||||
{"deltarpm", "3.6-25.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"deltarpm", "3.6-25.fc28", "rpm", "source"}},
|
||||||
{"fedora-gpg-keys", "28-5", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"fedora-gpg-keys", "28-5", "rpm", "binary"}},
|
||||||
{"ima-evm-utils", "1.1-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"ima-evm-utils", "1.1-2.fc28", "rpm", "binary"}},
|
||||||
{"nss-tools", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"nss-tools", "3.38.0-1.0.fc28", "rpm", "binary"}},
|
||||||
{"libtasn1", "4.13-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libtasn1", "4.13-2.fc28", "rpm", "source"}},
|
||||||
{"elfutils-libelf", "0.173-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"elfutils-libelf", "0.173-1.fc28", "rpm", "binary"}},
|
||||||
{"device-mapper-libs", "1.02.146-5.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"device-mapper-libs", "1.02.146-5.fc28", "rpm", "binary"}},
|
||||||
{"gobject-introspection", "1.56.1-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"gobject-introspection", "1.56.1-1.fc28", "rpm", "source"}},
|
||||||
{"publicsuffix-list", "20180514-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"publicsuffix-list", "20180514-1.fc28", "rpm", "source"}},
|
||||||
{"libcap", "2.25-9.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libcap", "2.25-9.fc28", "rpm", "binary"}},
|
||||||
{"librepo", "1.8.1-7.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"librepo", "1.8.1-7.fc28", "rpm", "binary"}},
|
||||||
{"rpm-sign-libs", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"rpm-sign-libs", "4.14.1-9.fc28", "rpm", "binary"}},
|
||||||
{"coreutils-single", "8.29-7.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"coreutils-single", "8.29-7.fc28", "rpm", "binary"}},
|
||||||
{"libacl", "2.2.53-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libacl", "2.2.53-1.fc28", "rpm", "binary"}},
|
||||||
{"popt", "1.16-14.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"popt", "1.16-14.fc28", "rpm", "source"}},
|
||||||
{"libtasn1", "4.13-2.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libtasn1", "4.13-2.fc28", "rpm", "binary"}},
|
||||||
{"gawk", "4.2.1-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"gawk", "4.2.1-1.fc28", "rpm", "source"}},
|
||||||
{"diffutils", "3.6-4.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"diffutils", "3.6-4.fc28", "rpm", "source"}},
|
||||||
{"libgpg-error", "1.31-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libgpg-error", "1.31-1.fc28", "rpm", "source"}},
|
||||||
{"libdb-utils", "5.3.28-30.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libdb-utils", "5.3.28-30.fc28", "rpm", "binary"}},
|
||||||
{"python3-iniparse", "0.4-30.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-iniparse", "0.4-30.fc28", "rpm", "binary"}},
|
||||||
{"acl", "2.2.53-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"acl", "2.2.53-1.fc28", "rpm", "binary"}},
|
||||||
{"libssh", "0.8.2-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libssh", "0.8.2-1.fc28", "rpm", "source"}},
|
||||||
{"python3-librepo", "1.8.1-7.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-librepo", "1.8.1-7.fc28", "rpm", "binary"}},
|
||||||
{"gobject-introspection", "1.56.1-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"gobject-introspection", "1.56.1-1.fc28", "rpm", "binary"}},
|
||||||
{"rpm", "4.14.1-9.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"rpm", "4.14.1-9.fc28", "rpm", "source"}},
|
||||||
{"libgcrypt", "1.8.3-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"libgcrypt", "1.8.3-1.fc28", "rpm", "source"}},
|
||||||
{"curl", "7.59.0-6.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"curl", "7.59.0-6.fc28", "rpm", "source"}},
|
||||||
{"tzdata", "2018e-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"tzdata", "2018e-1.fc28", "rpm", "source"}},
|
||||||
{"krb5", "1.16.1-13.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"krb5", "1.16.1-13.fc28", "rpm", "source"}},
|
||||||
{"librepo", "1.8.1-7.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"librepo", "1.8.1-7.fc28", "rpm", "source"}},
|
||||||
{"python3-gpg", "1.10.0-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-gpg", "1.10.0-4.fc28", "rpm", "binary"}},
|
||||||
{"nettle", "3.4-2.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"nettle", "3.4-2.fc28", "rpm", "source"}},
|
||||||
{"libgcrypt", "1.8.3-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libgcrypt", "1.8.3-1.fc28", "rpm", "binary"}},
|
||||||
{"python3", "3.6.6-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3", "3.6.6-1.fc28", "rpm", "binary"}},
|
||||||
{"python3-libcomps", "0.1.8-11.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"python3-libcomps", "0.1.8-11.fc28", "rpm", "binary"}},
|
||||||
{"rpm-libs", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"rpm-libs", "4.14.1-9.fc28", "rpm", "binary"}},
|
||||||
{"nspr", "4.19.0-1.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"nspr", "4.19.0-1.fc28", "rpm", "binary"}},
|
||||||
{"argon2", "20161029-5.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"argon2", "20161029-5.fc28", "rpm", "source"}},
|
||||||
{"tar", "1.30-3.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"tar", "1.30-3.fc28", "rpm", "source"}},
|
||||||
{"qrencode-libs", "3.4.4-5.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"qrencode-libs", "3.4.4-5.fc28", "rpm", "binary"}},
|
||||||
{"gmp", "6.1.2-7.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"gmp", "6.1.2-7.fc28", "rpm", "source"}},
|
||||||
{"libverto", "0.3.0-5.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libverto", "0.3.0-5.fc28", "rpm", "binary"}},
|
||||||
{"python3", "3.6.6-1.fc28", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"python3", "3.6.6-1.fc28", "rpm", "source"}},
|
||||||
{"libksba", "1.3.5-7.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"libksba", "1.3.5-7.fc28", "rpm", "binary"}},
|
||||||
{"readline", "7.0-11.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"readline", "7.0-11.fc28", "rpm", "binary"}},
|
||||||
{"rpm-build-libs", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"rpm-build-libs", "4.14.1-9.fc28", "rpm", "binary"}},
|
||||||
{"npth", "1.5-4.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"npth", "1.5-4.fc28", "rpm", "binary"}},
|
||||||
{"rootfiles", "8.1-22.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"rootfiles", "8.1-22.fc28", "rpm", "binary"}},
|
||||||
{"rpm-plugin-systemd-inhibit", "4.14.1-9.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"rpm-plugin-systemd-inhibit", "4.14.1-9.fc28", "rpm", "binary"}},
|
||||||
{"systemd-libs", "238-9.git0e0aa59.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"systemd-libs", "238-9.git0e0aa59.fc28", "rpm", "binary"}},
|
||||||
{"nss-util", "3.38.0-1.0.fc28", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"nss-util", "3.38.0-1.0.fc28", "rpm", "binary"}},
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRpmFeatureDetection(t *testing.T) {
|
func TestRpmFeatureDetection(t *testing.T) {
|
||||||
@ -333,11 +333,11 @@ 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.LayerFeature{
|
||||||
{"centos-release", "7-1.1503.el7.centos.2.8", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"centos-release", "7-1.1503.el7.centos.2.8", "rpm", "binary"}},
|
||||||
{"filesystem", "3.2-18.el7", "rpm", "binary", database.Namespace{}},
|
{Feature: database.Feature{"filesystem", "3.2-18.el7", "rpm", "binary"}},
|
||||||
{"centos-release", "7-1.1503.el7.centos.2.8", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"centos-release", "7-1.1503.el7.centos.2.8", "rpm", "source"}},
|
||||||
{"filesystem", "3.2-18.el7", "rpm", "source", database.Namespace{}},
|
{Feature: database.Feature{"filesystem", "3.2-18.el7", "rpm", "source"}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -54,7 +54,7 @@ func loadTestFiles(testFilePaths map[string]string) tarutil.FilesMap {
|
|||||||
type TestCase struct {
|
type TestCase struct {
|
||||||
Name string
|
Name string
|
||||||
FilePaths map[string]string
|
FilePaths map[string]string
|
||||||
ExpectedResult []database.Feature
|
ExpectedResult []database.LayerFeature
|
||||||
}
|
}
|
||||||
|
|
||||||
// RunTest runs a featurefmt test by loading the package info database files and
|
// RunTest runs a featurefmt test by loading the package info database files and
|
||||||
@ -65,7 +65,7 @@ func RunTest(t *testing.T, test TestCase, lister Lister, expectedVersionFormat s
|
|||||||
expected := test.ExpectedResult
|
expected := test.ExpectedResult
|
||||||
features, err := lister.ListFeatures(filesMap)
|
features, err := lister.ListFeatures(filesMap)
|
||||||
require.Nil(t, err)
|
require.Nil(t, err)
|
||||||
visited := map[database.Feature]bool{}
|
visited := map[database.LayerFeature]bool{}
|
||||||
// we only enforce the unique packages to match, the result features
|
// we only enforce the unique packages to match, the result features
|
||||||
// should be always deduplicated.
|
// should be always deduplicated.
|
||||||
for _, pkg := range expected {
|
for _, pkg := range expected {
|
||||||
@ -84,7 +84,7 @@ func RunTest(t *testing.T, test TestCase, lister Lister, expectedVersionFormat s
|
|||||||
visited[f] = true
|
visited[f] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
missingPackages := []database.Feature{}
|
missingPackages := []database.LayerFeature{}
|
||||||
for pkg, ok := range visited {
|
for pkg, ok := range visited {
|
||||||
if !ok {
|
if !ok {
|
||||||
missingPackages = append(missingPackages, pkg)
|
missingPackages = append(missingPackages, pkg)
|
||||||
|
Loading…
Reference in New Issue
Block a user