Download the uv build the Pi can actually run
Raspberry Pi OS ships a 64-bit kernel with a 32-bit userland, so uname -m - and
therefore ansible_architecture - reports aarch64 on a box whose /bin/ls is
ELF32 ARM and which has no /lib/ld-linux-aarch64.so.1. The aarch64 uv tarball
unpacked happily and then failed three tasks later with
/usr/local/bin/uv: No such file or directory
which is the dynamic loader missing, not the file, and points at entirely the
wrong thing. Pick the target triple from ansible_userspace_bits instead, which
is the fact that tells the truth, and key the install directory on the triple as
well as the version - otherwise `creates:` would keep a wrong-architecture
binary in place forever. Then run `uv --version` right after installing it, so a
bad download fails where the cause is visible.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,21 @@ pi_musicmouse_repo: "ssh://git@git.bauer.tech:2222/martin/musicmouse.git"
|
||||
pi_musicmouse_python_version: "3.13"
|
||||
pi_musicmouse_uv_version: "0.12.10"
|
||||
|
||||
# Which uv build to download. Raspberry Pi OS ships a 64-bit kernel with a 32-bit
|
||||
# userland, so `uname -m` (and therefore ansible_architecture) says aarch64 on a box
|
||||
# that can only run armhf binaries - the aarch64 build installs fine and then fails to
|
||||
# exec with "No such file or directory", which is the dynamic loader missing, not the
|
||||
# file. ansible_userspace_bits is the fact that tells the truth.
|
||||
pi_musicmouse_uv_target: >-
|
||||
{{ 'armv7-unknown-linux-gnueabihf'
|
||||
if (ansible_architecture in ['aarch64', 'armv7l', 'armv6l'] and ansible_userspace_bits == '32')
|
||||
else _pi_musicmouse_uv_targets[ansible_architecture] }}
|
||||
_pi_musicmouse_uv_targets:
|
||||
aarch64: aarch64-unknown-linux-gnu
|
||||
armv7l: armv7-unknown-linux-gnueabihf
|
||||
armv6l: armv7-unknown-linux-gnueabihf
|
||||
x86_64: x86_64-unknown-linux-gnu
|
||||
|
||||
# Where to check out the repo on the *control machine* to build the frontend (npm isn't
|
||||
# installed on the Pi - see README). Keyed by version so different hosts on different
|
||||
# versions don't clobber each other's build.
|
||||
|
||||
Reference in New Issue
Block a user