Convenient pinned installation
The shell installer has no option to specify a version and the tgz target it uses only serves the latest version. The only mechanism to install a pinned version are the github releases. However, they do not work with convenience scripts like https://github.com/jpillora/installer due to the unusual xz packaging.
Life would better if the github releases simply used .tar.gz, and the installer script relied on them directly (or in the latest release mirrored).
it's strange that installer doesn't support xz compression, due to its ubiquity, but it should be trivial enough to submit a patch here: https://github.com/jpillora/installer/blob/397db1c2de0fe2d3ff11e347027eefd30da06500/scripts/install.sh.tmpl#L116-L139
There's .tar.gzs here: https://dist.pkgx.dev/?prefix=pkgx.sh/linux/x86-64/
Certainly our shell installer should allow a version to be specified.
I agree .tar.gz as the github release assets would be better. We were using .xz since pkgx^1 used deno and the deno compiled binaries were ~100MB so xz saved a lot of space.
I am reluctant to change the asset type now as scripts may exist that expect the .xz and I am reluctant to provide both on the assets since it makes browsing the release assets more confusing and we provide .gzs elsewhere.
Oh I see, jpillora/installer uses github releases. Well they really should support all common archive formats.
right. surprising in 2025 that .xz isn't supported.
I guess we can start adding .gz to releases too.
If we were extra keen we could write a script to retroactively add .gz to previous releases as well.
FWIW, it is true that https://github.com/jpillora/installer can be trivially extended to support .xz, but I do not think .xz is that ubiquitous. Evidence:
docker run -i -t ubuntu
root@27b2bb510727:/# gunzip
gzip: compressed data not read from a terminal. Use -f to force decompression.
For help, type: gzip -h
root@27b2bb510727:/# xz
bash: xz: command not found
root@27b2bb510727:/#
Of course one can just apt update && apt install xz-utils, but inside a docker image, part of the pkgx magic is that you don't need other package managers which have inferior properties.
I am running a script to update all releases with .gz files and new releases will also publish .tar.gz files.
installer should still support .xz files IMO (easy to do if they use pkgxdev/setup@v3 ofc). It’s not ubiquitous, I agree, but it is common.
Just FYI, I have confirmed this now works:
docker run -i -t chainguard/wolfi-base
apk add curl bash
curl https://i.jpillora.com/pkgxdev/[email protected]! | bash
Thanks!