You are not logged in.

#1 2022-09-05 12:55:51

x-yuri
Member
Registered: 2013-01-06
Posts: 160

[SOVLED] GnuPG's systemd sockets are now enabled in the vendor locatio

I've just upgraded the packages. One of the messages I got was:

( 50/550) upgrading gnupg                                                    [###########################################] 100%
NOTE: GnuPG's systemd sockets are now enabled in the vendor location /usr/lib/systemd/user/!

I can see that the socket units now come in /usr/lib/systemd/user/sockets.target.wants, not symlinked to /etc/systemd/user/sockets.target.wants in post_install. Which (as far as I can tell) means they are no longer started/enabled.

I don't really know if the fact that they were (supposedly) started/enabled before the upgrade was in any way beneficial. Should I ignore this message? Or should I start/enable the sockets?

Last edited by x-yuri (2022-09-18 12:39:30)

Offline

#2 2022-09-17 16:09:49

x-yuri
Member
Registered: 2013-01-06
Posts: 160

Re: [SOVLED] GnuPG's systemd sockets are now enabled in the vendor locatio

Okay, from what I can see before upgrade the sockets were enabled this way:

ln -sf /usr/lib/systemd/user/$fname /etc/systemd/user/sockets.target.wants/$fname

After upgrade:

ln -sv ../$fname /usr/lib/systemd/user/sockets.target.wants/$fname

Also in the latter case it happens while building the package, not when installing it.

But is this documented anywhere that sockets can be enabled this way? From what I can see:

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

$ systemctl --user enable dirmngr.socket
Created symlink /home/yuri/.config/systemd/user/sockets.target.wants/dirmngr.socket → /usr/lib/systemd/user/dirmngr.socket.

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

Offline

#3 2022-09-17 17:02:58

3beb6e7c46a615a
Member
Registered: 2021-03-27
Posts: 165

Re: [SOVLED] GnuPG's systemd sockets are now enabled in the vendor locatio

It is; systemd calls this a "preset" unit.  "systemctl --user status dirmngr.socket" lists the unit as "preset: enabled".    You can create this link yourself with "systemctl --user preset dirmngr.socket".

systemd distinguishes between preset units and enabled units; the latter only refers to locations "systemctl enable" would put a symlink at.  Hence "systemctl --user is-enabled dirmngr.socket" lists it as disabled, because "is-enabled" only checks for units enabled via "enable"; per "systemctl(1)": "Checks whether any of the specified unit files are enabled (as with enable)."

Offline

#4 2022-09-18 12:37:37

x-yuri
Member
Registered: 2013-01-06
Posts: 160

Re: [SOVLED] GnuPG's systemd sockets are now enabled in the vendor locatio

lunaryorn wrote:

It is; systemd calls this a "preset" unit.  "systemctl --user status dirmngr.socket" lists the unit as "preset: enabled".

I believe you're mistaken. I asked on the systemd-devel mailing list and they say there are no preset units. "preset: enabled" means it's "enabled in the preset policy." Which doesn't equal "enabled." Whatever is written in the preset policy, it doesn't take effect until you apply it. For all the units (systemctl --user preset-all), or for specific ones (systemctl --user preset UNIT...).

lunaryorn wrote:

You can create this link yourself with "systemctl --user preset dirmngr.socket".

It will create a symlink, but in this case it makes no difference, since the socket is already enabled via /usr/lib/systemd/user/sockets.target.wants/dirmngr.socket. And the fact that it lets you create another symlink is confusing. That doesn't happen e.g. with services enabled via /usr/lib/systemd/user/default.target.wants.

lunaryorn wrote:

systemd distinguishes between preset units and enabled units

I see no confirmation of this. Only in the sense that it doesn't always see that a unit is already enabled (e.g. via /usr/lib/systemd).

--

In the end, the mentioned commit only changes the way the sockets are enabled. So safe to ignore. Actually socket activation doesn't work wth gpg anyway, but that's a different topic.

Offline

Board footer

Powered by FluxBB