Let's check what happens when a user uses ./configure --enable-apparmor:
fdns binary ends up in /usr/local/bin/fdns
apparmor files go to /usr/local/etc/apparmor.d/{usr.bin.fdns,local/usr.bin.fdns}
systemd unit ends up in /usr/local/etc/fdns/fdns.service
Problems:
/usr/local/etc/apparmor.d/usr.bin.fdns refers to /usr/bin/fdns and /etc/fdns/**, both of which are NON-EXISTING paths on such a setup, breaking apparmor support
even though ./configure --help states that without the --systemd=DIR option, a copy of the unit file is installed in ${sysconfdir}/fdns directory, that file itself references ExecStart=/usr/bin/fdns, which obviously does not exist
IMHO we should improve the current configuration logic and avoid such breakage.
After a few recent commits (https://github.com/netblue30/fdns/commit/ab483585b3050ac8338ad27d3f6ab357ee9cf05d and https://github.com/netblue30/fdns/commit/318ee24ae32cb5898687333e52b6bb2ce18e3553) it dawned on me that our configure logic seems to assume
--prefix=/usr
is present. If that prefix is absent (which is the default if not explicitly added when packaging), things start to break rather badly. Especially theapparmor
files and thesystemd
unit are affected.Let's check what happens when a user uses
./configure --enable-apparmor
:Problems:
IMHO we should improve the current configuration logic and avoid such breakage.