wez / atomicparsley

AtomicParsley is a lightweight command line program for reading, parsing and setting metadata into MPEG-4 files, in particular, iTunes-style metadata.
https://github.com/wez/atomicparsley
GNU General Public License v2.0
576 stars 70 forks source link

chore: name releases using standard libc host triples #67

Closed coolaj86 closed 11 months ago

coolaj86 commented 1 year ago

I'm the one of the core maintainers of webinstall.dev and I'm adding an AtomicParsley installer.

I'm submitting this change to use standard host triples for release names so that standard so that the install type can be automated by Webi and other installer and package management tools without requiring custom mappings or manual configuration.

This is very common across GitHub (and other platforms) for projects that provide binary releases.

The Host Triple Standard

Most of the common C-family / libc-compatible build tools for C, C++, Rust, GoReleaser, and Zig put host triple is format of <cpu>-<platform>-<os>-<libc> (technically a host quadruple I suppose).

LLVM

Source: https://clang.llvm.org/docs/CrossCompilation.html

Rust

rustc --print target-list | sort -r
x86_64-wrs-vxworks
x86_64-uwp-windows-msvc
x86_64-uwp-windows-gnu
x86_64-unknown-uefi
x86_64-unknown-redox
x86_64-unknown-openbsd
x86_64-unknown-none-linuxkernel
x86_64-unknown-none
x86_64-unknown-netbsd
x86_64-unknown-linux-musl
x86_64-unknown-linux-gnux32
x86_64-unknown-linux-gnu
x86_64-unknown-l4re-uclibc
x86_64-unknown-illumos
x86_64-unknown-hermit
x86_64-unknown-haiku
x86_64-unknown-freebsd
x86_64-unknown-dragonfly
x86_64-sun-solaris
x86_64-pc-windows-msvc
x86_64-pc-windows-gnu
x86_64-pc-solaris
x86_64-linux-android
x86_64-fuchsia
x86_64-fortanix-unknown-sgx
x86_64-apple-tvos
x86_64-apple-ios-macabi
x86_64-apple-ios
x86_64-apple-darwin
wasm64-unknown-unknown
wasm32-wasi
wasm32-unknown-unknown
wasm32-unknown-emscripten
thumbv8m.main-none-eabihf
thumbv8m.main-none-eabi
thumbv8m.base-none-eabi
thumbv7neon-unknown-linux-musleabihf
thumbv7neon-unknown-linux-gnueabihf
thumbv7neon-linux-androideabi
thumbv7m-none-eabi
thumbv7em-none-eabihf
thumbv7em-none-eabi
thumbv7a-uwp-windows-msvc
thumbv7a-pc-windows-msvc
thumbv6m-none-eabi
thumbv4t-none-eabi
sparcv9-sun-solaris
sparc64-unknown-openbsd
sparc64-unknown-netbsd
sparc64-unknown-linux-gnu
sparc-unknown-linux-gnu
s390x-unknown-linux-musl
s390x-unknown-linux-gnu
riscv64imac-unknown-none-elf
riscv64gc-unknown-none-elf
riscv64gc-unknown-linux-musl
riscv64gc-unknown-linux-gnu
riscv64gc-unknown-freebsd
riscv32imc-unknown-none-elf
riscv32imc-esp-espidf
riscv32imac-unknown-none-elf
riscv32im-unknown-none-elf
riscv32i-unknown-none-elf
riscv32gc-unknown-linux-musl
riscv32gc-unknown-linux-gnu
powerpc64le-unknown-linux-musl
powerpc64le-unknown-linux-gnu
powerpc64le-unknown-freebsd
powerpc64-wrs-vxworks
powerpc64-unknown-linux-musl
powerpc64-unknown-linux-gnu
powerpc64-unknown-freebsd
powerpc-wrs-vxworks-spe
powerpc-wrs-vxworks
powerpc-unknown-openbsd
powerpc-unknown-netbsd
powerpc-unknown-linux-musl
powerpc-unknown-linux-gnuspe
powerpc-unknown-linux-gnu
powerpc-unknown-freebsd
nvptx64-nvidia-cuda
msp430-none-elf
mipsisa64r6el-unknown-linux-gnuabi64
mipsisa64r6-unknown-linux-gnuabi64
mipsisa32r6el-unknown-linux-gnu
mipsisa32r6-unknown-linux-gnu
mipsel-unknown-none
mipsel-unknown-linux-uclibc
mipsel-unknown-linux-musl
mipsel-unknown-linux-gnu
mipsel-sony-psp
mips64el-unknown-linux-muslabi64
mips64el-unknown-linux-gnuabi64
mips64-unknown-linux-muslabi64
mips64-unknown-linux-gnuabi64
mips64-openwrt-linux-musl
mips-unknown-linux-uclibc
mips-unknown-linux-musl
mips-unknown-linux-gnu
m68k-unknown-linux-gnu
i686-wrs-vxworks
i686-uwp-windows-msvc
i686-uwp-windows-gnu
i686-unknown-uefi
i686-unknown-openbsd
i686-unknown-netbsd
i686-unknown-linux-musl
i686-unknown-linux-gnu
i686-unknown-haiku
i686-unknown-freebsd
i686-pc-windows-msvc
i686-pc-windows-gnu
i686-linux-android
i686-apple-darwin
i586-unknown-linux-musl
i586-unknown-linux-gnu
i586-pc-windows-msvc
i386-apple-ios
hexagon-unknown-linux-musl
bpfel-unknown-none
bpfeb-unknown-none
avr-unknown-gnu-atmega328
asmjs-unknown-emscripten
armv7s-apple-ios
armv7r-none-eabihf
armv7r-none-eabi
armv7a-none-eabihf
armv7a-none-eabi
armv7a-kmc-solid_asp3-eabihf
armv7a-kmc-solid_asp3-eabi
armv7-wrs-vxworks-eabihf
armv7-unknown-netbsd-eabihf
armv7-unknown-linux-uclibceabihf
armv7-unknown-linux-uclibceabi
armv7-unknown-linux-musleabihf
armv7-unknown-linux-musleabi
armv7-unknown-linux-gnueabihf
armv7-unknown-linux-gnueabi
armv7-unknown-freebsd
armv7-linux-androideabi
armv7-apple-ios
armv6k-nintendo-3ds
armv6-unknown-netbsd-eabihf
armv6-unknown-freebsd
armv5te-unknown-linux-uclibceabi
armv5te-unknown-linux-musleabi
armv5te-unknown-linux-gnueabi
armv4t-unknown-linux-gnueabi
armebv7r-none-eabihf
armebv7r-none-eabi
arm-unknown-linux-musleabihf
arm-unknown-linux-musleabi
arm-unknown-linux-gnueabihf
arm-unknown-linux-gnueabi
arm-linux-androideabi
aarch64_be-unknown-linux-gnu_ilp32
aarch64_be-unknown-linux-gnu
aarch64-wrs-vxworks
aarch64-uwp-windows-msvc
aarch64-unknown-uefi
aarch64-unknown-redox
aarch64-unknown-openbsd
aarch64-unknown-none-softfloat
aarch64-unknown-none
aarch64-unknown-netbsd
aarch64-unknown-linux-musl
aarch64-unknown-linux-gnu_ilp32
aarch64-unknown-linux-gnu
aarch64-unknown-hermit
aarch64-unknown-freebsd
aarch64-pc-windows-msvc
aarch64-linux-android
aarch64-kmc-solid_asp3
aarch64-fuchsia
aarch64-apple-tvos
aarch64-apple-ios-sim
aarch64-apple-ios-macabi
aarch64-apple-ios
aarch64-apple-darwin

