On 2/22/21 9:12 PM, Lennart Poettering wrote: > Quite frankly, I am not sure it would be a good idea to do things that > way. > > note that resolved should be fine as a resolvconf replacement, even if > you don't want to use it as a resolver: just set the /etc/resolv.conf > symlink to /run/systemd/resolve/resolv.conf (instead of the usual > /run/systemd/resolve/stub-resolv.conf) and you get the upstream > servers listed there, as any other resolvconf implementation would do > it. I am aware it can work like that. But it still requires systemd-resolved to be enabled, while it does nothing more than listening for interface events. Even when some other DNS cache running on localhost. Openresolv can provide also split-dns configuration for dnsmasq, unbound, named, powerdns (recursor). Or just no local cache, in size 64k. > > The thing is, there's a bunch of software these days that can talk to > to resolved's D-Bus interface to set DNS servers and such. You lose > all that if you insist that systemd-resolved is so terrible that you > cannot even use it as a resolvconf reimplementation, that is more than > a bunch of shell scripts. I never proposed D-Bus API. I think DNS (RFC 1035) works well enough to provide name resolution. I would recommend DNS library instead of proprietary D-Bus API personally. I am trying to find common solution with ability to support different implementations. Implementing common D-Bus protocol in every cache seems unrealistic to me. Common interface able to pass domains and addresses tuples seems possible with resolvconf, with minimal overhead or added complexity. > > Another option might be > https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/ btw. > > Lennart > > -- > Lennart Poettering, Berlin I know about alternatives. I would kindly point you to filled bug #1923727 [1], which already requests Alternatives support from systemd. Openresolv already supports it [2]. Problem with alternatives is, it can handle quite poorly situation, where both openresolv and systemd-resolved are removed or disabled. Let's take for example file from openvpn package: /usr/share/doc/openvpn/contrib/pull-resolv-conf/client.up Close to the end is resolvconf handling. I would like something similar to be part of installed packages, for example dhcp-client. It should handle states: - systemd-resolved enabled and active (default configuration), providing split- DNS - dnsmasq + openresolv configured, providing split-DNS * no local cache running and no resolvconf enabled Problem is with *starred* option. How to tell packages to handle resolv.conf manually? How to update /usr/sbin/dhclient-script, function change_resolv_conf()? How can I use alternatives and check resolvconf is enabled? And keep it simple and maintainable in various VPN providers? Openvpn variant is simple and elegant, but requires ability to remove resolvconf, when not used. Current systemd does not pass such requirement. 1. https://bugzilla.redhat.com/show_bug.cgi?id=1923727 2. https://src.fedoraproject.org/rpms/openresolv/blob/rawhide/f/openresolv.spec#_56 -- Petr Menšík Software Engineer Red Hat, http://www.redhat.com/ email: pemensik@xxxxxxxxxx PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure