Compare commits

...
Author SHA1 Message Date
MickLesk 067ddf764e deCONZ: start in privileged Incus containers, skip an update with nothing new
The postinst gives /usr/bin/deCONZ the sys_time and sys_boot file caps; a
privileged Incus container lacks them in its bounding set, so exec failed
with 'Operation not permitted'. The service runs as root and needs none, so
an apt hook drops them after every dpkg run. The update now upgrades deconz
only when a newer version exists.
2026-11-17 14:52:21 +01:00
MickLesk 26a2c0b76f Fetch libssl1.1 for deCONZ over HTTPS on arm64 2026-11-17 14:16:58 +01:00
2 changed files with 27 additions and 6 deletions

No files matched your search

+19 -3
View File
@@ -29,11 +29,27 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating deCONZ"
msg_info "Updating Package Index"
apt_update_safe
$STD apt upgrade -y
msg_ok "Updated Package Index"
CURRENT=$(dpkg-query -W -f='${Version}' deconz 2>/dev/null)
CANDIDATE=$(apt-cache policy deconz | awk '/Candidate:/{print $2}')
if [[ -z "$CANDIDATE" || "$CANDIDATE" == "(none)" ]]; then
msg_error "No candidate version found for deconz"
exit
fi
if [[ "$CURRENT" == "$CANDIDATE" ]]; then
msg_ok "Already on latest version: ${CURRENT}"
exit
fi
msg_info "Updating deCONZ"
$STD apt install -y --only-upgrade deconz
setcap -r /usr/bin/deCONZ 2>/dev/null || true
systemctl restart deconz
msg_ok "Updated deCONZ"
msg_ok "Updated successfully!"
msg_ok "Updated successfully from ${CURRENT} to ${CANDIDATE}!"
exit
}
+8 -3
View File
@@ -22,9 +22,14 @@ setup_deb822_repo \
msg_ok "Setup Phoscon Repository"
msg_info "Installing deConz"
pool="$(arch_resolve "https://security.ubuntu.com/ubuntu/pool/main/o/openssl/" "http://ports.ubuntu.com/ubuntu-ports/pool/main/o/openssl/")"
libssl=$(curl -fsSL --proto '=http,https' "$pool" | grep -o "libssl1\.1_1\.1\.1f-1ubuntu2\.2[^\"]*$(arch_resolve)\.deb" | head -n1)
curl -fsSL --proto '=http,https' "$pool$libssl" -o "$libssl"
# deCONZ runs as root; the file caps its postinst sets (sys_time, sys_boot) are
# outside a privileged Incus container's bounding set and make exec fail.
cat <<'EOF' >/etc/apt/apt.conf.d/99-deconz-no-filecaps
DPkg::Post-Invoke { "setcap -r /usr/bin/deCONZ 2>/dev/null || true"; };
EOF
pool="$(arch_resolve "https://security.ubuntu.com/ubuntu/pool/main/o/openssl/" "https://ports.ubuntu.com/ubuntu-ports/pool/main/o/openssl/")"
libssl=$(curl -fsSL --proto '=https' "$pool" | grep -o "libssl1\.1_1\.1\.1f-1ubuntu2\.2[^\"]*$(arch_resolve)\.deb" | head -n1)
curl -fsSL --proto '=https' "$pool$libssl" -o "$libssl"
$STD dpkg -i "$libssl"
$STD apt install -y deconz
rm -rf "$libssl"