Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192621 - sys-apps/coreutils-6.9-r1 is linked against sys-apps/acl & sys-apps/attr even with USE="-acl" on selinux systems
Summary: sys-apps/coreutils-6.9-r1 is linked against sys-apps/acl & sys-apps/attr even...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-15 20:29 UTC by Davide Pesavento
Modified: 2008-10-16 14:27 UTC (History)
1 user (show)

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


Attachments
Log of emerge coreutils with USE="-acl" (log,193.31 KB, text/plain)
2007-09-16 19:42 UTC, Davide Pesavento (RETIRED)
Details
config.log.bz2 (config.log.bz2,39.29 KB, text/plain)
2007-09-20 14:41 UTC, Davide Pesavento (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Pesavento (RETIRED) gentoo-dev 2007-09-15 20:29:47 UTC
This is critical imho: if a user runs emerge --depclean, acl & attr will be removed, but coreutils are still linked against those libs and cannot be rebuilt because revdep-rebuild fails...

chronos ~ # ls
ls: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory
chronos ~ #

and emerge fails on every package...

>>> Emerging (1 of 3) net-libs/libnfsidmap-0.19 to /
 * libnfsidmap-0.19.tar.gz RMD160 ;-) ...                                                                                                [ ok ]
 * libnfsidmap-0.19.tar.gz SHA1 ;-) ...                                                                                                  [ ok ]
 * libnfsidmap-0.19.tar.gz SHA256 ;-) ...                                                                                                [ ok ]
 * libnfsidmap-0.19.tar.gz size ;-) ...                                                                                                  [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                     [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                    [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                   [ ok ]
 * checking libnfsidmap-0.19.tar.gz ;-) ...                                                                                              [ ok ]
install: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory
 
!!! ERROR: net-libs/libnfsidmap-0.19 failed.
Call stack:
  ebuild.sh, line 1638:   Called dyn_unpack
  ebuild.sh, line 759:   Called die
 
!!! Failed to create dir '/var/tmp/portage/net-libs/libnfsidmap-0.19/work'
!!! If you need support, post the topmost build error, and the call stack if relevant.
Comment 1 SpanKY gentoo-dev 2007-09-15 20:47:01 UTC
not quite sure what you expect here ... you have to rebuild things before unmerging libs

echo USE="$USE -acl" >> /etc/make.conf
emerge world --newuse
emerge depclean

doing depclean first is just wrong
Comment 2 Davide Pesavento (RETIRED) gentoo-dev 2007-09-15 21:46:06 UTC
(In reply to comment #1)
> not quite sure what you expect here ... you have to rebuild things before
> unmerging libs
> 
> echo USE="$USE -acl" >> /etc/make.conf
> emerge world --newuse
> emerge depclean
> 
> doing depclean first is just wrong
> 

Of course I re-emerged coreutils before running depclean. Then I run depclean
and removed acl & attr, thus breaking coreutils that were *still* linked against those libs despite USE="-acl".

Forgot my emerge --info:

Portage 2.1.3.9 (selinux/2007.0/x86/hardened, gcc-3.4.6, glibc-2.5-r4, 2.6.20-hardened-r6 i686)
=================================================================
System uname: 2.6.20-hardened-r6 i686 Intel(R) Pentium(R) 4 CPU 2.20GHz
Timestamp of tree: Sat, 15 Sep 2007 15:50:01 +0000
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0_rc4-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.7.9-r1, 1.10
sys-devel/binutils:  2.17-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -msse2 -mfpmath=sse -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -msse2 -mfpmath=sse -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks loadpolicy metadata-transfer nodoc noinfo parallel-fetch sandbox selinux sesandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.ing.unibo.it/gentoo/"
LINGUAS="en en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="bash-completion berkdb bitmap-fonts bzip2 caps cli cracklib crypt dbus dri gnutls hardened iconv idn isdnlog kerberos ldap midi mudflap ncurses nls nptl nptlonly openmp pam pcre pic pppd python readline reflection samba sasl selinux session snmp socks5 spl sqlite sse sse2 ssl tcpd threads truetype-fonts type1-fonts unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Davide Pesavento (RETIRED) gentoo-dev 2007-09-15 21:46:40 UTC
Oops... ;)
Comment 4 SpanKY gentoo-dev 2007-09-15 22:40:53 UTC
other people dont re-emerge coreutils before depcleaning

you'll have to recover your box (hint: use the static `bb` rescue shell to wget and untar a binary) and then run `emerge coreutils >& log` and post the log as an attachment

ive fixed this in 6.9 already ...
Comment 5 SpanKY gentoo-dev 2007-09-15 23:58:48 UTC
and indeed, on my system:
# USE=-acl ebuild coreutils-6.9-r1.ebuild clean unpack compile install
...
# scanelf -qn /var/tmp/portage/sys-apps/coreutils-6.9-r1/image/bin/ls
librt.so.1,libc.so.6  /var/tmp/portage/sys-apps/coreutils-6.9-r1/image/bin/ls

no libacl in sight
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2007-09-16 10:27:55 UTC
(In reply to comment #4)
> you'll have to recover your box (hint: use the static `bb` rescue shell to wget
> and untar a binary) and then run `emerge coreutils >& log` and post the log as
> an attachment

I had already recovered my box before filing this bug by copying libacl and libattr (and symlinks) from another machine to /tmp/lib via scp and then running `LD_LIBRARY_PATH=/tmp/lib emerge -1 coreutils`.
Do you want the log of the building process with acl & attr installed or not installed?
Comment 7 SpanKY gentoo-dev 2007-09-16 18:48:57 UTC
i want `USE=-acl emerge coreutils` when acl/attr are installed ... if acl/attr arent installed, that isnt particularly useful seeing as how it'd be impossible to link against them in that case
Comment 8 Davide Pesavento (RETIRED) gentoo-dev 2007-09-16 19:42:13 UTC
Created attachment 131074 [details]
Log of emerge coreutils with USE="-acl"
Comment 9 Davide Pesavento (RETIRED) gentoo-dev 2007-09-16 19:47:08 UTC
Steps to reproduce on my hardened box:

1) emerge -1 attr acl
2) USE="-acl" emerge coreutils
3) emerge --depclean (removes attr & acl)
4) ls (fails saying "ls: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory")
Comment 10 SpanKY gentoo-dev 2007-09-20 07:18:39 UTC
post the config.log as well please
Comment 11 Davide Pesavento (RETIRED) gentoo-dev 2007-09-20 14:02:29 UTC
The config.log is too large to be attached here, bugzilla refuses it :(
I'm going to send you an email attaching the log there.

P.S.:
# scanelf -qn /var/tmp/portage/sys-apps/coreutils-6.9-r1/image/bin/* | grep libacl
libselinux.so.1,libacl.so.1,libc.so.6  /var/tmp/portage/sys-apps/coreutils-6.9-r1/image/bin/cp
librt.so.1,libselinux.so.1,libacl.so.1,libc.so.6  /var/tmp/portage/sys-apps/coreutils-6.9-r1/image/bin/dir
librt.so.1,libselinux.so.1,libacl.so.1,libc.so.6  /var/tmp/portage/sys-apps/coreutils-6.9-r1/image/bin/ls
libselinux.so.1,libacl.so.1,libc.so.6  /var/tmp/portage/sys-apps/coreutils-6.9-r1/image/bin/mv
librt.so.1,libselinux.so.1,libacl.so.1,libc.so.6  /var/tmp/portage/sys-apps/coreutils-6.9-r1/image/bin/vdir
Comment 12 SpanKY gentoo-dev 2007-09-20 14:13:46 UTC
so compress it with bzip2 ...
Comment 13 Davide Pesavento (RETIRED) gentoo-dev 2007-09-20 14:41:47 UTC
Created attachment 131382 [details]
config.log.bz2
Comment 14 SpanKY gentoo-dev 2007-09-30 02:41:52 UTC
oh, you're on selinux ... sucks to be you ;)

the selinux stuff is a mess with acl and it wont be fixed until the next major release of coreutils as they've integrated this stuff upstream finally
Comment 15 Renato Caldas 2008-04-06 19:25:35 UTC
I'm experiencing the reverse of this bug.

I used to have USE=selinux and everything compiled with selinux support. After getting tired of selinux I've changed the profile back and reemerged everything with USE=-selinux, including coreutils.

Now today I've done "emerge --depclean" and coreutils broke. So it seems that coreutils links with libselinux even with USE=-selinux. This is really bad, because it means it is impossible to move away from selinux.

Should I open another bug report or could you reopen this one?
Comment 16 Davide Pesavento (RETIRED) gentoo-dev 2008-10-16 14:26:50 UTC
WORKSFORME is quite inaccurate ;)
Comment 17 Davide Pesavento (RETIRED) gentoo-dev 2008-10-16 14:27:38 UTC
UPSTREAM seems better.