When I set PORT_LOGDIR in make.conf, some (not all) emerges fail with access violations (e.g. open_wr: /dev/stderr). When PORT_LOGDIR is unset, they all work fine. Some ebuilds for which this is a problem: ffmpeg-0.4.9, xine-lib-1.0.1-r4 Not a problem for: nano-1.3.7 Upgrading sandbox from 1.2.12 to 1.2.17 had no noticeable effect. Permissions on log directory: drwxrws--- (set by portage) I will attach a sample build log. Reproducible: Always Steps to Reproduce: 1. Add PORT_LOGDIR="/var/log/buildlogs" to make.conf 2. Attepmt emerge of certain ebuilds (e.g. ffmpeg) 3. Groan in frustation at error message Actual Results: --------------------------- ACCESS VIOLATION SUMMARY --------------------------- LOG FILE = "/var/log/sandbox/sandbox-media-video_-_ffmpeg-0.4.9_p20050226-r5-27244.log" open_wr: /dev/stderr -------------------------------------------------------------------------------- Expected Results: Everything installed without error. Portage 2.0.51.22-r3 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.11-hardened-r15genkernel.custom i686) ================================================================= System uname: 2.6.11-hardened-r15genkernel.custom i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.6.13 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r6 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 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks prelink sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://open-systems.ufl.edu/mirrors/gentoo http://mirrors.acm.cs.rpi.edu/gentoo/ http://mirror.datapipe.net/gentoo http://gentoo.chem.wisc.edu/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X acl adns aim alsa apm arts audiofile avi bash-completion berkdb bitmap-fonts bzip2 caps cdr cpdflib crypt cscope cups curl dbx dga dio directfb doc emboss encode esd exif expat fam fbcon ffmpeg flac flash flatfile foomaticdb fortran ftp gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 guile hardened hardenedphp idn imagemagick imap imlib innodb ipv6 jabber java joystick jpeg kde kerberos krb4 lcms ldap libg++ libwww lua mad mhash mikmod mime ming mmx mng motif mozilla mp3 mpeg mysql mysqli ncurses nis nls nptl nptlonly ogg oggvorbis opengl oscar pam pcntl pcre pda pdflib perl php pic pie png posix prelude python qt quicktime readline recode samba sapdb sasl sdl session shared sharedmem simplexml slang soap sockets speex spell spl sqlite sse ssl sysvipc tcltk tcpd tetex threads tidy tiff tokenizer truetype truetype-fonts type1-fonts udev vhosts videos vorbis wmf xine xml xml2 xmlrpc xmms xosd xv xvid yahoo zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Ie, portage not adding that dir to SANDBOX_WRITE.
Created attachment 74653 [details] ffmpeg build log with PORT_LOGDIR set This is a build log from attempting to re-emerge ffmpeg with PORT_LOGDIR set. Note that this is only one example, other emerges fail in the same way. These same ebuilds emerge fine with PORT_LOGDIR unset, but of course there's no log to attach. :-)
Created attachment 74660 [details] lm_sensors build log with PORT_LOGDIR set This is just another example of an emerge that fails when, and only when, PORT_LOGDIR is set. Also, this was done after upgrading portage to 2.0.53 (still using sandbox-1.2.17).
/usr/portage/eclass/flag-o-matic.eclass: line 408: /dev/stderr: Permission denied Apparently you don't have the correct version of flag-o-matic.eclass because when I build ffmpeg it gives the the above error (different line number), but without a sandbox violation due to addwrite "/dev/stderr" being in the correct version of the eclass. Do you have eclass in RSYNC_EXCLUDEFROM or something?
Doh, emerge sync seems to have fixed it. Actually, it appears my previous sync was the day before the eclass was fixed, and I would have synced again except that I was trying to maintain a mostly unchanged state to diagnose and fix some other problems I was dealing with. Oh well, sorry for the trouble.