Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 648880

Summary: sys-apps/baselayout should own the /var/run symlink
Product: Gentoo Linux Reporter: Mike Gilbert <floppym>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: CONFIRMED ---    
Severity: normal CC: base-system, marci_r, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=520404
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 332633    
Bug Blocks: 646542    

Description Mike Gilbert gentoo-dev 2018-02-26 16:17:54 UTC
Having baselayout own this symlink will prevent it from being removed accidentally by random package removals.
Comment 1 Larry the Git Cow gentoo-dev 2023-01-26 00:08:37 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=cd2a6014247b4a3b69b780a331e4d5a5f280c2d8

commit cd2a6014247b4a3b69b780a331e4d5a5f280c2d8
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-01-26 00:05:18 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-01-26 00:05:18 +0000

    drop fhs compatibility symlinks from the makefile
    
    This is necessary since we want baselayout to own these links.
    To do that, we need to create them in the ebuild.
    
    Bug: https://bugs.gentoo.org/648880
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 Makefile | 5 -----
 1 file changed, 5 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2023-01-26 00:13:18 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b91cfbd5648d0b1a9d9532e52bc6d701921dc621

commit b91cfbd5648d0b1a9d9532e52bc6d701921dc621
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-01-26 00:11:22 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-01-26 00:12:48 +0000

    sys-apps/baselayout: create fhs compatible symlinks in the ebuild
    
    This needs to happen so that we own the symlinks.
    
    Bug: https://bugs.gentoo.org/648880
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 sys-apps/baselayout/baselayout-9999.ebuild | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 3 Larry the Git Cow gentoo-dev 2023-01-27 17:30:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8922ff37ff381fde642f486cd74922ec060c4a15

commit 8922ff37ff381fde642f486cd74922ec060c4a15
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-01-27 17:29:04 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-01-27 17:29:21 +0000

    sys-apps/baselayout: add 2.10
    
    Closes: https://bugs.gentoo.org/648880
    Closes: https://bugs.gentoo.org/853820
    Closes: https://bugs.gentoo.org/888807
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 sys-apps/baselayout/Manifest               |   1 +
 sys-apps/baselayout/baselayout-2.10.ebuild | 368 +++++++++++++++++++++++++++++
 2 files changed, 369 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2023-01-28 02:08:09 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=bc22069d1a41eeec6e22ba9bf391412a0244f5a7

commit bc22069d1a41eeec6e22ba9bf391412a0244f5a7
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-01-28 01:59:03 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-01-28 02:05:06 +0000

    Move /var/run and /var/lock back to the layout target
    
    We need to ensure packages do not install things here and come up with a
    better migration plan.
    
    Bug: https://bugs.gentoo.org/648880
    Bug: https://bugs.gentoo.org/892267
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 Makefile | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2023-01-28 02:17:38 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dcff3b5a60cd6fbead3da67835600db188b6972

commit 3dcff3b5a60cd6fbead3da67835600db188b6972
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-01-28 02:16:54 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-01-28 02:17:33 +0000

    sys-apps/baselayout: add 2.13, drop 2.12
    
    Bug: https://bugs.gentoo.org/648880
    Bug: https://bugs.gentoo.org/892267
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/baselayout/Manifest                        |  2 +-
 ...aselayout-2.12.ebuild => baselayout-2.13.ebuild} | 21 ++++++++-------------
 2 files changed, 9 insertions(+), 14 deletions(-)
Comment 6 Mike Gilbert gentoo-dev 2023-01-28 17:17:51 UTC
After dealing with the fallout of the recent change, I kind of think this change is not worth the effort.

We already set UNINSTALL_IGNORE="/var/run /var/lock" in the base profile. That will prevent the symlinks from being removed during package removals.

Given that the only safe time to migrate from directories to symlinks is a system startup, I think it makes sense to keep these as un-owned objects to be created by baselayout[build], an init script, or systemd-tmpfiles.

Closing this as WONTFIX.
Comment 7 William Hubbs gentoo-dev 2023-01-28 18:44:18 UTC
I would like to look further into this.

We need to check the following things:

1. No ebuild should be running keepdir /var/{lock,run}

2. No ebuild should be installing things in /var/{lock,run}
Comment 8 Larry the Git Cow gentoo-dev 2023-01-28 21:00:37 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41b18d2299e59710c1d65d37107d763fb85f9af0

commit 41b18d2299e59710c1d65d37107d763fb85f9af0
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-01-28 20:59:11 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-01-28 20:59:11 +0000

    sys-apps/baselayout: create ${ED}/var/{run,lock} in pkg_preinst
    
    Bug: https://bugs.gentoo.org/648880
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/baselayout/baselayout-2.13-r1.ebuild | 378 ++++++++++++++++++++++++++
 sys-apps/baselayout/baselayout-9999.ebuild    |  23 +-
 2 files changed, 388 insertions(+), 13 deletions(-)