Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 165909 - dev-util/esvn-0.6.11 failed with error "ACCESS DENIED mkdir: /share"
Summary: dev-util/esvn-0.6.11 failed with error "ACCESS DENIED mkdir: /share"
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Alin Năstac (RETIRED)
Depends on:
Reported: 2007-02-08 12:26 UTC by Den_M
Modified: 2007-03-08 12:54 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Den_M 2007-02-08 12:26:19 UTC
When I tried to emerge dev-util/esvn-0.6.11 it failed with error (tail of make output):

make[1]: Leaving directory `/usr/src/portage/dev-util/esvn-0.6.11/work/esvn'
** done **
ACCESS DENIED  mkdir:     /share
mkdir: cannot create directory `/usr/src/portage/dev-util/esvn-0.6.11/image/../../../../../../share': Permission denied
make: *** [install_icons] Error 1
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-dev-util_-_esvn-0.6.11-20956.log"

mkdir:     /share

Logged as root I created directory /share and setted its permissions a+w,
now emerging of dev-utils/esvn-0.6.11 failed with error:

ACCESS DENIED  mkdir:     /share/pixmaps

Reproducible: Always

Steps to Reproduce:
1.emerge esvn

Actual Results:  
emerging failed

Expected Results:  
successful installation

Portage 2.1.2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r4.nicevt.den_m x86_64)
System uname: 2.6.19-gentoo-r4.nicevt.den_m x86_64 Intel(R) Pentium(R) D CPU 3.00GHz
Gentoo Base System version 1.12.9
Timestamp of tree: Thu, 18 Jan 2007 16:30:01 +0000
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=nocona -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
LINGUAS="en ru"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X acpi alsa amd64 berkdb bitmap-fonts cdr clamav cli cracklib crypt cups dbus dga dio directfb dlloader dri dvd dvdr exif fbcon firefox fortran gdbm gif gnome gpm gtk gtk2 hal iconv imlib ipv6 isdnlog jpeg libg++ lm_sensors ncurses nls nptl nptlonly opengl oss pam pcre perl png ppds pppd python readline reflection samba session spl ssl tcpd threads tiff truetype truetype-fonts type1-fonts udev unicode usb wmf xinerama xorg xpm 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 mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="fbdev i810 nv nvidia vga"
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2007-02-08 15:46:21 UTC
I failed to reproduce this on my work computer, which have the following info:

