Skip to content

fix: package the D-Bus system policy required for a fresh headless install#3

Open
tekgnosis-net wants to merge 1 commit into
ananthb:mainfrom
tekgnosis-net:feat/headless-packaging
Open

fix: package the D-Bus system policy required for a fresh headless install#3
tekgnosis-net wants to merge 1 commit into
ananthb:mainfrom
tekgnosis-net:feat/headless-packaging

Conversation

@tekgnosis-net

Copy link
Copy Markdown

Problem

The daemon runs on the system bus ([dbus] bus = "system") and must own org.ht32panel.Daemon. On the system bus, owning a name requires an explicit D-Bus policy — but the deb/rpm packages don't ship one. So on a fresh package install the daemon fails to register its bus name (and ht32panelctl / the web UI can't reach it) until an admin hand-writes a policy under /etc/dbus-1/system.d/. (Found while deploying on a headless Proxmox host.)

Changes

  • Add packaging/org.ht32panel.Daemon.conf — a minimal system-bus policy: root may own org.ht32panel.Daemon; local clients may call it and receive its signals.
  • Install it to /usr/share/dbus-1/system.d/org.ht32panel.Daemon.conf via nfpm.yaml (deb + rpm).
  • Add a postinstall hook that reloads systemd, D-Bus (so the policy applies without a reboot), and udev. It does not auto-enable the service — the package ships config.toml.example, so the admin creates config.toml then runs systemctl enable --now ht32-panel.service.
  • Stage the two new files in the release workflow.

Testing

  • Policy XML is well-formed; nfpm.yaml parses with the new content entry and scripts.postinstall; postinstall.sh passes sh -n.
  • This exact policy (hand-installed) is what let the daemon successfully own org.ht32panel.Daemon on a live system-bus deployment; this PR ships it so fresh installs work out of the box.

The daemon runs on the system bus and must own org.ht32panel.Daemon, which
requires an explicit D-Bus policy; without it a fresh package install fails to
register the service. Add packaging/org.ht32panel.Daemon.conf, install it to
/usr/share/dbus-1/system.d/, and add a postinstall hook that reloads systemd,
D-Bus, and udev so it takes effect without a reboot. Stage the new files in
the release workflow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant