Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 404413 - portage-2.1.10.47 - IOError: [Errno 13] Permission denied: '/var/log/portage/elog/app-emulation:vmware-workstation-8.0.2.591240:20120218-170233.log'
Summary: portage-2.1.10.47 - IOError: [Errno 13] Permission denied: '/var/log/portage/...
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-18 17:06 UTC by Nikos Chantziaras
Modified: 2012-02-18 22:32 UTC (History)
0 users

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 Nikos Chantziaras 2012-02-18 17:06:54 UTC
This command crashes emerge when issuing it as a normal, non-root user:

emerge vmware-workstation --fetchonly
Calculating dependencies... done!

>>> Fetching (1 of 2) app-emulation/vmware-workstation-8.0.2.591240 from vmware

!!! app-emulation/vmware-workstation-8.0.2.591240 has fetch restriction turned on.
!!! This probably means that this ebuild's files must be downloaded
!!! manually.  See the comments in the ebuild for more information.

 * Fetch failed for 'app-emulation/vmware-workstation-8.0.2.591240'
 * Please download VMware-Workstation-Full-8.0.2-591240.x86_64.bundle
 * from http://www.vmware.com/products/workstation/
 * and place it in /usr/portage/distfiles
Traceback (most recent call last):
  File "/usr/bin/emerge", line 43, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 2030, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 442, in action_build
    retval = mergetask.merge()
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1002, in merge
    rval = self._merge()
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1352, in _merge
    self._main_loop()
  File "/usr/lib64/portage/pym/_emerge/PollScheduler.py", line 148, in _main_loop
    self.sched_iface.iteration()
  File "/usr/lib64/portage/pym/portage/util/_eventloop/EventLoop.py", line 166, in iteration
    if not x.callback(f, event, *x.args):
  File "/usr/lib64/portage/pym/_emerge/SpawnProcess.py", line 239, in _dummy_handler
    self._unregister_if_appropriate(event)
  File "/usr/lib64/portage/pym/_emerge/AbstractPollTask.py", line 129, in _unregister_if_appropriate
    self.wait()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 53, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 146, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 158, in _fetchonly_exit
    spawn_nofetch(portdb, self._ebuild_path, settings=self.settings)
  File "/usr/lib64/portage/pym/portage/package/ebuild/_spawn_nofetch.py", line 80, in spawn_nofetch
    elog_process(settings.mycpv, settings)
  File "/usr/lib64/portage/pym/portage/elog/__init__.py", line 175, in elog_process
    m.process(mysettings, str(key), mod_logentries, mod_fulllog)
  File "/usr/lib64/portage/pym/portage/elog/mod_save.py", line 52, in process
    mode='w', encoding=_encodings['content'], errors='backslashreplace')
IOError: [Errno 13] Permission denied: '/var/log/portage/elog/app-emulation:vmware-workstation-8.0.2.591240:20120218-170233.log'

Reproducible: Always




Portage 2.1.10.47 (default/linux/amd64/10.0/desktop/kde, gcc-4.6.2, glibc-2.14.1-r2, 3.2.6-gentoo-ck1 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.6-gentoo-ck1-x86_64-Intel-R-_Core-TM-_i5-2500K_CPU_@_3.30GHz-with-gentoo-2.1
Timestamp of tree: Sat, 18 Feb 2012 16:15:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3
dev-util/cmake:           2.8.7-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2, 4.6.2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo nx vmware proaudio interactive-fiction science kde qt Local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -mtune=native -march=native -O2 -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
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/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-pipe -mtune=native -march=native -O2 -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS=""
GENTOO_MIRRORS="ftp://ftp.ntua.gr/pub/linux/gentoo ftp://mirror.ovh.net/gentoo-distfiles ftp://distfiles.gentoo.org/pub/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common"
LINGUAS="en en_US"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/nx /var/lib/layman/vmware /var/lib/layman/pro-audio /var/lib/layman/interactive-fiction /var/lib/layman/science /var/lib/layman/kde /var/lib/layman/qt /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acpi aes-ni alsa amd64 audiofile avx bash-completion branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cxx dbus declarative dri dts dvd dvdr emboss encode exif fam fbcondecor flac gdbm gdu gif glitz gpm iconv imlib jpeg kde kipi lcdfilter lcms libsamplerate lm_sensors mad mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib ncurses nptl nptlonly nvidia offensive ogg opengl openmp pango pcre pdf pgo phonon plasma png policykit ppds pppd qt qt4 readline semantic-desktop session spell sse sse2 sse3 sse4 sse4_1 ssl ssse3 startup-notification svg sysfs tcpd tiff truetype udev unicode usb vdpau vorbis webkit x264 xcb xcomposite xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" DRACUT_MODULES="plymouth" 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" SANE_BACKENDS="nothing" USERLAND="GNU" VIDEO_CARDS="nvidia" 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

=================================================================
                        Package Settings
=================================================================

sys-apps/portage-2.1.10.47 was built with the following:
USE="(consolekit) (ipc) (multilib) (policykit) -build -doc -epydoc (-pypy1_8) -python2 -python3 (-selinux) -xattr" LINGUAS="-pl"



emerge -pv portage:
These are the packages that would be merged, in order:

Calculating dependencies  ... done!
[ebuild   R    ] sys-apps/portage-2.1.10.47  USE="(ipc) -build -doc -epydoc (-pypy1_8) -python2 -python3 (-selinux) -xattr" LINGUAS="-pl" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Comment 1 Zac Medico gentoo-dev 2012-02-18 19:12:55 UTC
Please post the output of the following command:

  ls -ld /var/log/portage /var/log/portage/elog
Comment 2 Nikos Chantziaras 2012-02-18 19:22:25 UTC
(In reply to comment #1)
> Please post the output of the following command:
> 
>   ls -ld /var/log/portage /var/log/portage/elog

drwxr-xr-x 3 root    root   4096 Aug 26  2009 /var/log/portage
drwxrws--- 2 portage root 106496 Feb 18 20:25 /var/log/portage/elog
Comment 3 Zac Medico gentoo-dev 2012-02-18 19:29:49 UTC
Somehow you got the wrong permissions. This will fix it:

   chown portage:portage /var/log/portage /var/log/portage/elog
   chmod g+ws /var/log/portage /var/log/portage/elog

I don't know how you got the wrong permissions. Portage doesn't change the permissions automatically, in order to respect the permissions that the administrator may have set.

As long as the stage3 tarball contains the correct permissions, and portage sets the permissions correctly if it has to create the directory, then we can close this bug as RESOLVED:WORKSFORME.
Comment 4 Nikos Chantziaras 2012-02-18 19:44:46 UTC
I installed Gentoo on this machine in 2006.  I've never reinstalled again after that.  At some point, I stopped being able to use "elogv" as a normal user (the user is in the "portage" group).  I do not remember when that happened, but I am absolutely sure that I never changed the permissions of that directory myself.

I suppose an ebuild did this (perhaps in an attempt to update the system to new directory permissions or something,) but I guess we'll never know which one.  So I'm closing this, since it seems I'm the only one who has this problem.  Should I investigate further though?  I could post a message on the users mailing list and ask if anyone out there has the same permission problem.
Comment 5 Zac Medico gentoo-dev 2012-02-18 22:32:14 UTC
(In reply to comment #4)
> Should I investigate further though?

No, if it's not reproducible then it's not worth investigating. One possible cause is that you upgraded to portage-2.1.10.11 before I added the permission tweaks to the ebuild for bug 377177.