mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 08:53:15 +01:00
Expand deb cataloger to include opkg (#1985)
* Add opkg info directory and status file to deb cataloger opkg uses the same or nearly the same metadata and structure as Debian: **/lib/opkg/status lists status information for all packages **/lib/opkg/info/opkg.conffiles is a list of configuration files **/lib/opkg/info/*.list contains files and directories installed by the package **/lib/opkg/info/*.preinst are scripts to run before installation **/lib/opkg/info/*.postinst are scripts to run after installation **/lib/opkg/info/*.postrm are scripts to run after package removal **/lib/opkg/info/*.control provides package metadata Signed-off-by: Nicholas R. Smith <nicholas_smith@selinc.com> --------- Signed-off-by: Nicholas R. Smith <nicholas_smith@selinc.com> Co-authored-by: Nicholas R. Smith <nicholas_smith@selinc.com>
This commit is contained in:
parent
c2b4231cc3
commit
e55277f26d
@ -14,5 +14,5 @@ func NewDpkgdbCataloger() *generic.Cataloger {
|
||||
return generic.NewCataloger(catalogerName).
|
||||
// note: these globs have been intentionally split up in order to improve search performance,
|
||||
// please do NOT combine into: "**/var/lib/dpkg/{status,status.d/*}"
|
||||
WithParserByGlobs(parseDpkgDB, "**/var/lib/dpkg/status", "**/var/lib/dpkg/status.d/*")
|
||||
WithParserByGlobs(parseDpkgDB, "**/var/lib/dpkg/status", "**/var/lib/dpkg/status.d/*", "**/lib/opkg/info/*", "**/lib/opkg/status")
|
||||
}
|
||||
|
||||
@ -168,6 +168,8 @@ func TestCataloger_Globs(t *testing.T) {
|
||||
expected: []string{
|
||||
"var/lib/dpkg/status",
|
||||
"var/lib/dpkg/status.d/pkg-1.0",
|
||||
"usr/lib/opkg/status",
|
||||
"usr/lib/opkg/info/pkg-1.0",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -0,0 +1 @@
|
||||
bogus package
|
||||
@ -0,0 +1 @@
|
||||
bogus status
|
||||
Loading…
x
Reference in New Issue
Block a user