Probably a duplicat of bug 352684. emerge grub fails with: bzr: ERROR: Cannot lock LockDir(file:///usr/portage/distfiles/bzr-src/grub/.bzr/branch/lock): Permission denied:
emerge --info =sys-boot/grub-9999 Portage 2.1.9.40 (default/linux/amd64/10.0/desktop/gnome, gcc-4.4.4, glibc-2.11.2-r3, 2.6.37-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-2.6.37-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.0.1 Timestamp of tree: Mon, 21 Feb 2011 17:30:01 +0000 app-shells/bash: 4.1_p9 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.6.6-r1, 3.1.2-r4 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 2.0.1-r1 sys-apps/openrc: 0.7.0 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.13, 2.65-r1 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.4-r2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.36.1 (sys-kernel/linux-headers) ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage//distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y --backtrack=30 --keep-going" FEATURES="assume-digests binpkg-logs collision-protect distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv" FFLAGS="" GENTOO_MIRRORS="ftp://mirror.netcologne.de/gentoo/ ftp://de-mirror.org/distro/gentoo/ rsync://de-mirror.org/gentoo/" LANG="de_DE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="de" MAKEOPTS="-j7" 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/mozilla /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext 3dnowprefetch 3ds X a52 aac aacs aalib abm accessibility acl acpi alsa amd64 amr aperfmperf apic atmo autoipd avahi bash-completion berkdb bidi bl bluetooth bluray branding bs2b bzip2 cairo cdda cdparanoia cdr cdrom cdsound clamav clamd clamdtop cleartype clflush cli cmov cmp_legacy consolekit constant_tsc corefonts cpb cr8_legacy cracklib crypt cups cvs cxx dbus dc1394 de debug-utils device-mapper dga dia dirac directfb dri dselect dts dvd dvdr eds emerald encode epydoc esd evo examples exif extapic extd_apicid extensions fam fat fbcon ffmpeg firefox firefox3 flac fltk fluidsynth fontconfig fortran fpu ftp fxsr fxsr_opt gadu gconf gdbm gdu ggi gif gimp glitz gmplayer gnome gnome-keyring gnome-print gnutls gpg gphoto2 gpm gs gstreamer gtk hddtemp hfs hpcups hpijs hsm ht httpd ibs iconv id3tag ieee1394 inkjar java jfs jpeg ladspa lahf_lm lbrv lcms ldap libass libcaca libgda libnotify libproxy libsamplerate libtiger libv4l libv4l2 live lm lm_sensors logwatch lucene lzo mad matroska mca mce md5sum mdnsresponder-compat mikmod milter misalignsse mjpeg mmx mmxext mng modplug modules monitor mp3 mp4 mpeg mplayer msr mtp mtrr mudflap multilib multimedia musepack musicbrainz nas nautilus ncurses nls nonstop_tsc npt nptl nptlonly nrip_save nsplugin ntfs nut nx objc ogg ogg123 ogm openal opengl openmp optimisememory osvw pae pam pango pat pcre pdf pdpe1gb perl pge plugins png pni pnm policykit popcnt ppds pppd projectm pse pse36 pulseaudio python qt-faststart qt3support qt4 qtscript quicktime radio rar raw rdtscp readline reiserfs remoteosd rep_good rtsp ruby scanner schroedinger sdl sdl-image sep session shine shout skinit skins snmp socks5 speex spell sqlite sse sse2 sse3 sse4 sse4a sse5 ssl ssse3 startup-notification stream subversion suid svg svm svm_lock syscall sysfs taglib tcpd teletext templates tga theora threadsafe tiff tk tor tordns truetype tsc twitgin twolame type1 type3 udev unicode upnp usb v4l v4l2 vaapi vcdx vlm vme vorbis wdt web webcam webkit wma-fixed wmf wxwidgets x264 xanim xattr xcb xfs xinerama xklavier xml xorg xosd xulrunner xv xvid xvmc zlib zvbi" 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 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" CAMERAS="*" 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 ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 263353 [details] emerge grub
Created attachment 263355 [details] sys-boot:grub-9999:20110221-182243.log
Created attachment 263357 [details] emerge -pqv =sys-boot/grub-9999
eselect python show --python2 python2.6
tux ~ # eselect python list Available Python interpreters: [1] python2.6 * [2] python3.1
What are the file permissions for the following dir? /usr/portage/distfiles/bzr-src/grub/.bzr/branch If it's not portage:portage, I suggest you set the recursively the permissions under /usr/portage/distfiles/bzr-src to portage:portage.
Thanks for the fast answer! The permissions were root:portage. I changed to portage:portage in the distfile directory with chown -R portage:portage bzr-src/grub/.bzr/branch/lock emerge --sync env-update source /etc/profile. But its still the same error message. I controlled all direktoris and found in /usr/portage/distfiles/bzr-src/grub/.bzr/ tux .bzr # ls -la insgesamt 28 drwxr-sr-x 5 root portage 4096 13. Feb 04:06 . drwxr-sr-x 3 root portage 4096 13. Feb 04:02 .. -rw-r--r-- 1 root portage 141 13. Feb 04:02 README drwxr-sr-x 3 portage portage 4096 20. Feb 03:02 branch -rw-r--r-- 1 root portage 35 13. Feb 04:02 branch-format drwxr-sr-x 2 root portage 4096 13. Feb 04:02 branch-lock drwxr-sr-x 7 root portage 4096 13. Feb 04:06 repository With chown - R portage: portage * are all indicated now tux .bzr # ls -la insgesamt 28 drwxr-sr-x 5 root portage 4096 13. Feb 04:06 . drwxr-sr-x 3 root portage 4096 13. Feb 04:02 .. -rw-r--r-- 1 portage portage 141 13. Feb 04:02 README drwxr-sr-x 3 portage portage 4096 20. Feb 03:02 branch -rw-r--r-- 1 portage portage 35 13. Feb 04:02 branch-format drwxr-sr-x 2 portage portage 4096 13. Feb 04:02 branch-lock drwxr-sr-x 7 portage portage 4096 13. Feb 04:06 repository A new emerge grub works properly: >>> Installing (1 of 1) sys-boot/grub-9999 * QA Notice: Expected SLOT='0', got '2' * * To avoid automounting and auto(un)installing with /boot, * just export the DONT_MOUNT_BOOT variable. * * * Your boot partition was detected as being mounted as /boot. * Files will be installed there for grub to function correctly. * * * To avoid automounting and auto(un)installing with /boot, * just export the DONT_MOUNT_BOOT variable. * * * Your boot partition was detected as being mounted as /boot. * Files will be installed there for grub to function correctly. * * * To avoid automounting and auto(un)installing with /boot, * just export the DONT_MOUNT_BOOT variable. * * * Your boot partition was detected as being mounted as /boot. * Files will be installed there for grub to function correctly. * * You have installed grub2 with USE=multislot, so to coexist * with grub1, the grub2 install binary is named grub2-install. >>> Auto-cleaning packages... >>> No outdated packages were found on your system. * Regenerating GNU info directory index... * Processed 170 info files. * IMPORTANT: 5 config files in '/etc' need updating. * See the CONFIGURATION FILES section of the emerge * man page to learn how to update config files. Thank you for the references.
@ulm, @fauli: I suspect the issue that affected the user was related to the change from -userfetch to userfetch on FEATURES. In any case, this is not a bug in the bzr eclass. My question is whether we want to document this or if we should just close the bug as INVALID (notabug).
bzr.eclass lists a maintainer unknown to bugzilla: <bzr-gentoo-overlay@lazymalevolence.com>
(In reply to comment #9) > I suspect the issue that affected the user was related to the change from > -userfetch to userfetch on FEATURES. Hm, I think that userpriv is the relevant feature, not userfetch. > My question is whether we want to document this or if we should just close > the bug as INVALID (notabug). We could inherit permissions from ${DISTDIR}, or set the umask to 002. But I don't know if this wouldn't have any security implications. Bug 225007 comes to mind.
Hello, I read your discussion and decided to delete that dir /usr/portage, because I wanted to reproduce the error. export LC_MESSAGES="C" rm -r /usr/portage emerge --sync env-update source /etc/profile emerge grub Calculating dependencies... done! >>> Verifying ebuild manifests >>> Emerging (1 of 1) sys-boot/grub-9999 * Package: sys-boot/grub-9999 * Repository: gentoo * Maintainer: base-system@gentoo.org * USE: amd64 elibc_glibc kernel_linux multilib multislot truetype userland_GNU * FEATURES: sandbox splitdebug userpriv >>> Unpacking source... mkdir: cannot create directory `/usr/portage/distfiles': Permission denied * ERROR: sys-boot/grub-9999 failed (unpack phase): * bzr.eclass: can't mkdir /usr/portage/distfiles/bzr-src * * Call stack: * ebuild.sh, line 56: Called src_unpack * environment, line 3485: Called bzr_src_unpack * environment, line 682: Called bzr_fetch * environment, line 628: Called die * The specific snippet of code: * mkdir -p "${EBZR_STORE_DIR}" || die "${EBZR}: can't mkdir ${EBZR_STORE_DIR}"; * * If you need support, post the output of 'emerge --info =sys-boot/grub-9999', * the complete build log and the output of 'emerge -pqv =sys-boot/grub-9999'. * The complete build log is located at '/var/log/portage/sys-boot:grub-9999:20110222-204830.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-boot/grub-9999/temp/environment'. * S: '/var/tmp/portage/sys-boot/grub-9999/work/grub-9999' >>> Failed to emerge sys-boot/grub-9999, Log file: >>> '/var/log/portage/sys-boot:grub-9999:20110222-204830.log' * * The following package has failed to build or install: * * (sys-boot/grub-9999, ebuild scheduled for merge), Log file: * '/var/log/portage/sys-boot:grub-9999:20110222-204830.log' * The above permisson error appears.And I was root! I changed in /etc/make.conf the line: #FEATURES="splitdebug userpriv userfetch parallel-fetch collision-protect sandbox" to FEATURES="splitdebug userfetch parallel-fetch collision-protect sandbox" thus userpriv deleted. A emerge grub works now. Ciao Lucy
Please post the output of the following command: $ ls -ld /usr/portage /usr/portage/distfiles
hallo, tux ~ # ls -ld /usr/portage /usr/portage/distfiles drwxr-xr-x 162 root root 4096 22. Feb 21:49 /usr/portage drwxrwxr-x 3 root portage 12288 23. Feb 08:44 /usr/portage/distfiles mfg
@Portage team: Do you consider removal of ${DISTDIR} a valid usage case? (In reply to comment #14) > tux ~ # ls -ld /usr/portage /usr/portage/distfiles > > drwxr-xr-x 162 root root 4096 22. Feb 21:49 /usr/portage > drwxrwxr-x 3 root portage 12288 23. Feb 08:44 /usr/portage/distfiles Problem is that with FEATURES=userpriv the eclass cannot create ${DISTDIR} (or rather, ${PORTAGE_ACTUAL_DISTDIR}) as a subdir of ${PORTDIR}: (In reply to comment #12) > * FEATURES: sandbox splitdebug userpriv > >>> Unpacking source... > mkdir: cannot create directory `/usr/portage/distfiles': Permission denied
(In reply to comment #15) > @Portage team: Do you consider removal of ${DISTDIR} a valid usage case? No, I think we can just rely on the user to create it themselves if they get an error like this. Besides, the only way to trigger this is to follow these steps: 1) enable userpriv 2) remove distdir 3) emerge an ebuild that has empty SRC_URI (portage creates DISTDIR when fetching/checking files from SRC_URI).
(In reply to comment #9) > I suspect the issue that affected the user was related to the change from > -userfetch to userfetch on FEATURES. In any case, this is not a bug in the > bzr eclass. My question is whether we want to document this or if we should > just close the bug as INVALID (notabug). Live ebuilds are intended for advanced users, and I think we can expect them to find the cause of such problems themselves. I'm therefore closing this bug as INVALID.