When running emerge <package> that need to access files in /usr/src/linux when a secure umask of 077 or 007 ebuilds fail with random errors OTHER then permission denied when trying to access files like /usr/src/linux/.config and modversions.h. Possilbe fix would be to make the ebuild kernel source have the group portage and g+rx. Reproducible: Always Steps to Reproduce: 1. set default umask 077 2. compile/configure kernel source 3. run portage in userpriv/sandbox and try to merge something like alsa-drivers Actual Results: !!! ERROR: media-sound/alsa-driver-0.9.3c-r1 failed. !!! Function src_compile, Line 59, Exitcode 2 !!! Parallel Make Failed and /tmp/portage/alsa-driver-0.9.3c-r1/work/alsa-driver-0.9.3c/include/adriver.h:42:31: linux/modversions.h: No such file or directory Expected Results: driver emerged This is a rather hard error to pinpoint since running emerge as root leads one to believe it would be able to access the needed files.
still an issue ?
yes. it is! linux-2.6.8.1-ck8 # emerge alsa-driver Calculating dependencies ...done! >>> emerge (1 of 1) media-sound/alsa-driver-1.0.6a to / >>> md5 src_uri ;-) alsa-driver-1.0.6a.tar.bz2 >>> Unpacking source... >>> Unpacking alsa-driver-1.0.6a.tar.bz2 to /var/tmp/portage/alsa-driver-1.0.6a/work * >> Compiling 2.6.8-ck8 modules... * Applying alsa-driver-1.0.5-devfix.patch... [ ok ] * Applying alsa-driver-1.0.5a-cs46xx-passthrough.patch... [ ok ] * Applying alsa-driver-1.0.6a-kbuild.patch... [ ok ] * /usr/src/linux is a symbolic link checking for inline... inline checking whether time.h and sys/time.h may both be included... yes checking whether gcc needs -traditional... no checking for current directory... /var/tmp/portage/alsa-driver-1.0.6a/work/alsa-driver-1.0.6a checking cross compile... checking for directory with kernel source... /usr/src/linux checking for kernel version... The file /usr/src/linux/include/linux/version.h does not exist. Please, install the package with full kernel sources for your distribution or use --with-kernel=dir option to specify another directory with kernel sources (default is /usr/src/linux). !!! ERROR: media-sound/alsa-driver-1.0.6a failed. !!! Function econf, Line 362, Exitcode 1 !!! econf failed linux-2.6.8.1-ck8 # l include/linux/version.h -rw-rw---- 1 root root 129 Sep 28 20:13 include/linux/version.h linux-2.6.8.1-ck8 # chmod -R a+rX . linux-2.6.8.1-ck8 # umask 0007 linux-2.6.8.1-ck8 # emerge info Portage 2.0.50-r11 (2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.4.22-1.2115.nptlsmp) ================================================================= System uname: 2.4.22-1.2115.nptlsmp i686 Intel(R) Xeon(TM) CPU 2.80GHz Gentoo Base System version 1.4.16 distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -mfpmath=sse -msse2 -mmmx -pipe -fomit-frame-pointer -falign-functions=4" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -mfpmath=sse -msse2 -mmmx -pipe -fomit-frame-pointer -falign-functions=4" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache distcc sandbox sfperms userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.linux.ee/pub/gentoo/distfiles http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://gentoo.linux.no/ ftp://gentoo.linux.no/pub/gentoo/ http://ftp.easynet.nl/mirror/gentoo/" MAKEOPTS="-j25" PKGDIR="/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/gentoo/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X aalib acpi alsa apache2 arts artswrappersuid avi bitmap-fonts chroot crypt cups dga directfb dvd encode extensions fbcon flac gif gphoto2 gpm gstreamer gtk gtk2 imap imlib java javascript jikes jpeg kde libg++ libwww linguas_et mad maildir md5sum memlimit mmx motif mpeg mysql ncurses oggvorbis opengl oss pam pda pdflib perl png qt quicktime readline samba scanner sdl slang slp spell sse ssl svga tcltk tiff truetype usb x86 xinerama xml2 xprint xv zlib"
can paste another one: emerge of x11-base/xorg-x11-6.8.0-r1: * 9970_all_dlloader-imake-fix.patch... [ ok ] * 9980_all_6.7.99.904-fix-encodings.patch... [ ok ] * Done with patching * Setting up config/cf/host.def... awk: cmd. line:2: fatal: cannot open file `//usr/src/linux/include/linux/version.h' for reading (Permission denied) /usr/sbin/ebuild.sh: line 74: [: : integer expression expected !debug x86 x86 xprint [ ok ] >>> Source unpacked. * Setting make jobs to "-j8" to ensure successful merge... * Building xorg-x11... Building Release 6.8. I hope you checked the configuration parameters in ./config/cf to see if you need to pass BOOTSTRAPCFLAGS. Sat Oct 16 02:16:50 EEST 2004 cd ./config/imake && make - --jobserver-fds=3,5 -j -f Makefile.ini BOOTSTRAPCFLAGS="" CC="gcc" clean make[1]: Entering directory `/var/tmp/portage/xorg-x11-6.8.0-r1/work/xc/config/imake' rm -f ccimake imake.o imake # ls -lad //usr/src/linux/include/linux/version.h -rw-rw---- 1 root root 131 Oct 13 19:57 //usr/src/linux/include/linux/version.h
*** Bug 65460 has been marked as a duplicate of this bug. ***
Turn off userpriv?