Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120653 - ROOT=/build/ emerge -u ... doesn't do config file protection
Summary: ROOT=/build/ emerge -u ... doesn't do config file protection
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 137867 136244
  Show dependency tree
 
Reported: 2006-01-28 03:08 UTC by echtler
Modified: 2006-07-12 04:00 UTC (History)
2 users (show)

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


Attachments
fix broken paths in the merge phase (mergephase.patch,3.06 KB, patch)
2006-07-10 19:00 UTC, Zac Medico
Details | Diff
fix ROOT=/ config protect breakage (bug_140045.patch,714 bytes, patch)
2006-07-12 04:00 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description echtler 2006-01-28 03:08:31 UTC
I'm using portage to manage several small/embedded systems, by
having a buildroot which is held up-to-date via rsync.
However, ${ROOT}/etc keeps making trouble as portage just over-
writes everything without bothering to check..

Is there a short-term solution anyone is aware of?

Here's emerge info:

Portage 2.0.54 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14.2-mh2 i686)
=================================================================
System uname: 2.6.14.2-mh2 i686 AMD Athlon(tm) XP 2700+
Gentoo Base System version 1.6.14
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon -pipe -mmmx -m3dnow -msse -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon -pipe -mmmx -m3dnow -msse -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://gentoo.inode.at/source/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ http://mirror.switch.ch/mirror/gentoo/ ftp://mir.zyrianes.net/gentoo/ http://195.56.77.10/"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowex X a52 aac alsa audiofile avi bash-completion bitmap-fonts bluetooth bonobo bzip2 cairo cddb cdr crypt cups dbus dmx dvb dvd dvdr dvdread eds encode ethereal evo exif fame ffmpeg firefox flac foomaticdb gcj gif gimp gimpprint glut gnome gnutls gphoto2 gstreamer gtk gtk2 hddtemp imagemagick imlib java jpeg lzo mad md5sum mikmod mjpeg mmap mmx mozsvg mpeg multitarget nautilus ncurses nethack nls noantlr nobcel nobeanutils nobsh nocommonslogging nocommonsnet nojdepend nojsch nojython nolog4j nooro noregexp norhino noxalan noxerces nptl nptlonly nsplugin nvidia offensive ogg oggvorbis opengl pam pic png ppds quicktime readline real rtc sdl speex srv sse ssl tga theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales v4l v4l2 vcd vim-with-x vorbis win32codecs wxgtk1 wxwindows xanim xinerama xv xvid xvmc zlib fritzcapi_cards_fxusb_CZ userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS, MAKEOPTS
Comment 1 gent_bz 2006-03-13 20:33:56 UTC
I have this same problem, even with $ROOT/etc (and others) in CONFIG_PROTECT.
Comment 2 Stefan Hellermann 2006-05-15 09:03:58 UTC
same problem here, is there any work-around? 
Comment 3 Zac Medico gentoo-dev 2006-07-05 12:56:19 UTC
This should be working in 2.1. If it's not working in 2.1 or the latest ~arch release then please reopen.
Comment 4 Stefan Hellermann 2006-07-10 16:48:27 UTC
It seems like the problem isn't fixed yet.
Tested with portage-2.1-r1, a customized ${ROOT}/etc/nsswitch.conf is overwritten every time I 'ROOT=/myroot emerge -k glibc'.
When I chroot into /myroot an 'emerge -k glibc' the nsswitch.conf is protected and an etc-update list's an update.

The problem is not related only to glibc but that's an example.
Comment 5 Zac Medico gentoo-dev 2006-07-10 19:00:07 UTC
Created attachment 91422 [details, diff]
fix broken paths in the merge phase

More than just config file protection is broken.  Apparently, protected file destined for $ROOT are actually merged to / (extremely bad).  This is fixed in svn r3836.
Comment 6 Zac Medico gentoo-dev 2006-07-10 19:01:54 UTC
I wouldn't recommend for anyone to use $ROOT without the attached patch.
Comment 7 Zac Medico gentoo-dev 2006-07-11 12:23:45 UTC
This has been released in 2.1.1_pre2-r7.
Comment 8 Zac Medico gentoo-dev 2006-07-12 04:00:21 UTC
Created attachment 91558 [details, diff]
fix ROOT=/ config protect breakage

The first patch has a bug for ROOT=/ (see bug 140045).