[Rpm-maint] [rpm-software-management/rpm] RFE: container-native rpmdb format (Issue #2005)

Robert Sturla notifications at github.com
Tue Nov 25 18:54:50 UTC 2025


p5 left a comment (rpm-software-management/rpm#2005)

I've created an (AI-assisted) PoC of this, and appears to be functional after limited testing.

Each installed RPM is represented by a numbered file in `/var/lib/rpm/jsonzstd`, such as `00000001.json.zstd`.  Each file contains the RPM header data as a B64 encoded string, and is rebuilt in-memory when required.  

```json
{
  "version": 1,
  "hdrNum": 1,
  "blob": "<base64-encoded RPM header blob>"
}
```

In the same directory lives a "manifest" file which points to each individual package file and stores metadata about the next number in the sequence.  This manifest still has the same drawback of the sqlite db, where it will be stored across multiple layers, but is considerably smaller.  This could be adapted to no longer require the manifest file, though would require some other method for calculating the next available file index.

```json
{
  "version": 1,
  "nextHdrNum": 42,
  "packages": [1, 2, 5, 7, 12]
}
```

RPM is able to rebuild the jsonzstd database from a pre-existing sqlite database, and packages are installable via `dnf` and query-able via the updated `rpm`.

---

The implementation can be found in my forked repo - https://github.com/p5/rpm-software-management-rpm/tree/jsonzstd-rpmdb-backend - and I am currently attempting to publish a build in a COPR to ease testing.

---

I am fully aware of this project's stance on AI generated code and am in no way claiming this implementation is production-ready.  This comment/fork serves as a proof-of-concept for how this could look, and to demonstrate the usefulness of a backend more optimised for container images.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2005#issuecomment-3577104263
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/2005/3577104263 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20251125/4bc65c30/attachment.htm>


More information about the Rpm-maint mailing list