Summary: | dev-lang/ghc-8.10.4 fails to emerge due to error in ghc-bin-8.10.4-x86_64-pc-linux-gnu.tbz2 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Paul Preney <paul> |
Component: | Current packages | Assignee: | Gentoo's Haskell Language team <haskell> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | jstein, paul, polynomial-c, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=320313 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Paul Preney
2021-04-25 16:42:51 UTC
ghc-bin-8.10.4-x86_64-pc-linux-gnu.tbz2 is produced by emerge --buildpkg. It contains both normal .tar.bz2 contents and environment. As you have discovered bzip2 skipped it forever. pzip2 does not. I'm not sure what is out of spec here. You might want to confirm with pbzip2 upstream. Also bug #320313 sounds vaguely familiar where pbzip2 was fixed at least once for similar issue. CC +polynomial-c@ as a app-arch/pbzip2 maintainer. Digging some more "man pbzip2" shows that pbzip2 has an option: "--ignore-trailing-garbage=#", i.e.., one wants the following set in /etc/make.conf: PORTAGE_BZIP2_COMMAND="/usr/bin/pbzip2 --ignore-trailing-garbage=1" instead of: PORTAGE_BZIP2_COMMAND="/usr/bin/pbzip2" to apparently have the same semantics as bzip2. (I confirm the above works to install dev-lang/ghc (after removing the env stuff of course).) That said, it is a concern that the tarball has trailing garbage and I feel such should be fixed. In the dev-lang/ghc ebuild, this is set: arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )" which can end up in SRC_URI and downloaded and affect others, i.e., whatever is causing this tarball to have trailing garbage (reported both by bzip2 and pbzip2) needs to be discovered and fixed. Since pbzip2 has the --ignore-trailing-garbage and when used matches bzip2 and both report the same trailing garbage issue I've not filed any bug reports upstream with either of those projects. (If others here feel otherwise, please say so and why.) From my point-of-view, it appears the fixes needed are to address the causes of generating trailing garbage tarballs in the first place. :-) I have FEATURES="buildpkg" set in my make.conf and manually decompressing the dev-lang/ghc .xpak file with bzip2 and pbzip2 both result in trailing garbage errors. With pbzip2 one has to use --ignore-trailing-garbage=1 to get the output (otherwise such is deleted). Other .xpak files also have the same issue: trailing garbage, e.g., $ cp gcc-10.3.0-1.xpak gcc-10.3.0-1.xpak.tar.bz2 $ pbzip2 -d gcc-10.3.0-1.xpak.tar.bz2 pbzip2: *ERROR during BZ2_bzDecompress - trailing garbage: ret=4; block=271; seq=0; isLastInSeq=1; avail_in=17997 pbzip2: *ERROR: system call failed with errno=[2: No such file or directory]! pbzip2: *ERROR: system call failed with errno=[2: No such file or directory]! Terminator thread: premature exit requested - quitting... pbzip2: *INFO: Deletion of output file succeeded. $ so this is not a problem with dev-lang/ghc per se --it is connected to FEATURES=buildpkg and underlying tools. |