fix(packaging): address code review findings
- Upgrade path restarts only fenris-collect.timer, not fenris-collect.service (spec §7: "a running oneshot finishes on its old interpreter") - Remove redundant deb depends override in nfpm.yaml (top-level is sufficient) - Remove common.sh sourcing — scripts are self-contained to avoid path dependency when dpkg/rpm run them from /var/lib/dpkg/info/ Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
This commit is contained in:
co-authored by
CommandCodeBot
parent
babc8eeeb1
commit
8fa86c3bf8
@@ -1,20 +1,13 @@
|
||||
#!/bin/sh
|
||||
# RPM %postun — post-uninstall scriptlet (spec §7).
|
||||
#
|
||||
# On erase ($1 -eq 0): remove config (unmodified removed, modified as .rpmsave),
|
||||
# store, backups, and group.
|
||||
# On upgrade ($1 -ge 1): daemon-reload only.
|
||||
set -eu
|
||||
|
||||
if [ "$1" -eq 0 ]; then
|
||||
# Package fully erased
|
||||
# Package fully erased — remove config, store, group
|
||||
rm -rf /etc/fenris
|
||||
rm -rf /var/lib/fenris
|
||||
# Remove the fenris group if it exists
|
||||
if getent group fenris > /dev/null 2>&1; then
|
||||
groupdel fenris 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
||||
# Always daemon-reload (units may have been removed)
|
||||
systemctl daemon-reload 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user