-
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
core: intercept groupadd/useradd/usermod calls in scriptlets #3762
Comments
I realized there are some packages (e.g.
|
I filed ostreedev/ostree-rs-ext#383 but probably it's a duplicate of this (though we should debate it living in ostree). What do you see as the status on this? It seems like we landed code, but it's disabled by default? Do we need an opt-in |
We did land all the wrappers but they are currently gated by a rpm-ostree/src/libpriv/usermod-wrapper.sh Lines 7 to 9 in ea5e9b6
At some point yes, but this is entangled in 1) cleanups on Fedora side (most things should be ok in F38), and 2) figuring out the interactions with all the other users/groups configuration fields in the treefile. If you are mostly caring about the in-container flow at this point, I think at this time it makes sense to turn it always-on there. |
Ah but it doesn't work in the native-container flow because we're only using the libdnf path there. Filed #4075 |
I'm late to the party, a bit, but I was just working on something similar: https://github.com/keszybz/sysusers-convert. The full list of stuff to intercept: I plan to convert all packages to use sysusers files. I hope this works for rpm-ostree too. |
Great! Well yes it should, I can't think why it wouldn't. But regarding interception; generation: One overall challenge is that in the bigger picture we really want this to work outside of RPM too. I think as you know, we are investing deeply into containers (in addition to RPM) as a mechanism for operating system management, and people definitely have come to expect Over in containers/bootc#1055 (comment) I'm thinking about moving some of the Rust tmpfiles.d and sysusers.d handling over to bootc. What's supremely ugly is that in the general case for image builds we need to clearly disentangle and canonicalize what's in |
The nice thing about the latest changes in rpm is that we no longer need the tools for handling users to be present in the image. When rpm or dnf operate on a chroot, user and group accounts can be created using a tool called from the host. I expect that we'll have nicer leaner container images once this goes through. I don't see why
I have no idea about this. I would expect that tmpfiles config would be used to create … temporary files, so stuff that is not part of the image, but ephemeral. |
Because of the merge problem; ostree doesn't special case
tmpfiles is definitely used to create things that I believe most system administrators don't think of as "temporary" or "ephemeral" in the sense one would ordinarily use those terms - for example, it may create But anyways the code I am talking about here is to handle the problem where many rpms (like postgres) physically ship |
Background discussion behind this happened in #3712 (comment).
In the context of making incremental progress on the
sysusers.d
front, we'd like to start auto-generating fragments for system users and groups.Attempting to do this post-fact by parsing /etc content hits a minor problem related to distinguishing dynamic and static IDs.
Moving a bit earlier in scriptlets processing though we can intercept calls to
useradd
andgroupadd
in order to learn whether they were given static IDs.An example of dynamic IDs (from
chrony
RPM) looks like this:Instead, an example of static IDs (from
squid
RPM) looks like this:Let's start adding some
groupadd
anduseradd
wrapper in scriptlets environment that will:The text was updated successfully, but these errors were encountered: