Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 872497 - sys-apps/busybox: add virtual/libc to RDEPEND iff !static
Summary: sys-apps/busybox: add virtual/libc to RDEPEND iff !static
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: riscv Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-23 08:04 UTC by Marcelo Politzer
Modified: 2022-09-23 08:38 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcelo Politzer 2022-09-23 08:04:19 UTC
TL;DR I would like to suggest including `virtual/libc` into the RDEPEND section of busybox.

Something like this:
+ !static? ( virtual/libc selinux? ( sys-libs/libselinux ) )

Would be useful for embedde / minimal systems.
I'm creating a rootfs for a riscv environment based on musl.
Without this change I get [1], An unbootable system. With the change I get [2], the correct, expected behavior.

[1]
```
>>> Running pre-merge checks for sys-libs/libxcrypt-4.4.28-r2
>>> Emerging binary (1 of 3) sys-libs/libxcrypt-4.4.28-r2::gentoo for /tmp/staging/
>>> Installing (1 of 3) sys-libs/libxcrypt-4.4.28-r2::gentoo to /tmp/staging/
>>> Emerging binary (2 of 3) virtual/libcrypt-2-r1::gentoo for /tmp/staging/
>>> Installing (2 of 3) virtual/libcrypt-2-r1::gentoo to /tmp/staging/
>>> Emerging binary (3 of 3) sys-apps/busybox-1.34.1-r1::gentoo for /tmp/staging/
>>> Installing (3 of 3) sys-apps/busybox-1.34.1-r1::gentoo to /tmp/staging/
>>> Recording sys-apps/busybox in "world" favorites file...
```

[2]
```
>>> Running pre-merge checks for sys-libs/libxcrypt-4.4.28-r2           
>>> Emerging binary (1 of 5) sys-libs/libxcrypt-4.4.28-r2::gentoo for /tmp/staging/
>>> Installing (1 of 5) sys-libs/libxcrypt-4.4.28-r2::gentoo to /tmp/staging/    
>>> Emerging binary (2 of 5) sys-libs/musl-1.2.3-r4::gentoo for /tmp/staging/
>>> Installing (2 of 5) sys-libs/musl-1.2.3-r4::gentoo to /tmp/staging/
>>> Emerging binary (3 of 5) virtual/libcrypt-2-r1::gentoo for /tmp/staging/
>>> Installing (3 of 5) virtual/libcrypt-2-r1::gentoo to /tmp/staging/
>>> Emerging binary (4 of 5) virtual/libc-1-r1::gentoo for /tmp/staging/                                  
>>> Installing (4 of 5) virtual/libc-1-r1::gentoo to /tmp/staging/
>>> Emerging binary (5 of 5) sys-apps/busybox-1.34.1-r1::gentoo for /tmp/staging/
>>> Installing (5 of 5) sys-apps/busybox-1.34.1-r1::gentoo to /tmp/staging/  
>>> Recording sys-apps/busybox in "world" favorites file...
```
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-23 08:20:26 UTC
I guess busybox is sort of a special case, although I don't know if I'd want to go around adding it to every single package that's not statically linked ;)

But given busybox's nature, let's do it here.
Comment 2 Larry the Git Cow gentoo-dev 2022-09-23 08:23:06 UTC
The bug has been closed via the following commit(s):

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

commit a9720529caa34a39ed0bdf1e759068fad943011b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-09-23 08:22:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-23 08:23:00 +0000

    sys-apps/busybox: adjust non-static deps for libcrypt/libc
    
    It's a bit of a weird one in that we don't end up doing
    this for every single package when it's non-static,
    but the libcrypt dep was wrong anyway for -static,
    and busybox is a special case anyway in that
    someone is quite likely to want to build
    a tiny system with only busybox and possibly
    a custom built application within.
    
    Closes: https://bugs.gentoo.org/872497
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/busybox/busybox-1.34.1-r1.ebuild | 7 +++++--
 sys-apps/busybox/busybox-1.34.1.ebuild    | 7 +++++--
 sys-apps/busybox/busybox-1.35.0-r1.ebuild | 7 +++++--
 sys-apps/busybox/busybox-1.35.0.ebuild    | 7 +++++--
 sys-apps/busybox/busybox-9999.ebuild      | 7 +++++--
 5 files changed, 25 insertions(+), 10 deletions(-)