Skip to content
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

Option to set up mounts inside installroots #2062

Open
evan-goode opened this issue Feb 13, 2025 · 0 comments
Open

Option to set up mounts inside installroots #2062

evan-goode opened this issue Feb 13, 2025 · 0 comments

Comments

@evan-goode
Copy link
Member

Currently, RPM scriptlets will fail inside installroots if they depend on common files and devices that are not present under the installroot, including:

  • "virtual" devices in /dev (e.g. /dev/null, /dev/zero, /dev/urandom)
  • /proc
  • /tmp and /run

DNF could provide an option to automatically create these common directories and mount certain host paths inside the installroot, like https://gitlab.com/fedora/bootc/base-images-experimental/-/blob/main/build/dnf-installroot.

Inspired by discussion on https://matrix.to/#/#bootc:fedoraproject.org:

@cgwalters:

dnf doesn't do any container features with --installroot and punts that to higher level tools which isn't wrong, but also forces everything to wrap it in different ways. I crafted https://gitlab.com/fedora/bootc/base-images-experimental/-/blob/main/build/dnf-installroot which is a demonstration minimal version that works with as few as possible privileges inside a default podman/docker container

@supakeen:

The above dance is pretty much what every build tool has to do having a single approach to that is probably nice; e.g. I'd prefer dnf to be able to do the above itself.
There can however be a bunch more to it to make-things-work if one also wants to run things inside that root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant