Bug 1938928
| Summary: | Backport read-only support for sqlite rpmdb | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Panu Matilainen <pmatilai> |
| Component: | rpm | Assignee: | Michal Domonkos <mdomonko> |
| Status: | CLOSED ERRATA | QA Contact: | Tomáš Bajer <tbajer> |
| Severity: | high | Docs Contact: | Mariya Pershina <mpershin> |
| Priority: | high | ||
| Version: | --- | CC: | jlebon, lucarval, mbasti, mdomonko, mpershin, rjones, travier, walters |
| Target Milestone: | rc | Keywords: | FutureFeature, Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | rpm-4.14.3-16.el8 | Doc Type: | Enhancement |
| Doc Text: |
.RPM now has read-only support for the `sqlite` database backend
The ability to query an RPM database based on `sqlite` may be desired when inspecting other root directories, such as containers.This update adds read-only support for the RPM `sqlite` database backend. As a result, it is now possible to query packages installed in a UBI 9 or Fedora container from the host RHEL 8. To do that with Podman:
. Mount the container's file system with the `podman mount` command.
. Run the `rpm -qa` command with the `--root` option pointing to the mounted location.
Note that RPM on RHEL 8 still uses the BerkeleyDB database (`bdb`) backend.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-11-09 20:01:59 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1836094 | ||
|
Description
Panu Matilainen
2021-03-15 08:42:41 UTC
> Read-write support is out of the scope as it would require other hairy changes to rpm internals. Hi Panu, Is there some wiggle room there to get this to happen or is it too difficult? In RHCOS, we use Fedora-based tooling to compose OSTree content. With f34 rpm losing support for bdb, and el8 not having support for sqlite we're a bit squeezed. One thing we could do once there is read-only support for sqlite in RHEL at least is to compose to sqlite (using Fedora librpm), and then use RHEL rpm to convert it back to bdb. Though ideally if it just supported sqlite for read and write, we could leave bdb behind entirely and simplify composes. See discussions in https://github.com/openshift/os/pull/548. As you even quoted, I explicitly stated write support is out of scope due to requiring hairy changes to rpm internals. There are no ifs and buts in that. Doesn't seem worth trying to switch just RHCOS to sqlite by default. OK and there's `rpmdb --exportdb` and `rpmdb --importdb` so presumably we can pipe those together to do the conversion. OK https://github.com/coreos/rpm-ostree/pull/2990 is working for me and it doesn't require this patch. That said, ultimately I can still see this patch (RHEL8 sqlite read) being useful because it means other projects/situations like this can avoid juggling two independent versions of rpm as in the rpm-ostree approach. I finally got around to testing this with the new libguestfs (bug 1836094) and RHEL 8.6 and it appears to work well. (I tested rpm-4.14.3-18.el8.x86_64) Thanks, Richard, that's appreciated! Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Low: rpm security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:4489 |