Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 245417

Summary: sys-libs/ncurses with USE=berkdb links against db in /usr
Product: Gentoo Linux Reporter: Eugene Shalygin <eugene.shalygin>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: bernhard.hartleb, DarkNRG, gbin, sam
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 398051    

Description Eugene Shalygin 2008-11-03 16:16:45 UTC
/sbin/rc fails to load and thus machine fails to boot when openrc is linked against ncurses with berkdb use flag in case of /usr is located on separate partition and is not accessible during beginning of boot process 

Reproducible: Always

Steps to Reproduce:
1. move /usr to separate partition
2. emerge sys-libs/ncurses with berkdb use flag enabled
3. emerge sys-apps/openrc with ncurses use flag enabled
4. reboot

Actual Results:  
machine failed to boot because /sbin/rc failed to load

Expected Results:  
machine boot properly

emerge --info:
Portage 2.2_rc13 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.27-gentoo-r2 x86_64)
=================================================================                                                
System uname: Linux-2.6.27-gentoo-r2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T5550_@_1.83GHz-with-glibc2.2.5           
Timestamp of tree: Mon, 03 Nov 2008 10:45:02 +0000                                                               
app-shells/bash:     3.2_p39                                                                                     
dev-java/java-config: 1.3.7, 2.1.6-r1                                                                            
dev-lang/python:     2.5.2-r8                                                                                    
dev-util/cmake:      2.6.2                                                                                                                                   
sys-apps/baselayout: 2.0.0                                                                                                                                   
sys-apps/openrc:     0.3.0-r1                                                                                                                                
sys-apps/sandbox:    1.2.18.1-r3                                                                                                                             
sys-devel/autoconf:  2.13, 2.63                                                                                                                              
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1                                                                                            
sys-devel/binutils:  2.19                                                                                                                                    
sys-devel/gcc-config: 1.4.0-r4                                                                                                                               
sys-devel/libtool:   2.2.6a                                                                                                                                  
virtual/os-headers:  2.6.27-r2                                                                                                                               
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                                                                               
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/env /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /usr/shutdown /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/var/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirror.pw.edu.pl/ "
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="ru uk eo en"
MAKEOPTS="-j2"
PKGDIR="/var/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/nouveau /usr/local/portage/layman/kde-crazy /usr/local/portage/layman/lcd-filtering /usr/local/portage/my"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 apache2 avahi bash-completion berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus djvu dri dv dvd dvdr dvdread emacs emboss encode evo exif exiv2 fam ffmpeg firefox firefox3 flac fontconfig fortran fuse gdbm gif gimp gphoto2 gpm gstreamer gtk hal iconv inotify ipv6 ipw3945 isdnlog java java5 java6 joystick jpeg kde kde4 kdeenablefinal kdehiddenvisibility kerberos kipi kpathsea laptop latex ldap libnotify lm_sensors lmsensors mad matroska midi mikmod mmap mmx moznopango mp3 mpeg mudflap multilib musicbrainz ncurses networkmanager newspr nls nptl nptlonly ogg openexr opengl openmp paludis pam pch pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba sdl semantic-desktop session spell spl ssesse2 ssl startup-notification svg symlink sysfs tcpd tetex threads tiff tk truetype unicode usb utemper v4l v4l2 vorbis wmf x264 xattr xcb xcomposite xine xinetd xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="intel-hda" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="evdev joystick keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru uk eo en" USERLAND="GNU" VIDEO_CARDS="v4l vesa nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2008-11-03 17:45:14 UTC
so dont enable USE=berkdb for ncurses

should probably introduce a USE=sep-usr flag
Comment 2 Eugene Shalygin 2008-11-03 17:58:48 UTC
thanks, and yes, disabling berkdb is trivial solution. But, the problem is not in rescuing system, but that it happens after ordinary world update. I think something more then new use-flag should be done in order to prevent similar situations. Moreover, ncurses with that flag caused my shell to print some diagnostic messages from Berkley DB after each command (something like DB->get: method not bla-bla-bla).
Comment 3 DarkNRG 2008-11-04 11:24:02 UTC
I had the same problem and had to use a Gentoo LiveCD to fix it.
According to "ldd /lib{32,64}/* | grep /usr/ -B 5" this is not the only package which installs files in /lib{32,64} which depend on libs in /usr (for me there are dev-libs/libusb and app-emulation/emul-linux-x86-baselibs), but they were no problem yet.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-04 18:37:35 UTC
*** Bug 245443 has been marked as a duplicate of this bug. ***
Comment 5 SpanKY gentoo-dev 2008-11-04 21:11:29 UTC
please file a bug against any package that installs into / but links against /usr/
Comment 6 DarkNRG 2008-11-05 12:13:17 UTC
(In reply to comment #5)
> please file a bug against any package that installs into / but links against
> /usr/
> 

Done.
Bugs #245641 and #245645 for other such packages
Comment 7 Bernhard Hartleb 2009-10-31 22:50:56 UTC
The berkdb flag is commented out in all ncurses ebuilds now.
There might be still an issue, if it is added to the ebuild again.

Someone should clear up the ncurses ebuilds.
After that, this bug could be closed.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-01 01:33:30 UTC
commit 46de87314a6a0bc0bb4945d5566e98a26b322295
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Tue Dec 2 02:17:24 2008 +0000

    also comment out berkdb in src_install #249511
    (Portage version: 2.2_rc16/cvs/Linux 2.6.27.4 x86_64)
     (Signed Manifest commit)

commit bd8df97f85c4391e8371a64a8c77ad1f77e918b0
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Tue Dec 2 02:17:16 2008 +0000

    also comment out berkdb in src_install #249511
    (Portage version: 2.2_rc16/cvs/Linux 2.6.27.4 x86_64)

commit 70dc71ad79d92cdaf8dbd2af509eb68174e76649
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Thu Nov 27 21:27:40 2008 +0000

    Disable USE=berkdb rather than masking the package.
    (Portage version: 2.2_rc16/cvs/Linux 2.6.27.4 x86_64)
     (Signed Manifest commit)

commit 0ac6b5926fd73309eb47415bdf8a22e09925a3a0
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Thu Nov 27 21:27:26 2008 +0000

    Disable USE=berkdb rather than masking the package.
    (Portage version: 2.2_rc16/cvs/Linux 2.6.27.4 x86_64)

and it never came back -> FIXED