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

System package scan for fedora distro does not work #831

Closed
philcali opened this issue Jul 29, 2023 · 4 comments · Fixed by aboutcode-org/scancode-toolkit#3479
Closed

System package scan for fedora distro does not work #831

philcali opened this issue Jul 29, 2023 · 4 comments · Fixed by aboutcode-org/scancode-toolkit#3479
Labels
bug Something isn't working

Comments

@philcali
Copy link
Contributor

I've tried to run a docker and rootfs scan of a fedora base and it does not appear to detect installed rpms.

To replicate, simply spin up a scancode.io portal and start a scan of fedora server with docker://fedora:38. It detects pypi packes but none of the installed rpms.

@pombredanne
Copy link
Member

pombredanne commented Aug 1, 2023

@philcali Thanks for the report... that's a great catch!

I was able to reproduce this and this is a bug indeed. At the lowest level, ScanCode toolkit can parse the rpmdb.sqlite format of Fedora 38 correctly... BUT there is a (stupid copy/paste) bug in https://github.com/nexB/scancode-toolkit/blob/200fb10eb22218c36f68e37f2f9dc86342adaa35/src/packagedcode/rpm.py#L235 where the "rpmdb.sqlite" is expected to have the same type as the older Berkeley DB format... and therefore no scan is taking place there for the system packages in this case because the sqlite file does have "berkeley" in its file type for sure.

@pombredanne pombredanne added the bug Something isn't working label Aug 1, 2023
@philcali
Copy link
Contributor Author

philcali commented Aug 1, 2023

Yep, I wound yup tracing the issue to the same spot yesterday, and have confirmed a fix for it. I can post a cr soon if you haven't already resolved it.

@philcali
Copy link
Contributor Author

philcali commented Aug 1, 2023

Here is the PR: aboutcode-org/scancode-toolkit#3479

@tdruez
Copy link
Contributor

tdruez commented Aug 7, 2023

@philcali PR merged, thanks for your contribution 🚀

@tdruez tdruez closed this as completed Aug 7, 2023
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.

3 participants