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

systemd: Use systemd-sysusers to create cockpit-wsinstance user #20447

Merged
merged 3 commits into from
May 8, 2024

Conversation

martinpitt
Copy link
Member

This was originally proposed and discussed extensively in @travier 's PR #20365. However, all of a sudden I'm not allowed to push into @travier's branch any more:

To github.com:travier/cockpit.git
 ! [remote rejected]     HEAD -> main-sysuserconfig (permission denied)
error: failed to push some refs to 'github.com:travier/cockpit.git'

So cloning the PR from my fork.

@martinpitt
Copy link
Member Author

These are a problem. I'll back out the tmpfiles.d commit for now -- even without it it's already an improvement, and I'll let the tmpfiles.d thing simmer for a bit longer.

Even oldoldstable and the last two Ubuntu LTSes have never versions,
this isn't necessary any more.
Copy link
Member

@allisonkarlitskaya allisonkarlitskaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good except for one trivial nag. Please either merge as-is, do a force-push, or I'm also fine with a follow-up (ideally before release).

Thanks!

Add a sysusers config file for our remaining system user.

Arch was already using sysusers, replace the packaging specific one with
the upstream one.

For Debian, run dh_installsysusers (compat level 14 will do that
automatically in the future).

RPM 4.19 has native support for sysusers in principle [1], but it's not
currently enabled/working [2]. Fedora rather wants packages to do an
overcomplicated process which keeps a downstream copy of the sysusers
file in the packaging dist-git [3], which is error prone and ugly to
automate.

So keep the tried-and-tested current approach of creating the user
directly in the spec's `%pre` script for the time being (which is
necessary anyway for CentOS/RHEL 9).

[1] https://rpm-software-management.github.io/rpm/manual/users_and_groups.html
[2] rpm-software-management/rpm#3073
[3] https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_dynamic_allocation
@martinpitt martinpitt merged commit 46fe9f5 into cockpit-project:main May 8, 2024
80 checks passed
@martinpitt martinpitt deleted the main-sysuserconfig branch May 8, 2024 15:50
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

3 participants