Bug 2160300

Summary: Busybox is not actually statically linked
Product: [Fedora] Fedora Reporter: jbash <jbash>
Component: busyboxAssignee: Tom "spot" Callaway <spotrh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 37CC: admiller, davide, dvlasenk, epel-packagers-sig, spotrh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-12 14:40:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jbash 2023-01-12 02:03:35 UTC
Description of problem:

The "busybox" binary installed by the busybox-1.35.0-5.fc37.x86_64 package
is not statically linked, but instead dynamically linked against the musl
libc.

I found this *extremely* surprising... especially since the package
description says it's static, there's a symlink to the same binary
under the name "busybox.musl.static", and there's another package
(busybox-shared) that's billed as offering an "alternative" dynamically
linked version of busybox.

The main utility of busybox, at least in a "big computer" OS like
Fedora, is that it's a single file without dependencies. You can
copy it to any machine, container, or whatever, and run it without
having to have anything else available, let alone working. For example,
I wanted to use it from a USB stick to debug dracut problems on a
different machine from the one where I installed it.

# ldd /usr/sbin/busybox
        linux-vdso.so.1 (0x00007ffed915d000)
        ld-musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x00007f1fa63db000)

Version-Release number of selected component (if applicable):

# busybox

BusyBox v1.35.0 (2022-07-20 00:00:00 UTC) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.
[... etc ...]


How reproducible:

Perfectly reproducible


Steps to Reproduce:
1. Install busybox from the fedora 37 repos
2. Copy the binary into an environment without musl in /usr/lib.
3. Notice that it doesn't work.

Actual results:

The busybox binary depends on the musl libc. Installing the busybox
package will install musl.

Expected results:

Whatever other versions there may be, the one called just "busybox"
should be a single file with no outside dependencies. Similarly, the
"busybox" package itself should have few or no dependencies on any
other packages.

Comment 1 Tom "spot" Callaway 2023-01-12 14:40:16 UTC

*** This bug has been marked as a duplicate of bug 2079295 ***