diff --git a/Fix-build-with-libnettle-3.5.patch b/Fix-build-with-libnettle-3.5.patch new file mode 100644 index 0000000..0c310e8 --- /dev/null +++ b/Fix-build-with-libnettle-3.5.patch @@ -0,0 +1,41 @@ +From: Vladislav Grishenko +Date: Wed, 26 Jun 2019 15:27:11 +0000 (+0500) +Subject: Fix build with libnettle 3.5 +X-Git-Url: http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff_plain;h=ab73a746a0d6fcac2e682c5548eeb87fb9c9c82e;hp=69bc94779c2f035a9fffdb5327a54c3aeca73ed5 + +Fix build with libnettle 3.5 +--- + +diff --git a/src/crypto.c b/src/crypto.c +index ebb871e..fecc64a 100644 +--- a/src/crypto.c ++++ b/src/crypto.c +@@ -275,6 +275,10 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len + static struct ecc_point *key_256 = NULL, *key_384 = NULL; + static mpz_t x, y; + static struct dsa_signature *sig_struct; ++#if NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 4 ++#define nettle_get_secp_256r1() (&nettle_secp_256r1) ++#define nettle_get_secp_384r1() (&nettle_secp_384r1) ++#endif + + if (!sig_struct) + { +@@ -294,7 +298,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len + if (!(key_256 = whine_malloc(sizeof(struct ecc_point)))) + return 0; + +- nettle_ecc_point_init(key_256, &nettle_secp_256r1); ++ nettle_ecc_point_init(key_256, nettle_get_secp_256r1()); + } + + key = key_256; +@@ -307,7 +311,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len + if (!(key_384 = whine_malloc(sizeof(struct ecc_point)))) + return 0; + +- nettle_ecc_point_init(key_384, &nettle_secp_384r1); ++ nettle_ecc_point_init(key_384, nettle_get_secp_384r1()); + } + + key = key_384; diff --git a/dnsmasq.changes b/dnsmasq.changes index ee3c51e..3b6c2eb 100644 --- a/dnsmasq.changes +++ b/dnsmasq.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Sep 4 18:47:39 UTC 2019 - Stefan BrĂ¼ns + +- Add Fix-build-with-libnettle-3.5.patch + ------------------------------------------------------------------- Tue Jul 23 13:52:05 UTC 2019 - matthias.gerstner@suse.com diff --git a/dnsmasq.spec b/dnsmasq.spec index de40dd0..03badad 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -23,7 +23,6 @@ Group: Productivity/Networking/DNS/Servers Version: 2.80 Release: 0 Provides: dns_daemon -PreReq: /usr/sbin/useradd /bin/mkdir Url: http://www.thekelleys.org.uk/dnsmasq/ Source0: http://www.thekelleys.org.uk/%{name}/%{name}-%{version}.tar.xz Source1: http://www.thekelleys.org.uk/%{name}/%{name}-%{version}.tar.xz.asc @@ -34,6 +33,8 @@ Source5: rc.dnsmasq-suse Source8: %{name}-rpmlintrc Patch0: dnsmasq-groups.patch Patch1: 0001-fix-build-after-y2038-changes-in-glibc.patch +# PATCH-FIX-UPSTREAM -- http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=ab73a746a0d6fcac2e682c5548eeb87fb9c9c82e +Patch2: Fix-build-with-libnettle-3.5.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: dbus-1-devel BuildRequires: dos2unix @@ -42,11 +43,9 @@ BuildRequires: libnettle-devel BuildRequires: lua-devel BuildRequires: pkg-config BuildRequires: pkgconfig(libnetfilter_conntrack) -Requires(pre): group(nogroup) -%if 0%{?suse_version} >= 1210 BuildRequires: pkgconfig(systemd) -%endif Requires(pre): group(nogroup) +Requires(pre): /usr/sbin/useradd %description Dnsmasq provides network infrastructure for small networks: DNS, @@ -69,6 +68,7 @@ server's leases. %setup -q %patch0 %patch1 -p1 +%patch2 -p1 # Remove the executable bit from python example files to # avoid unwanted automatic dependencies @@ -82,7 +82,7 @@ sed -i -e 's|\(PREFIX *= *\)/usr/local|\1/usr|; s|$(LDFLAGS)|$(CFLAGS) $(LDFLAGS)|' \ Makefile -# use lua5.3 instead of lua5.3 +# use lua5.3 instead of lua5.2 sed -i -e 's|lua5.2|lua5.3|' Makefile # SED-FIX-UPSTREAM -- Fix man page @@ -170,7 +170,6 @@ rm -rf contrib/MacOSX-launchd %find_lang %{name} --with-man %files -f %{name}.lang -%defattr(-,root,root,-) %license COPYING COPYING-v3 %doc CHANGELOG FAQ doc.html setup.html dnsmasq.conf.example contrib dbus %config(noreplace) %{_sysconfdir}/dnsmasq.conf @@ -187,7 +186,6 @@ rm -rf contrib/MacOSX-launchd %dir %attr(0755,tftp,tftp) /srv/tftpboot %files utils -%defattr(-,root,root,-) %{_bindir}/dhcp_* %{_mandir}/man1/dhcp_*