Hi Laurent, On Mon, Jan 06, 2025 at 12:27:19PM +0100, Laurent Bigonville wrote: > I'm not opposed on resolved having mDNS features enabled by default (well > modulo privacy questions), it's more the fact that my understanding until > now was that having one package configure default features of an other > package like was not really allowed.
In principle, I agree with your concern. However in this case, Luca Boccassi (with a systemd maintainer hat) suggested that you configure systemd-resolved from avahi-daemon. I read this as implied consent. We may as well reconfirm explicitly. Luca, could you (re)confirm that you agree to avahi-daemon installing a systemd-resolved configuration file for disabling mDNS? > Regarding the predictability, I guess that can be two fold: > 1) Linked to the previous point, an unrelated package changes the > configuration of an other package In principle, I agree, but here avahi-daemon is not entirely unrelated. It feels more like installing rsyslog on a system that already has systemd-journald. There, behaviour or journald is changed (at runtime) to forward messages to rsyslog. > 2) Should the resolved configuration snippets be installed in /etc (as a > conffile) or in /usr. With the former there is a risk that the conffile is > not purged leading to user confusion. But a conffile is maybe not necessary > as configuration in /etc should override the one in /usr I know that Luca is working on "hermetic /usr" where the goal is to empty /etc as much as possible. As a result, I suggest that /usr is the better location. In particular, removing avahi-daemon will immediately remove a /usr snippet but you'd have to install a postrm remove handler for removing the /etc snippet when avahi-daemon gets removed but not purged. If in doubt, I suggest asking Luca. > If we are going with using the configuration snippet, one renaming question > would be about the value of the "MulticastDNS=" option, should we keep the > mDNS resolving part of resolved or disable it completely? That would > probably require to check whether the nsswitch.conf file is OK to avoid > duplication (mdns4_minimal nss plugin is installed (Recommends) by default > by task-desktop, like avahi). May I defer this to Luca as well? One question that I still have here is how systemd-resolved learns about the configuration change. Say it is already running with mDNS enabled, it needs to be reloaded (or restarted?) before starting avahi. That likely incurs code to avahi-daemon.postinst (and likewise avahi-daemon.postrm). I hope this is also something Luca can help with sorting out. In any case, this looks like we are narrowing down details on a consensual solution. Helmut