Skip to content

Conversation

0intro
Copy link
Contributor

@0intro 0intro commented Aug 18, 2025

This change handles virtual packages in dpkginfo probe by parsing the "Provides" field of /var/lib/dpkg/status.

Instead of relying on the "Package" field exclusively, this change also matches the requested package name with the package names listed in the "Provides" field.

It should allow to query virtual package names like "system-log-daemon" to actually installed packages likes "rsyslog" and so on.

See deb-control(5).

This PR is currently a work-in-progress.

This change handles virtual packages in dpkginfo probe
by parsing the "Provides" field of /var/lib/dpkg/status.

Instead of relying on the "Package" field exclusively,
this change also matches the requested package name with
the package names listed in the "Provides" field.

It should allow to query virtual package names like
"system-log-daemon" to actually installed packages
likes "rsyslog" and so on.

See deb-control(5).
@evgenyz
Copy link
Contributor

evgenyz commented Sep 17, 2025

Is the PR still WIP?

I see that we don't really have a test for dpkginfo probe except for test_mitre_linux_probes.sh, which is not enabled by default (ENABLE_MITRE). Do you think it'd make sense to do something about that?

@evgenyz
Copy link
Contributor

evgenyz commented Sep 17, 2025

BTW if enabled test_mitre_linux_probes.sh fails on Fedora :(

@0intro
Copy link
Contributor Author

0intro commented Sep 17, 2025

I'd like to have feedback from @a-skr to confirm it solves his issue.

Yes, it would be nice to add tests from the dpkg probe, since it's pretty much untested by the CI currently.

@a-skr
Copy link

a-skr commented Sep 18, 2025

I just checked, and the issue is solved.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants