Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 306569 - x11-libs/gtk+-2.18.7 emerge fails with app-vim/cvsmenu installed due to sandbox errors while calling gtkdoc-fixxref
Summary: x11-libs/gtk+-2.18.7 emerge fails with app-vim/cvsmenu installed due to sandb...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-23 20:24 UTC by Graham Murray
Modified: 2010-03-06 22:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (gtk-build.log,1.62 MB, text/plain)
2010-02-24 18:23 UTC, Graham Murray
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Murray 2010-02-23 20:24:15 UTC
emerging gtk+-2.18.7 fails with several instances of the following message
F: open_wr
S: deny
P: /usr/share/vim/vimfiles/plugin/.cvsmenu.vim.swp
A: /usr/share/vim/vimfiles/plugin/.cvsmenu.vim.swp
R: /usr/share/vim/vimfiles/plugin/.cvsmenu.vim.swp
C: /usr/bin/vim -n -e -u /dev/null -T xterm

F: open_wr
S: deny
P: /usr/share/vim/vimfiles/plugin/.cvsmenu.vim.swp
A: /usr/share/vim/vimfiles/plugin/.cvsmenu.vim.swp
R: /usr/share/vim/vimfiles/plugin/.cvsmenu.vim.swp
C: /usr/bin/vim -n -e -u /dev/null -T xterm

emerge --info =x11-libs/gtk+-2.18.7
Portage 2.2_rc63 (default/linux/x86/10.0/desktop, gcc-4.4.3, glibc-2.11-r1, 2.6.33-rc8-00140-g4ec62b2 i686)
=================================================================                                          
                        System Settings                                                                    
=================================================================                                          
System uname: Linux-2.6.33-rc8-00140-g4ec62b2-i686-Intel-R-_Core-TM-2_CPU_6700_@_2.66GHz-with-gentoo-2.0.1 
Timestamp of tree: Tue, 23 Feb 2010 17:45:02 +0000                                                         
app-shells/bash:     4.1_p2
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1, 3.1.1-r1
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.0-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.6.3-r1, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20
sys-devel/gcc:       4.3.4, 4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.32
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -mtune=native -pipe -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/games/angband/edit/ /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -mtune=native -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests buildsyspkg distlocks fixpackages installsources news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.first-world.info/ http://de-mirror.org/distro/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.tiscali.nl/"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,--as-needed,-O1"
LINGUAS="en_GB en fr_FR fr"
MAKEOPTS="-j3"
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/perl-experimental /var/lib/layman/sunrise /var/lib/layman/x11 /var/lib/layman/sping /var/lib/layman/x11 /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi aim alsa apache2 audiofile avi bash-completion berkdb bluetooth bonobo branding browserplugin bzip2 bzlib cairo caps cdda cddb cdparanoia cdr cjk cli consolekit cracklib crypt cups curl cvs cxx dbus directfb doc dri dts dv dvd dvdr dvdread eds emacs emboss encode esd ethereal evo examples exif expat fam fbcon ffmpeg fftw flac fontconfig foomaticdb fortran ftp gcj gd gdbm geoip gif glut gmp gnome gnome-keyring gnutls gphoto2 gpm graphviz gstreamer gtk gtk2 gtkhtml guile hal htmlhandbook iconv icq icu idn imagemagick imlib ipv6 jabber jack java javascript jbig jce jpeg jpeg2k junit kde kdehiddenvisibility ladspa latex lcms ldap leim libgda libnotify libsamplerate libwww lm_sensors logrotate lua mad matroska mbox mikmod milter mime mmap mmx mng modplug modules mono mozilla mp3 mp4 mpeg mpi mplayer msn mudflap musepack ncurses nls nptl nptlonly nsplugin odbc offensive ogg oggvorbis openal opengl openmp oscar oss pam pcntl pcre pdf perl plasma png policykit postgres ppds pppd profile pulseaudio python qt3support qt4 quicktime raw readline recode reflection ruby sasl sdl semantic-desktop session sharedmem sndfile snmp soap sockets sox speex spell spl sqlite sqlite3 sse sse2 sse3 ssl ssse3 startup-notification subversion svg sysfs sysvipc tcl tcltk tcpd theora threads thunar tiff tk truetype uicktime unicode usb v4l v4l2 vim-syntax vorbis wavpack win32codecs wmf wxwindows x264 x86 xattr xcb xcomposite xface xft xine xml xml2 xorg xulrunner xv xvid yahoo 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" CAMERAS="canon ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en fr_FR fr" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon vesa fbdev vga v4l"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rafał Mużyło 2010-02-24 09:20:36 UTC
Attach full build log.
Did you set any var, that could have such effect ?
Comment 2 Graham Murray 2010-02-24 18:21:22 UTC
Further investigation shows that the build works with no problems if I first unmerge =app-vim/cvsmenu-1.147. Re-emerging this and trying again to emerge gtk+ fails as before. 
Comment 3 Graham Murray 2010-02-24 18:23:15 UTC
Created attachment 221011 [details]
Build log

