mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-24 02:31:18 -08:00
QDK's qbuild truncates QPKG_VER to 10 characters, so versions like 1.105.265-1 produced Tailscale_1.105.265-_<arch>.qpkg while we returned (and put in the manifest) Tailscale_1.105.265-1_<arch>.qpkg. The "-1" tag was never bumped, so drop it and use the version alone. Fail the build if the version itself exceeds 10 characters rather than silently producing a mismatched filename. Built qnap/x86_64 unsigned at 1.105.280: the file on disk and the manifest both name Tailscale_1.105.280_x86_64.qpkg, and the qpkg header version is 1.105.280. The length guard and signed builds were not exercised. Updates tailscale/corp#51480 Signed-off-by: Gabriel von Winckler <[email protected]>
20 lines
435 B
Bash
Executable File
20 lines
435 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
# Clean up folders and files created during build.
|
|
function cleanup() {
|
|
rm -rf /Tailscale/$ARCH
|
|
rm -f /Tailscale/sed*
|
|
rm -f /Tailscale/qpkg.cfg
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
mkdir -p /Tailscale/$ARCH
|
|
cp /tailscaled /Tailscale/$ARCH/tailscaled
|
|
cp /tailscale /Tailscale/$ARCH/tailscale
|
|
|
|
sed "s/\$QPKG_VER/$TSTAG/g" /Tailscale/qpkg.cfg.in >/Tailscale/qpkg.cfg
|
|
|
|
qbuild --root /Tailscale --build-arch $ARCH --build-dir /out
|