sysusers: add a treefile option in rpm-ostree#4680
Conversation
|
Skipping CI for Draft Pull Request. |
3c76dba to
3fbf784
Compare
|
Build fcos with coreos/fedora-coreos-config#2698, run |
cgwalters
left a comment
There was a problem hiding this comment.
So...no opposition to experimenting with this.
However my overall concern is that sysusers won't handle cases where we have a dynamic UID/GID included in the ostree commit/image content.
I think we started to add a check for this as part of the build system.
| new_entities.add_passwd_content(rootfs.as_raw_fd(), "usr/lib/passwd")?; | ||
| new_entities.add_group_content(rootfs.as_raw_fd(), "usr/lib/group")?; | ||
| } else { | ||
| new_entities.add_passwd_content(rootfs.as_raw_fd(), "usr/etc/passwd")?; |
There was a problem hiding this comment.
Is this right though? I thought we'd be relying on systemd-sysusers creating the users/groups on firstboot?
There was a problem hiding this comment.
Maybe should add both? Do you mean with empty passwd / group (and no check-passwd/check-groups)? Maybe that is the final goal.
There was a problem hiding this comment.
Right, I thought the goal was that we start with an empty passwd file if we were going all-in on sysusers.
| db.add_passwd_content(rootfs.as_raw_fd(), "usr/lib/passwd")?; | ||
| db.add_group_content(rootfs.as_raw_fd(), "usr/etc/group")?; | ||
| db.add_group_content(rootfs.as_raw_fd(), "usr/lib/group")?; | ||
| if has_usrlib_passwd(&rootfs)? { |
There was a problem hiding this comment.
I think this change can land now if you want
1a64b58 to
ee3f713
Compare
nss-altfiles support and the passwd / group files migration to /usr/libee3f713 to
3034dc0
Compare
Default is `false`, if `true`: - turns off nss-altfiles support - disables the passwd / group files migration to /usr/lib Xref to coreos/fedora-coreos-tracker#155 (comment)
3034dc0 to
a9c572a
Compare
|
Tried to remove Does this mean should remove |
|
I'm pretty sure we need to also figure out how to disable https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/systemd.spec#_940 Add an environment variable e.g.? |
|
Also per discussion I'd say this treefile option should also enable Edit: And if we have this enabled we also ignore (or error out) if the static |
Another problem is when installing a package which requires a systemd users, that will also create the user during pre-script, should we also disable it? for example |
Ah wow yes...messy. We have "dueling" sources of truth here. I guess for now we could copy the file to |
ef30c3b to
7401b70
Compare
7401b70 to
6cbfed7
Compare
|
In discussion about this one now I think short term what we want is a denylist like: sysusers-groups:
Anything in that set would be dropped from the altfiles setup at build time - and we rely on them being created at boot. Alternatively, we could try an allowlist instead. Maybe support both. |
|
Note #5427 proposes also adding a |
Add
sysusersoption in treefile, iftrue,nss-altfilessupportpasswd / groupfiles migration to/usr/libXref to coreos/fedora-coreos-tracker#155 (comment)