Zig

Zig also has a nice list:

zig targets | jq -r '.libc[]' | sort -r
x86_64-windows-gnu
x86_64-macos-none
x86_64-macos-none
x86_64-macos-none
x86_64-linux-musl
x86_64-linux-gnux32
x86_64-linux-gnu
x86-windows-gnu
x86-linux-musl
x86-linux-gnu
wasm32-wasi-musl
wasm32-freestanding-musl
thumb-linux-musleabihf
thumb-linux-musleabi
thumb-linux-gnueabihf
thumb-linux-gnueabi
sparc64-linux-gnu
sparc-linux-gnu
s390x-linux-musl
s390x-linux-gnu
riscv64-linux-musl
riscv64-linux-gnu
powerpc64le-linux-musl
powerpc64le-linux-gnu
powerpc64-linux-musl
powerpc64-linux-gnu
powerpc-linux-musl
powerpc-linux-gnueabihf
powerpc-linux-gnueabi
mipsel-linux-musl
mipsel-linux-gnueabihf
mipsel-linux-gnueabi
mips64el-linux-musl
mips64el-linux-gnuabin32
mips64el-linux-gnuabi64
mips64-linux-musl
mips64-linux-gnuabin32
mips64-linux-gnuabi64
mips-linux-musl
mips-linux-gnueabihf
mips-linux-gnueabi
m68k-linux-musl
m68k-linux-gnu
csky-linux-gnueabihf
csky-linux-gnueabi
armeb-windows-gnu
armeb-linux-musleabihf
armeb-linux-musleabi
armeb-linux-gnueabihf
armeb-linux-gnueabi
arm-windows-gnu
arm-linux-musleabihf
arm-linux-musleabi
arm-linux-gnueabihf
arm-linux-gnueabi
aarch64_be-windows-gnu
aarch64_be-linux-musl
aarch64_be-linux-gnu
aarch64-windows-gnu
aarch64-macos-none
aarch64-macos-none
aarch64-macos-none
aarch64-linux-musl
aarch64-linux-gnu
howyallare commented 1 year ago

