Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903631 - unpacker.eclass: Assumes GNU tar is configured with DEFAULT_ARCHIVE=- and tape is unset
Summary: unpacker.eclass: Assumes GNU tar is configured with DEFAULT_ARCHIVE=- and tap...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: tar-without-file
  Show dependency tree
 
Reported: 2023-03-31 10:22 UTC by Arsen Arsenović
Modified: 2023-04-06 16:35 UTC (History)
2 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 Arsen Arsenović gentoo-dev 2023-03-31 10:22:43 UTC
On my system, GNU tar is configured with:

  ~$ cat /etc/portage/env/app-arch/tar 
  EXTRA_ECONF="DEFAULT_ARCHIVE=/dev/full"

This causes unpacker.eclass' unpack_deb to fail mysteriously.  Adding -f - to its tar invocation fixes this.

Since this isn't the first time that we've seen this bug, though it usually manifests via someone having TAPE set, I suggest we make this a tracker bug and configure tinderboxes and volunteers systems with the EXTRA_ECONF above.

See '(tar)file tutorial' for a description of how the default is picked.
Comment 1 Arsen Arsenović gentoo-dev 2023-03-31 20:02:44 UTC
actually, a better configuration is probably

  EXTRA_ECONF="DEFAULT_ARCHIVE=/dev/null/BAD_TAR_INVOCATION"

since it allows for this:

  ~$ sudo tar -c foo
  tar: /dev/null/BAD_TAR_INVOCATION: Cannot open: Not a directory
  tar: Error is not recoverable: exiting now
  ~ 2 $ sudo tar -t
  tar: /dev/null/BAD_TAR_INVOCATION: Cannot open: Not a directory
  tar: Error is not recoverable: exiting now
  ~ 2 $ 

toralf, mind doing this on Tinderbox?  if so, I can mark this as a tracker

TIA
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-06 15:29:27 UTC
Please send a patch to the ML for unpacker.eclass.
Comment 3 Mike Gilbert gentoo-dev 2023-04-06 15:34:24 UTC
*** Bug 903914 has been marked as a duplicate of this bug. ***
Comment 4 Mike Gilbert gentoo-dev 2023-04-06 15:34:31 UTC
*** Bug 903919 has been marked as a duplicate of this bug. ***
Comment 5 Mike Gilbert gentoo-dev 2023-04-06 15:35:33 UTC
We should wait until unpacker.eclass is fixed before tinderboxing this. Otherwise, we will end up with a bunch of duplicate bug reports.
Comment 6 Mike Gilbert gentoo-dev 2023-04-06 15:37:29 UTC
(In reply to Arsen Arsenović from comment #1)
> if so, I can mark this as a tracker

Please file a new bug to use as a tracker; this bug already specifically mentions unpacker.eclass and should be closed after it gets fixed.
Comment 7 Larry the Git Cow gentoo-dev 2023-04-06 15:44:23 UTC
The bug has been closed via the following commit(s):

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

commit d53ec485fe53d50619a1292cccb6c66eaf16b9ac
Author:     Arsen Arsenović <arsen@gentoo.org>
AuthorDate: 2023-04-06 15:35:11 +0000
Commit:     Arsen Arsenović <arsen@gentoo.org>
CommitDate: 2023-04-06 15:42:10 +0000

    unpacker.eclass: Don't assume the default tar is stdin
    
    Despite common misconception, the default GNU tar tarfile is not stdin.
    On some systems, this can cause tar to fail to extract relevant files.
    
    See '(tar)file tutorial' for a description of how the default is picked.
    
    Closes: https://bugs.gentoo.org/903631
    Closes: https://bugs.gentoo.org/903914
    Closes: https://bugs.gentoo.org/903919
    
    Signed-off-by: Arsen Arsenović <arsen@gentoo.org>

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