Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47482 - libs from /usr referenced in /bin and /lib
Summary: libs from /usr referenced in /bin and /lib
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Highest critical (vote)
Assignee: Gentoo Quality Assurance Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-10 22:09 UTC by Dwight Schauer
Modified: 2005-02-13 23:59 UTC (History)
3 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 Dwight Schauer 2004-04-10 22:09:51 UTC
I'm using Gentoo Base System version 1.4.3.13 on amd64.

There are items in /bin, /sbin, and /lib that reference items in /usr.
This can problematic for scripts that run at boot time. I'm trying to track down a problem in a boot script that I can't recreate when /usr is mounted, and I believe this might be a source of the problem. Even if it is not, it is not correct ro reference libraries from /usr in /bin, /lib, and /sbin. 

# pwd
/lib
# ls -l | grep /usr
lrwxrwxrwx    1 root     root           17 Mar 13 13:37 libacl.a -> /usr/lib/libacl.a
lrwxrwxrwx    1 root     root           18 Mar 13 13:37 libacl.la -> /usr/lib/libacl.la
lrwxrwxrwx    1 root     root           18 Mar 13 13:37 libattr.a -> /usr/lib/libattr.a
lrwxrwxrwx    1 root     root           19 Mar 13 13:37 libattr.la -> /usr/lib/libattr.la

# pwd
/sbin
# ldd * | grep /usr
        libmng.so.1 => /usr/lib/libmng.so.1 (0x0000002a9566a000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x0000002a95c9f000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0000002a9566a000)
        libldap.so.2 => /usr/lib/libldap.so.2 (0x0000002a959b7000)
        liblber.so.2 => /usr/lib/liblber.so.2 (0x0000002a95aec000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x0000002a95f47000)
        libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x0000002a9605d000)
        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x0000002a96193000)
        libwrap.so.0 => /usr/lib/libwrap.so.0 (0x0000002a9566a000)

# pwd
/bin
# ldd * | grep /usr
        libattr.so.1 => /usr/lib/libattr.so.1 (0x0000002a95770000)
        libattr.so.1 => /usr/lib/libattr.so.1 (0x0000002a95c55000)
        libcrack.so.2 => /usr/lib/libcrack.so.2 (0x0000002a9579d000)
        libattr.so.1 => /usr/lib/libattr.so.1 (0x0000002a95770000)
        libattr.so.1 => /usr/lib/libattr.so.1 (0x0000002a95c55000)
        libattr.so.1 => /usr/lib/libattr.so.1 (0x0000002a95770000)
        libcrack.so.2 => /usr/lib/libcrack.so.2 (0x0000002a9579d000)
        libattr.so.1 => /usr/lib/libattr.so.1 (0x0000002a95c55000)
Comment 1 Dwight Schauer 2004-04-10 22:53:24 UTC
After copying the missing libraries via "cp $(ldd /bin/* /sbin/* | grep /usr | awk '{print $3}' | sort -u) /lib" my boot script problems went away. I was getting a "Failed to calculate module dependencies" error, and nothing I did was fixing it, until I tracked it down to a library problem.

