Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 345665 - sys-apps/busybox-1.5.13: everything is dynamically linked when USE=pam
Summary: sys-apps/busybox-1.5.13: everything is dynamically linked when USE=pam
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-15 20:16 UTC by Paweł Hajdan, Jr. (RETIRED)
Modified: 2010-12-21 23:32 UTC (History)
0 users

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 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-11-15 20:16:44 UTC
My stable x86 VM system just got hosed (see bug #345645), and I tried to recover with busybox.

Unfortunately, it turned out every busybox binary was dynamically linked, and impossible to launch when glibc disappeared.

/bin/busybox.static was a symlink to /bin/bb
/bin/bb was a symlink to /bin/busybox
and /bin/busybox...

ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped

I'd suggest providing a static binary in a default install of busybox.
Comment 1 solar (RETIRED) gentoo-dev 2010-11-16 04:47:41 UTC
We do provide a default static binary unless +pam is set. 
Comment 2 solar (RETIRED) gentoo-dev 2010-11-16 04:52:57 UTC
In a later version of busybox I made the removed pam from the default inherit group for this very reason. The PM should be behaving here.
 
*busybox-1.16.0 (14 Mar 2010)

  14 Mar 2010; <solar@gentoo.org> +files/busybox-1.16.0-bb.patch,
  +busybox-1.16.0.ebuild:
  - Version bump. Convert EAPI=2 and disable pam by default.
Comment 3 SpanKY gentoo-dev 2010-11-16 10:24:34 UTC
IUSE=-foo is easily overridden.  Pawel: is your busybox built with USE=pam ?
Comment 4 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-11-16 10:28:02 UTC
(In reply to comment #3)
> Pawel: is your busybox built with USE=pam ?

Yes, it is:

[ebuild   R   ] sys-apps/busybox-1.15.3  USE="pam -debug -make-symlinks -savedconfig (-selinux) -static" 0 kB

Comment 5 SpanKY gentoo-dev 2010-11-16 12:14:43 UTC
ive changed the logic to disable pam for the static build since USE=pam is the default settings and most people dont pay attention to busybox until it's too late (i.e. their system is gone)

http://sources.gentoo.org/sys-apps/busybox/busybox-1.17.1-r1.ebuild?r1=1.2&r2=1.3
Comment 6 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-12-21 21:15:42 UTC
I think it's still broken:

localhost ~ # emerge -1pv busybox

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-apps/busybox-1.17.4  USE="mdev pam -debug -ipv6 -make-symlinks -savedconfig (-selinux) -static" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
localhost ~ # ls -l /bin/busybox
-rwxr-xr-x 1 root root 916520 Dec 21 21:59 /bin/busybox
localhost ~ # file /bin/busybox
/bin/busybox: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped
localhost ~ # ldd /bin/busybox
	linux-gate.so.1 =>  (0xb77aa000)
	libm.so.6 => /lib/libm.so.6 (0xb776d000)
	libpam_misc.so.0 => /lib/libpam_misc.so.0 (0xb7769000)
	libc.so.6 => /lib/libc.so.6 (0xb7624000)
	libpam.so.0 => /lib/libpam.so.0 (0xb7617000)
	/lib/ld-linux.so.2 (0xb77ab000)
	libdl.so.2 => /lib/libdl.so.2 (0xb7612000)
localhost ~ # ls -l /bin/bb
lrwxrwxrwx 1 root root 7 Dec 21 21:59 /bin/bb -> busybox
localhost ~ # ls -l /bin/busybox.static 
lrwxrwxrwx 1 root root 2 Dec 21 21:59 /bin/busybox.static -> bb
Comment 7 SpanKY gentoo-dev 2010-12-21 23:24:14 UTC
not a regression, thus not a stable blocker
Comment 8 SpanKY gentoo-dev 2010-12-21 23:32:16 UTC
the src_install needed tweaking too ... the build was fine

http://sources.gentoo.org/sys-apps/busybox/busybox-1.17.4.ebuild?r1=1.2&r2=1.3