Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-30 Thread Bastian Blank
On Thu, Dec 30, 2021 at 09:19:35PM +0100, Marco d'Itri wrote:
> systemd-resolved is supposed to forward queries to the upstream resolver 
> and always be available on 127.0.0.53, so what does actually change in 
> resolve.conf when using it?

Only if you are using the stub resolver.  systemd-resolved can also
update a resolv.conf with the real resolver.  Okay, you loose a lot of
flexibility then, because resolv.conf can't redirect domains to
different name servers, but you can do that.

Bastian

-- 
... bacteriological warfare ... hard to believe we were once foolish
enough to play around with that.
-- McCoy, "The Omega Glory", stardate unknown



Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-30 Thread Marco d'Itri
On Dec 30, Scott Kitterman  wrote:

> I would too.  It would be nice if systemd-resolved had some mechanism to 
> support this kind of functionality.  If you're going to replace resolvconf, 
> then you ought to actually replace it.
systemd-resolved is supposed to forward queries to the upstream resolver 
and always be available on 127.0.0.53, so what does actually change in 
resolve.conf when using it?

-- 
ciao,
Marco


signature.asc
Description: PGP signature


Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-30 Thread Michael Biebl

On 29.12.21 22:35, Scott Kitterman wrote:

The postfix package ships a script in /etc/resolvconf/update-libc.d/ to restart
postfix when resolv.conf is updated.


Why copy the file? Couldn't you bind mount it into the chroot so you 
don't need to update it everytime the host /etc/resolv.conf changes?





OpenPGP_signature
Description: OpenPGP digital signature


Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-30 Thread Bastian Blank
On Thu, Dec 30, 2021 at 08:26:07AM -0500, Scott Kitterman wrote:
> > Maybe you should stop supporting the non-standard chroot configuration?
> What do you mean by non-standard?  It's true that the upstream default is now 
> not in the chroot, but it's totally a configuration supported by upstream.  

chroot is non-standard configuration in Postfix and was discuoraged for
a lot of years before that.  Exactly because of problems like that.

> How would you suggest handling upgrades?  I've no idea how to determine if an 
> installation is chrooted because the administrator wanted it chrooted or if 
> it's merely because that's been the default in Debian for over 20 years.

You error out if postconf -M show chroot enabled.

> I believe I can solve this problem by adding Recommends: resolvconf if that's 
> the only way.  I had hoped there would be some "modern" way to do it from 
> within Debian's default package set.

No, it can't be solved this way, as resolvconf and systemd-resolved do
not communicate.

Bastian

-- 
The more complex the mind, the greater the need for the simplicity of play.
-- Kirk, "Shore Leave", stardate 3025.8



Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-30 Thread Scott Kitterman
On Thursday, December 30, 2021 9:01:07 AM EST David Bremner wrote:
> Scott Kitterman  writes:
> > I believe I can solve this problem by adding Recommends: resolvconf if
> > that's the only way.  I had hoped there would be some "modern" way to do
> > it from within Debian's default package set.
> 
> I hope that wouldn't interfere with an enabled systemd-resolved,
> otherwise that seems likely to cause some breakage.

I would too.  It would be nice if systemd-resolved had some mechanism to 
support this kind of functionality.  If you're going to replace resolvconf, 
then you ought to actually replace it.

Scott K

signature.asc
Description: This is a digitally signed message part.


Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-30 Thread Scott Kitterman
On Thursday, December 30, 2021 8:50:48 AM EST Bjørn Mork wrote:
> Scott Kitterman  writes:
> > I believe I can solve this problem by adding Recommends: resolvconf if
> > that's the only way.  I had hoped there would be some "modern" way to do
> > it from within Debian's default package set.
> 
> Funny.  That seems to have been the solution to this bug almost 20 years
> ago too: https://bugs.debian.org/154669

Yes.  Exactly.  I'm not sure where we lost it and I'll put it back if that's 
the most correct solution, but it seems suboptimal since another package is 
now managing resolv.conf in our default install.

Scott K

signature.asc
Description: This is a digitally signed message part.


Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-30 Thread David Bremner
Scott Kitterman  writes:

> I believe I can solve this problem by adding Recommends: resolvconf if that's 
> the only way.  I had hoped there would be some "modern" way to do it from 
> within Debian's default package set.

I hope that wouldn't interfere with an enabled systemd-resolved,
otherwise that seems likely to cause some breakage.

d



Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-30 Thread Bjørn Mork
Scott Kitterman  writes:

> I believe I can solve this problem by adding Recommends: resolvconf if that's 
> the only way.  I had hoped there would be some "modern" way to do it from 
> within Debian's default package set.

Funny.  That seems to have been the solution to this bug almost 20 years
ago too: https://bugs.debian.org/154669


Bjørn



Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-30 Thread Scott Kitterman
On Thursday, December 30, 2021 2:36:45 AM EST Bastian Blank wrote:
> On Thu, Dec 30, 2021 at 01:48:49AM +, Scott Kitterman wrote:
> > It does.  My question is on the other end of the problem.  Once
> > resolv.conf is updated, how do I trigger an action for another package? 
> > In this case it's copy the updated resolv.conf into the chroot and
> > restart postfix.  I know how to do everything except for the trigger.
> Maybe you should stop supporting the non-standard chroot configuration?

