Re: [systemd-devel] Can /usr/lib/systemd/user/sockets.target.wants be used to autoenable a socket by a vendor package?

2022-10-10 Thread Yuri Kanivetsky
After experimenting some more, I can see that if there's no [Install] section and the unit is enabled by putting it into /usr/lib/systemd/*/*.target.wants, then is-enabled is static, and `systemctl enable` does nothing and explains the situation. Which makes me think that one should either add the

Re: [systemd-devel] Can /usr/lib/systemd/user/sockets.target.wants be used to autoenable a socket by a vendor package?

2022-09-20 Thread Andrei Borzenkov
On Tue, Sep 20, 2022 at 10:42 AM Barry wrote: > > Enabled does mean that it will or will not run. > It means that it is wanted by the default target. > No. It means that it is wanted by whatever units are listed in [Install] section (actually, it is "enabled" even if only aliases are created, so

Re: [systemd-devel] Can /usr/lib/systemd/user/sockets.target.wants be used to autoenable a socket by a vendor package?

2022-09-20 Thread Barry
> On 18 Sep 2022, at 13:08, Yuri Kanivetsky wrote: > >  >> >>> $ ls -al >>> /usr/lib/systemd/user/multi-user.target.wants/infinite-tsukuyomi.service >>> lrwxrwxrwx 1 root root 29 Sep 18 08:45 >>> /usr/lib/systemd/user/multi-user.target.wants/infinite-tsukuyomi.service >>> ->

Re: [systemd-devel] Can /usr/lib/systemd/user/sockets.target.wants be used to autoenable a socket by a vendor package?

2022-09-19 Thread Colin Guthrie
Yuri Kanivetsky wrote on 18/09/2022 13:08: Also, I've created a simple perl server: https://gist.github.com/x-yuri/45f53c16a99337ba0716a988290491bd And if I put perl-server.socket and perl-server.service into /usr/lib/systemd/user, and symlink perl-server.socket into

Re: [systemd-devel] Can /usr/lib/systemd/user/sockets.target.wants be used to autoenable a socket by a vendor package?

2022-09-18 Thread Yuri Kanivetsky
> > $ ls -al > > /usr/lib/systemd/user/multi-user.target.wants/infinite-tsukuyomi.service > > lrwxrwxrwx 1 root root 29 Sep 18 08:45 > > /usr/lib/systemd/user/multi-user.target.wants/infinite-tsukuyomi.service > > -> ../infinite-tsukuyomi.service > > > > And rebooted the machine. The service

Re: [systemd-devel] Can /usr/lib/systemd/user/sockets.target.wants be used to autoenable a socket by a vendor package?

2022-09-18 Thread Andrei Borzenkov
On 18.09.2022 09:05, Yuri Kanivetsky wrote: >> No, everything linked to a .wants/ directory immediately becomes a >> Wants= dep of and is therefore "enabled", it doesn't matter whether >> that .wants/ is in /etc or /usr/lib or /run. > > To confirm this, I created the following files: > > $

Re: [systemd-devel] Can /usr/lib/systemd/user/sockets.target.wants be used to autoenable a socket by a vendor package?

2022-09-18 Thread Yuri Kanivetsky
> No, everything linked to a .wants/ directory immediately becomes a > Wants= dep of and is therefore "enabled", it doesn't matter whether > that .wants/ is in /etc or /usr/lib or /run. To confirm this, I created the following files: $ cat /usr/lib/systemd/user/infinite-tsukuyomi.service

Re: [systemd-devel] Can /usr/lib/systemd/user/sockets.target.wants be used to autoenable a socket by a vendor package?

2022-09-17 Thread Mantas Mikulėnas
On Sat, Sep 17, 2022 at 8:35 PM Yuri Kanivetsky wrote: > Hi, > > I've noticed that an Arch Linux package (gnupg) seemingly > automatically enables a socket: > > ln -s "../dirmngr.socket" > "/usr/lib/systemd/user/sockets.target.wants/dirmngr.socket" > > >