Message ID | 1417106898-14444-1-git-send-email-gustavo@zacarias.com.ar |
---|---|
State | Superseded |
Headers | show |
Hi, 2014-11-27 17:48 GMT+01:00 Gustavo Zacarias <gustavo@zacarias.com.ar>: > Using a /tmp symlink makes it racy (mode 1777 for /tmp proper) and ugly. > While at it also point /var/run to /run until everything is moved there like > it should be. > > Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> > --- > system/skeleton/run | 1 - > system/skeleton/run/.empty | 0 > system/skeleton/var/run | 2 +- > 3 files changed, 1 insertion(+), 2 deletions(-) > delete mode 120000 system/skeleton/run > create mode 100644 system/skeleton/run/.empty > Shouldn't we link /var/lock to (../)run/lock then?
On Mon, Dec 1, 2014 at 9:39 PM, André Erdmann <dywi@mailerd.de> wrote: > Hi, > > 2014-11-27 17:48 GMT+01:00 Gustavo Zacarias <gustavo@zacarias.com.ar>: >> Using a /tmp symlink makes it racy (mode 1777 for /tmp proper) and ugly. >> While at it also point /var/run to /run until everything is moved there like >> it should be. >> >> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> >> --- >> system/skeleton/run | 1 - >> system/skeleton/run/.empty | 0 >> system/skeleton/var/run | 2 +- >> 3 files changed, 1 insertion(+), 2 deletions(-) >> delete mode 120000 system/skeleton/run >> create mode 100644 system/skeleton/run/.empty >> > > Shouldn't we link /var/lock to (../)run/lock then? I think we shuould. Regards,
On 12/01/2014 06:01 PM, Samuel Martin wrote: >> Shouldn't we link /var/lock to (../)run/lock then? > > I think we shuould. It's not a prerequisite for this patch to get applied. And that would fail badly for the systemd scenario, you want to use tmpfiles.d for that since /run will be empty and no inittab/script will fill that up. Regards.
2014-12-01 22:12 GMT+01:00 Gustavo Zacarias <gustavo@zacarias.com.ar>: > On 12/01/2014 06:01 PM, Samuel Martin wrote: > >>> Shouldn't we link /var/lock to (../)run/lock then? >> >> I think we shuould. > > It's not a prerequisite for this patch to get applied. > And that would fail badly for the systemd scenario, you want to use > tmpfiles.d for that since /run will be empty and no inittab/script will > fill that up. > Regards. > There are already tmpfiles.d rules for that, /usr/lib/tmpfiles.d/legacy.conf: d /run/lock 0755 root root - L /var/lock - - - - ../run/lock To make it work properly for systemd, /var/lock needs to be removed from the skeleton or point to /run/lock (or replace the "L" with "L+" in the tmpfiles.d rule).
On 12/01/2014 06:19 PM, André Erdmann wrote: > There are already tmpfiles.d rules for that, /usr/lib/tmpfiles.d/legacy.conf: > > d /run/lock 0755 root root - > L /var/lock - - - - ../run/lock > > To make it work properly for systemd, /var/lock needs to be removed > from the skeleton or point to /run/lock (or replace the "L" with "L+" > in the tmpfiles.d rule). Sure, but as i explained to Samuel on IRC this is just the tip of a general cleanup regarding the base files. Even though systemd ships that doing more symlinks won't help the sysv-aspect of the cleanup since /run/lock won't exist whereas now lock is still /tmp hence no breakage until the other patches are sent/applied. The idea is to make a script to handle something similar to tmpfiles.d for sysv-style so we can drop all the symlink hackery which is pointless for systemd but necessary for sysv, we just stick is as S01basefiles or some other preferred name. And also to really move out all of the remaining files that make no sense for systemd and/or sysv into a basefiles (or other nifty name) package to avoid noise. Regards.
2014-12-01 22:32 GMT+01:00 Gustavo Zacarias <gustavo@zacarias.com.ar>: > On 12/01/2014 06:19 PM, André Erdmann wrote: > >> There are already tmpfiles.d rules for that, /usr/lib/tmpfiles.d/legacy.conf: >> >> d /run/lock 0755 root root - >> L /var/lock - - - - ../run/lock >> >> To make it work properly for systemd, /var/lock needs to be removed >> from the skeleton or point to /run/lock (or replace the "L" with "L+" >> in the tmpfiles.d rule). > > Sure, but as i explained to Samuel on IRC this is just the tip of a > general cleanup regarding the base files. > Even though systemd ships that doing more symlinks won't help the > sysv-aspect of the cleanup since /run/lock won't exist whereas now lock > is still /tmp hence no breakage until the other patches are sent/applied. > The idea is to make a script to handle something similar to tmpfiles.d > for sysv-style so we can drop all the symlink hackery which is pointless > for systemd but necessary for sysv, we just stick is as S01basefiles or > some other preferred name. The symlinks might still be required for readonly rootfs (but this requires other changes anyway). Apart from that, I agree with the basefiles approach and keeping /var/lock untouched in this patch series. > And also to really move out all of the remaining files that make no > sense for systemd and/or sysv into a basefiles (or other nifty name) > package to avoid noise. > Regards.
diff --git a/system/skeleton/run b/system/skeleton/run deleted file mode 120000 index 1c2f433..0000000 --- a/system/skeleton/run +++ /dev/null @@ -1 +0,0 @@ -tmp \ No newline at end of file diff --git a/system/skeleton/run/.empty b/system/skeleton/run/.empty new file mode 100644 index 0000000..e69de29 diff --git a/system/skeleton/var/run b/system/skeleton/var/run index 1431b0e..84ba55b 120000 --- a/system/skeleton/var/run +++ b/system/skeleton/var/run @@ -1 +1 @@ -../tmp \ No newline at end of file +../run
Using a /tmp symlink makes it racy (mode 1777 for /tmp proper) and ugly. While at it also point /var/run to /run until everything is moved there like it should be. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> --- system/skeleton/run | 1 - system/skeleton/run/.empty | 0 system/skeleton/var/run | 2 +- 3 files changed, 1 insertion(+), 2 deletions(-) delete mode 120000 system/skeleton/run create mode 100644 system/skeleton/run/.empty \ No newline at end of file