mrness@a-nastac ~ $ emerge --info
Portage 2.1.1-r2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.17-gentoo-r8 x86_64)
System uname: 2.6.17-gentoo-r8 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.6
Last Sync: Thu, 18 Jan 2007 10:50:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
FEATURES="autoaddcvs autoconfig cvs distlocks metadata-transfer multilib-strict nostrip parallel-fetch sandbox sfperms sign strict test"
LINGUAS="en ro"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTDIR_OVERLAY="/usr/local/portage /home/mrness/gentoo-cvs"
USE="amd64 X a52 aac aalib acl acpi alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol apache2 apm arts audiofile avi berkdb bitmap-fonts bluetooth bzip2 cdparanoia cdr cli cracklib crypt cups curl customlog dga directfb divx4linux dlloader doc dri dv dvd dvdr dvdread eds elibc_glibc emboss encode expat extensions faac faad fam fbcon ffmpeg firefox flac follow-xff font-server foomaticdb fortran freetype gd gdbm gif glut gmp gnome gnutls gpm gstreamer gtk gtk2 gtkhtml hal iconv idn ieee1394 imlib input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog java jpeg kde kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text lcms ldap libcaca libg++ libwww linguas_en linguas_ro live logrotate mad maildir memlimit mikmod mng motif mozcalendar mozilla mp3 mpeg mpeg4 mplayer musepack musicbrainz mysql nas ncurses nis nls nptl nptlonly nsplugin nvidia offensive ogg oggvorbis openal opengl oss pam pcre pdflib perl pic png ppds pppd python qt qt3 qt4 quicktime readline reflection samba sdk sdl session slang speex spell spl ssl swig tcl tcltk tcpd tetex theora threads tiff tk truetype truetype-fonts type1 type1-fonts udev unicode usb userland_GNU v4l2 video_cards_nv video_cards_nvidia video_cards_vesa video_cards_vga video_cards_vmware vorbis wma wxwindows xcomposite xine xml xml2 xorg xprint xv xvid zlib"
Comment 2 Den_M 2007-02-09 09:32:57 UTC
(In reply to comment #1)
> I failed to reproduce this on my work computer, which have the following info:

Does dev-util/esvn indeed create directory "share" in root folder / , not /usr?
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2007-02-09 10:40:48 UTC
Of course it creates it in /usr, but in your case the ebuild is trying to write outside its sandbox. Packets are installed in $D (/var/tmp/portage/....) and only afterwards those images are merged into the system.
Your system seems to borked. Please try to fix your own problem.
Comment 4 Den_M 2007-02-09 10:57:41 UTC
(In reply to comment #3)
> Of course it creates it in /usr

It's very strange because all other packages have been emerged fine (for example subversion, eclipse and so on). Can you give me some point to rtfm for playing around this problem? What I have to check first, what I can change? How ebuild configuring paths (/usr/src/portage/dev-util/esvn-0.6.11/image/../../../../../../share) and how that can be fixed?
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2007-02-10 16:23:06 UTC
"Leaving directory" line look strange to me. With your unorthodox $PORTAGE_TMPDIR, it should have been /usr/src/portage/esvn-0.6.11/work/esvn (note the absence of $CATEGORY).

Besides, "** done **" line shows that compilation has been completed successful. The ebuild died after src_compile() has ended but before ">>> Source compiled." message.
Comment 6 Alin Năstac (RETIRED) gentoo-dev 2007-02-13 08:48:55 UTC
closed as WORKSFORME.
Comment 7 Den_M 2007-02-20 12:49:42 UTC
(In reply to comment #6)
> closed as WORKSFORME.

new additional information:
I've played around with this problem some time and here are my results.

if PORTAGE_TMPDIR=/usr/src in make.conf -> emerge failed with above error

if PORTAGE_TMPDIR=/usr/src/somefolder in make.conf -> emerge failed with above error

if PORTAGE_TMPDIR=/usr/somefolder in make.conf -> emerge failed with above error

if PORTAGE_TMPDIR is not set in make.conf (default /var/tmp) -> emerge is OK

if PORTAGE_TMPDIR=/tmp in make.conf -> emerge is OK

It looks like esvn is very sensitive to /usr/some_path as portage temp directory.
For other packages I've installed it doesn't matter what portage temp directory is.
Comment 8 Alin Năstac (RETIRED) gentoo-dev 2007-02-25 10:37:06 UTC
Bug confirmed.

qt team, please help me with this. Seems that qmake creates the *.mak file stuffed with installation paths relative to the compilation directory. 

For instance, when esvn is build in /var, the esvn.mak has rules like this:
install_icons: all
        @$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)/usr/share/pixmaps/" || $(MKDIR) "$(INSTALL_ROOT)/usr/share/pixmaps/"
        -$(INSTALL_FILE) "images/esvn.png" "$(INSTALL_ROOT)/usr/share/pixmaps/"

When is build in /usr, the esvn.mak rules looks like this:
install_icons: all
        @$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)../../../../../../../share/pixmaps/" || $(MKDIR) "$(INSTALL_ROOT)../../../../../../../share/pixmaps/"
        -$(INSTALL_FILE) "images/esvn.png" "$(INSTALL_ROOT)../../../../../../../share/pixmaps/"

Question is, can I disable this qmake behavior? 
Comment 9 Alin Năstac (RETIRED) gentoo-dev 2007-03-08 12:54:46 UTC
I'm sorry, but I cannot fix this; qmake generate the mak filled with paths relative to the compilation directory. However, the good news is that upstream plans to move to QT4. This version of QT don't have this bug (paths will be preserved between .pro and .mak file). Till then, use a more appropriate PORTAGE_TMPDIR, such as /var/* or /tmp/*.

Closed as CANTFIX.