mirror of
https://github.com/jmcorgan/fips.git
synced 2026-10-06 03:28:24 +00:00
Removing the .deb while fips-dns was not running left the resolver's .fips routing file in place. prerm stops fips-dns, but systemd runs its teardown only for an active unit, and postrm cleaned up the routing only on purge. After an apt remove the resolver kept sending .fips queries to [::1]:5354, where nothing listens once the daemon is gone, so .fips lookups timed out until the file was deleted by hand. postrm now runs the DNS cleanup on both remove and purge. A purge of an installed package runs remove and then purge; the second pass finds no file and restarts nothing. A purge of a package already removed runs only the purge pass, which still cleans up. Configuration, keys and the fips group are still removed only on purge. The deb-install check now removes the package with the routing planted and fips-dns stopped, then plants the routing again and purges from config-files state, so each postrm branch is exercised on its own. The packaging text test reads the remove|purge branch.