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

Bug 904989

Summary: sys-apps/openrc: Runit compatibility expects /usr/bin/runsvdir, sys-process/runit: provides /bin/runsvdir
Product: Gentoo Linux Reporter: gentoo
Component: Current packagesAssignee: OpenRC Team <openrc>
Status: RESOLVED FIXED    
Severity: normal CC: exogenesis, proxy-maint, zhixu.liu
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=935656
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 690294    

Description gentoo 2023-04-25 00:50:10 UTC
See /etc/init.d/runsvdir

Unsure what direction the fix for this should be in
Comment 1 Ryan G 2023-09-02 02:14:04 UTC
I was able to reproduce this.

The following fails to start:

```
emerge runit
rc-service start runsvdir
```

To inspect the line:

```
grep runsvdir /etc/init.d/runsvdir
```

On Void Linux `/bin/runsvdir` is a symlink to `/usr/bin/runsvdir`, this fixed it on my Gentoo:

```
ln -s (/bin/runsv*) /usr/bin
```

I also had to change the `USER` line to my username, the shell expansion didn't work.
Comment 2 Zhixu Liu 2024-09-09 08:27:33 UTC
this might be related with the merged-usr feature?

IIRC runsvdir was installed into /usr/bin, but changed to /bin one day in 2021, if this is not portage's bug (unlikely), then we should change /etc/init.d/runsvdir in openrc?
Comment 3 Zhixu Liu 2024-09-11 07:42:00 UTC
I finally find the reason.

commit 8fb5fae5a29261cf3d1447bf1d0c5a69de5c4016
Date:   Thu May 13 21:16:13 2021 +0000

2.1.2-r1 was marked as stable for amd64, src_install has 'into /' inserted before dobin which made binaries installed into /bin (not /usr/bin as before stable package w/o into /). So I'll change 'into /' => 'into /usr'.

+src_install() {
+       into /
+       dobin $(<../package/commands)
Comment 4 Larry the Git Cow gentoo-dev 2024-10-07 15:33:04 UTC
The bug has been closed via the following commit(s):

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

commit cb893880b4741d78a58b005a005985bbf7dc0dd8
Author:     Z. Liu <zhixu.liu@gmail.com>
AuthorDate: 2024-09-09 08:55:05 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2024-10-07 15:31:02 +0000

    sys-process/runit: fix path issue
    
    1. install binary to /usr (remove 'into /')
    2. handle symlink of /sbin/runsvdir-start by USE split-usr
    
    Closes: https://bugs.gentoo.org/904989
    Closes: https://bugs.gentoo.org/935656
    Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/38531
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 .../runit/{runit-2.1.2-r5.ebuild => runit-2.1.2-r6.ebuild}    | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)