LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.
C cdebiandesktop-environmentebpffirewalllandlocklinuxlinux-distributionopen-sourceprivacyquickjsraspberry-pi-5reactsecuritywaylandwayland-compositor
Pi image on an x86-64 host with an aarch64 server/build: check the signed code with a host lord-server (CODE_CHECK_SERVER) and strip with aarch64-linux-gnu-strip (the package shipped unstripped, 17 MB instead of 11 MB)
Federico Pereira0229779120fa
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 1c67fd2..e1dd3be 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,18 @@ of the matching [GitHub release](https://github.com/lordbasex/LordOS/releases),## [Unreleased]+### Fixed++- **Raspberry Pi image on an x86-64 host with an aarch64 `server/build`:** `tools/iso/mkdeb.sh` checks the+ signed system code by running `lord-server --check-code`, which can't run an aarch64 binary on x86-64+ (it failed as "the staged system code does not match code-manifest.json"). `CODE_CHECK_SERVER` now names+ a `lord-server` built for the host from the same tree, and `tools/rpi/build-img.sh` asks for it instead of+ failing later. Found building the 0.8.5 image; the check itself is unchanged (`docs/SIGNING.md`).+- **Same build, unstripped binaries:** `mkdeb.sh` stripped with the host's `strip`, which can't read aarch64+ binaries and whose errors are ignored, so that package shipped every binary with its symbols (17 MB+ instead of 11 MB, the same files). It now uses `aarch64-linux-gnu-strip` when it packages arm64 on another+ architecture, and stops if it is missing.+## [0.8.5-beta] - 2026-10-27### Addeddiff --git a/docs/SIGNING.md b/docs/SIGNING.mdindex 322f66a..7c82299 100644--- a/docs/SIGNING.md+++ b/docs/SIGNING.md@@ -315,7 +315,10 @@ noise of the build without the check (727–870 ms against 745–855 ms).3. `REQUIRE_SIGNED_CODE=1 tools/iso/mkdeb.sh` installs both files into `/usr/lib/lordos/` and runs`lord-server --check-code` on the staged tree: the `.deb` is not built if a bundle doesn't matchor (release build) the signature is missing. The ISO and the Raspberry Pi image install that `.deb`- (`tools/rpi/build-img.sh` passes `RELEASE` and `REQUIRE_SIGNED_CODE` to its arm64 chroot).+ (`tools/rpi/build-img.sh` passes `RELEASE` and `REQUIRE_SIGNED_CODE` to its arm64 chroot). An x86-64+ host packaging an `server/build` already compiled for aarch64 can't run that `lord-server`, so it+ sets `CODE_CHECK_SERVER` to a `lord-server` built for the host from the same tree: the check reads+ only the bundles and the signature, which are the same on both architectures.See [RELEASING.md](RELEASING.md), step 3.diff --git a/tools/iso/mkdeb.sh b/tools/iso/mkdeb.shindex 15b2068..97a647e 100755--- a/tools/iso/mkdeb.sh+++ b/tools/iso/mkdeb.sh@@ -61,44 +61,51 @@ install -m 755 server/build/lord-sessiond "$L/bin/lord-sessiond"install -m 755 server/build/lord-netd "$L/bin/lord-netd"install -m 755 server/build/lord-netperm "$L/bin/lord-netperm"install -m 755 server/build/lord-fand "$L/bin/lord-fand"+# strip for the package's architecture: the host's strip can't read another architecture's binaries+# (an aarch64 server/build packaged on x86-64 by tools/rpi/build-img.sh), and its errors are ignored below+STRIP=strip+if [ "${DEB_ARCH:-}" = arm64 ] && [ "$(dpkg --print-architecture)" != arm64 ]; then+ STRIP=aarch64-linux-gnu-strip+ command -v "$STRIP" > /dev/null || { echo "missing $STRIP (binutils-aarch64-linux-gnu)" >&2; exit 1; }+fi# the LordOS Imager's first-run file applier (Raspberry Pi image, rpi/firstboot; docs/IMAGER.md)install -m 755 server/build/lordos-firstrun "$L/bin/lordos-firstrun"# System Information's report for a terminal, SSH or CI; lord-server never runs itinstall -d "$PKG/usr/bin"install -m 755 server/build/lordos-sysreport "$PKG/usr/bin/lordos-sysreport"-strip --strip-unneeded "$PKG/usr/bin/lordos-sysreport" 2>/dev/null || true+"$STRIP" --strip-unneeded "$PKG/usr/bin/lordos-sysreport" 2>/dev/null || trueln -s lordos-sysreport "$PKG/usr/bin/lordos-fetch"# the visual test bench: a plain Wayland client, launched like any Linux app[ -x server/build/lordos-testbench ] && {install -m 755 server/build/lordos-testbench "$PKG/usr/bin/lordos-testbench"- strip --strip-unneeded "$PKG/usr/bin/lordos-testbench" 2>/dev/null || true+ "$STRIP" --strip-unneeded "$PKG/usr/bin/lordos-testbench" 2>/dev/null || trueinstall -d "$PKG/usr/share/applications"install -m 644 packaging/desktop/lordos-testbench.desktop "$PKG/usr/share/applications/lordos-testbench.desktop"}# isolated PDF and archive helper (optional: make skips it without libpoppler-glib-dev/libarchive-dev);# lord-server only launches the lord-doc in its own folder[ -x server/build/lord-doc ] && install -m 755 server/build/lord-doc "$L/bin/lord-doc"-strip --strip-unneeded "$L/bin/lord-server" "$L/bin/lord-sessiond" "$L/bin/lord-netd" "$L/bin/lord-netperm" "$L/bin/lord-fand" "$L/bin/lordos-firstrun" 2>/dev/null || true-[ -x "$L/bin/lord-doc" ] && { strip --strip-unneeded "$L/bin/lord-doc" 2>/dev/null || true; }+"$STRIP" --strip-unneeded "$L/bin/lord-server" "$L/bin/lord-sessiond" "$L/bin/lord-netd" "$L/bin/lord-netperm" "$L/bin/lord-fand" "$L/bin/lordos-firstrun" 2>/dev/null || true+[ -x "$L/bin/lord-doc" ] && { "$STRIP" --strip-unneeded "$L/bin/lord-doc" 2>/dev/null || true; }# lord-server only launches the lord-media in its own folder (media: video, photos, camera, recorder)[ -x server/build/lord-media ] && install -m 755 server/build/lord-media "$L/bin/lord-media"-[ -x "$L/bin/lord-media" ] && { strip --strip-unneeded "$L/bin/lord-media" 2>/dev/null || true; }+[ -x "$L/bin/lord-media" ] && { "$STRIP" --strip-unneeded "$L/bin/lord-media" 2>/dev/null || true; }# lord-vault: Passwords and the system keyring (docs/PASSWORDS.md); lord-server only launches the one in its own folder[ -x server/build/lord-vault ] && install -m 755 server/build/lord-vault "$L/bin/lord-vault"-[ -x "$L/bin/lord-vault" ] && { strip --strip-unneeded "$L/bin/lord-vault" 2>/dev/null || true; }+[ -x "$L/bin/lord-vault" ] && { "$STRIP" --strip-unneeded "$L/bin/lord-vault" 2>/dev/null || true; }# lord-maild: IMAP/SMTP/CalDAV/CardDAV with TLS for Mail (docs/MAIL.md); lord-server only launches the one in its own folder[ -x server/build/lord-maild ] && install -m 755 server/build/lord-maild "$L/bin/lord-maild"-[ -x "$L/bin/lord-maild" ] && { strip --strip-unneeded "$L/bin/lord-maild" 2>/dev/null || true; }+[ -x "$L/bin/lord-maild" ] && { "$STRIP" --strip-unneeded "$L/bin/lord-maild" 2>/dev/null || true; }# lord-fetch (0.8.5): downloads the subscribed blocklists over HTTPS, sandboxed (docs/FIREWALL.md, "Blocklists")[ -x server/build/lord-fetch ] && install -m 755 server/build/lord-fetch "$L/bin/lord-fetch"-[ -x "$L/bin/lord-fetch" ] && { strip --strip-unneeded "$L/bin/lord-fetch" 2>/dev/null || true; }+[ -x "$L/bin/lord-fetch" ] && { "$STRIP" --strip-unneeded "$L/bin/lord-fetch" 2>/dev/null || true; }# the app catalog (0.8.5, apt/): Store → Artificial Intelligence; pkg-source-add reads it as rootinstall -d "$L/apt/keys"install -m 644 apt/catalog.json "$L/apt/catalog.json"for k in apt/keys/*.asc; do install -m 644 "$k" "$L/apt/keys/"; done# lord-tls (0.8.5): HTTPS for the package engine's downloads, sandboxed (docs/PACKAGES.md, "HTTPS")[ -x server/build/lord-tls ] && install -m 755 server/build/lord-tls "$L/bin/lord-tls"-[ -x "$L/bin/lord-tls" ] && { strip --strip-unneeded "$L/bin/lord-tls" 2>/dev/null || true; }+[ -x "$L/bin/lord-tls" ] && { "$STRIP" --strip-unneeded "$L/bin/lord-tls" 2>/dev/null || true; }# FIDO2 security keys reachable by the session user (lord-sessiond sessions have no logind seat)install -d "$PKG/usr/lib/udev/rules.d"install -m 644 packaging/udev/71-lordos-fido.rules "$PKG/usr/lib/udev/rules.d/71-lordos-fido.rules"@@ -132,7 +139,10 @@ install -m 644 code-manifest.json "$L/code-manifest.json"if [ "${REQUIRE_SIGNED_CODE:-0}" = 1 ] && [ ! -f "$L/code-manifest.sig" ]; thenecho "missing code-manifest.sig: sign the manifest on the maintainer's machine (tools/release/sign-code.sh)" >&2; exit 1fi-server/build/lord-server --check-code "$L" > "$PKG/code-check.log" 2>&1 || {+# the check is the same on any architecture: building another architecture's package on this host+# (tools/rpi/build-img.sh on x86-64 with an aarch64 server/build), CODE_CHECK_SERVER names a+# lord-server built for this host from the same tree+"${CODE_CHECK_SERVER:-server/build/lord-server}" --check-code "$L" > "$PKG/code-check.log" 2>&1 || {tail -20 "$PKG/code-check.log" >&2; echo "the staged system code does not match code-manifest.json" >&2; exit 1; }tail -1 "$PKG/code-check.log"; rm -f "$PKG/code-check.log"install -m 755 tools/iso/rootfs/usr/lib/lordos/lordos-live-prep "$L/lordos-live-prep"diff --git a/tools/rpi/build-img.sh b/tools/rpi/build-img.shindex f8c00e1..7542885 100755--- a/tools/rpi/build-img.sh+++ b/tools/rpi/build-img.sh@@ -16,7 +16,9 @@# image before it grows on boot, 512), RPI_SSH=1 (SSH server on from the start, for development;# otherwise it ships off and the `ssh` switch file turns it on), RPI_KEY_NOCHECK=1 (do not verify# the Raspberry Pi archive key fingerprint; not recommended), KERNEL_DEBS (folder with the LordOS-# kernel packages from tools/rpi/build-kernel.sh, default /var/tmp/lordos-kernel/out).+# kernel packages from tools/rpi/build-kernel.sh, default /var/tmp/lordos-kernel/out), CODE_CHECK_SERVER+# (an x86-64 host with an aarch64 server/build: a lord-server built for the host from the same tree,+# used only to check the signed system code; docs/SIGNING.md).## Kernel: the LordOS build of the Raspberry Pi kernel (with Landlock, the BPF LSM and BTF) when its# .debs are in $KERNEL_DEBS; otherwise Raspberry Pi's archive kernel, which has none of them (a loud@@ -172,6 +174,10 @@ is_aarch64() { # aarch64 ELF (e_machine = 0xb7)[ -f themes/greeter/theme.bundle.js ] || { echo "build-img.sh: themes missing (npm run build on the development machine)" >&2; exit 1; }if is_aarch64 server/build/lord-server && is_aarch64 server/build/lord-sessiond; thenecho "== lord-server: using server/build (already aarch64)"+ # mkdeb.sh checks the signed system code with lord-server, which can't run here on x86-64+ if [ "$NATIVE" = 0 ] && [ ! -x "${CODE_CHECK_SERVER:-}" ]; then+ echo "build-img.sh: server/build is aarch64 on an $(uname -m) host: set CODE_CHECK_SERVER to a lord-server built for this host from the same tree" >&2; exit 1+ fiDEB_ARCH=$ARCH sh tools/iso/mkdeb.sh "$DEB"elseecho "== lord-server: building in an arm64 chroot ($BR)"@@ -401,7 +407,7 @@ if [ "${RPI_SSH:-0}" = 1 ]; then in_root "$CH" systemctl enable ssh.service > /dumount_ch "$CH"# ---- 4. the image: MBR, 512 MiB FAT32 (bootfs) + ext4 (rootfs) -----echo "== imagen"+echo "== image"ROOT_MB=$(( $(du -sm "$CH" | cut -f1) - $(du -sm "$CH/boot/firmware" | cut -f1) ))BOOT_MB=512SIZE_MB=$((4 + BOOT_MB + ROOT_MB * 115 / 100 + IMG_EXTRA_MB))