-
Notifications
You must be signed in to change notification settings - Fork 235
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
Run shadow-utils inside the chroot to avoid contradictory configurations #1283
Conversation
FWIW, I think the comment there refers mostly to whether the version of shadow-utils in the container supported the |
That's good to know. This approach specifically avoids using the |
3cc7896
to
a7e9964
Compare
This is pursuant to our Slack discussion of how to handle this - I know the full patch would need documentation in the defaults file and probably tests as well. Since the buildroot object has the config dict, we can look it up there. The way this is structured, the default case would be to use the host's shadow-utils, and then only if the explicit configuration is set to use the chroot's would the chroot's utils be used. I'm definitely open to more idiomatic ways to express it but that's the intention. |
Thank you for your work on this, @mhjacks.
Note that Mock no longer installs shadow-utils into the minimal buildroot as it used to, this has changed in a34d3ae. Mock never installed shadow-utils into the bootstrap chroot explicitly. |
There only used to be nuance between Mock never used The reasoning behind the "on host decision" is that Mock upstream expects that the machines that are used by users for Mock builds are "new enough". Ideally Fedora builders, or the latest RHEL releases (users should start moving builders out from RHEL8 definitely). Then, using the tooling "on host" is much more predictable (and fixable) for the builder machine administrator) then relying on various in-chroot tooling versions (one machine typically builds for different distributions, and builder admins are unlikely to have rights to fix the target buildroots). |
Converting to draft to add the other items you requested. Thanks for the review! |
30c977f
to
d0cbc64
Compare
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.
Thank you!
This is the suggestion that @sgallagher offered; I tested this on a FreeIPA-enrolled system and it worked.
I'm a bit nervous about the comment above the line about old shadow-utils being problematic; but we definitely also have the case where shadow-utils config from the host "leaks" into the chroot. I'm not sure which problem is bigger.