Bug 1548060 - dnsmasq fails with older version of nettle rpm
Summary: dnsmasq fails with older version of nettle rpm
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnsmasq
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Menšík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1556888 (view as bug list)
Depends On:
Blocks: 1549190
TreeView+ depends on / blocked
 
Reported: 2018-02-22 15:55 UTC by Dusty Mabe
Modified: 2018-04-01 19:06 UTC (History)
11 users (show)

Fixed In Version: dnsmasq-2.79-1.fc27 dnsmasq-2.79-1.fc28
Clone Of:
: 1549190 (view as bug list)
Environment:
Last Closed: 2018-03-27 20:05:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch fixing unintended usage of nettle_get_hash (1.69 KB, patch)
2018-03-15 16:53 UTC, Petr Menšík
no flags Details | Diff

Description Dusty Mabe 2018-02-22 15:55:41 UTC
Description of problem:

If you install dnsmasq on a system without a fully up to date nettle rpm then you get an error. 


```
[root@localhost ~]# dnf install dnsmasq                            
...
Installed:
  dnsmasq.x86_64 2.78-2.fc27                                                                                                                                                                                                                                                   

Complete!
[root@localhost ~]# dnsmasq --version
dnsmasq: relocation error: dnsmasq: symbol nettle_get_hashes, version NETTLE_6 not defined in file libnettle.so.6 with link time reference
[root@localhost ~]# rpm -q nettle dnsmasq
nettle-3.3-5.fc27.x86_64
dnsmasq-2.78-2.fc27.x86_64
```

It might be a good idea to require a minimum version of nettle to not hit this problem.

Comment 1 Itamar Reis Peixoto 2018-02-23 03:52:21 UTC
I am just looking arround, and I have something to say.

dnsmasq buildrequires nettle-devel, and nettle-devel requires nettle.

after dnsmasq finish compiling,  rpm see that's dnsmasq is linked with libnettle.so.6
and add a requires libnettle.so.6()(64bit), so my opinion here is -> 

rpm should see who owns libnettle.so.6 ->

rpm -qf /usr/lib64/libnettle.so.6
 nettle-3.4-1.fc27.x86_64

in my opinion rpm should add nettle-3.4-1.fc27.x86_64 into requires.

what do you think about ?

Comment 2 Dusty Mabe 2018-02-23 04:05:16 UTC
(In reply to Itamar Reis Peixoto from comment #1)

> what do you think about ?

I honestly don't know. Just figured I would report what I found. Maybe nettle made a breaking change in the middle of a release?

Comment 3 Petr Menšík 2018-02-26 16:07:45 UTC
No, it should not. RPM will try to find any package that provides libnettle.so.6 library. You can try "rpm -q --requires dnsmasq" command to see what packages are required. And then "dnf repoquery --whatprovides 'libnettle.so.6()(64bit)'" to search what can provide this library. RPM can work this out correctly.

This trouble is about nettle_hashes symbol. Failure in dnsmasq is that it uses array directly. It changed to using function nettle_get_hashes@NETTLE_6 automatically with a newer build. It changed from referencing original array to function returning only start pointer. That is a good thing, because the array is not good for dynamic linking. Problem is that version of library should have been raised with that change. Because old library still provides exactly the same library as more recent one. But it is not backward compatible. Dnsmasq without change it its code had different dependencies with more recent nettle after recent build.

$ dnf repoquery --provides nettle-3.4-1.fc27.x86_64 | grep nettle
Last metadata expiration check: 0:35:30 ago on Mon 26 Feb 2018 04:22:49 PM CET.
libnettle.so.6()(64bit)
libnettle.so.6(NETTLE_6)(64bit)
nettle = 3.4-1.fc27
nettle(x86-64) = 3.4-1.fc27

$ LANG=en_US.UTF-8 dnf repoquery --provides nettle-3.3-5.fc27.x86_64 | grep nettle
Last metadata expiration check: 0:36:11 ago on Mon 26 Feb 2018 04:22:49 PM CET.
libnettle.so.6()(64bit)
libnettle.so.6(NETTLE_6)(64bit)
nettle = 3.3-5.fc27
nettle(x86-64) = 3.3-5.fc27

This is why will RPM allow you to install older version, which in fact cannot satisfy dependencies.

I will update dnsmasq to always use explicitly nettle_get_hashes and require nettle >= 3.4, since which this function is available. I think failure is on nettle build.

Comment 4 Petr Menšík 2018-03-02 13:01:16 UTC
Patch posted to upstream

http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2018q1/012020.html

Comment 5 Petr Menšík 2018-03-15 15:00:03 UTC
*** Bug 1556888 has been marked as a duplicate of this bug. ***

Comment 6 Petr Menšík 2018-03-15 16:53:17 UTC
Created attachment 1408497 [details]
patch fixing unintended usage of nettle_get_hash

Comment 7 Petr Menšík 2018-03-15 17:59:50 UTC
Proposed fix is at:

https://src.fedoraproject.org/fork/pemensik/rpms/dnsmasq/branch/rhbz1548060

Waiting on upstream opinion to prevent future conflicts.

Comment 8 Lukas Slebodnik 2018-03-15 19:47:16 UTC
(In reply to Petr Menšík from comment #7)
> Proposed fix is at:
> 
> https://src.fedoraproject.org/fork/pemensik/rpms/dnsmasq/branch/rhbz1548060
> 
> Waiting on upstream opinion to prevent future conflicts.

I am not sure whetherthey will be able to workaround issue which is in nettle itself.
https://bugzilla.redhat.com/show_bug.cgi?id=1556890

Comment 9 Petr Menšík 2018-03-15 20:01:16 UTC
(In reply to Lukas Slebodnik from comment #8)
> I am not sure whetherthey will be able to workaround issue which is in
> nettle itself.
> https://bugzilla.redhat.com/show_bug.cgi?id=1556890

By the way I already filled similar bug #1549190 to nettle, but yours is better documented.

Comment 10 Fedora Update System 2018-03-22 19:21:37 UTC
dnsmasq-2.79-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5a4d0ee124

Comment 11 Fedora Update System 2018-03-22 19:22:58 UTC
dnsmasq-2.79-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-bb556fd888

Comment 12 Fedora Update System 2018-03-23 14:44:22 UTC
dnsmasq-2.79-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5a4d0ee124

Comment 13 Fedora Update System 2018-03-23 17:46:46 UTC
dnsmasq-2.79-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-bb556fd888

Comment 14 Fedora Update System 2018-03-27 20:05:41 UTC
dnsmasq-2.79-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2018-04-01 19:06:13 UTC
dnsmasq-2.79-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.