Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 385651 - eix update fails with "Could not properly execute: ..." "Permission denied"
Summary: eix update fails with "Could not properly execute: ..." "Permission denied"
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-04 19:24 UTC by jcat
Modified: 2011-10-23 12:54 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 jcat 2011-10-04 19:24:45 UTC
I add an overlay to /etc/make.conf

PORTDIR_OVERLAY="/usr/local/portage/overlay/mythtv_portage/Gentoo"

Do:  eix-update

..and it fails on lots of entries in the overlay with the following kind of "permission denied" errors:

Ebuild failed with status 1
     Reading category 139|155 ( 89%): www-apps ..
Could not properly execute /usr/local/portage/overlay/mythtv_portage/Gentoo/www-apps/mythweb/mythweb-0.24_p20110310.ebuild
     Reading category 139|155 ( 89%): www-apps ../usr/lib/portage/bin/ebuild.sh: line 526: /usr/local/portage/overlay/mythtv_portage/Gentoo/www-apps/mythweb/mythweb-0.25_pre20110703.ebuild: Permission denied
 * ERROR: www-apps/mythweb-0.25_pre20110703 failed (depend phase):
 *   error sourcing ebuild
 * 
 * Call stack:
 *   ebuild.sh, line 526:  Called die
 * The specific snippet of code:
 *   			source "$EBUILD" || die "error sourcing ebuild"
 * 
 * If you need support, post the output of 'emerge --info =www-apps/mythweb-0.25_pre20110703',
 * the complete build log and the output of 'emerge -pqv =www-apps/mythweb-0.25_pre20110703'.
 * This ebuild is from an overlay: '/usr/local/portage/overlay/mythtv_portage/Gentoo/'
 * S: '/mythweb-0.25_pre20110703'



I have double and triple checked all perms within the overlay, everything is fine, plus I'm running the command as root anyway.  I event tried 777 on all files and folders, but it errors the same.

An strace on the process reveals errors like this:


write(1, "     Reading category 139|155 ( "..., 49     Reading category 139|155 ( 89%): www-apps ..) = 49
stat64("/usr/local/portage/overlay/mythtv_portage/Gentoo/metadata/cache/www-apps/mythweb-0.25_pre20110703", 0xbfdad260) = -1 ENOENT (No such file or directory)
stat64("/var/cache/edb/dep/usr/local/portage/overlay/mythtv_portage/Gentoo/www-apps/mythweb-0.25_pre20110703", 0xbfdad260) = -1 ENOENT (No such file or directory)
open("/usr/local/portage/overlay/mythtv_portage/Gentoo/www-apps/mythweb/mythweb-0.25_pre20110703.ebuild", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0640, st_size=1191, ...}) = 0
mmap2(NULL, 1191, PROT_READ, MAP_SHARED, 3, 0) = 0xb775f000
close(3)                                = 0
munmap(0xb775f000, 1191)                = 0
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {0x81421a0, [], 0}, NULL, 8) = 0
rt_sigaction(SIGINT, {0x81421a0, [], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x81421a0, [], 0}, NULL, 8) = 0
open("/tmp/ebuild-cache.YAcc7V", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 3
fchown32(3, 250, 250)                   = 0
close(3)                                = 0
vfork()                                 = 9570
waitpid(-1, /usr/lib/portage/bin/ebuild.sh: line 526: /usr/local/portage/overlay/mythtv_portage/Gentoo/www-apps/mythweb/mythweb-0.25_pre20110703.ebuild: Permission denied
 * ERROR: www-apps/mythweb-0.25_pre20110703 failed (depend phase):
 *   error sourcing ebuild



Which is odd, because the "metadata/cache" path referred to is non-existent.  So why is eix trying to run stuff against it?



Reproducible: Always

Steps to Reproduce:
1. Add overlay to make.conf
2. eix-update
3.
Actual Results:  
Permission denied errors during cache update process.

Expected Results:  
Clean cache update.

Portage 2.2.0_alpha60 (default/linux/x86/10.0, gcc-4.5.3, glibc-2.12.2-r0, 2.6.33-gentoo-r1 i686)
=================================================================
System uname: Linux-2.6.33-gentoo-r1-i686-Intel-R-_Core-TM-2_Quad_CPU_Q8200_@_2.33GHz-with-gentoo-2.0.3
Timestamp of tree: Tue, 04 Oct 2011 18:30:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo sunrise nysasounds Mythtv-Ebuilds
Installed sets: @system
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA PUEL AdobeFlash-10.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB"
MAKEOPTS="-j5"
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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /usr/local/portage/overlay/jcat /usr/local/portage/overlay/mythtv_portage/Gentoo"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa apache2 berkdb bzip2 cli cracklib crypt cups cxx dbus dri dvb dvd ffmpeg flac fortran gdbm gif gpm iconv jpeg lame lirc logrotate mmx modules mudflap mythtv ncurses nls nptl nptlonly ogg opengl openmp pam pcre perl png pppd python readline session sse sse2 ssl ssse3 svg sysfs tcpd tiff truetype unicode vdpau vorbis wavpack x86 xml xorg xv xvid xvmc zlib" ALSA_CARDS="hda-intel usb-audio" 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="usb-a800 usb-dib0700" 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="keyboard mouse evdev void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" LIRC_DEVICES="devinput" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel nv nvidia vesa" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Diego Augusto Molina 2011-10-07 15:30:44 UTC
Have you done an `emerge --metadata' first? It's been a while since I don't use overlays but I remember that for some reason I always run that before an `eix-update'.
Comment 2 jcat 2011-10-07 16:36:54 UTC
Doesn't seem to help unfortunately.

Don't forget that's not my only overlay, it's only barfing on the mythtv overlay, I also have Sunrise.  However, none of the permissions within the mythtv overlay are incorrect.

Either the error is miss-leading and the problem is not permissions, or it's some kind of bug in eix.



Cheers,
jcat
Comment 3 Martin Väth 2011-10-10 18:26:11 UTC
I cannot reproduce the problem here.
Which overlay is causing this problem?
(I cannot find any mythtv overlay in layman or zugaina)

Some facts which might help:

If the overlay contains no up-to-date metadata/cache directory,
eix tries to execute the ebuilds (via /usr/lib/portage/bin/ebuild.sh)
after dropping the permissions to $EBUILD_USER:$EBUILD_GROUP
(which you can configure and which defaults to portage:portage).

So certainly a workaround is to update metadata/cache with
ecachegen --repo="name of the repository" --update
If this also falis because of permission problems, it is an issue
of that particular overlay or of portage itself.

I have never examined what ebuild.sh does exactly, but it might
be that it expects that certain directories (like /tmp or /var/tmp)
are *not* mounted with the "noexec" flag.

Does it change anything if you set (in /etc/eixrc or the environment)
OVERLAY_CACHE_METHOD="parse|ebuild"
(instead of default: "parse|ebuild*")
This means that "ebuild" is executed instead of only "ebuild.sh".
Comment 4 jcat 2011-10-23 12:54:39 UTC
Ok, I eventually fixed this be re-generating the manifests, so I guess it was a problem specific to the overlay.

FYI The overlay is not in layman, it maintained here:
git://github.com/MythTV/packaging.git

I guess it's the error message that mislead me a little :)


Apologies for the static.
Closing as invalid.


Cheers,
jcat