This a serious problem, so I'm upping the severity and priority.
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2004-04-11 01:17:16 UTC
wow, that's terrible with the attr and acl stuff -- I'm very very sorry -- I'll fix this asap
Comment 3 Daniel Black (RETIRED) gentoo-dev 2004-04-23 19:22:29 UTC
(ldd /sbin/* /bin/* | cut -f 3 -d ' ' | grep -E ^/usr/lib | xargs -n1 qpkg -f -v | sort | uniq)
media-libs/freetype-2.1.5-r1 *
media-libs/libmng-1.0.4 *
sys-devel/binutils-2.14.90.0.7-r4 *
sys-libs/cracklib-2.7-r8 *
sys-libs/zlib-1.1.4-r2 *

media-libs/jpeg-6b-r3 *
Comment 4 solar (RETIRED) gentoo-dev 2004-04-23 19:36:51 UTC
Please POST your USE flags.

If you have USE="acl" then you can expect libacl to be there.
If you have USE="ssl" then you can expect things in lib to be linked to things in 
/usr/lib to be there.

Can we try this with USE="-*" and work our way back from that please?
Comment 5 Daniel Black (RETIRED) gentoo-dev 2004-04-23 20:36:15 UTC
I thinks my logic is very wrong. Will get some sleep and work this out properly. Good idea with the USE assignment solar.
Comment 6 Dwight Schauer 2004-04-23 22:09:07 UTC
Ok, this is a different system, also Gentoo on amd64

/bin # cat /etc/gentoo-release 
Gentoo Base System version 1.4.9

/bin # cat /proc/version 
Linux version 2.6.5-gentoo-r1 (root@livecd) (gcc version 3.3.3 20040217 (Gentoo Linux 3.3.3, propolice-3.3-7)) #1 Mon Apr 19 21:48:26 CDT 2004

/bin # ldd * | grep /usr
        libcrack.so.2 => /usr/lib/libcrack.so.2 (0x0000002a9579d000)
        libcrack.so.2 => /usr/lib/libcrack.so.2 (0x0000002a9579d000)

/bin # qpkg -f /usr/lib/libcrack.so.2
sys-libs/cracklib

/sbin # ldd * | grep /usr
        libmng.so.1 => /usr/lib/libmng.so.1 (0x0000002a9566a000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x0000002a95c9f000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0000002a9566a000)

/lib # ls -l | grep /usr
lrwxrwxrwx  1 root root      17 Apr 19 01:36 libacl.a -> /usr/lib/libacl.a
lrwxrwxrwx  1 root root      18 Apr 19 01:36 libacl.la -> /usr/lib/libacl.la

/lib # qpkg -f /usr/lib/libacl.a
sys-apps/acl *

USE="-3dfx 3dnow -aalib -accessibility acl acpi -afs -adns -aim -alsa
-altivec apache2 apm -arts -atlas -audiofile -avi berkdb -bidi -bonobo
-canna caps -cdr -cjk crypt -cscope -cups -curl -debug -dedicated -dga
-directfb -doc -dvb -dvd -dvdr -emacs -emacs-w3 -encode -esd ethereal
-evo -fam fastcgi fbcon -fdftk -fftw -firebird -flac -flash -foomaticdb
-freetds -freewnn -gb -gd -gd-external -gdbm -ggi -gif -ginac -gmp
-gnome -gphoto2 -gpm -gps -gstreamer -gtk -gtk2 -gtkhtml -guile
hardened -icc -icc-pgo -icq imap -imagemagick -imlib -innodb -informix
ipv6 -jabber -jack -java -jikes -joystick -jpeg -junit -kde -kerberos
-krb4 -ladcca -lcms -ldap -leim -libg++ -libgda -libwww -lirc -mad
maildir -matrox mbox -mcal -mikmod memlimit mmx -motif -lesstif
-mozilla -mpeg -mpi -msn -mule -mysql -nas ncurses -nhc98 -netcdf -nls
-nocardbus nocd -oci8 -odbc -offensive -oggvorbis -opengl -oscar -oss
pam -pcmcia -pda -ppds -pdflib perl -plotutils -png -pnp -postgres
-bindist prelude python -qt -quicktime readline ruby -samba sasl
-scanner -sdl slang -slp -snmp -socks5 -speex -spell sse ssl -sqlite
-svga -tcltk tcpd -tetex -theora -tiff -truetype -trusted -unicode usb
vhosts -videos -voodoo3 -wavelan -wmf -wxwindows -X -Xaw3d -xface
-xinerama -xosd xml xml2 -xmms -xv -yahoo -yaz -zeo zlib"
Comment 7 SpanKY gentoo-dev 2004-04-23 22:13:37 UTC
ok, that shows us that we got *something* in /{bin,lib} linking with /usr, but you didnt show us *what*
Comment 8 Dwight Schauer 2004-04-23 22:31:49 UTC
/bin

groups:
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x0000002a9566a000)
        libcrack.so.2 => /usr/lib/libcrack.so.2 (0x0000002a9579d000)
        libc.so.6 => /lib/libc.so.6 (0x0000002a958aa000)
        /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)

su:
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x0000002a9566a000)
        libcrack.so.2 => /usr/lib/libcrack.so.2 (0x0000002a9579d000)
        libpam.so.0 => /lib/libpam.so.0 (0x0000002a958aa000)
        libpam_misc.so.0 => /lib/libpam_misc.so.0 (0x0000002a959b2000)
        libc.so.6 => /lib/libc.so.6 (0x0000002a95ab5000)
        libdl.so.2 => /lib/libdl.so.2 (0x0000002a95cee000)
        /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)

/sbin

fbmngplay:
        libmng.so.1 => /usr/lib/libmng.so.1 (0x0000002a9566a000)
        libz.so.1 => /lib/libz.so.1 (0x0000002a957cf000)
        libm.so.6 => /lib/libm.so.6 (0x0000002a958e3000)
        libc.so.6 => /lib/libc.so.6 (0x0000002a95a67000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x0000002a95c9f000)
        /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)

fbtruetype:
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0000002a9566a000)
        libm.so.6 => /lib/libm.so.6 (0x0000002a957f4000)
        libc.so.6 => /lib/libc.so.6 (0x0000002a95979000)
        libz.so.1 => /lib/libz.so.1 (0x0000002a95bb1000)
        /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-04-23 23:24:55 UTC
cracklib is fixed now. libcrack.so* is placed into /lib.
Comment 10 SpanKY gentoo-dev 2004-04-23 23:25:31 UTC
dunno about you guys but i think it'd be safe to say we can move fbmngplay and fbtruetype into /usr/sbin/
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-04-23 23:28:10 UTC
vapier: i don't use fb on any machine, so it's really no water off my back.
Comment 12 Daniel Black (RETIRED) gentoo-dev 2004-04-24 01:20:45 UTC
/sbin/ksymoops: sys-kernel/ksymoops (plasmaroo@gentoo.org ,x86-kernel@gentoo.org)
        libbfd-2.14.90.0.7.so => /usr/lib/libbfd-2.14.90.0.7.so (0x4001e000)

/sbin/mkfs.cramfs: (base-system)
        libz.so.1 => /usr/lib/libz.so.1 (0x4001e000)

/sbin/fsck.cramfs: (base-system)
       libz.so.1 => /usr/lib/libz.so.1 (0x4001e000)

should check /lib too - mine turned up clean though.
Comment 13 Daniel Black (RETIRED) gentoo-dev 2004-04-24 01:25:37 UTC
Apologies to parties erroneously added.
Comment 14 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-04-24 01:35:21 UTC
zlib is already in /lib

/sbin/ksymoops should probably move to /usr/sbin
i don't see much need for it on a minimal system 
libbfd is large and I don't think it should go on the root fs anyway.
Comment 15 Spider (RETIRED) gentoo-dev 2004-04-24 02:46:06 UTC
about fbmng:
its used for the animations shown in bootsplash, I think that putting libmng and its deps in /lib is too much and too far, so this should probably be handed off to the bootsplash related folks
Comment 16 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-08-14 16:11:58 UTC
plasmaroo: could ksymoops be installed in /usr/sbin instead of /sbin ?
Comment 17 Tim Yamin (RETIRED) gentoo-dev 2004-08-14 16:24:39 UTC
Done, ksymoops moved to /usr/bin.
Comment 18 Daniel Black (RETIRED) gentoo-dev 2004-10-01 19:04:01 UTC
is there anything left to fix here?
Comment 19 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-12-13 22:48:30 UTC
I do think we can leave some this stuff, as it's now unlikely that you won't have /usr available for some of these, and the overhead of moving the libraries into /lib is getting too large anyway.

The NUT stuff could move into /usr and likewise for arpd.

/sbin/fbmngplay: media-gfx/bootsplash
        libmng.so.1 => /usr/lib/libmng.so.1 (0xb7f7b000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7e02000)
/sbin/fbtruetype: media-gfx/bootsplash
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x415e1000)
/sbin/arpd: sys-apps/iproute2
        libdb-4.2.so => /usr/lib/libdb-4.2.so (0xb7f05000)
/lib/security/pam_smbpass.so: net-fs/samba
        libcrypt.so.1 => /usr/lib/libcrypt.so.1 (0xb7ef7000)
        libresolv.so.2 => /usr/lib/libresolv.so.2 (0xb7ee3000)
        libnsl.so.1 => /usr/lib/libnsl.so.1 (0xb7ecc000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0xb7ec8000)
/lib/libnss_ldap-2.3.2.so: net-libs/nss_ldap
        libldap.so.2 => /usr/lib/libldap.so.2 (0xb1e23000)
        liblber.so.2 => /usr/lib/liblber.so.2 (0xb3f15000)
        libdb-4.1.so => /usr/lib/libdb-4.1.so (0xb7f15000)
/lib/nut/newhidups: www-apps/nut
        libusb-0.1.so.4 => /usr/lib/libusb-0.1.so.4 (0xb7fcf000)
/lib/nut/snmp-ups: www-apps/nut
        libnetsnmp.so.5 => /usr/lib/libnetsnmp.so.5 (0xb7f30000)
        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0xb7e36000)
        libelf.so.1 => /usr/lib/libelf.so.1 (0xb7e24000)
Comment 20 SpanKY gentoo-dev 2004-12-14 05:44:05 UTC
we've already covered bootsplash ... it cant move :P

also, i'm pretty sure the pam stuff has to stay in /lib/security/
Comment 21 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-02-13 23:59:16 UTC
nut and iproute2's arpd are fixed.
I think we can close this now, as there is nothing else (on my systems at least) that can be moved out of the root filesystem.