Files
Thomas Vincent 064352af0c feat: add idiomatic Debian packaging (#435)
Fixes #440

Adds idiomatic Debian packaging under packaging/debian/.

To build a .deb, symlink the directory to the source root first:

    ln -s packaging/debian debian
    dpkg-buildpackage -us -uc -b

Files: control, rules (debhelper 13, bootstrap+configure override,
setuid fix in dh_fixperms), cacti-spine.install, cacti-spine.manpages,
changelog, copyright (DEP-5, GPL-2.0-or-later + BSD-4-Clause for
nft_popen), postinst (seeds /etc/spine.conf from .dist on first
install), prerm.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-03-11 20:35:29 +00:00

20 lines
478 B
Bash

#!/bin/sh
set -e
case "$1" in
configure)
# Grant CAP_NET_RAW via file capability so spine can open raw ICMP
# sockets without running setuid-root.
if [ -f /usr/sbin/spine ]; then
setcap cap_net_raw+eip /usr/sbin/spine
fi
# Create default config if not present
if [ ! -f /etc/spine.conf ]; then
cp /etc/spine.conf.dist /etc/spine.conf 2>/dev/null || true
fi
;;
esac
#DEBHELPER#
exit 0