Files
tailscale/release/dist/qnap/files/scripts/build-qpkg.sh
Gabriel von Winckler f3bc40b679 release/dist/qnap: drop the static package tag from QPKG_VER (#22381)
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]>
2026-11-17 14:31:35 +00:00

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