Re: Can we finally switch to systemd /run directory? /var/run sucks…

2019-02-19 Thread Michael Shigorin
On Tue, Feb 19, 2019 at 09:34:48AM +0100, Jacek Konieczny wrote:
> The bigger problem will be /var/run subdirectories… I have no
> good idea how to make this work without systemd and tmpfiles or
> by re-implementing tmpfiles in rc-scripts… 

You might want to have a look at
http://git.altlinux.org/gears/s/startup.git?p=startup.git;a=commit;h=e7558a4ecfe9084099c9c620614e646008f1f68d
and probably some later commits as well.

> I wish we could switch to systemd all together finally.

CVE-2019-6454 has some recent irony for you...

-- 
  WBR, Michael Shigorin / http://altlinux.org
  -- http://opennet.ru / http://anna-news.info
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: Can we finally switch to systemd /run directory? /var/run sucks…

2019-02-19 Thread glen


On 2/19/19 10:39 AM, Jacek Konieczny wrote:

On 19/02/2019 09.34, Jacek Konieczny wrote:

The systemd preferred way to handle backward compatibility with the old
/var/run directory is to make /var/run a symlink to /run.

Wrong… it is bind-mount of /run over /var/run, which is currently
disabled in PLD.



yes, it's bind mounted. but i don't have much pld-systemd systems around 
to verify widely.



```

# mount|grep run
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,mode=755)

# rpm -q systemd
systemd-232-7.x86_64

```


non-systemd should do the same, but currently it does not:


```

# mount|grep run
run on /run type tmpfs (rw,relatime,mode=755)

# rpm -q rc-scripts
rc-scripts-0.4.18-1.x86_64

```

--
glen

___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: Can we finally switch to systemd /run directory? /var/run sucks…

2019-02-19 Thread Jacek Konieczny
On 19/02/2019 09.39, Jacek Konieczny wrote:
> On 19/02/2019 09.34, Jacek Konieczny wrote:
>> The systemd preferred way to handle backward compatibility with the old
>> /var/run directory is to make /var/run a symlink to /run. 
> 
> Wrong… it is bind-mount of /run over /var/run, which is currently
> disabled in PLD.

Forget this… it seems I am wrong again… I need to investigate it a bit
further…

Jacek
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: Can we finally switch to systemd /run directory? /var/run sucks…

2019-02-19 Thread Jacek Konieczny
On 19/02/2019 09.34, Jacek Konieczny wrote:
> The systemd preferred way to handle backward compatibility with the old
> /var/run directory is to make /var/run a symlink to /run. 

Wrong… it is bind-mount of /run over /var/run, which is currently
disabled in PLD.

Maybe the way to go is to restore this and mark /var/run
%_netsharedpath in rpm macros?

Jacek
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Can we finally switch to systemd /run directory? /var/run sucks…

2019-02-19 Thread Jacek Konieczny
Hi,


In PLD various systemd units and tmpfiles configs have been patched to
move from /run to the legacy /var/run for 'backward compatibility', even
though there are good reasons for using /run.

New systemd won't even work well with /var/run:

Feb 19 08:55:04 pbx systemd-tmpfiles[1100]:
[/usr/lib/tmpfiles.d/dbus.conf:1] Line references path below legacy
directory /var/run/, updating /var/run/dbus → /run/dbus; please update
the tmpfiles.d/ drop-in file accordingly.
Feb 19 08:55:04 pbx systemd-tmpfiles[1100]:
[/usr/lib/tmpfiles.d/iproute2.conf:1] Line references path below legacy
directory /var/run/, updating /var/run/netns → /run/netns; please update
the tmpfiles.d/ drop-in file accordingly.
Feb 19 08:55:04 pbx systemd-tmpfiles[1100]:
[/usr/lib/tmpfiles.d/ndisc6.conf:1] Line references path below legacy
directory /var/run/, updating /var/run/rdnssd → /run/rdnssd; please
update the tmpfiles.d/ drop-in file accordingly.
Feb 19 08:55:04 pbx systemd-tmpfiles[1100]:
[/usr/lib/tmpfiles.d/openvpn.conf:1] Line references path below legacy
directory /var/run/, updating /var/run/openvpn → /run/openvpn; please
update the tmpfiles.d/ drop-in file accordingly.
Feb 19 08:55:04 pbx systemd-tmpfiles[1100]:
[/usr/lib/tmpfiles.d/pam.conf:1] Line references path below legacy
directory /var/run/, updating /var/run/console → /run/console; please
update the tmpfiles.d/ drop-in file accordingly.
Feb 19 08:55:04 pbx systemd-tmpfiles[1100]:
[/usr/lib/tmpfiles.d/pam.conf:2] Line references path below legacy
directory /var/run/, updating /var/run/sepermit → /run/sepermit; please
update the tmpfiles.d/ drop-in file accordingly.
Feb 19 08:55:04 pbx systemd-tmpfiles[1100]:
[/usr/lib/tmpfiles.d/radvd.conf:1] Line references path below legacy
directory /var/run/, updating /var/run/radvd → /run/radvd; please update

Feb 19 08:55:14 pbx systemd[1]: Failed to connect to API bus: No such
file or directory
Feb 19 08:55:14 pbx systemd[1]: Failed to connect to system bus: No such
file or directory
Feb 19 08:55:14 pbx systemd[1]: Failed to connect to API bus: No such
file or directory

…and various different errors.

/var/run being stored on a persistent file system has been causing
various trouble even before systemd had been a thing. Many services
wouldn't start after unclean shutdown because of pid or lock files
staying around etc.

The systemd preferred way to handle backward compatibility with the old
/var/run directory is to make /var/run a symlink to /run. I think it is
time to implement this in PLD and make rc-scripts mount tmpfs on /run
too. The bigger problem will be /var/run subdirectories… I have no good
idea how to make this work without systemd and tmpfiles or by
re-implementing tmpfiles in rc-scripts… I wish we could switch to
systemd all together finally.

Jacek
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en