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

Bug 364041

Summary: linux-info.eclass getfilevar_noexec receiving wrong parameters (affects =x11-drivers/xf86-video-intel-2.15.0)
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: EclassesAssignee: Gentoo Kernel Miscellaneous <kernel-misc>
Status: RESOLVED FIXED    
Severity: normal CC: dschridde+gentoobugs, kirelagin, Martin.vGagern, x11
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Build log
linux-info.eclass patch

Description Agostino Sarubbo gentoo-dev 2011-04-18 15:42:53 UTC
Created attachment 270395 [details]
Build log

$summary

See attached build log.

CC'ing x11 by scarabeus request


Portage 2.1.9.45 (hardened/linux/x86, gcc-4.4.5, glibc-2.11.3-r0, 2.6.38-gentoo i686)
=================================================================                                                                                                                   
System uname: Linux-2.6.38-gentoo-i686-Intel-R-_Celeron-R-_M_CPU_430_@_1.73GHz-with-gentoo-2.0.2                                                                                    
Timestamp of tree: Mon, 18 Apr 2011 14:00:01 +0000                                                                                                                                  
app-shells/bash:     4.1_p9                                                                                                                                                         
dev-java/java-config: 2.1.11-r3                                                                                                                                                     
dev-lang/python:     2.6.6-r2, 2.7.1-r1, 3.1.3-r1                                                                                                                                   
dev-util/cmake:      2.8.1-r2                                                                                                                                                       
sys-apps/baselayout: 2.0.2                                                                                                                                                          
sys-apps/openrc:     0.8.0                                                                                                                                                          
sys-apps/sandbox:    2.4                                                                                                                                                            
sys-devel/autoconf:  2.13, 2.65-r1                                                                                                                                                  
sys-devel/automake:  1.10.3, 1.11.1                                                                                                                                                 
sys-devel/binutils:  2.20.1-r1                                                                                                                                                      
sys-devel/gcc:       4.4.5                                                                                                                                                          
sys-devel/gcc-config: 1.4.1                                                                                                                                                         
sys-devel/libtool:   2.2.10                                                                                                                                                         
sys-devel/make:      3.81-r2                                                                                                                                                        
sys-kernel/linux-headers: 2.6.36.1                                                                                                                                                  
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)                                                                                                                            
ACCEPT_KEYWORDS="x86"                                                                                                                                                               
ACCEPT_LICENSE="*"                                                                                                                                                                  
CBUILD="i686-pc-linux-gnu"                                                                                                                                                          
CFLAGS="-O2 -march=prescott -g0 -w"                                                                                                                                                 
CHOST="i686-pc-linux-gnu"                                                                                                                                                           
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"                                                                                                              
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"   
CXXFLAGS="-O2 -march=prescott -g0 -w"                                                                                                                                               
DISTDIR="/usr/portage/distfiles"                                                                                                                                                    
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests binpkg-logs collision-protect distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-z,now"
LINGUAS="it"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apic bash-completion berkdb bzip2 cli consolekit cracklib crypt custom-cflags custom-optimization cxx dbus dri dvd extras ffmpeg gdbm gpm gstreamer gtk hardened holidays iconv jpeg jpeg2k kde lame lm_sensors mad mmx modules mp3 mudflap ncurses networkmanager nls nptl nptlonly nsplugin opengl openmp pam pcre perl pic png policykit pppd python qt3support qt4 readline rtsp semantic-desktop session sse sse2 ssl svg symlink sysfs tcpd threads tiff udev urandom x264 x86 xorg zlib" ALSA_CARDS="hda-intel" 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 cgi cgid 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="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="input mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-04-20 20:03:49 UTC
*** Bug 364279 has been marked as a duplicate of this bug. ***
Comment 2 Martin von Gagern 2011-04-20 20:12:41 UTC
(In reply to comment #1)
> *** Bug 364279 has been marked as a duplicate of this bug. ***

Bug #364279 comment #0 has a "set -x" trace of the issue.
Comment 3 Erik Quaeghebeur 2011-12-23 23:53:50 UTC
I encounter this as well. Can this have practical consequences?
(Since the coinciding xorg and intel driver stabilization on 22/12 I'm having X/KDE trouble and I'm still diagnosing.)
Comment 4 Martin von Gagern 2012-02-18 23:13:10 UTC
net-fs/cifs-utils-5.3 affected as well, just filed bug #404457 for this.
Comment 5 Víctor Ostorga (RETIRED) gentoo-dev 2012-03-29 15:52:14 UTC
*** Bug 404457 has been marked as a duplicate of this bug. ***
Comment 6 Martin von Gagern 2012-04-28 18:43:59 UTC
net-fs/cifs-utils-5.4 still affected. Bug has been reported over a year ago.
Comment 7 Dennis Schridde 2012-05-16 20:29:13 UTC
 * Messages for package sys-kernel/dracut-018-r1:
 * Could not find a Makefile in the kernel source directory.
 * Please ensure that /usr/src/linux points to a complete set of Linux sources
 * Unable to calculate Linux Kernel version for build, attempting to use running version
 * If the following test report contains a missing kernel
 * configuration option, you should reconfigure and rebuild your
 * kernel before booting image generated with this Dracut version.
 * getfilevar_noexec requires 2 variables, with the second a valid file.
 *    getfilevar_noexec <VARIABLE> <CONFIGFILE>
 *   CONFIG_BLK_DEV_INITRD: "Initial RAM filesystem and RAM disk (initramfs/initrd) support" is missing and REQUIRED
 * getfilevar_noexec requires 2 variables, with the second a valid file.
 *    getfilevar_noexec <VARIABLE> <CONFIGFILE>
 *   CONFIG_DEVTMPFS: "Maintain a devtmpfs filesystem to mount at /dev" is missing and REQUIRED
 * getfilevar_noexec requires 2 variables, with the second a valid file.
 *    getfilevar_noexec <VARIABLE> <CONFIGFILE>
 *   CONFIG_MODULES: "Enable loadable module support" is missing and REQUIRED
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.


 * Messages for package sys-apps/dbus-1.5.12:
 * Could not find a Makefile in the kernel source directory.
 * Please ensure that /usr/src/linux points to a complete set of Linux sources
 * Unable to calculate Linux Kernel version for build, attempting to use running version
 * getfilevar_noexec requires 2 variables, with the second a valid file.
 *    getfilevar_noexec <VARIABLE> <CONFIGFILE>
 *   CONFIG_EPOLL:       is not set when it should be.
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.


 * Messages for package www-client/google-chrome-19.0.1084.46_p135956:
 * Could not find a Makefile in the kernel source directory.
 * Please ensure that /usr/src/linux points to a complete set of Linux sources
 * Unable to calculate Linux Kernel version for build, attempting to use running version
Comment 8 Kirill Elagin 2012-06-25 09:15:14 UTC
 * Messages for package x11-drivers/xf86-video-intel-2.19.0:

 * getfilevar_noexec requires 2 variables, with the second a valid file.
 *    getfilevar_noexec <VARIABLE> <CONFIGFILE>
Comment 9 Kirill Elagin 2012-06-25 20:04:25 UTC
Created attachment 316247 [details, diff]
linux-info.eclass patch

Ok, I've managed to trace the problem down.

So, this happens because $KV_OUT_DIR in 'linux-info.eclass' is not set. It is normally initialised by `get_version`, but, guess what, no one calls `get_version`! So the veriable remains empty.

Next ebuild calls `linux_config_exists`. `linux_config_exists` checks for '/.config' (recall that the variable is empty) and (in my particular case) finds it! Well, it's a directory, but `linux_config_exists` doesn't care and returns true. Then our ebuild calls `linux_chkconfig_present` which, in turn, checks that '/.config' is a regular file which is not true, so it gives '/proc/config.gz', which does not exist, to `getfilevar_noexec` and the latter displays this error.

First, I propose the attached patch. Second, something should be done to ensure $KV_OUT_DIR is set.
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-06-26 00:07:46 UTC
You're barking up entirely the wrong tree with that patch, but your research did point out that the ebuild was not calling linux-info_pkg_setup, like it should have been.

I changed the ebuild now.