Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 531676 - sys-apps/portage: die due to ebuild permissions with FEATURES=userpriv should give a hint about userpriv
Summary: sys-apps/portage: die due to ebuild permissions with FEATURES=userpriv should...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-04 15:00 UTC by BRULE Herman
Modified: 2014-12-06 21:46 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 BRULE Herman 2014-12-04 15:00:19 UTC
Hello,
Portage 2.2.8-r2 (hardened/linux/amd64, gcc-4.8.3, glibc-2.19-r1, 3.14.22-gentoo x86_64)
=================================================================
System uname: Linux-3.14.22-gentoo-x86_64-Intel-R-_Core-TM-_i5-4670_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:     8102532 total,   1056200 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Tue, 25 Nov 2014 14:30:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.7, 3.3.5-r1, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.14 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=native -mfpmath=sse -msse2 -mavx -mavx2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /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="-pipe -O2 -march=native -mfpmath=sse -msse2 -mavx -mavx2"
DISTDIR="/mnt/system/portage/distfiles/"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-z --compress-level=9 -4 --exclude=/metadata/md5-cache --exclude=/metadata/cache --exclude=/metadata/glsa"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/system/tmp-disk"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
USE="X accessibility aio amd64 avx avx2 berkdb bzip2 cli cracklib crypt custom-cflags cxx dri egl ffmpeg g3dvl gbm gdbm gif git gles2 gmp hardened iconv icu ipv6 jit joystick jpeg justify kde libkms llvm lzma matroska mmx mng modules mpi multilib ncurses network nls nptl ogg opengl openmp openvg osmesa pam pax_kernel pcre png qt3support readline real rss s3 scanner scsi semantic-desktop session smp sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 stream svg theora threads tiff udev unicode urandom usb vaapi vdpau vorbis vpx wayland x264 xa xattr xcb xcomposite xinerama xorg xtpax xv xvid xvmc xz zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ublox ubx" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="mouse keyboard evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="x86_64 x86 arm" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel wlshm" 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, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, SYNC, USE_PYTHON
With curlftpfs on /usr/portage/ I have:
 * the complete build log and the output of `emerge -pqv '=sys-power/iasl-20130117-r1::gentoo'`.
 * Working directory: '/usr/lib64/portage/pym'
 * S: '/mnt/system/tmp-disk/portage/sys-power/iasl-20130117-r1/work/iasl-20130117'
/usr/lib64/portage/bin/ebuild.sh: line 545: /usr/portage/dev-java/bcprov/bcprov-1.40-r1.ebuild: Permission denied
 * ERROR: dev-java/bcprov-1.40-r1::gentoo failed (depend phase):
 *   error sourcing ebuild
 * 
 * Call stack:
 *   ebuild.sh, line 545:  Called die
 * The specific snippet of code:
 *                      source "$EBUILD" || die "error sourcing ebuild"
 * 
 * If you need support, post the output of `emerge --info '=dev-java/bcprov-1.40-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-java/bcprov-1.40-r1::gentoo'`.
 * Working directory: '/usr/lib64/portage/pym'
 * S: '/mnt/system/tmp-disk/portage/dev-java/bcprov-1.40-r1/work/bcprov-1.40'
/usr/lib64/portage/bin/ebuild.sh: line 545: /usr/portage/x11-base/xorg-drivers/xorg-drivers-1.15.ebuild: Permission denied
 * ERROR: x11-base/xorg-drivers-1.15::gentoo failed (depend phase):
 *   error sourcing ebuild
 * 
 * Call stack:
 *   ebuild.sh, line 545:  Called die
 * The specific snippet of code:
 *                      source "$EBUILD" || die "error sourcing ebuild"
 * 
 * If you need support, post the output of `emerge --info '=x11-base/xorg-drivers-1.15::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-base/xorg-drivers-1.15::gentoo'`.
 * Working directory: '/usr/lib64/portage/pym'
 * S: '/mnt/system/tmp-disk/portage/x11-base/xorg-drivers-1.15/work/xorg-drivers-1.15'

Reproducible: Always
Comment 1 Zac Medico gentoo-dev 2014-12-04 15:06:49 UTC
(In reply to BRULE Herman from comment #0)
> /usr/lib64/portage/bin/ebuild.sh: line 545:
> /usr/portage/x11-base/xorg-drivers/xorg-drivers-1.15.ebuild: Permission
> denied

For FEATURES=userpriv, you need to use the allow_other option when mounting fuse filesystems.

We could fix portage to detect this case and give a more helpful error message.
Comment 2 Zac Medico gentoo-dev 2014-12-04 15:16:58 UTC
(In reply to Zac Medico from comment #1)
> We could fix portage to detect this case and give a more helpful error
> message.

I guess we could simply improve the die message so that it gives a hint about userpriv.
Comment 3 BRULE Herman 2014-12-04 15:30:44 UTC
Yes, more information about use FEATURES=userpriv (if needed and not defaulted).
allow_other information is usefull, but:

curlftpfs#ftp://172.16.0.45/ /usr/portage/distfiles fuse rw,relatime,user_id=0,group_id=0,allow_other 0 0
Remain doing:
bash: /mnt/system/portage/distfiles/.__portage_test_write__: Operation not supported
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/util/_async/ForkProcess.py", line 45, in _spawn
    rval = self._run()
  File "/usr/lib64/portage/pym/_emerge/EbuildFetcher.py", line 172, in _run
    allow_missing_digests=allow_missing):
  File "/usr/lib64/portage/pym/portage/package/ebuild/fetch.py", line 646, in fetch
    wantnewlockfile=1, **lock_kwargs)
  File "/usr/lib64/portage/pym/portage/locks.py", line 105, in lockfile
    myfd = os.open(lockfilename, os.O_CREAT|os.O_RDWR, 0o660)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 259, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 95] Operation not supported: '/mnt/system/portage/distfiles/.linux-3.14.tar.xz.portage_lockfile'
 * Fetch failed for 'sys-kernel/gentoo-sources-3.14.24', Log file:
 *  '/mnt/system/tmp-disk/portage/sys-kernel/gentoo-sources-3.14.24/temp/build.log'
Comment 4 Zac Medico gentoo-dev 2014-12-04 15:36:25 UTC
(In reply to BRULE Herman from comment #3)
> Yes, more information about use FEATURES=userpriv (if needed and not
> defaulted).
> allow_other information is usefull, but:
> 
> curlftpfs#ftp://172.16.0.45/ /usr/portage/distfiles fuse
> rw,relatime,user_id=0,group_id=0,allow_other 0 0
> Remain doing:
> bash: /mnt/system/portage/distfiles/.__portage_test_write__: Operation not
> supported

FEATURES=userfetch is relevant for DISTDIR.

> OSError: [Errno 95] Operation not supported:
> '/mnt/system/portage/distfiles/.linux-3.14.tar.xz.portage_lockfile'

You can use FEATURES="-distlocks" to avoid this.
Comment 5 BRULE Herman 2014-12-04 15:41:14 UTC
I don't have found this info with google. Then as portage output will be greate.

-distlocks -ebuild-locks, remain this error on this output but continue to work:
bash: /mnt/system/portage/distfiles/.__portage_test_write__: Operation not supported
Comment 6 Zac Medico gentoo-dev 2014-12-06 21:46:55 UTC
(In reply to BRULE Herman from comment #5)
> bash: /mnt/system/portage/distfiles/.__portage_test_write__: Operation not
> supported

I guess this is because it tries to open __portage_test_write__ in append mode, and apparently curlftpfs does not support append mode.