Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99061 - portage does not work after last update
Summary: portage does not work after last update
Status: VERIFIED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: x86 Linux
: High blocker
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-14 18:12 UTC by Eugen Udma
Modified: 2005-09-02 20:59 UTC (History)
0 users

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


Attachments
script that prints file permissions recursively (show_perms.sh,276 bytes, text/plain)
2005-08-07 16:07 UTC, Zac Medico
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugen Udma 2005-07-14 18:12:04 UTC
I
Comment 1 Eugen Udma 2005-07-14 18:12:04 UTC
I´m using Gentoo for more than one year and had no problems until I emerged the
latest version of portage (2.0.51.22-r1).

Just before updating it I did my usual weekly sync & emerge -p world. Then,
after I emerged portage, I can´t emerge anything: any try, on any ebuild starts,
does the MD5 checks, then fails invariably with:

/usr/lib/portage/bin/ebuild.sh: line 1686:
/mnt/data/linux/gentoo/portage/xxx/yyy/zzz-0.0.ebuild: Permission denied

emerge -p works. I´m always emerging as su root, the permissions to portage
storage (which is on another partition than the root partition) are ok (full
access for root).

I restored my system from a backup copy of my root partition, did the emerge
sync, tried an emerge using the installed version of portage (it works!),
updated portage to the latest version and ... once again can´t emerge
anything afterwards.

For now I stick with the old version of portage, which works fine, but I don´t
like the idea of not being able to update to the latest available version of an
installed package.

Any ideas?
eugenu2@yahoo.com

Reproducible: Always
Steps to Reproduce:
1.emerge sync
2.emerge portage
3.emerge any other package

Actual Results:  
/usr/lib/portage/bin/ebuild.sh: line 1686:
/mnt/data/linux/gentoo/portage/xxx/yyy/zzz-0.0.ebuild: Permission denied


Expected Results:  
what portage should do: emerge packages!
Comment 2 Jason Stubbs (RETIRED) gentoo-dev 2005-07-15 04:11:05 UTC
Does it work with FEATURES="-sandbox"? What about with FEATURES="-userpriv"? 
Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2005-07-15 04:12:42 UTC
Also, could you attach the output of emerging with the --debug parameter 
please? 
Comment 4 Eugen Udma 2005-07-15 15:27:28 UTC
(In reply to comment #1)
> Does it work with FEATURES="-sandbox"? What about with FEATURES="-userpriv"? 

-sandbox was already used.

It works after I added -userpriv. Does it mean that the bug is solved?
Comment 5 Eugen Udma 2005-07-15 15:38:34 UTC
(In reply to comment #2)
> Also, could you attach the output of emerging with the --debug parameter 
> please? 

Without FEATURES=-userpriv the output is as follows:

---------------------------------------------------------------------------------
emerge --debug man
Calculating dependencies
Parent:    None
Depstring: sys-apps/man
Candidates: ['sys-apps/man']
ebuild: sys-apps/man-1.6-r1
binpkg: None
 -
 Parent:    ebuild / sys-apps/man-1.6-r1 merge
 Depstring: !bootstrap? ( sys-devel/patch ) !bootstrap? ( sys-devel/patch )
sys-process/cronbase >=sys-apps/groff-1.18 nls? ( sys-devel/gettext )
 Exiting... None
  ...done!
  >>> emerge (1 of 1) sys-apps/man-1.6-r1 to /
  + dyn_clean
  + '[' GNU == BSD ']'
  + '[' GNU == Darwin ']'
  + rm -rf /var/tmp/portage/man-1.6-r1/image
  + hasq keeptemp autoaddcvs autoconfig collision-protect cvs distlocks nostrip
sfperms strict userpriv
  + local x
  + local me=keeptemp
  + shift
  + for x in '"$@"'
  + '[' autoaddcvs == keeptemp ']'
  + for x in '"$@"'
  + '[' autoconfig == keeptemp ']'
  + for x in '"$@"'
  + '[' collision-protect == keeptemp ']'
  + for x in '"$@"'
  + '[' cvs == keeptemp ']'
  + for x in '"$@"'
  + '[' distlocks == keeptemp ']'
  + for x in '"$@"'
  + '[' nostrip == keeptemp ']'
  + for x in '"$@"'
  + '[' sfperms == keeptemp ']'
  + for x in '"$@"'
  + '[' strict == keeptemp ']'
  + for x in '"$@"'
  + '[' userpriv == keeptemp ']'
  + return 1
  + rm -rf /var/tmp/portage/man-1.6-r1/temp
  + hasq keepwork autoaddcvs autoconfig collision-protect cvs distlocks nostrip
sfperms strict userpriv
  + local x
  + local me=keepwork
  + shift
  + for x in '"$@"'
  + '[' autoaddcvs == keepwork ']'
  + for x in '"$@"'
  + '[' autoconfig == keepwork ']'
  + for x in '"$@"'
  + '[' collision-protect == keepwork ']'
  + for x in '"$@"'
  + '[' cvs == keepwork ']'
  + for x in '"$@"'
  + '[' distlocks == keepwork ']'
  + for x in '"$@"'
  + '[' nostrip == keepwork ']'
  + for x in '"$@"'
  + '[' sfperms == keepwork ']'
  + for x in '"$@"'
  + '[' strict == keepwork ']'
  + for x in '"$@"'
  + '[' userpriv == keepwork ']'
  + return 1
  + rm -rf /var/tmp/portage/man-1.6-r1/.unpacked
  + rm -rf /var/tmp/portage/man-1.6-r1/.compiled
  + rm -rf /var/tmp/portage/man-1.6-r1/.tested
  + rm -rf /var/tmp/portage/man-1.6-r1/.installed
  + rm -rf /var/tmp/portage/man-1.6-r1/.packaged
  + rm -rf /var/tmp/portage/man-1.6-r1/build-info
  + rm -rf /var/tmp/portage/man-1.6-r1/work
  + '[' -f /var/tmp/portage/man-1.6-r1/.unpacked ']'
  ++ find /var/tmp/portage/man-1.6-r1 -mindepth 1 -maxdepth 1
  + '[' -z '' ']'
  + rmdir /var/tmp/portage/man-1.6-r1
  + true
  + set +x
  >>> md5 files   ;-) man-1.6.ebuild
  >>> md5 files   ;-) man-1.5p.ebuild
  >>> md5 files   ;-) man-1.6-r1.ebuild
  >>> md5 files   ;-) files/man-1.5m-groff-1.18.patch
  >>> md5 files   ;-) files/man-1.5p-search-order.patch
  >>> md5 files   ;-) files/man-1.5p-parallel-make.patch
  >>> md5 files   ;-) files/man-1.5p-defmanpath-symlinks.patch
  >>> md5 files   ;-) files/makewhatis.cron
  >>> md5 files   ;-) files/digest-man-1.6
  >>> md5 files   ;-) files/man-1.6-message-order.patch
  >>> md5 files   ;-) files/digest-man-1.5p
  >>> md5 files   ;-) files/digest-man-1.6-r1
  >>> md5 files   ;-) files/man-1.6-parallel-make.patch
  >>> md5 src_uri ;-) man-1.6.tar.gz
  + dyn_setup
  + pkg_setup
  + return
  + set +x
  /usr/lib/portage/bin/ebuild.sh: line 1686:
/mnt/data/linux/gentoo/portage/sys-apps/man/man-1.6-r1.ebuild: Permission denied
  
  !!! ERROR: sys-apps/man-1.6-r1 failed.
---------------------------------------------------------------------------------
Comment 6 Jason Stubbs (RETIRED) gentoo-dev 2005-07-17 19:13:14 UTC
Are any of the directories or the file 
under /mnt/data/linux/gentoo/portage/sys-apps/man/man-1.6-r1.ebuild not 
globally readable or executable? It would seem so. If you need them to be 
inaccessable to "other", make sure that they are accessible to the portage 
user and group. 
Comment 7 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-06 08:54:46 UTC
(In reply to comment #5)
> Are any of the directories or the file 
> under /mnt/data/linux/gentoo/portage/sys-apps/man/man-1.6-r1.ebuild not 
> globally readable or executable? It would seem so. If you need them to be 
> inaccessable to "other", make sure that they are accessible to the portage 
> user and group.

If you can reproduce this error after setting the correct permissions on your 
files then please re-open.  Portage needs read/execute access to all files in 
PORTDIR and read/write/execute access to DISTDIR if you want portage to fetch as 
a non root user.

Comment 8 Eugen Udma 2005-08-07 14:45:23 UTC
Answer to comments 5 & 6:

On my system the "portage" user and group own PORTDIR and DISTDIR and the
permissions are according to messages 6.

As long as userpriv is set in FEATURES any emerge fails with the same message
(see bug description).

I believe it's not a problem of file/directory permissions as long as this
issue occured only after installing portage 2.0.51.22-r1. The permissions
were the same before updating portage and after, and they are the same now.

I gave up following this bug after I got answers about file permissions
which, anyway, I kind of expected. Now I just unset userpriv and I can
emerge everything.

Thanks anyway!
Comment 9 Zac Medico gentoo-dev 2005-08-07 16:07:45 UTC
Created attachment 65362 [details]
script that prints file permissions recursively

Please run this script on one of the ebuilds with permission problems (such as
/mnt/data/linux/gentoo/portage/sys-apps/man/man-1.6-r1.ebuild) and post the
output.

(In reply to comment #7)
> 
> I believe it's not a problem of file/directory permissions as long as this
> issue occured only after installing portage 2.0.51.22-r1. The permissions
> were the same before updating portage and after, and they are the same now.
> 

It's possible that, though your permissions may be strictly correct, they cause
a bug in portage to manifest itself.
Comment 10 Jason Stubbs (RETIRED) gentoo-dev 2005-08-07 16:10:58 UTC
userpriv was not working very well in 2.0.51.19. Portage was running as root 
at times when it should have been running as portage. Hence, while you're 
thinking it is a regression it is more likely to be incorrect file 
permissions. 
Comment 11 Zac Medico gentoo-dev 2005-08-28 22:16:18 UTC
(In reply to comment #7)
> I believe it's not a problem of file/directory permissions as long as this
> issue occured only after installing portage 2.0.51.22-r1. The permissions
> were the same before updating portage and after, and they are the same now.

If you are still experiencing this problem, please run the script from comment
#8 on your ebuild and attach the output.  Please reopen if you still believe the
bug exists.
Comment 12 Eugen Udma 2005-09-02 20:29:01 UTC
Bug still exists. Output of script is:

drwxr-xr-x  20 root root 464 Aug 24 14:34 /
drwxr-xr-x  8 root root 192 Aug 27 20:39 /mnt
drwxr-xr-x  7 root root 152 Jul 10 21:02 /mnt/data
drwx-w--w-  7 root root 168 Jun 18 14:27 /mnt/data/linux
drwxr-xr-x  7 root root 408 Sep  2 20:46 /mnta/linux/gentoo
drwxr-xr-x  149 portage portage 4424 Sep  2 18:36 /mnt/data/linux/gentoo/portage
drwxr-xr-x  199 portage portage 5504 Sep  2 18:36
/mnt/data/linux/gentoo/portage/sys-apps
drwxr-xr-x  3 portage portage 288 Sep  2 23:24
/mnt/data/linux/gentoo/portage/sys-apps/man
-rw-r--r--  1 portage portage 2799 Aug 22 19:40
/mnt/data/linux/gentoo/portage/sys-apps/man/man-1.6a.ebuild
Comment 13 Jason Stubbs (RETIRED) gentoo-dev 2005-09-02 20:45:39 UTC
drwx-w--w- 
Comment 14 Jason Stubbs (RETIRED) gentoo-dev 2005-09-02 20:45:39 UTC
drwx-w--w-  7 root root 168 Jun 18 14:27 /mnt/data/linux 
 
The portage user doesn't have read access. 
Comment 15 Eugen Udma 2005-09-02 20:59:34 UTC
Changed permissions of upper directory to read/execute.
Problem solved.

drwxr-xr-x  20 root root 464 Aug 24 14:34 /
drwxr-xr-x  8 root root 192 Aug 27 20:39 /mnt
drwxr-xr-x  7 root root 152 Jul 10 21:02 /mnt/data
drwxr-xr-x  7 root root 168 Jun 18 14:27 /mnt/data/linux
drwxr-xr-x  7 root root 408 Sep  2 20:46 /mnt/data/linux/gentoo
drwxr-xr-x  149 portage portage 4424 Sep  2 18:36 /mnt/data/linux/gentoo/portage
drwxr-xr-x  199 portage portage 5504 Sep  2 18:36
/mnt/data/linux/gentoo/portage/sys-apps
drwxr-xr-x  3 portage portage 288 Sep  2 23:55
/mnt/data/linux/gentoo/portage/sys-apps/man
-rw-r--r--  1 portage portage 2799 Aug 22 19:40
/mnt/data/linux/gentoo/portage/sys-apps/man/man-1.6a.ebuild