Documentation
¶
Overview ¶
Package rpm allows for inspecting RPM databases in BerkleyDB, NDB, and SQLite formats.
Index ¶
Constants ¶
const Version = "10"
Variables ¶
This section is empty.
Functions ¶
func FindDBs ¶
FindDBs walks the passed fs.FS looking for any files that seem to be rpm databases.
The returned iterator closes over the passed fs.FS. The returned FoundDB values are only valid to use with the same fs.FS value.
func MatchVulnerable ¶ added in v1.5.53
func MatchVulnerable(ctx context.Context, rec *claircore.IndexRecord, vuln *claircore.Vulnerability) (bool, error)
MatchVulnerable is a function implementing "driver.Matcher.Vulnerable" in a common way.
Given a package version "P" and vulnerability "V":
- If a fixed version "F" is specified in "V", "P < F" is reported.
- If a package version "F" is specified in "V", "P <= F" is reported.
- If no version is provided in "V", this function compares against an "infinite" version.
In addition to this version comparison, the architectures are compared.
Any other consideration (e.g. Repository, Distribution) must be handled by the caller.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database is a handle to an RPM database.
type FoundDB ¶
type FoundDB struct {
// contains filtered or unexported fields
}
FoundDB is a pointer to a probable rpm database found in an fs.FS.
type HeaderReader ¶
HeaderReader is the interface implemented for in-process RPM database handlers.
type Info ¶
type Info struct {
Name string
Version string
Release string
SourceRPM string
Module string
Arch string
Digest string
Signature []byte // This is a PGP signature packet.
DigestAlgo int
Epoch int
// contains filtered or unexported fields
}
Info is the package information extracted from the RPM header.
func (*Info) Filenames ¶
Filenames returns an iterator over all paths in the Info.
The returned paths are fs.FS-valid.
func (*Info) InsertIntoSet ¶
InsertIntoSet inserts filtered "relevant" paths into the provided PathSet.
func (*Info) Load ¶
Load populates the receiver with information extracted from the provided rpmdb.Header.
func (*Info) ModuleStream ¶
ModuleStream reports the module and stream from the full module version.
It returns the empty string if the Info does not describe a package from a module.
type PathSet ¶
type PathSet struct {
// contains filtered or unexported fields
}
PathSet is used to check if a path is an RPM-owned file.
func NewPathSet ¶
NewPathSet returns a PathSet for the provided layer.
Notes ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bdb provides support for read-only access to an RPM database using the BerkeleyDB "hash" format.
|
Package bdb provides support for read-only access to an RPM database using the BerkeleyDB "hash" format. |
|
Package ndb provides support for read-only access to an RPM "ndb" database.
|
Package ndb provides support for read-only access to an RPM "ndb" database. |
|
See the reference material at https://rpm-software-management.github.io/rpm/manual/.
|
See the reference material at https://rpm-software-management.github.io/rpm/manual/. |
|
Package sqlite extracts RPM package information from SQLite databases.
|
Package sqlite extracts RPM package information from SQLite databases. |