Closed sharkwouter closed 1 year ago
Here is how the arch package is build: https://gitlab.archlinux.org/archlinux/packaging/packages/file/-/blob/main/PKGBUILD#L33
Here is how the alpine package is build: https://git.alpinelinux.org/aports/tree/main/file/APKBUILD#n25
There is a fix for it upstream in file, but it is not available in a new release yet: https://github.com/file/file/commit/1dd21dd360472d7b830825df8e40a06cdc1cbbcf
I tested this fix and it did not resolve the problem.
I made an upstream issue: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15047
This was resolved upstream now in Alpine 3.18. I'll test it out
This has been resolved now thanks to the upstream fix.
Summary
It turns out that the file command is broken, which is used by the makepkg command. This makes makepkg think that tar.gz files are gzip archives, making it use gzip to extract it. The result is that tar files are not extracted fully, causing failures.
Details
The
makepkg
command uses the followingfile
command:The
file
variable is set to the archive name.Here is an example in what that results in on alpine:
On Arch and Debian 12 (which use the same version of file) this results in the following with the same file:
This is not fixed on alpine edge.
Possible solutions
At the moment I see the following options:
Patch pacman to just try bsdtar if the archive is seen as empty
I don't think there are many other ways around this one.