From 599a7112a6aa763458608801885d5f57e93aa7b1 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Tue, 7 Oct 2025 14:29:33 +0000 Subject: [PATCH 01/22] disable cloud-init, we dont need it --- builder.py | 1 + 1 file changed, 1 insertion(+) diff --git a/builder.py b/builder.py index 4d82523..760a1c8 100755 --- a/builder.py +++ b/builder.py @@ -62,6 +62,7 @@ class Defaults: ENABLE_SSH: str = "0" PUBKEY_SSH_FIRST_USER: str = "" PUBKEY_ONLY_SSH: str = "0" + ENABLE_CLOUD_INIT: str = "0" STAGE_LIST: str = "stage0 stage1 stage2" @property From 8ce52e410d83db48928fb6ec3b117037f45a8ff4 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Tue, 7 Oct 2025 14:30:15 +0000 Subject: [PATCH 02/22] Port resize script changes - `-x` option to du (--one-file-system) - align partition to 8MiB instead of 4Mib --- tree/export-image/prerun.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tree/export-image/prerun.sh b/tree/export-image/prerun.sh index 5cf9407..bbd2e65 100755 --- a/tree/export-image/prerun.sh +++ b/tree/export-image/prerun.sh @@ -10,12 +10,12 @@ rm -rf "${ROOTFS_DIR}" mkdir -p "${ROOTFS_DIR}" BOOT_SIZE="$((512 * 1024 * 1024))" -ROOT_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1) +ROOT_SIZE=$(du -x --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1) # use ~256Mi for data. shall be recreated by final-image creator tool DATA_SIZE="$((256 * 1024 * 1024))" # All partition sizes and starts will be aligned to this size -ALIGN="$((4 * 1024 * 1024))" +ALIGN="$((8 * 1024 * 1024))" # Add this much space to the calculated file size. This allows for # some overhead (since actual space usage is usually rounded up to the # filesystem block size) and gives some free space on the resulting From 8c6df8cbf951c1b740d25a54158cc0646ce7c174 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 15:02:36 +0000 Subject: [PATCH 03/22] Removed black, using ruff --- tasks.py | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/tasks.py b/tasks.py index a95c71a..0a5ad5e 100644 --- a/tasks.py +++ b/tasks.py @@ -24,6 +24,7 @@ def report_cov(ctx: Context, *, html: bool = False): """report coverage""" ctx.run("coverage combine", warn=True, pty=use_pty) ctx.run("coverage report --show-missing", pty=use_pty) + ctx.run("coverage xml", pty=use_pty) if html: ctx.run("coverage html", pty=use_pty) @@ -41,13 +42,6 @@ def coverage(ctx: Context, args: str = "", *, html: bool = False): report_cov(ctx, html=html) -@task(optional=["args"], help={"args": "black additional arguments"}) -def lint_black(ctx: Context, args: str = "."): - args = args or "." # needed for hatch script - ctx.run("black --version", pty=use_pty) - ctx.run(f"black --check --diff {args}", pty=use_pty) - - @task(optional=["args"], help={"args": "ruff additional arguments"}) def lint_ruff(ctx: Context, args: str = "."): args = args or "." # needed for hatch script @@ -58,13 +52,12 @@ def lint_ruff(ctx: Context, args: str = "."): @task( optional=["args"], help={ - "args": "linting tools (black, ruff) additional arguments, typically a path", + "args": "linting tools (ruff) additional arguments, typically a path", }, ) def lintall(ctx: Context, args: str = "."): """Check linting""" args = args or "." # needed for hatch script - lint_black(ctx, args) lint_ruff(ctx, args) @@ -81,13 +74,6 @@ def checkall(ctx: Context, args: str = ""): check_pyright(ctx, args) -@task(optional=["args"], help={"args": "black additional arguments"}) -def fix_black(ctx: Context, args: str = "."): - """fix black formatting""" - args = args or "." # needed for hatch script - ctx.run(f"black {args}", pty=use_pty) - - @task(optional=["args"], help={"args": "ruff additional arguments"}) def fix_ruff(ctx: Context, args: str = "."): """fix all ruff rules""" @@ -98,12 +84,11 @@ def fix_ruff(ctx: Context, args: str = "."): @task( optional=["args"], help={ - "args": "linting tools (black, ruff) additional arguments, typically a path", + "args": "linting tools (ruff) additional arguments, typically a path", }, ) def fixall(ctx: Context, args: str = "."): """Fix everything automatically""" args = args or "." # needed for hatch script - fix_black(ctx, args) fix_ruff(ctx, args) lintall(ctx, args) From 193a40c0494d04c6869406f094a3f9c26cd444ed Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 15:03:04 +0000 Subject: [PATCH 04/22] Using py3.13 and bumping deps --- pyproject.toml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 661b4f2..5f07394 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "builder" -requires-python = ">=3.9,<3.13" +requires-python = ">=3.13,<3.14" description = "Offspot Base Image Builder" readme = "README.md" dependencies = [] @@ -12,18 +12,17 @@ version = "1.0.0.dev0" [project.optional-dependencies] scripts = [ - "invoke==2.2.0", + "invoke==2.2.1", ] lint = [ - "black==24.4.0", - "ruff==0.4.1", + "ruff==0.14.0", ] check = [ - "pyright==1.1.359", + "pyright==1.1.406", ] dev = [ - "pre-commit==3.7.0", - "ipython==8.23.0", + "pre-commit==4.3.0", + "ipython==9.6.0", "builder[scripts]", "builder[lint]", "builder[check]", From 18306d70deeb51cebe324131d43eb05bc56b4447 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 15:03:56 +0000 Subject: [PATCH 05/22] Reducing post-resize sleep in succeess, increasing for failure --- tree/stage2/01-sys-tweaks/files/offspot_bi_init_resize.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tree/stage2/01-sys-tweaks/files/offspot_bi_init_resize.sh b/tree/stage2/01-sys-tweaks/files/offspot_bi_init_resize.sh index 57deb80..059d875 100644 --- a/tree/stage2/01-sys-tweaks/files/offspot_bi_init_resize.sh +++ b/tree/stage2/01-sys-tweaks/files/offspot_bi_init_resize.sh @@ -176,11 +176,11 @@ if ! check_commands; then fi if main; then - whiptail --infobox "Resized data filesystem. Rebooting in 5 seconds..." 20 60 - sleep 5 + whiptail --infobox "Resized data filesystem. Rebooting in 2 seconds..." 20 60 + sleep 2 else whiptail --msgbox "Could not recreate data filesystem Rebooting...\n${FAIL_REASON}" 20 60 - sleep 5 + sleep 10 fi reboot_pi From f9849158f838abc808d9dd98886830eb0cdd36a3 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 15:04:16 +0000 Subject: [PATCH 06/22] [WIP] Using offspot-config main --- tree/stage2/07-sys-configurator/01-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tree/stage2/07-sys-configurator/01-run.sh b/tree/stage2/07-sys-configurator/01-run.sh index 3059283..ad46b74 100755 --- a/tree/stage2/07-sys-configurator/01-run.sh +++ b/tree/stage2/07-sys-configurator/01-run.sh @@ -2,8 +2,8 @@ on_chroot << EOF python3 -m venv /usr/local/offspot-python -# /usr/local/offspot-python/bin/pip install https://github.com/offspot/offspot-config/archive/refs/heads/main.zip -/usr/local/offspot-python/bin/pip install offspot-config==2.7.0 +/usr/local/offspot-python/bin/pip install https://github.com/offspot/offspot-config/archive/refs/heads/main.zip +#/usr/local/offspot-python/bin/pip install offspot-config==2.7.0 EOF install -m 755 files/offspot-runtime.service "${ROOTFS_DIR}/etc/systemd/system/" From aa229ae38dd12b57d5ce6ce3542e2000445da4b4 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 15:18:03 +0000 Subject: [PATCH 07/22] Updated build-docker patch --- tree/build-docker.sh.patch-arm64 | 72 ++++++++++++++++---------------- tree/build-docker.sh.patch-armhf | 72 ++++++++++++++++---------------- 2 files changed, 72 insertions(+), 72 deletions(-) diff --git a/tree/build-docker.sh.patch-arm64 b/tree/build-docker.sh.patch-arm64 index 822ad90..e51ecb7 100644 --- a/tree/build-docker.sh.patch-arm64 +++ b/tree/build-docker.sh.patch-arm64 @@ -1,36 +1,36 @@ -*** tree-arm64.orig/build-docker.sh 2023-10-26 17:06:34 ---- tree/build-docker.sh 2023-10-26 17:14:07 -*************** esac -*** 105,135 **** - ;; - esac - -- # Check if qemu-aarch64-static and /proc/sys/fs/binfmt_misc are present -- if [[ "${binfmt_misc_required}" == "1" ]]; then -- if ! qemu_arm=$(which qemu-aarch64-static) ; then -- echo "qemu-aarch64-static not found (please install qemu-user-static)" -- exit 1 -- fi -- if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then -- echo "binfmt_misc required but not mounted, trying to mount it..." -- if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ; then -- echo "mounting binfmt_misc failed" -- exit 1 -- fi -- echo "binfmt_misc mounted" -- fi -- if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-aarch64* ; then -- # Register qemu-aarch64 for binfmt_misc -- reg="echo ':qemu-aarch64-rpi:M::"\ -- "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:"\ -- "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\ -- "${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register" -- echo "Registering qemu-aarch64 for binfmt_misc..." -- sudo bash -c "${reg}" 2>/dev/null || true -- fi -- fi -- - trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${DOCKER_CMDLINE_NAME}' SIGINT SIGTERM - time ${DOCKER} run \ - $DOCKER_CMDLINE_PRE \ ---- 105,110 ---- +diff --git build-docker.sh build-docker.sh +index 53f8cf7..b53fd9c 100755 +--- build-docker.sh ++++ build-docker.sh +@@ -105,31 +105,6 @@ case $(uname -m) in + ;; + esac + +-# Check if qemu-aarch64-static and /proc/sys/fs/binfmt_misc are present +-if [[ "${binfmt_misc_required}" == "1" ]]; then +- if ! qemu_arm=$(which qemu-aarch64-static) ; then +- echo "qemu-aarch64-static not found (please install qemu-user-static)" +- exit 1 +- fi +- if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then +- echo "binfmt_misc required but not mounted, trying to mount it..." +- if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ; then +- echo "mounting binfmt_misc failed" +- exit 1 +- fi +- echo "binfmt_misc mounted" +- fi +- if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-aarch64* ; then +- # Register qemu-aarch64 for binfmt_misc +- reg="echo ':qemu-aarch64-rpi:M::"\ +-"\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:"\ +-"\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\ +-"${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register" +- echo "Registering qemu-aarch64 for binfmt_misc..." +- sudo bash -c "${reg}" 2>/dev/null || true +- fi +-fi +- + trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${DOCKER_CMDLINE_NAME}' SIGINT SIGTERM + time ${DOCKER} run \ + $DOCKER_CMDLINE_PRE \ diff --git a/tree/build-docker.sh.patch-armhf b/tree/build-docker.sh.patch-armhf index 0dc9966..9922e04 100644 --- a/tree/build-docker.sh.patch-armhf +++ b/tree/build-docker.sh.patch-armhf @@ -1,36 +1,36 @@ -*** tree-armhf.orig/build-docker.sh 2023-10-26 17:07:21 ---- tree/build-docker.sh 2023-10-26 17:15:32 -*************** esac -*** 114,144 **** - ;; - esac - -- # Check if qemu-arm-static and /proc/sys/fs/binfmt_misc are present -- if [[ "${binfmt_misc_required}" == "1" ]]; then -- if ! qemu_arm=$(which qemu-arm-static) ; then -- echo "qemu-arm-static not found (please install qemu-user-static)" -- exit 1 -- fi -- if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then -- echo "binfmt_misc required but not mounted, trying to mount it..." -- if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ; then -- echo "mounting binfmt_misc failed" -- exit 1 -- fi -- echo "binfmt_misc mounted" -- fi -- if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-arm* ; then -- # Register qemu-arm for binfmt_misc -- reg="echo ':qemu-arm-rpi:M::"\ -- "\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:"\ -- "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\ -- "${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register" -- echo "Registering qemu-arm for binfmt_misc..." -- sudo bash -c "${reg}" 2>/dev/null || true -- fi -- fi -- - trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${DOCKER_CMDLINE_NAME}' SIGINT SIGTERM - time ${DOCKER} run \ - $DOCKER_CMDLINE_PRE \ ---- 114,119 ---- +diff --git build-docker.sh build-docker.sh +index 9c04651..71ced83 100755 +--- build-docker.sh ++++ build-docker.sh +@@ -114,31 +114,6 @@ case $(uname -m) in + ;; + esac + +-# Check if qemu-arm-static and /proc/sys/fs/binfmt_misc are present +-if [[ "${binfmt_misc_required}" == "1" ]]; then +- if ! qemu_arm=$(which qemu-arm-static) ; then +- echo "qemu-arm-static not found (please install qemu-user-static)" +- exit 1 +- fi +- if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then +- echo "binfmt_misc required but not mounted, trying to mount it..." +- if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ; then +- echo "mounting binfmt_misc failed" +- exit 1 +- fi +- echo "binfmt_misc mounted" +- fi +- if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-arm* ; then +- # Register qemu-arm for binfmt_misc +- reg="echo ':qemu-arm-rpi:M::"\ +-"\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:"\ +-"\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\ +-"${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register" +- echo "Registering qemu-arm for binfmt_misc..." +- sudo bash -c "${reg}" 2>/dev/null || true +- fi +-fi +- + trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${DOCKER_CMDLINE_NAME}' SIGINT SIGTERM + time ${DOCKER} run \ + $DOCKER_CMDLINE_PRE \ From 0263db9af3ec5ebcd70005782b49b97c5e8fb6fa Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 15:20:36 +0000 Subject: [PATCH 08/22] Updated apt conf for trixie --- tree/export-image/05-finalise/01-run.sh.patch | 11 ----- tree/stage0/00-configure-apt/00-run.sh.patch | 43 +++++++++--------- .../00-configure-apt/files/docker-keyring.pgp | Bin 0 -> 2760 bytes .../00-configure-apt/files/docker.sources | 6 +++ 4 files changed, 27 insertions(+), 33 deletions(-) delete mode 100644 tree/export-image/05-finalise/01-run.sh.patch create mode 100644 tree/stage0/00-configure-apt/files/docker-keyring.pgp create mode 100644 tree/stage0/00-configure-apt/files/docker.sources diff --git a/tree/export-image/05-finalise/01-run.sh.patch b/tree/export-image/05-finalise/01-run.sh.patch deleted file mode 100644 index 525534e..0000000 --- a/tree/export-image/05-finalise/01-run.sh.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- tree.orig/export-image/05-finalise/01-run.sh 2022-05-31 10:21:03.000000000 +0000 -+++ tree/export-image/05-finalise/01-run.sh 2022-07-22 12:09:02.000000000 +0000 -@@ -38,6 +38,8 @@ - - rm -f "${ROOTFS_DIR}"/var/cache/debconf/*-old - rm -f "${ROOTFS_DIR}"/var/lib/dpkg/*-old -+# remove apt lists. apt update will be necessary before any apt install -+rm -rf "${ROOTFS_DIR}"/var/lib/apt/lists/* - - rm -f "${ROOTFS_DIR}"/usr/share/icons/*/icon-theme.cache - diff --git a/tree/stage0/00-configure-apt/00-run.sh.patch b/tree/stage0/00-configure-apt/00-run.sh.patch index 4b12685..0a30d4f 100644 --- a/tree/stage0/00-configure-apt/00-run.sh.patch +++ b/tree/stage0/00-configure-apt/00-run.sh.patch @@ -1,25 +1,24 @@ ---- tree.orig/stage0/00-configure-apt/00-run.sh 2022-05-31 10:21:03.000000000 +0000 -+++ tree/stage0/00-configure-apt/00-run.sh 2022-07-11 17:18:28.000000000 +0000 -@@ -2,8 +2,12 @@ - - install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/" - install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/" -+install -m 644 files/docker.list "${ROOTFS_DIR}/etc/apt/sources.list.d/" - sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list" - sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list" -+sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/docker.list" -+sed -i "s/APT_ARCH/$(dpkg --print-architecture)/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/docker.list" -+cat "${ROOTFS_DIR}/etc/apt/sources.list.d/docker.list" - +diff --git stage0/00-configure-apt/00-run.sh stage0/00-configure-apt/00-run.sh +index f3e95b0..3a51fce 100755 +--- stage0/00-configure-apt/00-run.sh ++++ stage0/00-configure-apt/00-run.sh +@@ -3,8 +3,11 @@ + true > "${ROOTFS_DIR}/etc/apt/sources.list" + install -m 644 files/debian.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/" + install -m 644 files/raspi.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/" ++install -m 644 files/docker.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/" + sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/debian.sources" + sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.sources" ++sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/docker.sources" ++ + if [ -n "$APT_PROXY" ]; then install -m 644 files/51cache "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" -@@ -12,6 +16,8 @@ - rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" +@@ -20,6 +23,7 @@ else + rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list" fi - -+mkdir -p "${ROOTFS_DIR}/etc/apt/keyrings" -+curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor > "${ROOTFS_DIR}/etc/apt/keyrings/docker.gpg" - cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" - install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/" - on_chroot << EOF - dpkg --add-architecture arm64 + ++install -m 644 files/docker-keyring.pgp "${ROOTFS_DIR}/usr/share/keyrings/" + install -m 644 files/raspberrypi-archive-keyring.pgp "${ROOTFS_DIR}/usr/share/keyrings/" + on_chroot <<- \EOF + ARCH="$(dpkg --print-architecture)" diff --git a/tree/stage0/00-configure-apt/files/docker-keyring.pgp b/tree/stage0/00-configure-apt/files/docker-keyring.pgp new file mode 100644 index 0000000000000000000000000000000000000000..e5dc8cfda8e5d37f69956520048140c9baab9803 GIT binary patch literal 2760 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 /usr/share/keyrings/docker-keyring.pgp From fdaa901062100ca34ac68db887ee136418584192 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 15:26:07 +0000 Subject: [PATCH 09/22] Changed /etc/issue IP.issue triggers a tty prompt reload everytime there's an IP event which happens frequently with all our ifaces. This removes the IP part and improves the default prompt --- tree/stage2/01-sys-tweaks/files/IP.issue | 0 tree/stage2/01-sys-tweaks/files/issue | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 tree/stage2/01-sys-tweaks/files/IP.issue create mode 100644 tree/stage2/01-sys-tweaks/files/issue diff --git a/tree/stage2/01-sys-tweaks/files/IP.issue b/tree/stage2/01-sys-tweaks/files/IP.issue new file mode 100644 index 0000000..e69de29 diff --git a/tree/stage2/01-sys-tweaks/files/issue b/tree/stage2/01-sys-tweaks/files/issue new file mode 100644 index 0000000..ac9a6a4 --- /dev/null +++ b/tree/stage2/01-sys-tweaks/files/issue @@ -0,0 +1,2 @@ +Debian GNU/Linux 13 \e{blue}\n\e{reset} \l - \d \t + From 91d07e8f5f926e2bc9f8bc0c80005c575a01c40e Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 15:27:04 +0000 Subject: [PATCH 10/22] Disable swap --- tree/stage2/01-sys-tweaks/00-patches/02-swap.diff | 0 tree/stage2/01-sys-tweaks/files/disable-swap.conf | 3 +++ 2 files changed, 3 insertions(+) delete mode 100644 tree/stage2/01-sys-tweaks/00-patches/02-swap.diff create mode 100644 tree/stage2/01-sys-tweaks/files/disable-swap.conf diff --git a/tree/stage2/01-sys-tweaks/00-patches/02-swap.diff b/tree/stage2/01-sys-tweaks/00-patches/02-swap.diff deleted file mode 100644 index e69de29..0000000 diff --git a/tree/stage2/01-sys-tweaks/files/disable-swap.conf b/tree/stage2/01-sys-tweaks/files/disable-swap.conf new file mode 100644 index 0000000..07a4013 --- /dev/null +++ b/tree/stage2/01-sys-tweaks/files/disable-swap.conf @@ -0,0 +1,3 @@ +[Main] +# disable swap +Mechanism=none From 402ad99fcb15e146ccfe25f628da813c3b191ef4 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 15:27:32 +0000 Subject: [PATCH 11/22] disable cloud-init --- tree/stage2/04-cloud-init/00-packages.patch | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tree/stage2/04-cloud-init/00-packages.patch diff --git a/tree/stage2/04-cloud-init/00-packages.patch b/tree/stage2/04-cloud-init/00-packages.patch new file mode 100644 index 0000000..f178a67 --- /dev/null +++ b/tree/stage2/04-cloud-init/00-packages.patch @@ -0,0 +1,7 @@ +diff --git i/stage2/04-cloud-init/00-packages w/stage2/04-cloud-init/00-packages +index db064e6..8b13789 100644 +--- i/stage2/04-cloud-init/00-packages ++++ w/stage2/04-cloud-init/00-packages +@@ -1 +1 @@ +-cloud-init ++ From 5269d1e3b1ad28c77b5a3867443a10467d25d2f0 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 15:27:50 +0000 Subject: [PATCH 12/22] disable-swap2 --- packages | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages b/packages index 3b1c31b..8267474 100644 --- a/packages +++ b/packages @@ -21,10 +21,10 @@ + hostapd dnsmasq # not needed on host -- pi-bluetooth v4l-utils python3-gpiozero python3-rpi.gpio python3-v4l2 +- v4l-utils python3-gpiozero python3-rpi-lgpio # disable swap -- dphys-swapfile +# - rpi-swap # continue to use dhcpcd5 (replaced by network-manager in 2023-10) # purposedly not using `dhcpcd5` as its a virtual package with conflict from raspberry-sys-mod From 3d579c6e7ec79e2fae77a767425f385a60c38d6a Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 15:28:30 +0000 Subject: [PATCH 13/22] disable cloud-init2 and replace netplan by ifupdown --- packages | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages b/packages index 8267474..2d97e4e 100644 --- a/packages +++ b/packages @@ -11,6 +11,10 @@ + jq + tree +# replace netplan with ifupdown +- netplan.io ++ ifupdown + # docker stack: disabled in favor of balena (stage2/06-docker-tweaks) # docker-ce docker-ce-cli containerd.io docker-compose-plugin From 6c6b3c9c513cbfbfa51b20180a2df55039e01abc Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 17:52:45 +0000 Subject: [PATCH 14/22] Set WiFi country and unblock radio --- builder.py | 1 + .../00-boot-files/files/cmdline.txt.patch | 7 +++++ .../00-patches/07-resize-init.diff | 5 ---- tree/stage2/02-net-tweaks/01-run.sh.patch | 30 ++++++++++++------- 4 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 tree/stage1/00-boot-files/files/cmdline.txt.patch delete mode 100644 tree/stage2/01-sys-tweaks/00-patches/07-resize-init.diff diff --git a/builder.py b/builder.py index 760a1c8..b49b352 100755 --- a/builder.py +++ b/builder.py @@ -63,6 +63,7 @@ class Defaults: PUBKEY_SSH_FIRST_USER: str = "" PUBKEY_ONLY_SSH: str = "0" ENABLE_CLOUD_INIT: str = "0" + WPA_COUNTRY: str = "US" STAGE_LIST: str = "stage0 stage1 stage2" @property diff --git a/tree/stage1/00-boot-files/files/cmdline.txt.patch b/tree/stage1/00-boot-files/files/cmdline.txt.patch new file mode 100644 index 0000000..f5512a1 --- /dev/null +++ b/tree/stage1/00-boot-files/files/cmdline.txt.patch @@ -0,0 +1,7 @@ +diff --git stage1/00-boot-files/files/cmdline.txt stage1/00-boot-files/files/cmdline.txt +index 71b90ff..b024fc9 100644 +--- stage1/00-boot-files/files/cmdline.txt ++++ stage1/00-boot-files/files/cmdline.txt +@@ -1 +1 @@ +-console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait resize ++console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait systemd.restore_state=0 rfkill.default_state=1 quiet init=/usr/sbin/offspot_bi_init_resize.sh diff --git a/tree/stage2/01-sys-tweaks/00-patches/07-resize-init.diff b/tree/stage2/01-sys-tweaks/00-patches/07-resize-init.diff deleted file mode 100644 index 5bd20af..0000000 --- a/tree/stage2/01-sys-tweaks/00-patches/07-resize-init.diff +++ /dev/null @@ -1,5 +0,0 @@ ---- stage2.orig/rootfs/boot/firmware/cmdline.txt -+++ stage2/rootfs/boot/firmware/cmdline.txt -@@ -1 +1 @@ --console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait -+console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait quiet init=/usr/sbin/offspot_bi_init_resize.sh diff --git a/tree/stage2/02-net-tweaks/01-run.sh.patch b/tree/stage2/02-net-tweaks/01-run.sh.patch index e2cda91..9f05d0a 100644 --- a/tree/stage2/02-net-tweaks/01-run.sh.patch +++ b/tree/stage2/02-net-tweaks/01-run.sh.patch @@ -1,18 +1,28 @@ ---- tree.orig/stage2/02-net-tweaks/01-run.sh 2022-05-31 10:21:03.000000000 +0000 -+++ tree/stage2/02-net-tweaks/01-run.sh 2022-09-14 15:55:11.000000000 +0000 -@@ -35,3 +35,26 @@ - echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan" - echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan" +diff --git stage2/02-net-tweaks/01-run.sh stage2/02-net-tweaks/01-run.sh +index 1f91095..47dcff9 100755 +--- stage2/02-net-tweaks/01-run.sh ++++ stage2/02-net-tweaks/01-run.sh +@@ -11,6 +11,7 @@ for addr in 107d50c000.serial 3f215040.serial 20215040.serial fe215040.serial so + echo 0 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-${addr}:bluetooth" + done + ++# base-image sets this so we should always enter this + if [ -v WPA_COUNTRY ]; then + on_chroot <<- EOF + SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wifi_country "${WPA_COUNTRY}" +@@ -22,3 +23,24 @@ elif [ -d "${ROOTFS_DIR}/var/lib/NetworkManager" ]; then + WirelessEnabled=false + EOF fi + -+# unblock WiFi -+echo 0 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan" -+echo 0 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan" ++# unblock WiFi anyway (should have been done by raspi-config above though) ++for addr in 3f300000.mmcnr fe300000.mmcnr 1001100000.mmc; do ++ echo 0 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-${addr}:wlan" ++done + +install -m 755 files/internet-check "${ROOTFS_DIR}/usr/local/bin/" +install -m 644 files/internet-check.service "${ROOTFS_DIR}/etc/systemd/system/" + -+ +# runtime config firewall persistence (ap) +mkdir -p ${ROOTFS_DIR}/etc/iptables +install -m 644 files/iptables-restore.service "${ROOTFS_DIR}/etc/systemd/system/" @@ -24,6 +34,4 @@ +systemctl enable dhcpcd.service +systemctl unmask hostapd +systemctl disable hostapd.service dnsmasq.service iptables-restore.service -+ +EOF -+ From 3cfdd10c0aa696d6c845d6615ac735d6e6622bda Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 17:53:51 +0000 Subject: [PATCH 15/22] Updated fstab, config.txt patches --- .../00-boot-files/files/config.txt.patch | 21 ++++++++----------- tree/stage1/01-sys-tweaks/files/fstab.patch | 6 ++++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/tree/stage1/00-boot-files/files/config.txt.patch b/tree/stage1/00-boot-files/files/config.txt.patch index 4dfd41d..36db6a7 100644 --- a/tree/stage1/00-boot-files/files/config.txt.patch +++ b/tree/stage1/00-boot-files/files/config.txt.patch @@ -1,12 +1,9 @@ -*** tree.orig/stage1/00-boot-files/files/config.txt 2023-03-08 08:33:49 ---- tree/stage1/00-boot-files/files/config.txt 2023-03-08 08:36:04 -*************** -*** 1,6 **** ---- 1,7 ---- - # For more options and information see - # http://rptl.io/configtxt - # Some settings may impact device functionality. See link above for details -+ dtoverlay=i2c-rtc,pcf2127 - - # uncomment if you get no picture on HDMI for a default "safe" mode - #hdmi_safe=1 +diff --git i/stage1/00-boot-files/files/config.txt w/stage1/00-boot-files/files/config.txt +index fecd26f..0ea13f8 100644 +--- i/stage1/00-boot-files/files/config.txt ++++ w/stage1/00-boot-files/files/config.txt +@@ -49,3 +49,4 @@ otg_mode=1 + dtoverlay=dwc2,dr_mode=host + + [all] ++dtoverlay=i2c-rtc,pcf2127 diff --git a/tree/stage1/01-sys-tweaks/files/fstab.patch b/tree/stage1/01-sys-tweaks/files/fstab.patch index c1cc75e..f81194d 100644 --- a/tree/stage1/01-sys-tweaks/files/fstab.patch +++ b/tree/stage1/01-sys-tweaks/files/fstab.patch @@ -1,5 +1,7 @@ ---- tree.orig/stage1/01-sys-tweaks/files/fstab 2022-05-31 10:21:03.000000000 +0000 -+++ tree/stage1/01-sys-tweaks/files/fstab 2022-07-08 14:02:54.000000000 +0000 +diff --git stage1/01-sys-tweaks/files/fstab stage1/01-sys-tweaks/files/fstab +index 525c3bc..b20ddaf 100644 +--- stage1/01-sys-tweaks/files/fstab ++++ stage1/01-sys-tweaks/files/fstab @@ -1,3 +1,9 @@ proc /proc proc defaults 0 0 BOOTDEV /boot/firmware vfat defaults 0 2 From 4f84f88f5fd7950db385c54395a240f1714e89c5 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 17:54:05 +0000 Subject: [PATCH 16/22] Using 2025-10-01-raspios-trixie --- builder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builder.py b/builder.py index b49b352..0705cf8 100755 --- a/builder.py +++ b/builder.py @@ -30,9 +30,9 @@ def run(*args, **kwargs): class Defaults: supported_archs = ("armhf", "arm64") # using supported_archs indexes - pigen_versions = ( # ~ 2023-05-03-raspios-buster - "2024-03-15-raspios-bookworm", - "2024-03-15-raspios-bookworm-arm64", + pigen_versions = ( + "2025-10-01-raspios-trixie-armhf", + "2025-10-01-raspios-trixie-arm64", ) arch: str = "arm64" is_macos: bool = platform.system() == "Darwin" From ab6451bcf0b5315ef402c12f375411fbb78e5481 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 17:54:53 +0000 Subject: [PATCH 17/22] using disable-swap, new /etc/issue, disabling rpi-resize --- tree/stage2/01-sys-tweaks/01-run.sh.patch | 39 ++++++++++++++--------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/tree/stage2/01-sys-tweaks/01-run.sh.patch b/tree/stage2/01-sys-tweaks/01-run.sh.patch index 6339cc8..9549d87 100644 --- a/tree/stage2/01-sys-tweaks/01-run.sh.patch +++ b/tree/stage2/01-sys-tweaks/01-run.sh.patch @@ -1,12 +1,18 @@ ---- tree.orig/stage2/01-sys-tweaks/01-run.sh 2022-05-31 10:21:03.000000000 +0000 -+++ tree/stage2/01-sys-tweaks/01-run.sh 2022-07-25 14:57:50.000000000 +0000 -@@ -11,9 +11,13 @@ - - install -m 755 files/rc.local "${ROOTFS_DIR}/etc/" +diff --git stage2/01-sys-tweaks/01-run.sh stage2/01-sys-tweaks/01-run.sh +index 6da2876..2a2327d 100755 +--- stage2/01-sys-tweaks/01-run.sh ++++ stage2/01-sys-tweaks/01-run.sh +@@ -1,8 +1,17 @@ + #!/bin/bash -e +install -m 755 files/offspot.yaml "${ROOTFS_DIR}/boot/firmware/" -+ +install -m 755 files/offspot_bi_init_resize.sh "${ROOTFS_DIR}/usr/sbin/" ++ ++mkdir -p "${ROOTFS_DIR}/etc/rpi/swap.conf.d/" ++install -m 644 files/disable-swap.conf "${ROOTFS_DIR}/etc/rpi/swap.conf.d/" ++ ++install -m 644 files/issue "${ROOTFS_DIR}/etc/" ++install -m 644 files/IP.issue "${ROOTFS_DIR}/etc/issue.d/" + if [ -n "${PUBKEY_SSH_FIRST_USER}" ]; then install -v -m 0700 -o 1000 -g 1000 -d "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh @@ -15,17 +21,20 @@ chown 1000:1000 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys chmod 0600 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys fi -@@ -47,6 +52,13 @@ - systemctl enable resize2fs_once - EOF +@@ -28,8 +37,6 @@ fi + + + on_chroot <<- EOF +- systemctl enable rpi-resize +- + for GRP in input spi i2c gpio; do + groupadd -f -r "\$GRP" + done +@@ -61,3 +68,7 @@ EOF + if [ -e "${ROOTFS_DIR}/etc/avahi/avahi-daemon.conf" ]; then + sed -i 's/^#\?publish-workstation=.*/publish-workstation=yes/' "${ROOTFS_DIR}/etc/avahi/avahi-daemon.conf" fi -+on_chroot << EOF -+systemctl disable resize2fs_once -+EOF + +on_chroot << EOF +ln -s /usr/bin/vim.tiny /usr/local/bin/vim +EOF - - on_chroot < Date: Sat, 18 Oct 2025 17:55:08 +0000 Subject: [PATCH 18/22] Updating README --- CHANGELOG.md | 6 ++++++ tree/README.md | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ea9b54..eae62c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Based on pi-gen `2025-10-01-raspios-trixie` +- Using offspot-config 2.x.x - Data partition block-size now ~1Mib instead of 1KiB - Data partition reserved blocks for root to 1% instead of 5% - balena service to be started before offspot-runtime - docker-compose service not started automatically (started by offspot-runtime) +### Removed + +- Support for armhf. It's a soft removal, we just don't test it anymore. Use at own risk + ## [1.3.1] - 2025-03-25 ### Changed diff --git a/tree/README.md b/tree/README.md index bacc36f..d878261 100644 --- a/tree/README.md +++ b/tree/README.md @@ -8,4 +8,7 @@ pi-gen tree replacements ```sh diff -u path/to/original path/to/updated > tree/path/to/original.patch -``` \ No newline at end of file + +# or, if working from a git copy of the original tree (I use tree-arm54.orig) +git diff --no-prefix path/to/original > ../tree/path/to/original.patch +``` From 4dc96291ec30b935639e087f6ecf04d0672c5042 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Sat, 18 Oct 2025 18:09:57 +0000 Subject: [PATCH 19/22] Removed black (using ruff) --- .github/workflows/qa.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 5195604..23a7046 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -24,9 +24,6 @@ jobs: pip install -U pip pip install -e .[lint,scripts,check] - - name: Check black formatting - run: inv lint-black - - name: Check ruff run: inv lint-ruff From e3f2719a0dcacc115dc4c10cb04da4d9fa416507 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Mon, 20 Oct 2025 09:19:30 +0000 Subject: [PATCH 20/22] Using offspot-config 2.7.1 --- tree/stage2/07-sys-configurator/01-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tree/stage2/07-sys-configurator/01-run.sh b/tree/stage2/07-sys-configurator/01-run.sh index ad46b74..2e6af14 100755 --- a/tree/stage2/07-sys-configurator/01-run.sh +++ b/tree/stage2/07-sys-configurator/01-run.sh @@ -2,8 +2,8 @@ on_chroot << EOF python3 -m venv /usr/local/offspot-python -/usr/local/offspot-python/bin/pip install https://github.com/offspot/offspot-config/archive/refs/heads/main.zip -#/usr/local/offspot-python/bin/pip install offspot-config==2.7.0 +#/usr/local/offspot-python/bin/pip install https://github.com/offspot/offspot-config/archive/refs/heads/main.zip +/usr/local/offspot-python/bin/pip install offspot-config==2.7.1 EOF install -m 755 files/offspot-runtime.service "${ROOTFS_DIR}/etc/systemd/system/" From dd389a9585192fce9701323344ed0672e6ff498f Mon Sep 17 00:00:00 2001 From: rgaudin Date: Mon, 20 Oct 2025 09:33:02 +0000 Subject: [PATCH 21/22] Add WARN message on armhf --- builder.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builder.py b/builder.py index 0705cf8..64956f3 100755 --- a/builder.py +++ b/builder.py @@ -100,6 +100,10 @@ class Builder: def __init__(self, conf): self.conf = conf + if self.conf.arch == "armhf": + message = f"WARN: arch {self.conf.arch} is not tested. Use at own risk" + print(f"\033[91m{message}\033[0m", flush=True) # noqa: T201 + def run(self): # stop builder right away if target file already exists if self.conf.output.exists(): From cbeb4851ce24cf548db5cd2ed52f589ce70e02c8 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Mon, 20 Oct 2025 09:33:39 +0000 Subject: [PATCH 22/22] return result of build for process --- builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder.py b/builder.py index 64956f3..44e2825 100755 --- a/builder.py +++ b/builder.py @@ -126,7 +126,7 @@ def run(self): f"starting pi-gen build with {config_path}\n{config_path.read_text()}" ) - self.build() + return self.build() def download_pigen(self): """clone requested version of Pi-gen"""