Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 885719 - unpacker.eclass: unpack_gpkg fails (dev-python/pypy-exe-bin-7.3.10:7.3.10 does not build)
Summary: unpacker.eclass: unpack_gpkg fails (dev-python/pypy-exe-bin-7.3.10:7.3.10 doe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: tar-without-file
  Show dependency tree
 
Reported: 2022-12-13 07:16 UTC by Klaus Ethgen
Modified: 2023-04-11 01:35 UTC (History)
5 users (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 Klaus Ethgen 2022-12-13 07:16:37 UTC
dev-python/pypy-exe-bin, sys-firmware/edk2-ovmf-bin and sys-firmware/seabios-bin do not build due to a wrong tar usage.

 * Package:    dev-python/pypy-exe-bin-7.3.10:7.3.10
 * Repository: gentoo
 * Maintainer: python@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   ccache network-sandbox preserve-libs sandbox suidctl userpriv usersandbox
>>> Unpacking pypy-exe-7.3.10-1.amd64.gpkg.tar to /var/tmp/portage/dev-python/pypy-exe-bin-7.3.10/work
tar: /dev/nst0l: Cannot open: Permission denied
tar: Error is not recoverable: exiting now
 * ERROR: dev-python/pypy-exe-bin-7.3.10::gentoo failed (unpack phase):
 *   Unpacking /var/tmp/portage/dev-python/pypy-exe-bin-7.3.10/distdir/pypy-exe-7.3.10-1.amd64.gpkg.tar failed
 * 
 * Call stack:
 *               ebuild.sh, line  136:  Called src_unpack
 *             environment, line 1547:  Called unpacker_src_unpack
 *             environment, line 2533:  Called unpacker
 *             environment, line 2528:  Called _unpacker 'pypy-exe-7.3.10-1.amd64.gpkg.tar'
 *             environment, line  568:  Called unpack_gpkg '/var/tmp/portage/dev-python/pypy-exe-bin-7.3.10/distdir/pypy-exe-7.3.10-1.amd64.gpkg.tar'
 *             environment, line 2352:  Called assert 'Unpacking /var/tmp/portage/dev-python/pypy-exe-bin-7.3.10/distdir/pypy-exe-7.3.10-1.amd64.gpkg.tar failed'
 *   isolated-functions.sh, line   18:  Called die
 * The specific snippet of code:
 *              [[ ${x} -eq 0 ]] || die "$@"
 * 
 * If you need support, post the output of `emerge --info '=dev-python/pypy-exe-bin-7.3.10::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/pypy-exe-bin-7.3.10::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/pypy-exe-bin-7.3.10/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/pypy-exe-bin-7.3.10/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/pypy-exe-bin-7.3.10/work'
 * S: '/var/tmp/portage/dev-python/pypy-exe-bin-7.3.10/work'
Comment 1 Ionen Wolkens gentoo-dev 2022-12-13 07:31:29 UTC
Tar usage is pretty standard here.

Do you have the TAPE variable set in your environment by any chances? Only thing I can think of at the moment.
Comment 2 Ionen Wolkens gentoo-dev 2022-12-13 07:37:57 UTC
(In reply to Ionen Wolkens from comment #1)
> Tar usage is pretty standard here.
Well, upon closing look using -f - to ensure stdin rather than using TAPE or anything potentially auto-detected by tar alternatives defaults could make sense.

e.g. seabios-bin doesn't use -f at all
tar -x < <(xz -c -d --single-stream "${DISTDIR}/${BINPKG}.xpak") || die "unpacking binpkg failed"
Comment 3 Ionen Wolkens gentoo-dev 2022-12-13 07:44:18 UTC
(In reply to Ionen Wolkens from comment #2)
> e.g. seabios-bin doesn't use -f at all
> tar -x < <(xz -c -d --single-stream "${DISTDIR}/${BINPKG}.xpak") || die
> "unpacking binpkg failed"
unpacker.eclass seems to use -f - in most places, e.g.

    "${exe[@]}" | ${decomp} | tar --no-same-owner -xf -

But not for gpkg (last pipe):

    tar -xOf "${gpkg}" "${images[0]}" | ${decomp:-cat} |
        tar --no-same-owner -xC "${dirname}"

So yeah that sounds wrong now.
Comment 4 Larry the Git Cow gentoo-dev 2022-12-14 08:50:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02c3f6f9add5655d01f33b7cd94c8aa6e598df0c

commit 02c3f6f9add5655d01f33b7cd94c8aa6e598df0c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-14 08:49:32 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-14 08:49:52 +0000

    sys-firmware/seabios-bin: fix unpack with TAPE set
    
    Thanks to Ionen for spotting.
    
    Bug: https://bugs.gentoo.org/885719
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-firmware/seabios-bin/seabios-bin-1.16.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Larry the Git Cow gentoo-dev 2022-12-14 09:10:25 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f171d54b255e3434b040af42aaca725cfbaa0788

commit f171d54b255e3434b040af42aaca725cfbaa0788
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2022-12-14 09:06:12 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2022-12-14 09:07:13 +0000

    sys-firmware/edk2-ovmf-bin: fix unpack with TAPE set
    
    Was done for seabios-bin, doing here too to match (imagine this
    will likely migrate to gpkg.tar and unpacker.eclass in the future).
    
    Bug: https://bugs.gentoo.org/885719
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 sys-firmware/edk2-ovmf-bin/edk2-ovmf-bin-202202.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 7 Larry the Git Cow gentoo-dev 2022-12-14 10:18:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c55ca3f62b4c191e675ae24e95efe3c49ac66662

commit c55ca3f62b4c191e675ae24e95efe3c49ac66662
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-14 08:47:38 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-12-14 10:16:18 +0000

    unpacker.eclass: fix unpack_gpkg with TAPE set
    
    Closes: https://bugs.gentoo.org/885719
    Signed-off-by: Sam James <sam@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/28603
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 eclass/unpacker.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)