From 8684c7095de51b2c13ae1f93192b66629d7e44ab Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Tue, 5 May 2026 15:19:50 +0100 Subject: [PATCH 1/7] remove --build-targets argument --- .circleci/config.yml | 3 +-- CONTRIBUTING.md | 2 +- debian-pkg/Dockerfile | 3 --- dev-scripts/build-debian-pkg | 16 ++-------------- dev-scripts/device/install-from-source | 2 +- 5 files changed, 5 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4bad4eeef..fdbf6d091 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -227,8 +227,7 @@ jobs: - run: name: Build Debian package command: | - ./dev-scripts/build-debian-pkg \ - --build-targets linux/arm/v7 + ./dev-scripts/build-debian-pkg - run: name: Print Debian package contents command: dpkg --contents debian-pkg/releases/tinypilot*.deb diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c5f5523a4..f8a9774b2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -294,7 +294,7 @@ Once your dev system is configured for multi-architecture Docker builds, you can TARGET_PLATFORM='linux/arm/v7' (rm debian-pkg/releases/tinypilot*.deb || true) && \ - ./dev-scripts/build-debian-pkg --build-targets "${TARGET_PLATFORM}" && \ + ./dev-scripts/build-debian-pkg && \ mv debian-pkg/releases/tinypilot*.deb bundler/bundle && \ ./bundler/create-bundle ``` diff --git a/debian-pkg/Dockerfile b/debian-pkg/Dockerfile index c37a4a8d1..f0ed5ecf9 100644 --- a/debian-pkg/Dockerfile +++ b/debian-pkg/Dockerfile @@ -35,9 +35,6 @@ ARG PKG_BUILD_NUMBER='1' RUN cat | bash <<'EOF' set -exu case "${TARGETPLATFORM}" in - 'linux/amd64') - PKG_ARCH='amd64' - ;; 'linux/arm/v7') PKG_ARCH='armhf' ;; diff --git a/dev-scripts/build-debian-pkg b/dev-scripts/build-debian-pkg index 8945caae1..0f9ff2b5d 100755 --- a/dev-scripts/build-debian-pkg +++ b/dev-scripts/build-debian-pkg @@ -10,14 +10,9 @@ set -u print_help() { cat < 0 )); do case "$1" in @@ -42,11 +36,6 @@ while (( "$#" > 0 )); do print_help exit ;; - --build-targets) - BUILD_TARGETS="$2" - shift # For flag name. - shift # For flag value. - ;; --tinypilot-version) TINYPILOT_VERSION="$2" shift # For flag name. @@ -59,7 +48,6 @@ while (( "$#" > 0 )); do ;; esac done -readonly BUILD_TARGETS readonly TINYPILOT_VERSION # Echo commands before executing them, by default to stderr. @@ -77,7 +65,7 @@ readonly DOCKER_PROGRESS DOCKER_BUILDKIT=1 docker buildx build \ --file debian-pkg/Dockerfile \ - --platform "${BUILD_TARGETS}" \ + --platform 'linux/arm/v7' \ --build-arg TINYPILOT_VERSION="${TINYPILOT_VERSION}" \ --build-arg PKG_VERSION="${PKG_VERSION}" \ --target=artifact \ diff --git a/dev-scripts/device/install-from-source b/dev-scripts/device/install-from-source index 15d4ed97f..a0b97732b 100755 --- a/dev-scripts/device/install-from-source +++ b/dev-scripts/device/install-from-source @@ -22,7 +22,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" readonly SCRIPT_DIR cd "${SCRIPT_DIR}/../.." -./dev-scripts/build-debian-pkg --build-targets 'linux/arm/v7' +./dev-scripts/build-debian-pkg # Shellcheck recommends find instead of ls for non-alphanumeric filenames, but # we don't expect non-alphanumeric filenames, and the find equivalent is more From 1a7fae7bdf94c040ad1a00f7083119b7c6a042ca Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Wed, 6 May 2026 12:42:01 +0100 Subject: [PATCH 2/7] switch to arm64 --- dev-scripts/build-debian-pkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-scripts/build-debian-pkg b/dev-scripts/build-debian-pkg index 0f9ff2b5d..708f116c6 100755 --- a/dev-scripts/build-debian-pkg +++ b/dev-scripts/build-debian-pkg @@ -65,7 +65,7 @@ readonly DOCKER_PROGRESS DOCKER_BUILDKIT=1 docker buildx build \ --file debian-pkg/Dockerfile \ - --platform 'linux/arm/v7' \ + --platform 'linux/arm64' \ --build-arg TINYPILOT_VERSION="${TINYPILOT_VERSION}" \ --build-arg PKG_VERSION="${PKG_VERSION}" \ --target=artifact \ From 908fc15c154cf0e1d92880952f14d6e2ad28a8fb Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Wed, 6 May 2026 12:50:00 +0100 Subject: [PATCH 3/7] update to arm64 --- debian-pkg/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian-pkg/Dockerfile b/debian-pkg/Dockerfile index f0ed5ecf9..6180bd337 100644 --- a/debian-pkg/Dockerfile +++ b/debian-pkg/Dockerfile @@ -35,8 +35,8 @@ ARG PKG_BUILD_NUMBER='1' RUN cat | bash <<'EOF' set -exu case "${TARGETPLATFORM}" in - 'linux/arm/v7') - PKG_ARCH='armhf' + 'linux/arm64') + PKG_ARCH='arm64' ;; *) echo "Unrecognized target platform: ${TARGETPLATFORM}" >&2 From 53bd24cbb6bc78202400e16bc9c640847ecb1992 Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Wed, 6 May 2026 12:59:03 +0100 Subject: [PATCH 4/7] lintian --- debian-pkg/debian/tinypilot.lintian-overrides | 1 + 1 file changed, 1 insertion(+) diff --git a/debian-pkg/debian/tinypilot.lintian-overrides b/debian-pkg/debian/tinypilot.lintian-overrides index 4d4f661f6..012b21353 100644 --- a/debian-pkg/debian/tinypilot.lintian-overrides +++ b/debian-pkg/debian/tinypilot.lintian-overrides @@ -4,6 +4,7 @@ tinypilot: script-not-executable [opt/tinypilot/venv/lib/python*/site-packages/p tinypilot: script-not-executable [opt/tinypilot/venv/lib/python*/site-packages/pkg_resources/_vendor/appdirs.py] tinypilot: script-not-executable [opt/tinypilot/venv/lib/python*/site-packages/setuptools/command/easy_install.py] tinypilot: national-encoding opt/tinypilot/venv/lib/python*/site-packages/passlib/tests/sample1c.cfg +tinypilot: embedded-library libyaml [opt/tinypilot/venv/lib/python*/site-packages/yaml/_yaml.cpython-*-linux-gnu.so] # Lintian doesn't recognize the Python interpreter when it's within the # virtualenv. From 573403e1c09937c7fc11e4b94fb9bf8864ae4e6c Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Wed, 6 May 2026 13:06:29 +0100 Subject: [PATCH 5/7] fix bundle --- bundler/create-bundle | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bundler/create-bundle b/bundler/create-bundle index 9bf765133..ade4deb9c 100755 --- a/bundler/create-bundle +++ b/bundler/create-bundle @@ -24,11 +24,8 @@ cd ./bundler readonly BUNDLE_DIR='bundle' readonly OUTPUT_DIR='dist' -# Exclude the AMD64 package from the production bundle. -rm -f "${BUNDLE_DIR}/tinypilot"*amd64.deb - # Ensure that a TinyPilot Debian package exists. -if ! ls "${BUNDLE_DIR}/tinypilot"*armhf.deb 1> /dev/null 2>&1; then +if ! ls "${BUNDLE_DIR}/tinypilot"*arm64.deb 1> /dev/null 2>&1; then echo 'Failed to create bundle: no TinyPilot Debian package found.' >&2 exit 1 fi @@ -50,7 +47,7 @@ print_tinypilot_version() { dpkg-deb \ --show \ --showformat '${Tinypilot-Version}' \ - "${BUNDLE_DIR}/tinypilot"*armhf.deb + "${BUNDLE_DIR}/tinypilot"*arm64.deb } # Compose bundle file name, which consists of these hyphen-separated parts: From ec89c0bb8d0a1b2443f87e8d4e4343e71266b8d7 Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Wed, 6 May 2026 13:14:23 +0100 Subject: [PATCH 6/7] override --- debian-pkg/debian/tinypilot.lintian-overrides | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian-pkg/debian/tinypilot.lintian-overrides b/debian-pkg/debian/tinypilot.lintian-overrides index 012b21353..dd765b560 100644 --- a/debian-pkg/debian/tinypilot.lintian-overrides +++ b/debian-pkg/debian/tinypilot.lintian-overrides @@ -4,7 +4,7 @@ tinypilot: script-not-executable [opt/tinypilot/venv/lib/python*/site-packages/p tinypilot: script-not-executable [opt/tinypilot/venv/lib/python*/site-packages/pkg_resources/_vendor/appdirs.py] tinypilot: script-not-executable [opt/tinypilot/venv/lib/python*/site-packages/setuptools/command/easy_install.py] tinypilot: national-encoding opt/tinypilot/venv/lib/python*/site-packages/passlib/tests/sample1c.cfg -tinypilot: embedded-library libyaml [opt/tinypilot/venv/lib/python*/site-packages/yaml/_yaml.cpython-*-linux-gnu.so] +tinypilot: embedded-library libyaml opt/tinypilot/venv/lib/python3.9/site-packages/yaml/_yaml.cpython-39-aarch64-linux-gnu.so # Lintian doesn't recognize the Python interpreter when it's within the # virtualenv. From 3008baddfc53bc9e9c691c056be27e19c23fbc3f Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Wed, 6 May 2026 13:19:33 +0100 Subject: [PATCH 7/7] fix bundle verify --- bundler/verify-bundle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundler/verify-bundle b/bundler/verify-bundle index 966bee1b2..f5325cbf3 100755 --- a/bundler/verify-bundle +++ b/bundler/verify-bundle @@ -42,4 +42,4 @@ if [[ ! -f install ]]; then fi # List Debian package contents. -dpkg --contents tinypilot*armhf.deb +dpkg --contents tinypilot*arm64.deb