Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192416 - sys-apps/busybox-1.7.0: busybox.static not statically linked with USE=pam
Summary: sys-apps/busybox-1.7.0: busybox.static not statically linked with 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: 2007-09-13 12:28 UTC by Martin von Gagern
Modified: 2009-07-24 02:42 UTC (History)
1 user (show)

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


Attachments
Patch busybox-1.7.0.ebuild to skip static files for USE=pam (busybox-1.7.0.ebuild.patch,469 bytes, patch)
2007-09-13 12:43 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2007-09-13 12:28:48 UTC
After I've investigated for several hours why my initramfs wouldn't work, I found out that the file /bin/busybox.static is not static at all. This is probably the result of fixing bug 190212, as the pam USE flag seems to be handled just like the static use flag in too many situations, including the creation of this symlink.

There are several possible solutions. One would be to disable pam support when building a static version. Another would be to simply not create a static version at all, and to skip the creation of the symlink as well.
Comment 1 Martin von Gagern 2007-09-13 12:43:08 UTC
Created attachment 130807 [details, diff]
Patch busybox-1.7.0.ebuild to skip static files for USE=pam

This avoids installing /bin/bb and /bin/busybox.static if USE=pam is given and USE=static is not.
I noticed that the current version would not install a /bin/busybox.static node for normal builds with neither static nor pam USE flag. This seems to be an error as well, as bb and busybox.static seem to be synonymous in all cases, at least that's the way the 1.6.1 ebuild handled things. I therefore duplicated the dosym command.
Comment 2 Martin von Gagern 2007-09-13 12:52:28 UTC
Reading in bug 95136 that /bin/bb is the default rescue shell makes it sound like we really would want that node to be present in all cases. The current ebuild does this, my patch won't. However the rescue shell should really be linked statically, so probably we should make an effort to get a static version compiled without pam in all cases. Enabling CONFIG_STATIC seems to work by simply putting that option on the command line of make. I don't know whether unconfiguring CONFIG_PAM could work similarly, or whether you would need to reconfigure the whole package.
Comment 3 SpanKY gentoo-dev 2007-09-24 11:56:59 UTC
i'll omit the /bin/busybox.static symlink, but not /bin/bb

/bin/bb should always exist

the ebuild already accounts for USE="static pam" by disabling pam support
Comment 4 Martin von Gagern 2007-09-24 13:11:10 UTC
(In reply to comment #3)
> /bin/bb should always exist

As a repair shell, reight? I agree there.

> the ebuild already accounts for USE="static pam" by disabling pam support

I know this, I was more concerned about scenarios with USE="-static pam" where the libc got damaged somehow. In these cases you'd be out of luck if you try to repair this using bb. Thats why I wrote about trying to get a static non-pam version in all cases, no matter the USE flags.
Comment 5 SpanKY gentoo-dev 2007-09-24 14:44:13 UTC
i chose not to build busybox twice because the build system does not [yet] properly account for minimal rebuilding based on changed configuration options, so if pam gets turned off in the .config, the tree needs to be cleaned completely and built from scratch
Comment 6 solar (RETIRED) gentoo-dev 2009-07-24 02:42:09 UTC
Please use /etc/portage/package.use where it fits the needs of the local box.