FWIW, I think the Windows builds would have env=msvc rather than env=gnu (they import VCRUNTIME and UCRT rather than libstdc++ and libgcc).

coolaj86 commented 1 year ago

@howyallare yeah, I misunderstood two things:

I'm AFK for the weekend (on my return trip now), but I'll update the PR when I get back.

howyallare commented 1 year ago

None of the builds use static linking (though Linux and Windows probably should), thus the different glibc and musl versions. This leads to a couple of other considerations:

coolaj86 commented 1 year ago

Updated:

- AtomicParsley-x86_64-unknown-linux-musl.zip
+ AtomicParsley-x86_64-unknown-linux-musl++.zip
- AtomicParsley-x86_64-pc-windows-gnu.zip
+ AtomicParsley-x86_64-pc-windows-msvc.zip
- AtomicParsley-x86-pc-windows-gnu.zip
+ AtomicParsley-x86-pc-windows-msvc.zip
wez commented 11 months ago

Thanks for diving in here, and I appreciate the time you've spent on this, but I'm not going to merge either this or the other webi related PR, for a couple of reasons:

1) I'm philosophically opposed to the curl URL | bash installation method, and don't want to encourage users to use this dangerous practice. I'm not going to try to convince you to change anything in your project, it's just not what I want for my projects. 2) This PR only serves as a convenience for automation in one single external project. It makes it harder for humans to pick out the release for their system.

Again, I thank you for your time.

coolaj86 commented 11 months ago

I'm philosophically opposed to the curl URL | bash installation method, and don't want to encourage users to use this dangerous practice.

Would you prefer brew-style curl or command-style?

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

/bin/sh -c "$(curl -fsS https://webi.sh/AtomicParsley)"

vs

brew install atomicparsley

webi atomicparsley

The reason we default to curl -sS https://webi.sh | sh rather than sh -c "$(curl -fsS https://webi.sh/) is:

Notes

Like brew

Additional Security Measures

Also, since we don't have to deal with legacy compatibility, we take advantage of a few modern security practices that brew hasn't incorporated yet:

However, if you webi brew, it eliminates the insecure -L and automates the no-sudo install from their official instructions.

wez commented 11 months ago

curl | sh is inherently sketchy and encourages people to blindly trust running scripts from the internet. Normalizing this has consequences: I've seen the results of this sort of flow being owned by attackers and the outcome can be dire.

I'm not going to try to convince you to change anything you are doing, but rather want to make it plain that you cannot convince me to advise people to use this technique to directly install software that I maintain.

Again, I thank you for your effort and interest, but that's all I want to say and do on this matter.

image