Skip to content

Conversation

Flowdalic
Copy link
Contributor

This removes the redundant 'Group=' directive and replaces the deprecated 'PermissionsStartOnly' directive.

@hebasto
Copy link
Member

hebasto commented Jul 15, 2020

The replacement of deprecated PermissionsStartOnly was also suggested in #16994.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

Agree on "init: remove Group= as it will default to the user's default group" commit.

https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Credentials:

If no group is set, the default group of the user is used.


As ExecStart=+ syntax is used since v231, and basing on discussion in #16994, I suggest to follow @laanwj's comment until CentOS 7 EOL at least as it ships systemd v219 only.

@Flowdalic
Copy link
Contributor Author

I'd argue that (upstream) software's contributed configuration files should contain best-practices, and not worry about compatibility with arcane third-party software. I'd expect the CentOS/RedHat 7 bitcoind packager to test the package and fix any compatibility issues.

@laanwj
Copy link
Member

laanwj commented Jul 17, 2020

The init files are only there as example / documentation of how to use bitcoind as a service, there is no strict requirement for compatibility with everything under the sun, but also no reason to break compatibility for no good reason. It's there as a convenience to people, not as a display of systemd best practices.

That said I'm neutral on this.

Setting Group=bitcoin is redundant. It is typically the default group
of the user and if not explicitly specified, systemd will run the
service with the default group of the user.
PermissionsStartOnly is deprecated [1]. This removes the directives
and instead we prefixes the value of the ExecStartPre directive with
'+', which means the executable, 'chgrp' in this case, is run with
full privileges and able to change the group of /etc/bitcoin.

1: https://github.com/systemd/systemd/blob/60b45a80c1f98bad000bd902d97ecf6c4e3fc315/NEWS#L2434
@Flowdalic
Copy link
Contributor Author

Rebased on the latest master, please consider for inclusion.

@achow101
Copy link
Member

Closing this as it has not had any activity in a while. If you are interested in continuing work on this, please leave a comment so that it can be reopened.

@achow101 achow101 closed this Oct 12, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Oct 12, 2023
@fanquake
Copy link
Member

PIcked up in #33044.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants