-
Notifications
You must be signed in to change notification settings - Fork 198
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
compose: Drop rpmdb sqlite journaling files if rpmdb-normalize #5244
Conversation
a61d2e5
to
c102334
Compare
This code affects all the places we write the rpmdb, from builds to client layering, so it has a decently high blast radius. I am considering scoping something just to builds under the |
Moved the prep PR to #5247 |
c102334
to
bc92753
Compare
See rpm-software-management/rpm#2219 This is one of the things that makes builds unreproducible in general, which is worth fixing alone. But the thing immediately driving this now for me is that I think we're getting some ill-defined behavior because we may have these files hardlinked (via ostree) and depending on the container build environment, we may or may not see modifications "through" the hardlink: https://docs.kernel.org/filesystems/overlayfs.html#index If we happen to mutate the `rpmdb.sqlite-shm` file in one path but not the other confusion could easily result. (Actually what we want to do really is drop our other hardlinked copies of the rpmdb entirely, but that's a bigger change) Out of conservatism for now, we only do this if `rpmdb-normalize` is set (which none of the Fedora derivatives set today AFAICS). I do think we should likely do this in client side layering too, but this reduces the blast radius for now. I plan to enable this in fedora-bootc. Signed-off-by: Colin Walters <walters@verbum.org>
bc92753
to
7b0f07f
Compare
Done |
This one should be really safe, can someone stamp it? |
For reference here's what I'd apply to the bootc base image with this
|
OK review is slow on this and I decided for now to just do this in the base image build in shell script https://gitlab.com/fedora/bootc/base-images/-/merge_requests/81/diffs?commit_id=e6f0334d328a8b01dc1191261a68c693e1b3205a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
See rpm-software-management/rpm#2219
This is one of the things that makes builds unreproducible in
general, which is worth fixing alone.
But the thing immediately driving this now for me is that I
think we're getting some ill-defined behavior because we
may have these files hardlinked (via ostree) and depending
on the container build environment, we may or may not see
modifications "through" the hardlink:
https://docs.kernel.org/filesystems/overlayfs.html#index
If we happen to mutate the
rpmdb.sqlite-shm
file inone path but not the other confusion could easily result.
(Actually what we want to do really is drop our other
hardlinked copies of the rpmdb entirely, but that's
a bigger change)
Out of conservatism for now, we only do this if
rpmdb-normalize
is set (which none of the Fedora derivativesset today AFAICS). I do think we should likely
do this in client side layering too, but this
reduces the blast radius for now.
I plan to enable this in fedora-bootc.
Signed-off-by: Colin Walters walters@verbum.org