[Rpm-maint] [rpm-software-management/rpm] RFE: container-native rpmdb format (Issue #2005)
Colin Walters
notifications at github.com
Mon Apr 11 20:50:42 UTC 2022
The way OCI/Docker containers work is a [series of layers](https://github.com/opencontainers/image-spec/blob/main/layer.md). In overlayfs, modified files are "copied up".
There are two issues:
- rpms have a lot of metadata, so the rpmdb can be of nontrivial size
- The current main rpmdb format (sqlite) being a single big file means that it gets duplicated in each derived image
In the common case of something like e.g.
```
FROM registry.fedoraproject.org/fedora:35
RUN dnf -y install cowsay && dnf clean all
```
The resulting tar layer from the `RUN` command has an *entirely duplicated* copy of the rpm database, just with `cowsay` and its dependencies added.
It's quite common for builds like this to actually form the base image for further images - and this duplication gets compounded.
A strawman proposal here is something like `/usr/lib/sysimage/rpmdb.d` with something simple like zstd-compressed JSON files storing data instead. The files could be named something simple like `0000.json.zstd` and then later changes which add packages add just a new `0001.json.zstd` file or so. Or, we could keep sqlite and union those; I don't have a really strong opinion. (Well, not really "union" literally but more "merge", since we should support removing or upgrading packages from prior layers)
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2005
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/2005 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220411/33ffdcd2/attachment.html>
More information about the Rpm-maint
mailing list