Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPM database not found on ostree-managed systems #1755

Closed
fpytloun opened this issue Apr 21, 2023 · 0 comments · Fixed by #1756
Closed

RPM database not found on ostree-managed systems #1755

fpytloun opened this issue Apr 21, 2023 · 0 comments · Fixed by #1756
Labels
bug Something isn't working

Comments

@fpytloun
Copy link
Contributor

fpytloun commented Apr 21, 2023

What happened:

RPM database is hard-coded to be scanned in /var/lib/rpm but ostree-managed system has immutable RPM database thus stored in /usr/share/rpm:

bash-5.1# ls -lh /usr/share/rpm
total 36M
-rw-r--r-- 1 0 0 36M Oct  4  2022 rpmdb.sqlite
-rw-r--r-- 1 0 0 32K Oct  4  2022 rpmdb.sqlite-shm
-rw-r--r-- 1 0 0   0 Oct  4  2022 rpmdb.sqlite-wal

What you expected to happen:

Syft should be able to use /usr/share/rpm if present.

Steps to reproduce the issue:

Have some OSTree-managed image (eg. CentOS 7 Atomic or some custom system)

Anything else we need to know?:

Possible solution is here:
https://github.com/anchore/syft/blob/main/syft/pkg/rpm_metadata.go#L14

Environment:

  • Output of syft version:
  • OS (e.g: cat /etc/os-release or similar):
@fpytloun fpytloun added the bug Something isn't working label Apr 21, 2023
fpytloun added a commit to fpytloun/syft that referenced this issue Apr 21, 2023
fpytloun added a commit to fpytloun/syft that referenced this issue May 1, 2023
fixes: anchore#1755
Signed-off-by: Filip Pytloun <filip@pytloun.cz>
fpytloun added a commit to fpytloun/syft that referenced this issue May 2, 2023
fixes: anchore#1755
Signed-off-by: Filip Pytloun <filip@pytloun.cz>
fpytloun added a commit to fpytloun/syft that referenced this issue May 2, 2023
Fixes: anchore#1755
Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
Signed-off-by: Filip Pytloun <filip@pytloun.cz>
fpytloun added a commit to fpytloun/syft that referenced this issue May 2, 2023
Fixes: anchore#1755
Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
Signed-off-by: Filip Pytloun <filip@pytloun.cz>
wagoodman added a commit that referenced this issue May 2, 2023
Fixes: #1755

Signed-off-by: Filip Pytloun <filip@pytloun.cz>
Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
GijsCalis pushed a commit to GijsCalis/syft that referenced this issue Feb 19, 2024
…hore#1756)

Fixes: anchore#1755

Signed-off-by: Filip Pytloun <filip@pytloun.cz>
Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant