Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 485054 - dev-java/oracle-jdk-bin-1.7.0.40 fails src_unpack with "Permission denied"
Summary: dev-java/oracle-jdk-bin-1.7.0.40 fails src_unpack with "Permission denied"
Status: RESOLVED DUPLICATE of bug 477664
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-16 02:16 UTC by Kent Fredric (IRC: kent\n)
Modified: 2013-09-16 14:25 UTC (History)
1 user (show)

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


Attachments
emerge --info =dev-java/oracle-jdk-bin-1.7.0.40 (emerge_info,5.33 KB, text/plain)
2013-09-16 03:03 UTC, Kent Fredric (IRC: kent\n)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) gentoo-dev 2013-09-16 02:16:46 UTC
This is a new bug to me:

>>> Emerging (1 of 16) dev-java/oracle-jdk-bin-1.7.0.40
 * jdk-7u40-linux-x64.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                         [ ok ]
 * UnlimitedJCEPolicyJDK7.zip SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                        [ ok ]
>>> Unpacking source...
>>> Unpacking jdk-7u40-linux-x64.tar.gz to /var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.40/work
gzip: /var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0.40/distdir/jdk-7u40-linux-x64.tar.gz: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors


This is strange.

I downloaded the required file as instructed: 
  
ls -la /usr/portage/distfiles/jdk-7u40-linux-x64.tar.gz
-rw------- 1 kent kent 138021223 Sep 16 01:53 /usr/portage/distfiles/jdk-7u40-linux-x64.tar.gz


Though it seems the permissions now need to be manually set in order to work. ( IIRC, due to src_unpack now running as user instead of root under portage 2.2 )

Its never been a problem before for me, despite doing the exact same thing this time as I usually did, download, copy, install, and my previous java binaries show something of that nature.

ls -lat /usr/portage/distfiles/jdk*
-rw------- 1 kent    kent    138021223 Sep 16 01:53 /usr/portage/distfiles/jdk-7u40-linux-x64.tar.gz
-rw-r--r-- 1 kent    kent     96316511 Jun 27 02:19 /usr/portage/distfiles/jdk-7u25-linux-x64.tar.gz
-rw-r--r-- 1 kent    kent     96272413 May 10 01:10 /usr/portage/distfiles/jdk-7u21-linux-x64.tar.gz
-rw-r--r-- 1 kent    kent     72087592 Apr 30 14:54 /usr/portage/distfiles/jdk-6u45-linux-x64.bin
-rw-r--r-- 1 kent    kent     72039626 Mar 13  2013 /usr/portage/distfiles/jdk-6u43-linux-x64.bin
-rw-r--r-- 1 kent    kent     72041996 Feb 27  2013 /usr/portage/distfiles/jdk-6u41-linux-x64.bin
-rw-r--r-- 1 kent    kent     96146544 Feb  7  2013 /usr/portage/distfiles/jdk-7u13-linux-x64.tar.gz
-rw-r--r-- 1 kent    kent     72037515 Feb  7  2013 /usr/portage/distfiles/jdk-6u39-linux-x64.bin
-rw-r--r-- 1 kent    kent     72048548 Oct 25  2012 /usr/portage/distfiles/jdk-6u37-linux-x64.bin
-rw-r--r-- 1 kent    kent     72039455 Sep 15  2012 /usr/portage/distfiles/jdk-6u35-linux-x64.bin
-rw-r--r-- 1 kent    kent     96036590 Aug 23  2012 /usr/portage/distfiles/jdk-7u6-linux-x64.tar.gz
-rw-r--r-- 1 kent    kent     72029394 Jul 30  2012 /usr/portage/distfiles/jdk-6u33-linux-x64.bin
-rw-r--r-- 1 portage portage  81439763 Jun 28  2012 /usr/portage/distfiles/jdk-7u5-linux-x64.tar.gz
-rw-rw-r-- 1 portage portage  85581913 Jan 24  2012 /usr/portage/distfiles/jdk-6u31-linux-x64.bin
-rw-rw-r-- 1 portage portage  81056556 Jan 24  2012 /usr/portage/distfiles/jdk-7u3-linux-x64.tar.gz
-rw-rw-r-- 1 portage portage  81225513 Dec 22  2011 /usr/portage/distfiles/jdk-7u2-linux-x64.tar.gz
-rw-rw-r-- 1 portage portage  85411605 Nov  3  2011 /usr/portage/distfiles/jdk-6u29-linux-x64.bin
-rw-rw-r-- 1 portage portage  94972183 Oct  7  2011 /usr/portage/distfiles/jdk-7u1-linux-x64.tar.gz


I'm not sure why the latest isn't go+r , I haven't done anything different, maybe firefox changed here.

Either way, if this is something that can't be fixed automatically, then you perhaps should mention something like that in the download notes.

It was easy to fix this bug once I realised what was going wrong, I'd just rather not to have to fix it in the middle of an emerge cycle when portage bails unexpectedly, and I hope I don't have to fix this problem again ( Maybe it should be checked to be readable during the "has it been downloaded or not yet" step )
Comment 1 Kent Fredric (IRC: kent\n) gentoo-dev 2013-09-16 03:03:21 UTC
Created attachment 358756 [details]
emerge --info =dev-java/oracle-jdk-bin-1.7.0.40
Comment 2 Zac Medico gentoo-dev 2013-09-16 14:25:46 UTC
With FEATURES=userpriv, the ebuild runs as "portage" user and "portage" group. So, you may need to adjust ownership of files in some cases. Alternatively, you can remove userpriv from FEATURES:

  echo 'FEATURES="${FEATURES} -userpriv -usersandbox"' >> /etc/portage/make.conf

*** This bug has been marked as a duplicate of bug 477664 ***