zyedidia / eget

Easily install prebuilt binaries from GitHub.
MIT License
954 stars 39 forks source link

Bug: some tbz-packed binaries are not extracted correctly #46

Closed nestor-custodio closed 2 years ago

nestor-custodio commented 2 years ago

Looks like binaries packed within tbz tarballs are not (always?) extracted correctly. As an example, see the btop tool. On issuing an eget aristocratos/btop, the correct asset for my system was identified ("btop-x86_64-linux-musl.tbz"), and a btop executable is extracted, but it is not binary-accurate and attempting to run it will result in an error.

Manually pulling the tarball via eget --download-only aristocratos/btop followed by a tar -xjf btop-x86_64-linux-musl.tbz does yield a correctly extracted binary as "bin/btop", however.

zyedidia commented 2 years ago

Is .tbz the same as .tar.bz2? Eget does not currently support this particular extension, so it is just copying the compressed file to btop. Perhaps it should only do this for files that are clearly executables to avoid confusion. The fix for this particular case though is to just add support for .tbz files.

zyedidia commented 2 years ago

I take it back, eget does have support for .tbz but it is relatively recent so you may need to update your version of eget to master (or any commit after 75ebf064981871440c13d0eee36d9437de8fdcaa). I should probably just make a new release.

dufferzafar commented 2 years ago

And as you can see from the PR #37 this support was specifically added for the btop tool.

I hadn't even heard of the tbz extension before that.

nestor-custodio commented 2 years ago

Ah. Didn't realize this had already been addressed and was simply pending release. Many thanks.