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

[RFE] Support RHEL / CentOS Stream 9 #180

Open
1 of 4 tasks
agrare opened this issue Jan 30, 2024 · 5 comments
Open
1 of 4 tasks

[RFE] Support RHEL / CentOS Stream 9 #180

agrare opened this issue Jan 30, 2024 · 5 comments

Comments

@agrare
Copy link
Member

agrare commented Jan 30, 2024

RHEL 9 does not have a /lib/rpm/Packages database for the package scanner, resulting in no package list being created

evm[2302]: DEBUG -- evm: Q-task_id([job_dispatcher]) Processing RPM package database
evm[2302]: ERROR -- evm: Q-task_id([job_dispatcher]) MIQExtract.extract File not found: '/lib/rpm/Packages'

At a high level there are two issues here,

  1. MiqSqlite doesn't work with a standard rpmdb.sqlite sqlite3 database
  2. MiqRpmPackages doesn't understand the format of the rpmdb.sqlite database

MiqSqlite:

RpmDb:

@Fryguy
Copy link
Member

Fryguy commented Jan 30, 2024

I thought the location is /var/lib/rpm/Packages and I had thought it was there for a long time.

@Fryguy
Copy link
Member

Fryguy commented Jan 30, 2024

Oh interesting, seems there's now a /var/lib/rpm/rpmdb.sqlite (luckily we have SQLite support)

@Fryguy
Copy link
Member

Fryguy commented Jan 30, 2024

SQLite added and BDB deprecated in https://rpm.org/wiki/Releases/4.16.0 (current version is 4.19)

@miq-bot
Copy link
Member

miq-bot commented May 6, 2024

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

@agrare agrare added pinned and removed stale labels May 6, 2024
@Fryguy Fryguy added this to Roadmap Jun 12, 2024
@Fryguy Fryguy moved this to To do in Roadmap Jun 12, 2024
@nasark
Copy link
Member

nasark commented Oct 28, 2024

The Packages table which we need to read has a BLOB column. As a result when reading the column using the built-in MiqSqlite3 class (with changes accounting for the new path /var/lib/rpm/rpmdb.sqlite ), raw binary data is returned. The result is the same when using the sqlite3 gem and CLI.

The details on the format of rpmdb are not publicly disclosed but we could potentially use the librpm API to access the database. This will require the use of ffi since the librpm API is written in C and I am currently investigating this route

@Fryguy Fryguy assigned nasark and unassigned Fryguy and agrare Oct 28, 2024
@agrare agrare self-assigned this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

4 participants