Subject: Curl Feature Regression in Alpine 3.16+

From: Frederick Lafleche <[email-masked]>
Date: Fri, 13 Jan 2023 12:01:12 -0500

Hi,

I just noticed that since Alpine release 3.16.x the curl option
--dns-server does not work anymore. The following error message is
displayed:

       curl: option --dns-server: the installed libcurl version
doesn't support this

After some investigation I found that Curl (7.83.x) changed how the
build manages c-ares.

       configure: remove support for "embedded ares" #8397
       https://github.com/curl/curl/pull/8397)

Based on the commit comment the option --enable-ares must now be
explicitly given.

I'm now wondering how to proceed. Is this something that can be
changed in Alpine? Should a defect be opened? Submit a patch? What
would be the preferred method?

Thank you in advance,

Fred

-- 

Avis de confidentialité

Les
 informations contenues dans le présent 
message et dans toute pièce qui 
lui est jointe sont confidentielles et 
peuvent être protégées par le 
secret professionnel. Ces informations sont 
à l’usage exclusif de son ou
 de ses destinataires. Si vous recevez ce 
message par erreur, veuillez 
s’il vous plait communiquer immédiatement 
avec l’expéditeur et en 
détruire tout exemplaire. De plus, il vous est 
strictement interdit de 
le divulguer, de le distribuer ou de le reproduire 
sans l’autorisation 
de l’expéditeur. Merci.

Confidentiality notice

This
 e-mail message and any attachment hereto contain confidential 
information 
which may be privileged and which is intended for the 
exclusive use of its 
addressee(s). If you receive this message in error,
 please inform sender 
immediately and destroy any copy thereof. 
Furthermore, any disclosure, 
distribution or copying of this message 
and/or any attachment hereto 
without the consent of the sender is 
strictly prohibited. Thank you.

---

From: Kevin Daudt <[email-masked]>
Date: Fri, 13 Jan 2023 20:32:28 +0000

If I look at the buildlogs for curl on 3.15[0] or 3.14[1], I see:

> checking whether to enable c-ares for DNS lookups... no

so c-ares was not enabled then either. The pull request that you refer
to mentions:

> In March 2010 (commit 4259d2d) we removed the embedded 'ares'
> directory from the curl source tree 

So c-ares was already not embedded for a long time, and hence, could not
have been used.

The history of the curl package also does not show c-ares was ever
pulled in as a dependency. So my conclusion is that whatever has changed
since 3.16, it's not the lack of c-ares that causes the issue.

Comparing the configure output of those buildlogs, I do not see any
obvious differences which could explain why it's no longer supported.

This issue[2] mentions:

> The option --dns-servers only works if libcurl was built to use c-ares
> and it seems your build does not. Previously curl would just silently
> ignore that problem, but it still wouldn't (couldn't) use the option.

So apparently, it would have never worked, curl just didn't complain
about it.

Kevin

[0]:https://build.alpinelinux.org/buildlogs/build-3-15-x86_64/main/curl/curl-7.80.0-r5.log
[1]:https://build.alpinelinux.org/buildlogs/build-3-14-x86_64/main/curl/curl-7.79.1-r4.log
[2]:https://github.com/curl/curl/issues/8551#issuecomment-1060280243