This is the build log of the failure with =app-vim/cvsmenu-1.147 installed.
Comment 4 Rafał Mużyło 2010-02-24 23:42:15 UTC
Does it happen only with gtk+ or with any package
that uses gtk-doc *and* is set to rebuild docs
(either by 'doc' useflag or otherwise) ?
Comment 5 Graham Murray 2010-02-25 06:57:09 UTC
(In reply to comment #4)
> Does it happen only with gtk+ or with any package
> that uses gtk-doc *and* is set to rebuild docs
> (either by 'doc' useflag or otherwise) ?
> 

It does it with other packages as well, with yesterday's updates it also did it for sys-apps/devicekit-power-0.14.
Comment 6 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-03-06 19:52:34 UTC
ok, so for some silly reason gtkdoc-fixxref is calling /usr/bin/vim automagically

system "echo 'let html_number_lines=0|let html_use_css=1|let use_xhtml=1|syn on|e $temp_source_file|run! syntax/2html.vim|wa!|qa!' | /usr/bin/vim -n -e -u /dev/null -T xterm >/dev/null";

^ that is being called each time gtkdoc-fixxref is run. 

But there's a "-n" flag, which means vim should not use any .swp files. So why does it try to write to /usr/share/vim/vimfiles/plugin/.cvsmenu.vim.swp ...
Comment 7 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-03-06 20:49:33 UTC
(In reply to comment #6)
> ok, so for some silly reason gtkdoc-fixxref is calling /usr/bin/vim
> automagically
> 
> system "echo 'let html_number_lines=0|let html_use_css=1|let use_xhtml=1|syn
> on|e $temp_source_file|run! syntax/2html.vim|wa!|qa!' | /usr/bin/vim -n -e -u
> /dev/null -T xterm >/dev/null";
> 
> ^ that is being called each time gtkdoc-fixxref is run. 
> 
> But there's a "-n" flag, which means vim should not use any .swp files. So why
> does it try to write to /usr/share/vim/vimfiles/plugin/.cvsmenu.vim.swp ...
> 

ok, so apparently this bug in vim get weirder: that file is only created if vim is called with -u /dev/null . So a workaround is to instead call with -u NONE .

I've reported an upstream gtk-doc bug about this: https://bugzilla.gnome.org/show_bug.cgi?id=612028
Comment 8 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-03-06 22:46:17 UTC
I've added this to 1.13-r2. Here's documentation about what this is about (figured out thanks to #vim):

gtkdoc-fixxref in gtk-doc calls vim (if it is installed) in ex mode to run some commands in HighlightSourceVim(). The invocation is:

/usr/bin/vim -n -e -u /dev/null -T xterm

-n: Don't use swapfiles
-e: Ex mode
-u: Use this instead of /etc/vim/vimrc
-T: Terminal mode

If the user has cvsmenu installed, when vim loads that plugin, the plugin itself causes vim to read the plugin file again, probably here:

exec 'read '.CVSEscapePath(a:filename)

This causes vim to write a swapfile in the same place (inspite of -n). This however, only happens if you use -u /dev/null (why it doesn't happen without that is a mystery).

Easiest, and the most correct solution is to use -u NONE instead, which prevents vimrc and plugins both from being loaded. The patch committed does exactly this.