Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 366759 - sys-apps/sandbox: bad "tar xf" call for NFSv4 storage
Summary: sys-apps/sandbox: bad "tar xf" call for NFSv4 storage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal critical (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-10 13:55 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2011-05-10 16:00 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 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-05-10 13:55:33 UTC
Hello,
I am providing the official weekly arm stagebuilds and recently I switched my storage to NFSv4 (from v3). When that happened, the stagebuilds started failing only on the sys-apps/sandbox package during the stage1 build. This means that 35 or so packages built fine, but then sandbox failed in unpack() like this:

>>> Emerging (36 of 66) sys-apps/sandbox-2.4 for /tmp/stage1root/
>>> Failed to emerge sys-apps/sandbox-2.4 for /tmp/stage1root/, Log file:
>>>  '/var/tmp/portage/sys-apps/sandbox-2.4/temp/build.log'
 * Package:    sys-apps/sandbox-2.4
 * Repository: gentoo
 * Maintainer: sandbox@gentoo.org
 * USE:        arm build elibc_glibc kernel_linux userland_GNU
 * FEATURES:   sandbox
tar: sandbox-2.4/COPYING: Cannot change ownership to uid 8282, gid 100: Invalid argument
tar: sandbox-2.4/NEWS: Cannot change ownership to uid 8282, gid 100: Invalid argument
<... and so on ...>

I have isolated the problem to the non-standard src_unpack() function:

src_unpack() {
    unpack ${A}
    if [[ ! -d ${S} ]] ; then
        # When upgrading from older version, xz unpack may not work #271543
        xz -dc "${DISTDIR}/${A}" | tar xf - || die
    fi
}

where instead of "tar xf" - the portage unpack function does "tar xof" - can this be changed? Based on reading the tar man page, this should fix the issue. (I am testing it now, but it takes about 15 hours to get to that package) Thanks.
Comment 1 SpanKY gentoo-dev 2011-05-10 15:55:20 UTC
feel free to add the "o" flag
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-05-10 16:00:52 UTC
+  10 May 2011; Jeremy Olexa <darkside@gentoo.org> sandbox-2.4.ebuild,
+  sandbox-2.5.ebuild:
+  Don't restore ownership while extracting, bug 366759