What do you mean by non-standard?  It's true that the upstream default is now 
not in the chroot, but it's totally a configuration supported by upstream.  

How would you suggest handling upgrades?  I've no idea how to determine if an 
installation is chrooted because the administrator wanted it chrooted or if 
it's merely because that's been the default in Debian for over 20 years.

I believe I can solve this problem by adding Recommends: resolvconf if that's 
the only way.  I had hoped there would be some "modern" way to do it from 
within Debian's default package set.

Scott K

signature.asc
Description: This is a digitally signed message part.


Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-30 Thread Scott Kitterman
On Thursday, December 30, 2021 2:35:56 AM EST Bastian Blank wrote:
> On Wed, Dec 29, 2021 at 04:35:22PM -0500, Scott Kitterman wrote:
> > The postfix package ships a script in /etc/resolvconf/update-libc.d/ to
> > restart postfix when resolv.conf is updated.  As far as I know, that
> > still works if the resolvconf package is installed, but if not (i.e.
> > Debian default), what's the equivalent?  Does systemd-resolved have an
> > equivalent?  Should users that want this functionality install
> > resolvconf?
> 
> Why do you need to restart services on resolv.conf changes?  The libc
> resolver takes care of it by re-reading the file after it changed.

Because postfix doesn't.  Also, the copy of the file in the chroot needs to be 
updated.

Scott K

signature.asc
Description: This is a digitally signed message part.


Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-29 Thread Bastian Blank
On Thu, Dec 30, 2021 at 01:48:49AM +, Scott Kitterman wrote:
> It does.  My question is on the other end of the problem.  Once resolv.conf 
> is updated, how do I trigger an action for another package?  In this case 
> it's copy the updated resolv.conf into the chroot and restart postfix.  I 
> know how to do everything except for the trigger.

Maybe you should stop supporting the non-standard chroot configuration?

Bastian

-- 
"... freedom ... is a worship word..."
"It is our worship word too."
-- Cloud William and Kirk, "The Omega Glory", stardate unknown



Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-29 Thread Bastian Blank
On Wed, Dec 29, 2021 at 04:35:22PM -0500, Scott Kitterman wrote:
> The postfix package ships a script in /etc/resolvconf/update-libc.d/ to 
> restart 
> postfix when resolv.conf is updated.  As far as I know, that still works if 
> the 
> resolvconf package is installed, but if not (i.e. Debian default), what's the 
> equivalent?  Does systemd-resolved have an equivalent?  Should users that 
> want 
> this functionality install resolvconf?

Why do you need to restart services on resolv.conf changes?  The libc
resolver takes care of it by re-reading the file after it changed.

Bastian

-- 
Actual war is a very messy business.  Very, very messy business.
-- Kirk, "A Taste of Armageddon", stardate 3193.0



Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-29 Thread Scott Kitterman



On December 30, 2021 1:19:45 AM UTC, Adam Borowski  wrote:
>On Wed, Dec 29, 2021 at 04:35:22PM -0500, Scott Kitterman wrote:
>> The postfix package ships a script in /etc/resolvconf/update-libc.d/ to 
>> restart 
>> postfix when resolv.conf is updated.  As far as I know, that still works if 
>> the 
>> resolvconf package is installed, but if not (i.e. Debian default), what's 
>> the 
>> equivalent?  Does systemd-resolved have an equivalent?  Should users that 
>> want 
>> this functionality install resolvconf?
>
>The whole point is resolvconf is to be a common interface between producers:
>* ifup/ifdown
>* DHCP clients
>* PPP daemon
>* local name servers
>and consumers:
>* DNS caches
>* resolver libraries (including glibc)
>
>If systemd-resolved doesn't interface with resolvconf yet, then these tools
>should be taught to pass data, instead of inventing a yet another
>user-facing interface.

It does.  My question is on the other end of the problem.  Once resolv.conf is 
updated, how do I trigger an action for another package?  In this case it's 
copy the updated resolv.conf into the chroot and restart postfix.  I know how 
to do everything except for the trigger.

Scott K



Re: etc/resolvconf/update-libc.d/ equivalent for systemd-resolved

2021-12-29 Thread Adam Borowski
On Wed, Dec 29, 2021 at 04:35:22PM -0500, Scott Kitterman wrote:
> The postfix package ships a script in /etc/resolvconf/update-libc.d/ to 
> restart 
> postfix when resolv.conf is updated.  As far as I know, that still works if 
> the 
> resolvconf package is installed, but if not (i.e. Debian default), what's the 
> equivalent?  Does systemd-resolved have an equivalent?  Should users that 
> want 
> this functionality install resolvconf?

The whole point is resolvconf is to be a common interface between producers:
* ifup/ifdown
* DHCP clients
* PPP daemon
* local name servers
and consumers:
* DNS caches
* resolver libraries (including glibc)

If systemd-resolved doesn't interface with resolvconf yet, then these tools
should be taught to pass data, instead of inventing a yet another
user-facing interface.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ No matter if fathered by Abdes Pantera or a deity, Jesus
⢿⡄⠘⠷⠚⠋⠀ was a bastard.
⠈⠳⣄