Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322387 - dobin failed when testing ebuilds
Summary: dobin failed when testing ebuilds
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 18:12 UTC by Vladislav Poluhin
Modified: 2010-06-01 18:18 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 Vladislav Poluhin 2010-06-01 18:12:01 UTC
I cannot testing my ebuilds with dobin in src_install() from not root user.

$ ebuild $(equery w unrar) clean install

>>> Install unrar-3.9.7 into /tmp/portage/app-arch/unrar-3.9.7/image/ category app-arch
install: cannot change ownership of `/tmp/portage/app-arch/unrar-3.9.7/image//usr/bin/unrar': Operation not permitted
 * ERROR: app-arch/unrar-3.9.7 failed:
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  54:  Called src_install
 *   environment, line 946:  Called die
 * The specific snippet of code:
 *       dobin unrar || die;
 *
 * If you need support, post the output of 'emerge --info =app-arch/unrar-3.9.7',
 * the complete build log and the output of 'emerge -pqv =app-arch/unrar-3.9.7'.
 * The complete build log is located at '/tmp/portage/app-arch/unrar-3.9.7/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/app-arch/unrar-3.9.7/temp/environment'.
 * S: '/tmp/portage/app-arch/unrar-3.9.7/work/unrar'

Some information:

$ id -Gn
nuklea wheel cron audio cdrom video games cdrw usb portage messagebus anonymous pulse-access pulse plugdev vboxusers kvm wireshark nobody

$ ls -la /tmp/portage/app-arch/unrar-3.9.7/image//usr/bin/
итого 228
drwxr-xr-x 2 nuklea nuklea   4096 Июн  1 23:12 .
drwxr-xr-x 3 nuklea nuklea   4096 Июн  1 23:12 ..
-rw------- 1 nuklea nuklea 221403 Июн  1 23:12 unrar

$ emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.10.1-r1, 2.6.32-gentoo-r7 x86_64)
=================================================================
System uname: Linux-2.6.32-gentoo-r7-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5200+-with-gentoo-2.0.1
Timestamp of tree: Tue, 01 Jun 2010 12:30:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.5-r2
dev-python/pycrypto: 2.1.0
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8-sse3 -O2 -pipe -fomit-frame-pointer -mssse3 -msahf"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=k8-sse3 -O2 -pipe -fomit-frame-pointer -mssse3 -msahf"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildsyspkg distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="ru en"
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="/usr/layman/sunrise /usr/layman/callisto /usr/layman/nuklea /usr/layman/mpd"
SYNC="rsync://router.home/gentoo-portage"
USE="3dnow 3dnowext 7zip X aac acl acpi alsa amd64 ao asyncns bash-completion bzip2 cairo cdda chardet cleartype cli consolekit contrast cracklib crypt cue cups cxx dbus dcc_video device-mapper dmx dri dts dvd dvdr dvdread encode exif fbcondecor ffmpeg firefox3 flac fontconfig fortran freetype ftp fuse gd gdbm gif gimp glib glitz gpg gpm i18n iconv idle java6 jpeg kde kipi kvm lastfm libnotify libsamplerate lvm lvm2 lzma mad matroska midi mikmod mmx mmx2 mmxext mozdevelop mozilla mp3 mplayer mtp mudflap multilib ncurses newspr nls nptl nptlonly nsplugin nvidia ogg opengl openmp openssl oss pam pcre pdf png pppd python qt3support qt4 readline reflection samba scrobbler sdl session slang smp soap socks5 spl sse sse2 ssl ssse3 svg sysfs tcpd theora threads tiff timezone timidity trayicon truetype udev unicode utempter vdpau vim-syntax vorbis wma x264 xcb xcomposite xorg xscreensaver xvid zip zlib zsh-completion zvbi" 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" LIRC_DEVICES="kworld" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau 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, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Reproducible: Always
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-06-01 18:18:13 UTC
Yes. Look at what dobin does. It uses the -o option of install which needs root privs. 

Look at FEATURES=fakeroot. From the make.conf man page:

              fakeroot
                     Enable fakeroot for the install and package phases when a
                     non-root user runs the ebuild(1) command