Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64232 - right/owner problems of cvs-src dir with FEATURE="userpriv"
Summary: right/owner problems of cvs-src dir with FEATURE="userpriv"
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 64251 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-16 03:09 UTC by Torsten Veller (RETIRED)
Modified: 2004-09-16 09:10 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 Torsten Veller (RETIRED) gentoo-dev 2004-09-16 03:09:14 UTC
portage ebuild sets in pkg_postinst:

if [ -d "${ROOT}usr/portage/distfiles" ]; then
  chown -R root:portage "${ROOT}usr/portage/distfiles"

  find "${ROOT}usr/portage/distfiles" -type f -maxdepth 1 -print0 | \
  ${XARGS} -0 -n 500 chmod 0644 &> /dev/null

  chmod 2775 "${ROOT}usr/portage/distfiles"
  chmod 2775 "${ROOT}usr/portage/distfiles/cvs-src"
fi

this leads to permission problems if userpriv is in FEATURES:

ls -ld /usr/portage/distfiles/{,cvs-src}
drwxrwsr-x  6 root portage 368640 Sep 16 11:17 /usr/portage/distfiles/
drwxrwsr-x  4 root portage   4096 Sep 16 11:47 /usr/portage/distfiles/cvs-src

# emerge gnus-cvs --nodeps
[... successfully fetched than killed ...]

# ls -la /usr/portage/distfiles/cvs-src/gnus/
total 260
drwxr-sr-x   9 portage portage  4096 Sep 16 11:47 .
drwxrwsr-x   4 root    portage  4096 Sep 16 11:47 ..
-rw-r--r--   1 portage portage   120 Sep 10 17:04 .arch-inventory
-rw-r--r--   1 portage portage   146 Aug 30 17:37 .cvsignore
drwxr-sr-x   2 portage portage  4096 Sep 16 11:47 CVS
-rw-r--r--   1 portage portage 10949 Sep 11 19:17 ChangeLog
-rw-r--r--   1 portage portage  3942 Sep 11 19:17 GNUS-NEWS

# emerge portage

# ls -la /usr/portage/distfiles/cvs-src/gnus/
total 260
drwxr-sr-x   9 root portage  4096 Sep 16 11:47 .
drwxrwsr-x   4 root portage  4096 Sep 16 11:47 ..
-rw-r--r--   1 root portage   120 Sep 10 17:04 .arch-inventory
-rw-r--r--   1 root portage   146 Aug 30 17:37 .cvsignore
drwxr-sr-x   2 root portage  4096 Sep 16 11:47 CVS
-rw-r--r--   1 root portage 10949 Sep 11 19:17 ChangeLog
-rw-r--r--   1 root portage  3942 Sep 11 19:17 GNUS-NEWS

At this point user 'portage' doesn't have write permission in the current directory.
# emerge gnus-cvs --nodeps
Calculating dependencies ...done!
>>> emerge (1 of 1) app-emacs/gnus-cvs-5.11 to /
>>> Unpacking source...
 * Fetching CVS module gnus into /usr/portage/distfiles/cvs-src...
 * Running  cvs -q -f -z4 -d ":pserver:gnus:gnus@cvs.gnus.org:/usr/local/cvsroot" login
Logging in to :pserver:gnus@cvs.gnus.org:2401/usr/local/cvsroot
 * Running  cvs -q -f -z4 -d ":pserver:gnus@cvs.gnus.org:/usr/local/cvsroot" update -dP gnus
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot rewrite CVS/Entries.Backup: Permission denied
cvs update: cannot remove gnus/smilies: Permission denied
cvs [update aborted]: cannot open gnus/CVS: Permission denied

!!! ERROR: app-emacs/gnus-cvs-5.11 failed.
!!! Function cvs_fetch, Line 326, Exitcode 1
!!! cvs update command failed
!!! If you need support, post the topmost build error, NOT this status message.




Portage 2.0.51_rc1 (default-linux/x86/2004.2/gcc34/2.6, gcc-3.4.1, glibc-2.3.4.20040808-r0, 2.6.8-gentoo-r3 i686)
=================================================================
System uname: 2.6.8-gentoo-r3 i686 AMD Duron(tm) processor
Gentoo Base System version 1.5.3
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.14.90.0.8-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe -fstack-protector-all"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fstack-protector-all"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox sfperms userpriv usersandbox"
GENTOO_MIRRORS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/portage"
PORTDIR_OVERLAY="/usr/portage/local"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

Reproducible: Always
Steps to Reproduce:
Comment 1 Stephane Loeuillet 2004-09-16 06:03:19 UTC
*** Bug 64251 has been marked as a duplicate of this bug. ***
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2004-09-16 09:10:54 UTC
Committed a fix for the ebuild.

Remerge it in about an hour and it should be fixed.