[Rpm-maint] [rpm-software-management/rpm] rpm --rebuilddb in an overlayfs without redirect_dir=on (Discussion #2905)
th-hummel
notifications at github.com
Tue Feb 13 15:26:11 UTC 2024
Hello,
[I'm not sure this is the right place to post such a question, feel free to redirect me if needed.]
using `RPM version 4.19.1` on `Fedora release 39 (Thirty Nine)` or `RPM version 4.14.3` on `Red Hat Enterprise Linux release 8.8 (Ootpa)`, I experienced that I could not successfully run `rpm --rebuilddb` in an Apptainer or Docker container. I would get the following error msg:
```
Apptainer> rpm --rebuilddb
error: failed to replace old database with new database!
error: replace files in /var/lib/rpm with files from /var/lib/rpmrebuilddb.53312 to recover
```
My understanding it that `rpm` does not handle the `EXDEV` error when `rename()` is called in an overlayfs without the `redirect_dir` option turned to `on`
As a matter of fact, if I turn this on via:
```
echo "Y" > /sys/module/overlay/parameters/redirect_dir
```
the command succeeds
My question was, as I think some tools like `mv` do workaround this error, what is the reason for that (my guess is there is then no atomicity) and/or could it fit a legit request to implement this feature (beeing able to run `rpm --rebuilddb` when into a container or maybe just to give a hint about possible cause) or not ?
Context: in some provisioning environment, I happen to have to rebuild the database inside a Docker container.
Thanks for your help
--
Thomas HUMMEL
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2905
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/repo-discussions/2905 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240213/8e45ed5e/attachment.html>
More information about the Rpm-maint
mailing list