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

Rework useradd(etc) sysusers integration to work in container flow #4092

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

cgwalters
Copy link
Member

First, right now our container flow doesn't use the "unified core" mode which means we aren't intercepting scripts. We hence can't set the environment variable which gives us the package name.

Rework the sysusers file generation to not include the package name - in the end, while it is useful for debugging, in practice I don't think it's necessary.

Next, if we're in a container build, turn on the sysusers.d interception by default. I think this is the default stance we should be taking now, and the container flow is a fresh new API.

Finally, add support for useradd -G which is used by libvirt, e.g. https://src.fedoraproject.org/rpms/libvirt/blob/rawhide/f/libvirt.spec#_1621

useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu

@cgwalters
Copy link
Member Author

/retest

2 similar comments
@cgwalters
Copy link
Member Author

/retest

@cgwalters
Copy link
Member Author

/retest

@cgwalters
Copy link
Member Author

/retest

@cgwalters
Copy link
Member Author

OK! Got a passing Prow job here 🎉

First, right now our container flow doesn't use the "unified core"
mode which means we aren't intercepting scripts.  We hence
can't set the environment variable which gives us the package name.

Rework the sysusers file generation to not include the package
name - in the end, while it is useful for debugging, in practice I
don't think it's necessary.

Next, if we're in a container build, turn on the sysusers.d interception
by default.  I think this is the default stance we should be
taking now, and the container flow is a fresh new API.

Finally, add support for `useradd -G` which is used by libvirt, e.g.
https://src.fedoraproject.org/rpms/libvirt/blob/rawhide/f/libvirt.spec#_1621

`useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu`
@lucab lucab merged commit ad62c06 into coreos:main Oct 25, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants