Skip to content

Commit d16212c

Browse files
jdeanwallaceclaude
andauthored
Backport Trixie changes to Community (#1953)
Resolves tiny-pilot/tinypilot-pro#1765 This PR mostly backports our recent migration to Trixie, from Pro into Community, and any lingering changes that should have been backported. ### Notes - I followed a mostly manual process of: 1. Copying the Pro `.git` directory in the Community repo 1. Using VSCode to accept/reject Pro changes into the Community repo 1. Restoring the Community `.git` directory 1. Using AI to spot check the changes 1. Commit and push changes 1. Installing the bundle on a Voyager 2a device - keyboard, video, mouse, and audio streaming works - Most of the file changes came from the updated prettier version reformatting JS files (i.e., adding trailing `,`): - tiny-pilot/tinypilot-pro#1883 - As noted in the parent issue, this PR also removes all static IP scripts: - tiny-pilot/tinypilot-pro#1765 (comment) - Merging this PR should generate an empty diff when merging back into Pro <a data-ca-tag href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1953"><img src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review on CodeApprove" /></a> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1264877 commit d16212c

126 files changed

Lines changed: 2317 additions & 2140 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ executors:
55
- image: cimg/base:2024.02
66
ubuntu-machine:
77
machine:
8-
image: ubuntu-2204:2024.01.2
8+
image: ubuntu-2404:2025.09.1
9+
debian:
10+
docker:
11+
- image: debian:trixie-20260421-slim
912
python:
1013
docker:
11-
- image: cimg/python:3.9.17
14+
- image: cimg/python:3.13.12
1215
node:
1316
docker:
14-
- image: cimg/node:18.16.1
17+
- image: cimg/node:24.13.1
1518
commands:
1619
check_project_env_vars:
1720
steps:
@@ -182,12 +185,12 @@ jobs:
182185
docker:
183186
# To run tests against the dev server, Playwright needs a CircleCI image
184187
# with Python, Node, and a browser. While the check_python and
185-
# check_javascript steps use python-3.9.17 and node-18.16.1 respectively,
188+
# check_javascript steps use python-3.13.12 and node-24.13.1 respectively,
186189
# the CircleCI image with *both* python and node in the closest versions
187-
# is python:3.9.17-browsers. It has python-3.9.17 and node-18.16.0.
190+
# is python:3.13.12-browsers. It has python-3.13.12 and node-24.13.0.
188191
#
189192
# See: https://circleci.com/developer/images/image/cimg/python#tagging-scheme
190-
- image: cimg/python:3.9.17-browsers
193+
- image: cimg/python:3.13.12-browsers
191194
environment:
192195
NODE_ENV: development
193196
steps:
@@ -228,7 +231,7 @@ jobs:
228231
name: Build Debian package
229232
command: |
230233
./dev-scripts/build-debian-pkg \
231-
--build-targets linux/arm/v7
234+
--build-targets linux/arm64
232235
- run:
233236
name: Print Debian package contents
234237
command: dpkg --contents debian-pkg/releases/tinypilot*.deb
@@ -237,17 +240,20 @@ jobs:
237240
paths:
238241
- "*.deb"
239242
check_debian_package:
240-
executor: ubuntu
243+
executor: debian
241244
steps:
242245
- checkout
243246
- attach_workspace:
244247
at: ./
245-
- run:
246-
name: Update apt packages
247-
command: sudo apt-get update
248248
- run:
249249
name: Install lintian
250-
command: sudo apt-get install -y lintian=2.114.0ubuntu1
250+
command: |
251+
set -eux
252+
# Add a snapshot source so that the lintian version can be pinned.
253+
echo 'deb https://snapshot.debian.org/archive/debian/20250329T031528Z/ trixie main' \
254+
> /etc/apt/sources.list.d/snapshot.list
255+
apt-get update
256+
apt-get install --yes lintian=2.122.0
251257
- run:
252258
name: Print lintian version
253259
command: lintian --version

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Auto-generated files/folders.
22
**/__pycache__
33
**/*.py[cod]
4+
**/venv/
45

56
# Test files.
67
**/*_test.py

.eslintrc.cjs

Lines changed: 0 additions & 49 deletions
This file was deleted.

.lintianignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ extended-description-is-empty
1414
# https://github.com/tiny-pilot/tinypilot/issues/1196
1515
recursive-privilege-change
1616

17-
# Our copyright notice isn't in the correct format.
18-
# https://lintian.debian.org/tags/copyright-without-copyright-notice
19-
copyright-without-copyright-notice
20-
2117
# Apparently the Target and WantedBy fields we specify are atypical, so suppress
2218
# warnings until we can find the right field values.
2319
# https://github.com/tiny-pilot/tinypilot/issues/1207

.pylintrc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ docstring-min-length=60
112112
[STRING]
113113
check-quote-consistency=no
114114

115-
[ELIF]
115+
[REFACTORING]
116116

117117
# Maximum number of nested blocks for function / method body
118118
max-nested-blocks=5
@@ -177,6 +177,10 @@ init-import=no
177177
# not used).
178178
dummy-variables-rgx=(_+[a-zA-Z0-9_]*?$)|dummy
179179

180+
# Argument names that match this expression will be ignored. Default to name
181+
# with leading underscore
182+
ignored-argument-names=_.*
183+
180184
[CLASSES]
181185

182186
# List of method names used to declare (i.e. assign) instance attributes.
@@ -197,10 +201,6 @@ exclude-protected=_asdict,_fields,_replace,_source,_make
197201
# Maximum number of arguments for function / method
198202
max-args=10
199203

200-
# Argument names that match this expression will be ignored. Default to name
201-
# with leading underscore
202-
ignored-argument-names=_.*
203-
204204
# Maximum number of locals for function / method body
205205
max-locals=30
206206

@@ -236,4 +236,4 @@ analyse-fallback-blocks=no
236236

237237
# Exceptions that will emit a warning when being caught. Defaults to
238238
# "Exception"
239-
overgeneral-exceptions=Exception
239+
overgeneral-exceptions=builtins.Exception

.ruff.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
src = ["app"]
22

3-
# Assume Python 3.9.
4-
target-version = "py39"
3+
# Assume Python 3.13.
4+
target-version = "py313"
55

66
[lint]
77
select = [

CONTRIBUTING.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ The steps below show you how to quickly set up a development environment for Tin
88

99
### Requirements
1010

11-
- Python 3.9 or higher
12-
- Node.js 18.16.1 or higher
11+
- Python 3.13 or higher
12+
- Node.js 24.13.1 or higher
1313
- [shellcheck](https://github.com/koalaman/shellcheck#installing)
1414
- [bats](https://bats-core.readthedocs.io/en/stable/installation.html)
1515
- Docker 20.10.x or higher
@@ -146,7 +146,18 @@ By the way, for flashing the ready-made disk images of TinyPilot Pro, we recomme
146146

147147
### Initialize system on Voyager hardware
148148

149-
If you want to initialize a new system on Voyager hardware, you first need to set some configuration in place to make TinyPilot work with Voyager’s video capture chip.
149+
If you want to initialize a new system on Voyager hardware using the bundle installer, you first need to set some configuration in place so that it knows what hardware it runs on.
150+
151+
#### Voyager 3
152+
153+
```bash
154+
# Create hardware/product identifiers.
155+
mkdir -p /etc/tinypilot
156+
echo 'voyager' > /etc/tinypilot/product-family
157+
echo '3' > /etc/tinypilot/product-model
158+
```
159+
160+
#### Voyager 2 / 2a
150161

151162
```bash
152163
# Create tinypilot system user and group.
@@ -159,7 +170,7 @@ adduser \
159170
tinypilot
160171

161172
# Add uStreamer configuration.
162-
echo "dtoverlay=tc358743" | sudo tee --append /boot/config.txt
173+
echo "dtoverlay=tc358743" | sudo tee --append /boot/firmware/config.txt
163174
```
164175

165176
### Install from source
@@ -204,7 +215,7 @@ curl \
204215

205216
### Build a uStreamer Debian package
206217

207-
CircleCI builds the uStreamer Debian package for the `armhf` architecture on every commit to the [`ustreamer-debian` repo](https://github.com/tiny-pilot/ustreamer-debian), which is stored as a CircleCI artifact.
218+
CircleCI builds the uStreamer Debian package for the `arm64` architecture on every commit to the [`ustreamer-debian` repo](https://github.com/tiny-pilot/ustreamer-debian), which is stored as a CircleCI artifact.
208219

209220
Follow these steps:
210221

@@ -214,16 +225,14 @@ Follow these steps:
214225
1. Click the `build_debian_package` job.
215226
- If the [`build_debian_package` CircleCI job](https://github.com/tiny-pilot/ustreamer-debian/blob/2ace4a1d22a3c9108f5285e3dff0290c60e5b1cf/.circleci/config.yml#L25) fails for some reason, you can manually debug the code in CircleCI by clicking "rerun job with SSH" in the CircleCI dashboard and following their SSH instructions. Remember to cancel the CircleCI job once you're done debugging, in order to reduce CI costs.
216227
1. When the job completes, go to the "Artifacts" tab of the `build_debian_package` job on CircleCI to find the uStreamer Debian packages.
217-
218-
- We use `armhf`-based builds on physical devices and for testing in CircleCI.
228+
- We use `arm64`-based builds on physical devices and for testing in CircleCI.
219229
- [Docker platform names don't match Debian architecture names:](https://github.com/tiny-pilot/ustreamer-debian/blob/2ace4a1d22a3c9108f5285e3dff0290c60e5b1cf/Dockerfile#L46C1-L48)
220230

221231
> Docker's platform names don't match Debian's platform names, so we translate
222232
> the platform name from the Docker version to the Debian version...
223233
224234
Which means that when Docker's target platform is:
225-
226-
- `linux/arm/v7`, CircleCI creates a `armhf` Debian package
235+
- `linux/arm64`, CircleCI creates a `arm64` Debian package
227236

228237
### Install a uStreamer Debian package
229238

@@ -280,18 +289,18 @@ We don't use any Python package management tools because we want to limit comple
280289

281290
We don't track indirect dependencies for our dev dependencies (in `requirements_dev.txt`), so you can update those by simply changing the version number for any package.
282291

283-
### Building an ARMv7 bundle on a dev system
292+
### Building an ARM64 bundle on a dev system
284293

285294
To build a TinyPilot install bundle on your dev system, you first need to configure a Docker builder for multi-architecture builds using QEMU. You only need to perform this step once per system:
286295

287296
```bash
288297
./dev-scripts/enable-multiarch-docker
289298
```
290299

291-
Once your dev system is configured for multi-architecture Docker builds, you can build install ARMv7 TinyPilot bundles with the following commands:
300+
Once your dev system is configured for multi-architecture Docker builds, you can build install ARM64 TinyPilot bundles with the following commands:
292301

293302
```bash
294-
TARGET_PLATFORM='linux/arm/v7'
303+
TARGET_PLATFORM='linux/arm64'
295304

296305
(rm debian-pkg/releases/tinypilot*.deb || true) && \
297306
./dev-scripts/build-debian-pkg --build-targets "${TARGET_PLATFORM}" && \
@@ -538,10 +547,10 @@ const confirmCreateButton = document.querySelector("#confirm-create-btn");
538547
const confirmDeleteButton = document.querySelector("#confirm-delete-btn");
539548

540549
const confirmCreateButtonContainer = document.querySelector(
541-
"#create .btn-container"
550+
"#create .btn-container",
542551
);
543552
const confirmDeleteButtonContainer = document.querySelector(
544-
"#delete .btn-container"
553+
"#delete .btn-container",
545554
);
546555
```
547556

0 commit comments

Comments
 (0)