Skip to content

Commit 0a555a0

Browse files
authored
Merge pull request #78 from offspot/trixie
Update to trixie
2 parents a21fd68 + cbeb485 commit 0a555a0

26 files changed

Lines changed: 216 additions & 192 deletions

File tree

.github/workflows/qa.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
pip install -U pip
2525
pip install -e .[lint,scripts,check]
2626
27-
- name: Check black formatting
28-
run: inv lint-black
29-
3027
- name: Check ruff
3128
run: inv lint-ruff
3229

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111

12+
- Based on pi-gen `2025-10-01-raspios-trixie`
13+
- Using offspot-config 2.x.x
1214
- Data partition block-size now ~1Mib instead of 1KiB
1315
- Data partition reserved blocks for root to 1% instead of 5%
1416
- balena service to be started before offspot-runtime
1517
- docker-compose service not started automatically (started by offspot-runtime)
1618

19+
### Removed
20+
21+
- Support for armhf. It's a soft removal, we just don't test it anymore. Use at own risk
22+
1723
## [1.3.1] - 2025-03-25
1824

1925
### Changed

builder.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def run(*args, **kwargs):
3030
class Defaults:
3131
supported_archs = ("armhf", "arm64")
3232
# using supported_archs indexes
33-
pigen_versions = ( # ~ 2023-05-03-raspios-buster
34-
"2024-03-15-raspios-bookworm",
35-
"2024-03-15-raspios-bookworm-arm64",
33+
pigen_versions = (
34+
"2025-10-01-raspios-trixie-armhf",
35+
"2025-10-01-raspios-trixie-arm64",
3636
)
3737
arch: str = "arm64"
3838
is_macos: bool = platform.system() == "Darwin"
@@ -62,6 +62,8 @@ class Defaults:
6262
ENABLE_SSH: str = "0"
6363
PUBKEY_SSH_FIRST_USER: str = ""
6464
PUBKEY_ONLY_SSH: str = "0"
65+
ENABLE_CLOUD_INIT: str = "0"
66+
WPA_COUNTRY: str = "US"
6567
STAGE_LIST: str = "stage0 stage1 stage2"
6668

6769
@property
@@ -98,6 +100,10 @@ class Builder:
98100
def __init__(self, conf):
99101
self.conf = conf
100102

103+
if self.conf.arch == "armhf":
104+
message = f"WARN: arch {self.conf.arch} is not tested. Use at own risk"
105+
print(f"\033[91m{message}\033[0m", flush=True) # noqa: T201
106+
101107
def run(self):
102108
# stop builder right away if target file already exists
103109
if self.conf.output.exists():
@@ -120,7 +126,7 @@ def run(self):
120126
f"starting pi-gen build with {config_path}\n{config_path.read_text()}"
121127
)
122128

123-
self.build()
129+
return self.build()
124130

125131
def download_pigen(self):
126132
"""clone requested version of Pi-gen"""

packages

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
+ jq
1212
+ tree
1313

14+
# replace netplan with ifupdown
15+
- netplan.io
16+
+ ifupdown
17+
1418
# docker stack: disabled in favor of balena (stage2/06-docker-tweaks)
1519
# docker-ce docker-ce-cli containerd.io docker-compose-plugin
1620

@@ -21,10 +25,10 @@
2125
+ hostapd dnsmasq
2226

2327
# not needed on host
24-
- pi-bluetooth v4l-utils python3-gpiozero python3-rpi.gpio python3-v4l2
28+
- v4l-utils python3-gpiozero python3-rpi-lgpio
2529

2630
# disable swap
27-
- dphys-swapfile
31+
# - rpi-swap
2832

2933
# continue to use dhcpcd5 (replaced by network-manager in 2023-10)
3034
# purposedly not using `dhcpcd5` as its a virtual package with conflict from raspberry-sys-mod

pyproject.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,25 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "builder"
7-
requires-python = ">=3.9,<3.13"
7+
requires-python = ">=3.13,<3.14"
88
description = "Offspot Base Image Builder"
99
readme = "README.md"
1010
dependencies = []
1111
version = "1.0.0.dev0"
1212

