secubox-deb/packages/secubox-daemon/debian/secubox-daemon-c3box.postinst
CyberMind-FR a110f7c55a fix(daemon): rename secubox-c3box → secubox-daemon-c3box (closes #378)
packages/secubox-daemon/ declared a secondary binary package named
secubox-c3box, but packages/secubox-c3box/ is also a distinct source
package (the Python FastAPI dashboard) that produces a .deb with the
same name. dpkg only allows one binary named secubox-c3box on a host
at a time, so whichever package the build matrix produced last would
silently displace the other on install.

The two packages do completely different things: the Go variant ships
/usr/bin/c3box (Situational Awareness for the WireGuard mesh) and
depends on secubox-daemon; the Python variant ships
/usr/lib/secubox/c3box/ (FastAPI Services Portal) and depends on
secubox-core. File paths don't overlap, but the binary-package-name
collision does.

Rename the Go variant to secubox-daemon-c3box, matching Debian's
source-binary disambiguation convention (cf. linux → linux-image-*).
The Python secubox-c3box keeps the canonical name.

Add Conflicts: secubox-c3box (<< 1.1~) so an old install is removed
cleanly when the new package lands. Operators that currently have
both produce-paths in their build matrix should install only one
package per host.

Files touched:
  - packages/secubox-daemon/debian/control       (Package: stanza
    rename + Conflicts: + description update)
  - packages/secubox-daemon/debian/rules         (debian/secubox-c3box/
    install paths → debian/secubox-daemon-c3box/)
  - debian/secubox-c3box.{postinst,prerm}        (git mv to
    secubox-daemon-c3box.{postinst,prerm})

Surfaced by the Phase 1 consolidation audit (commit a85129f5).
2026-05-27 07:23:57 +02:00

12 lines
175 B
Bash

#!/bin/bash
set -e
case "$1" in
configure)
systemctl daemon-reload
systemctl enable c3box.service
systemctl start c3box.service || true
;;
esac
#DEBHELPER#