Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935656 - sys-process/runit: /sbin/runsvdir-start symlink broken with merged-usr
Summary: sys-process/runit: /sbin/runsvdir-start symlink broken with merged-usr
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: usrmerge, usrmerge-fixes
  Show dependency tree
 
Reported: 2024-07-06 06:48 UTC by Artemis Everfree
Modified: 2024-08-22 14:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to change `../etc` to `/etc` for the runsvdir-start symlink (absolute-runsvdir-start.patch,550 bytes, patch)
2024-07-07 07:46 UTC, Artemis Everfree
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Artemis Everfree 2024-07-06 06:48:36 UTC
sys-process/runit provides the following symlink:

/sbin/runsvdir-start -> ../etc/runit/2

This symlink is intended for use with inittab to launch runit as a secondary service manager ( https://wiki.gentoo.org/wiki/Runit#From_sysvinit ), i.e.

SV:12345:respawn:/sbin/runsvdir-start

With split-usr this works as intended, and resolves to /etc/runit/2 when ROOT=/. With merged-usr, /sbin is a symlink to /usr/bin. So this link resolves to /usr/etc/runit/2, breaking the link.

Reproducible: Always
Comment 1 Artemis Everfree 2024-07-06 09:18:38 UTC
forgot to mention- version 2.1.2-r2
Comment 2 Artemis Everfree 2024-07-07 07:46:20 UTC
Created attachment 897254 [details, diff]
patch to change `../etc` to `/etc` for the runsvdir-start symlink

Changing the symlink to be an absolute link instead of relative might be the right fix for this.

It does mean the link would point to the wrong file when viewed with the rootfs mounted somewhere other than `/`. i.e. outside a chroot, in a prefix or crossdev. However, it's unlikely that someone would want to execute this file in those contexts.

If we want to keep the symlink relative, I think we would need to add an IUSE=split-usr

I don't feel strongly about either solution. I've attached a patch that implements the absolute link change, which is what I'm using on my system right now.