From 2072c0eae55a6f9dc35a971d14dda128acaa93a2 Mon Sep 17 00:00:00 2001 From: CyberMind Date: Tue, 19 May 2026 06:53:31 +0200 Subject: [PATCH] fix(eye-square): relocate firstboot.sh out of /usr/local/sbin/ (closes #207) (#208) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Debian policy reserves /usr/local/ for the local administrator; packages may not install files there. dh_usrlocal was correctly rejecting the staged tree built from remote-ui/square/files/. Move: remote-ui/square/files/usr/local/sbin/firstboot.sh → remote-ui/square/files/usr/lib/secubox/firstboot.sh Update ExecStart in secubox-firstboot.service to match. The new location is namespaced under /usr/lib/secubox/ consistent with the sister helpers find-usb-serial and leasewatch.sh shipped by secubox-system. Bump 1.0.2 → 1.0.3. Local dpkg-buildpackage now produces a valid .deb; `dpkg-deb -c` confirms: - /usr/lib/secubox/firstboot.sh (0755) - /etc/systemd/system/secubox-firstboot.service (with new ExecStart) - no entries under /usr/local/ Co-authored-by: CyberMind-FR Co-authored-by: Claude Opus 4.7 (1M context) --- packages/secubox-eye-square/debian/changelog | 12 ++++++++++++ .../etc/systemd/system/secubox-firstboot.service | 4 ++-- .../usr/{local/sbin => lib/secubox}/firstboot.sh | 0 3 files changed, 14 insertions(+), 2 deletions(-) rename remote-ui/square/files/usr/{local/sbin => lib/secubox}/firstboot.sh (100%) diff --git a/packages/secubox-eye-square/debian/changelog b/packages/secubox-eye-square/debian/changelog index 28d1c24f..85a6b11e 100644 --- a/packages/secubox-eye-square/debian/changelog +++ b/packages/secubox-eye-square/debian/changelog @@ -1,3 +1,15 @@ +secubox-eye-square (1.0.3-1~bookworm1) bookworm; urgency=medium + + * Relocate firstboot.sh from /usr/local/sbin/ to /usr/lib/secubox/ + (Debian policy reserves /usr/local/ for the local admin; dh_usrlocal + was rejecting the staged tree). Update ExecStart in + secubox-firstboot.service to match the new path. The new location + is namespaced under /usr/lib/secubox/ consistent with sister + helpers (find-usb-serial, leasewatch.sh). + * Closes #207. + + -- Gerald KERMA Tue, 19 May 2026 06:55:00 +0200 + secubox-eye-square (1.0.2-1~bookworm1) bookworm; urgency=medium * Fix debian/rules content drift: drop the install block for diff --git a/remote-ui/square/files/etc/systemd/system/secubox-firstboot.service b/remote-ui/square/files/etc/systemd/system/secubox-firstboot.service index c96dd2d7..76c1c2e1 100644 --- a/remote-ui/square/files/etc/systemd/system/secubox-firstboot.service +++ b/remote-ui/square/files/etc/systemd/system/secubox-firstboot.service @@ -2,7 +2,7 @@ # SPDX-License-Identifier: LicenseRef-CMSD-1.0 # Copyright (c) 2026 CyberMind — Gérald Kerma # -# Runs /usr/local/sbin/firstboot.sh once on first boot. The script is idempotent +# Runs /usr/lib/secubox/firstboot.sh once on first boot. The script is idempotent # (guards on /etc/.secubox-eye-square-firstboot-done), so a second invocation is a no-op. [Unit] @@ -13,7 +13,7 @@ ConditionPathExists=!/etc/.secubox-eye-square-firstboot-done [Service] Type=oneshot RemainAfterExit=no -ExecStart=/usr/local/sbin/firstboot.sh +ExecStart=/usr/lib/secubox/firstboot.sh [Install] WantedBy=multi-user.target diff --git a/remote-ui/square/files/usr/local/sbin/firstboot.sh b/remote-ui/square/files/usr/lib/secubox/firstboot.sh similarity index 100% rename from remote-ui/square/files/usr/local/sbin/firstboot.sh rename to remote-ui/square/files/usr/lib/secubox/firstboot.sh