1313
[project.optional-dependencies]
1414
scripts = [
15-
"invoke==2.2.0",
15+
"invoke==2.2.1",
1616
]
1717
lint = [
18-
"black==24.4.0",
19-
"ruff==0.4.1",
18+
"ruff==0.14.0",
2019
]
2120
check = [
22-
"pyright==1.1.359",
21+
"pyright==1.1.406",
2322
]
2423
dev = [
25-
"pre-commit==3.7.0",
26-
"ipython==8.23.0",
24+
"pre-commit==4.3.0",
25+
"ipython==9.6.0",
2726
"builder[scripts]",
2827
"builder[lint]",
2928
"builder[check]",

tasks.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def report_cov(ctx: Context, *, html: bool = False):
2424
"""report coverage"""
2525
ctx.run("coverage combine", warn=True, pty=use_pty)
2626
ctx.run("coverage report --show-missing", pty=use_pty)
27+
ctx.run("coverage xml", pty=use_pty)
2728
if html:
2829
ctx.run("coverage html", pty=use_pty)
2930

@@ -41,13 +42,6 @@ def coverage(ctx: Context, args: str = "", *, html: bool = False):
4142
report_cov(ctx, html=html)
4243

4344

44-
@task(optional=["args"], help={"args": "black additional arguments"})
45-
def lint_black(ctx: Context, args: str = "."):
46-
args = args or "." # needed for hatch script
47-
ctx.run("black --version", pty=use_pty)
48-
ctx.run(f"black --check --diff {args}", pty=use_pty)
49-
50-
5145
@task(optional=["args"], help={"args": "ruff additional arguments"})
5246
def lint_ruff(ctx: Context, args: str = "."):
5347
args = args or "." # needed for hatch script
@@ -58,13 +52,12 @@ def lint_ruff(ctx: Context, args: str = "."):
5852
@task(
5953
optional=["args"],
6054
help={
61-
"args": "linting tools (black, ruff) additional arguments, typically a path",
55+
"args": "linting tools (ruff) additional arguments, typically a path",
6256
},
6357
)
6458
def lintall(ctx: Context, args: str = "."):
6559
"""Check linting"""
6660
args = args or "." # needed for hatch script
67-
lint_black(ctx, args)
6861
lint_ruff(ctx, args)
6962

7063

@@ -81,13 +74,6 @@ def checkall(ctx: Context, args: str = ""):
8174
check_pyright(ctx, args)
8275

8376

84-
@task(optional=["args"], help={"args": "black additional arguments"})
85-
def fix_black(ctx: Context, args: str = "."):
86-
"""fix black formatting"""
87-
args = args or "." # needed for hatch script
88-
ctx.run(f"black {args}", pty=use_pty)
89-
90-
9177
@task(optional=["args"], help={"args": "ruff additional arguments"})
9278
def fix_ruff(ctx: Context, args: str = "."):
9379
"""fix all ruff rules"""
@@ -98,12 +84,11 @@ def fix_ruff(ctx: Context, args: str = "."):
9884
@task(
9985
optional=["args"],
10086
help={
101-
"args": "linting tools (black, ruff) additional arguments, typically a path",
87+
"args": "linting tools (ruff) additional arguments, typically a path",
10288
},
10389
)
10490
def fixall(ctx: Context, args: str = "."):
10591
"""Fix everything automatically"""
10692
args = args or "." # needed for hatch script
107-
fix_black(ctx, args)
10893
fix_ruff(ctx, args)
10994
lintall(ctx, args)

tree/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ pi-gen tree replacements
88

99
```sh
1010
diff -u path/to/original path/to/updated > tree/path/to/original.patch
11-
```
11+
12+
# or, if working from a git copy of the original tree (I use tree-arm54.orig)
13+
git diff --no-prefix path/to/original > ../tree/path/to/original.patch
14+
```

tree/build-docker.sh.patch-arm64

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
*** tree-arm64.orig/build-docker.sh 2023-10-26 17:06:34
2-
--- tree/build-docker.sh 2023-10-26 17:14:07
3-
*************** esac
4-
*** 105,135 ****
5-
;;
6-
esac
7-
8-
- # Check if qemu-aarch64-static and /proc/sys/fs/binfmt_misc are present
9-
- if [[ "${binfmt_misc_required}" == "1" ]]; then
10-
- if ! qemu_arm=$(which qemu-aarch64-static) ; then
11-
- echo "qemu-aarch64-static not found (please install qemu-user-static)"
12-
- exit 1
13-
- fi
14-
- if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then
15-
- echo "binfmt_misc required but not mounted, trying to mount it..."
16-
- if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ; then
17-
- echo "mounting binfmt_misc failed"
18-
- exit 1
19-
- fi
20-
- echo "binfmt_misc mounted"
21-
- fi
22-
- if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-aarch64* ; then
23-
- # Register qemu-aarch64 for binfmt_misc
24-
- reg="echo ':qemu-aarch64-rpi:M::"\
25-
- "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:"\
26-
- "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\
27-
- "${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register"
28-
- echo "Registering qemu-aarch64 for binfmt_misc..."
29-
- sudo bash -c "${reg}" 2>/dev/null || true
30-
- fi
31-
- fi
32-
-
33-
trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${DOCKER_CMDLINE_NAME}' SIGINT SIGTERM
34-
time ${DOCKER} run \
35-
$DOCKER_CMDLINE_PRE \
36-
--- 105,110 ----
1+
diff --git build-docker.sh build-docker.sh
2+
index 53f8cf7..b53fd9c 100755
3+
--- build-docker.sh
4+
+++ build-docker.sh
5+
@@ -105,31 +105,6 @@ case $(uname -m) in
6+
;;
7+
esac
8+
9+
-# Check if qemu-aarch64-static and /proc/sys/fs/binfmt_misc are present
10+
-if [[ "${binfmt_misc_required}" == "1" ]]; then
11+
- if ! qemu_arm=$(which qemu-aarch64-static) ; then
12+
- echo "qemu-aarch64-static not found (please install qemu-user-static)"
13+
- exit 1
14+
- fi
15+
- if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then
16+
- echo "binfmt_misc required but not mounted, trying to mount it..."
17+
- if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ; then
18+
- echo "mounting binfmt_misc failed"
19+
- exit 1
20+
- fi
21+
- echo "binfmt_misc mounted"
22+
- fi
23+
- if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-aarch64* ; then
24+
- # Register qemu-aarch64 for binfmt_misc
25+
- reg="echo ':qemu-aarch64-rpi:M::"\
26+
-"\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:"\
27+
-"\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\
28+
-"${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register"
29+
- echo "Registering qemu-aarch64 for binfmt_misc..."
30+
- sudo bash -c "${reg}" 2>/dev/null || true
31+
- fi
32+
-fi
33+
-
34+
trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${DOCKER_CMDLINE_NAME}' SIGINT SIGTERM
35+
time ${DOCKER} run \
36+
$DOCKER_CMDLINE_PRE \

tree/build-docker.sh.patch-armhf

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
*** tree-armhf.orig/build-docker.sh 2023-10-26 17:07:21
2-
--- tree/build-docker.sh 2023-10-26 17:15:32
3-
*************** esac
4-
*** 114,144 ****
5-
;;
6-
esac
7-
8-
- # Check if qemu-arm-static and /proc/sys/fs/binfmt_misc are present
9-
- if [[ "${binfmt_misc_required}" == "1" ]]; then
10-
- if ! qemu_arm=$(which qemu-arm-static) ; then
11-
- echo "qemu-arm-static not found (please install qemu-user-static)"
12-
- exit 1
13-
- fi
14-
- if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then
15-
- echo "binfmt_misc required but not mounted, trying to mount it..."
16-
- if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ; then
17-
- echo "mounting binfmt_misc failed"
18-
- exit 1
19-
- fi
20-
- echo "binfmt_misc mounted"
21-
- fi
22-
- if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-arm* ; then
23-
- # Register qemu-arm for binfmt_misc
24-
- reg="echo ':qemu-arm-rpi:M::"\
25-
- "\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:"\
26-
- "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\
27-
- "${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register"
28-
- echo "Registering qemu-arm for binfmt_misc..."
29-
- sudo bash -c "${reg}" 2>/dev/null || true
30-
- fi
31-
- fi
32-
-
33-
trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${DOCKER_CMDLINE_NAME}' SIGINT SIGTERM
34-
time ${DOCKER} run \
35-
$DOCKER_CMDLINE_PRE \
36-
--- 114,119 ----
1+
diff --git build-docker.sh build-docker.sh
2+
index 9c04651..71ced83 100755
3+
--- build-docker.sh
4+
+++ build-docker.sh
5+
@@ -114,31 +114,6 @@ case $(uname -m) in
6+
;;
7+
esac
8+
9+
-# Check if qemu-arm-static and /proc/sys/fs/binfmt_misc are present
10+
-if [[ "${binfmt_misc_required}" == "1" ]]; then
11+
- if ! qemu_arm=$(which qemu-arm-static) ; then
12+
- echo "qemu-arm-static not found (please install qemu-user-static)"
13+
- exit 1
14+
- fi
15+
- if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then
16+
- echo "binfmt_misc required but not mounted, trying to mount it..."
17+
- if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ; then
18+
- echo "mounting binfmt_misc failed"
19+
- exit 1
20+
- fi
21+
- echo "binfmt_misc mounted"
22+
- fi
23+
- if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-arm* ; then
24+
- # Register qemu-arm for binfmt_misc
25+
- reg="echo ':qemu-arm-rpi:M::"\
26+
-"\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:"\
27+
-"\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\
28+
-"${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register"
29+
- echo "Registering qemu-arm for binfmt_misc..."
30+
- sudo bash -c "${reg}" 2>/dev/null || true
31+
- fi
32+
-fi
33+
-
34+
trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${DOCKER_CMDLINE_NAME}' SIGINT SIGTERM
35+
time ${DOCKER} run \
36+
$DOCKER_CMDLINE_PRE \

tree/export-image/05-finalise/01-run.sh.patch

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

0 commit comments

Comments
 (0)