Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136376 - CONFIG_PROTECT should not follow symlinks
Summary: CONFIG_PROTECT should not follow symlinks
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-11 03:57 UTC by Joakim Tjernlund
Modified: 2006-06-12 12:04 UTC (History)
1 user (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 Joakim Tjernlund 2006-06-11 03:57:21 UTC
After upgraging to gcc 3.4.6 and doing a emerge -e system, portage thinks
that /etc/X11/xdm/chooser, /etc/X11/rstart/rstartd.real and
/usr/lib/X11/xkb/xkbcomp are config files that needs attention.
These files are ELF executables and not config files.

The /usr/lib/X11/xkb path is probably picked up from the /etc/X11/xkb symlink
and expanded to /usr/lib/X11/xkb.

The above observations rasies the following items:
1) Symlinks should probably not be expanded.

2) Why is there object code in /etc in the first place? Better to move
these elsewhere and add a QA check to portage to prevent ELF files from being installed in /etc.


Portage 2.1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16-gentoo-r6 i686)
=================================================================
System uname: 2.6.16-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.6.14
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
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-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -march=i686"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache confcache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://devsrv.transmode.se/portage/distfiles http://gentoo.osuosl.org/"
MAKEOPTS="-j4 -s"
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'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/myportage /usr/local/portage"
SYNC="rsync://devsrv.transmode.se/gentoo-portage"
USE="x86 X alsa apache2 apm avi berkdb bitmap-fonts cli crypt cups dri eds emacs emboss encode firefox foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imlib ipv6 isdnlog jpeg libg++ libwww mikmod motif mp3 multislot ncurses nls nptl opengl oss pam pcre pdflib perl pic png pppd python quicktime readline reflection session spell spl ssl tcpd truetype truetype-fonts type1-fonts udev unicode usb xml xmms xorg xv zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2006-06-11 12:40:19 UTC

*** This bug has been marked as a duplicate of 32927 ***
Comment 2 SpanKY gentoo-dev 2006-06-11 13:57:44 UTC
we'll cover (1) here, (2) is the dupe
Comment 3 Zac Medico gentoo-dev 2006-06-11 18:43:50 UTC
Well(In reply to comment #0)
> CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/lib/X11/xkb"

1) You have /usr/lib/X11/xkb in CONFIG_PROTECT.  Do you know why?  Maybe you have some stale files in /etc/env.d or something?

2) Looking at the config protect code, it doesn't look like portage follows symlinks in the dblink.isprotected() method (inside portage.py).

3) The following files installed for x11-apps/xkbcomp-1.0.2 on my system:
	/usr/bin/xkbcomp
	/usr/share/man/man1/xkbcomp.1x.gz
	/usr/share/X11/xkb/xkbcomp

So, this bug report is not making sense to me in lots of ways...
Comment 4 Zac Medico gentoo-dev 2006-06-11 18:49:39 UTC
Well, I guess your not running modular X like me.  But anyway, the config protect behavior is normal based on /usr/lib/X11/xkb being in your CONFIG_PROTECT varable.  You can use `grep -r /usr/lib/X11/xkb /etc/env.d` to find out which file is causing that.  If the file belongs to a package, then you can do CONFIG_PROTECT_MASK="/usr/lib/X11/xkb" in make.conf.
Comment 5 Joakim Tjernlund 2006-06-12 12:04:00 UTC
Correct, I am not running modular X yet. The CONFIG_PROTECT is from
/etc/env.d/10xorg which belongs to x11-base/xorg-x11. Sure I can add
a CONFIG_PROTECT_MASK="/usr/lib/X11/xkb", but is that the right thing to do
in a non modular X?