FS#76166 - [gnupg] systemctl says that units are disabled

Attached to Project: Arch Linux
Opened by Yuri Kanivetsky (x-yuri) - Tuesday, 11 October 2022, 01:56 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:26 GMT
Task Type General Gripe
Category Packages: Core
Status Closed
Assigned To Lukas Fleischer (lfleischer)
David Runge (dvzrv)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: This one is probably questionable, but if you don't known much about gpg, and, to top it off, the gnupg home is not in ~/.gnupg (in which case socket activation won't work), this might be confusing.

As things stand:

$ systemctl --user is-enabled dirmngr.socket
disabled

Which is confusing. But if you delete the [Install] section:

$ systemctl --user is-enabled dirmngr.socket
static

Which makes sense. This happens because enable/disable/is-enabled concern themselves only with ~/.config/systemd and /etc/systemd:

https://lists.freedesktop.org/archives/systemd-devel/2022-September/048338.html

Putting the symlinks into /usr/lib/systemd for units with [Install] sections is like providing a way to enable the units twice.

One way to solve this is copy the units into the arch repo.

Another:

$ cat doc/examples/systemd-user/dirmngr.socket | sed '/\[Install\]/,$d'

You can also delete the last empty line if you will:

$ cat doc/examples/systemd-user/dirmngr.socket | sed '/\[Install\]/,$d' | sed '$d'

But this way it may break one day. No good solution.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:26 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/gnupg/issues/3
Comment by Toolybird (Toolybird) - Wednesday, 12 October 2022, 22:52 GMT
Hmm, this seems like a general gripe. I'm not across all the detail after reading the thread on systemd-devel. Seeing as it relates to a recent change, will assign to PM's for their opinion.
Comment by Mike Yuan (YHNdnzj) - Sunday, 06 August 2023, 12:59 GMT
Indeed. The correct thing to do is to either enable the unit in the post-install hook, or to remove the [Install] section from the statically-enabled unit. Having both around is confusing to users and unsupported by systemd.

See https://gitlab.archlinux.org/archlinux/archlinux-keyring/-/issues/220 for a similar issue.
Comment by David Runge (dvzrv) - Saturday, 11 November 2023, 21:36 GMT
The change is now live in 2.4.3-1 in [core-testing]. Please provide feedback!

Loading...