Accepting request 1220578 from server:dns

- update to 1.8.4:
  * Fix Resolver uses nameserver commented out in /etc/resolv.conf
  * Added RESINFO rrtype
  * Added WALLET rrtype
  * Added NXNAME rrtype
  * Fix static code analysis findings, and developer visible fixes
  * improve 'next-label' algorithm in ldns-walk
  * Add functions to extract RFC 8914 extended errors
  * Build system fixes and fixes for dependencies
- upstreamed, droped: ldns-swig-4.2.patch, ldns-swig-32bit.patch
- ldns-1.8.4-swig-3.4.0.patch: fix build with Swig 3.4.0 [boo#1231584]

OBS-URL: https://build.opensuse.org/request/show/1220578
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ldns?expand=0&rev=20
This commit is contained in:
Ana Guerrero 2024-11-05 14:40:40 +00:00 committed by Git OBS Bridge
commit d05b366b1b
9 changed files with 158 additions and 127 deletions

BIN
ldns-1.8.3.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE3DTuXbJBe8wVHlEA5fj4IS93pJgFAmL6IjQACgkQ5fj4IS93
pJhiJA//eHb2+DVUz4StIrTwfCd5VSe0xETUkg2m3qfUT+7+blf/w+8aRzN6dwhQ
bs44URFgmpy2dKUlC9Q2sCKX5RxLFI/8JnXWenaofIw/n320F0YhBN/kewH+8YTN
KN9CMFbEsAR1ortzPPsM4r56JeHgcTwEwwIhYX+WaC9n6QMqk7pJVC+B6vrW1Gjc
7loZ0vD1CeLSTKZrt9aknlQEjBe0CSpCAVOBlrh/fPghv9p0slIq6Ovol6Kt2w88
OeheBWf6g/Ll4g1ke41VE40e3SETW5KxHsxyIuhUltaUyJHzpmrGac6ydoctipzT
nJzwPA9PUIt+dX2qOKlUDD7PwRIGqmOG1pV6x0wz7eJq7tIjPgxgNk+xF2rTKjyt
m3bRGgBOzYf0raOE1yGtnyanAtI9BK6HbsaEuLxsZswzNWByZ9Fgp5sOK5iTswQO
xl2nhH9chyf0ktxbHvla6zZIi/Jj1mAumiZbkWUg6LHnIORYOqdeKByCg/aFHuNX
t7IDpO9VL+EPdrrhnynX+JDRbAxxarQAYqOsi+ARWyygQ0tON+UyxJ2vtEoFQFhG
LMQoal2h9mohYl5pJoWigsnPKdN4JMIhyxEyAS5HreDoeB8YX8x64cuvySVkUlyr
Qi7eByrJuyw9YdWt8iWOO6chokzw9S3jOyuYiKH/G9cqMDpRgAY=
=lSAh
-----END PGP SIGNATURE-----

113
ldns-1.8.4-swig-3.4.0.patch Normal file
View File

@ -0,0 +1,113 @@
From 8f98152d325f464bc1a20e17236a232f32e91703 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Wed, 23 Oct 2024 23:08:54 +0200
Subject: [PATCH] Use SWIG_AppendOutput to support swig 4.3
Swig has changed language specific AppendOutput functions. But helper
macro SWIG_AppendOutput remains unchanged. Use that everywhere instead
of SWIG_Python_AppendOutput, which would require one extra parameter
since swig 4.3.0.
https://github.com/swig/swig/blob/v4.3.0/CHANGES.current#L376
https://github.com/swig/swig/issues/2905
---
contrib/python/ldns_buffer.i | 2 +-
contrib/python/ldns_key.i | 2 +-
contrib/python/ldns_packet.i | 2 +-
contrib/python/ldns_rdf.i | 2 +-
contrib/python/ldns_resolver.i | 2 +-
contrib/python/ldns_rr.i | 2 +-
contrib/python/ldns_zone.i | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/contrib/python/ldns_buffer.i b/contrib/python/ldns_buffer.i
index 5c2d583b..0a3e3895 100644
--- a/contrib/python/ldns_buffer.i
+++ b/contrib/python/ldns_buffer.i
@@ -45,7 +45,7 @@
/* Result generation, appends (ldns_buffer *) after the result. */
%typemap(argout, noblock=1) (ldns_buffer **)
{
- $result = SWIG_Python_AppendOutput($result,
+ $result = SWIG_AppendOutput($result,
SWIG_NewPointerObj(SWIG_as_voidptr($1_buf),
SWIGTYPE_p_ldns_struct_buffer, SWIG_POINTER_OWN | 0));
}
diff --git a/contrib/python/ldns_key.i b/contrib/python/ldns_key.i
index dc67e67b..6a3c2db4 100644
--- a/contrib/python/ldns_key.i
+++ b/contrib/python/ldns_key.i
@@ -38,7 +38,7 @@
/* result generation */
%typemap(argout,noblock=1) (ldns_key **)
{
- $result = SWIG_Python_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_key), SWIGTYPE_p_ldns_struct_key, SWIG_POINTER_OWN | 0 ));
+ $result = SWIG_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_key), SWIGTYPE_p_ldns_struct_key, SWIG_POINTER_OWN | 0 ));
}
%typemap(argout) ldns_rdf *r "Py_INCREF($input);"
diff --git a/contrib/python/ldns_packet.i b/contrib/python/ldns_packet.i
index c2d7a3b6..8309808d 100644
--- a/contrib/python/ldns_packet.i
+++ b/contrib/python/ldns_packet.i
@@ -45,7 +45,7 @@
/* Result generation, appends (ldns_pkt *) after the result. */
%typemap(argout,noblock=1) (ldns_pkt **)
{
- $result = SWIG_Python_AppendOutput($result,
+ $result = SWIG_AppendOutput($result,
SWIG_NewPointerObj(SWIG_as_voidptr($1_pkt),
SWIGTYPE_p_ldns_struct_pkt, SWIG_POINTER_OWN | 0 ));
}
diff --git a/contrib/python/ldns_rdf.i b/contrib/python/ldns_rdf.i
index 39f9af18..ed1f0d00 100644
--- a/contrib/python/ldns_rdf.i
+++ b/contrib/python/ldns_rdf.i
@@ -45,7 +45,7 @@
/* Result generation, appends (ldns_rdf *) after the result. */
%typemap(argout, noblock=1) (ldns_rdf **)
{
- $result = SWIG_Python_AppendOutput($result,
+ $result = SWIG_AppendOutput($result,
SWIG_NewPointerObj(SWIG_as_voidptr($1_rdf),
SWIGTYPE_p_ldns_struct_rdf, SWIG_POINTER_OWN | 0));
}
diff --git a/contrib/python/ldns_resolver.i b/contrib/python/ldns_resolver.i
index 8468cce3..8d0abc6e 100644
--- a/contrib/python/ldns_resolver.i
+++ b/contrib/python/ldns_resolver.i
@@ -45,7 +45,7 @@
/* Result generation, appends (ldns_resolver *) after the result. */
%typemap(argout,noblock=1) (ldns_resolver **r)
{
- $result = SWIG_Python_AppendOutput($result,
+ $result = SWIG_AppendOutput($result,
SWIG_NewPointerObj(SWIG_as_voidptr($1_res),
SWIGTYPE_p_ldns_struct_resolver, SWIG_POINTER_OWN | 0 ));
}
diff --git a/contrib/python/ldns_rr.i b/contrib/python/ldns_rr.i
index 2e0a0714..c53955cf 100644
--- a/contrib/python/ldns_rr.i
+++ b/contrib/python/ldns_rr.i
@@ -45,7 +45,7 @@
/* Result generation, appends (ldns_rr *) after the result. */
%typemap(argout, noblock=1) (ldns_rr **)
{
- $result = SWIG_Python_AppendOutput($result,
+ $result = SWIG_AppendOutput($result,
SWIG_NewPointerObj(SWIG_as_voidptr($1_rr),
SWIGTYPE_p_ldns_struct_rr, SWIG_POINTER_OWN | 0 ));
}
diff --git a/contrib/python/ldns_zone.i b/contrib/python/ldns_zone.i
index bbb8d8f2..3459478a 100644
--- a/contrib/python/ldns_zone.i
+++ b/contrib/python/ldns_zone.i
@@ -39,7 +39,7 @@
/* result generation */
%typemap(argout,noblock=1) (ldns_zone **)
{
- $result = SWIG_Python_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_zone), SWIGTYPE_p_ldns_struct_zone, SWIG_POINTER_OWN | 0 ));
+ $result = SWIG_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_zone), SWIGTYPE_p_ldns_struct_zone, SWIG_POINTER_OWN | 0 ));
}
%nodefaultctor ldns_struct_zone; //no default constructor & destructor

3
ldns-1.8.4.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:838b907594baaff1cd767e95466a7745998ae64bc74be038dccc62e2de2e4247
size 1301058

16
ldns-1.8.4.tar.gz.asc Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE3DTuXbJBe8wVHlEA5fj4IS93pJgFAmabRi4ACgkQ5fj4IS93
pJiTTQ/+Oq6CRH4LJccxpbKAPaLFicUZzfY2zYO4OjY0yFQuYqVc1OWIdJbYQdZp
ouX45FhXAklYZiqQYniE7HdImDZNecWBHPtjgrc+jpfsIgx6wzU0tUHzXRWXv3sZ
1JV8D+xs+9r9LP4XfN643fpIltC4a2wYLsv97cp5mtAdPp5vnNkSZkCMvYrX+A3c
fapVZfpFLiJ9Su/sM2zUIM3XuKanA2Dc3DKctxnjNHG6CLnERZLoVXURItXkItNU
qo8yu6xoEYLSwE70Z/H5EWn3nqFvHVkaxNOBDSEMLFCp1dbddV2F+zFg8UsCMgUS
A2SqzXGAdBczKlOVrXkuBgMIQd0uvekSsuc2YU+bS2qiQIEuIbGoaqyUgFvVGwTB
s4NQEkBl59eqJf5J6m3sE/ScquxO0eyAu/F8DMqwUMCsDBcFrLG0jewZrSBNQxuQ
pys1efHJiFCCLuYX7gWz65vrdl99b2TOzGfDnNsZoafJ1TtSWcJTd6XuAgk0yGTi
zdiJAmOjCAvt5D0yS5zJYYtbWosYKR4Fn/fiTOk9uwUw6AXQFcAiibRnFX0Xk+E9
TsoMEpM/OAQADPtThRKRHBWKAEhKpNbiGosxLBTDofKdCmlvspQxfbQzSyow6NyK
+sgLbXdrcUtzu0E1ZC0LXvQF2AlxqyvGF8W3dfeAuK033N4fcbI=
=q3pY
-----END PGP SIGNATURE-----

View File

@ -1,33 +0,0 @@
From f91f61e10be595a6a46845112aaed7da24551bf9 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Fri, 26 Jan 2024 11:57:03 +0100
Subject: [PATCH] 32-bit compatibility for Python SWIG bindings
Upstream: https://github.com/NLnetLabs/ldns/pull/233
References: boo#1225794
The ssize_t type can be int instead of long, and the pointer
types are incompatible.
---
contrib/python/ldns.i | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/python/ldns.i b/contrib/python/ldns.i
index 881ba5e85..b4a740820 100644
--- a/contrib/python/ldns.i
+++ b/contrib/python/ldns.i
@@ -99,12 +99,14 @@
%typemap(in, noblock=1) (ssize_t)
{
int $1_res = 0;
- $1_res = SWIG_AsVal_long($input, &$1);
+ long val;
+ $1_res = SWIG_AsVal_long($input, &val);
if (!SWIG_IsOK($1_res)) {
SWIG_exception_fail(SWIG_ArgError($1_res), "in method '"
"$symname" "', argument " "$argnum" " of type '"
"$type""'");
}
+ $1 = val;
}

View File

@ -1,67 +0,0 @@
From daf38095763f758c77be538da25c267dc5cb73c8 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Fri, 26 Jan 2024 11:30:39 +0100
Subject: [PATCH] SWIG_Python_str_AsChar removal in SWIG 4.2.0
Upstream: https://github.com/NLnetLabs/ldns/pull/232
References: boo#1225794
The replacement, SWIG_PyUnicode_AsUTF8AndSize, has different
memory management requirements.
---
contrib/python/ldns_rdf.i | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/contrib/python/ldns_rdf.i b/contrib/python/ldns_rdf.i
index 5d7448fd..60daf1a7 100644
--- a/contrib/python/ldns_rdf.i
+++ b/contrib/python/ldns_rdf.i
@@ -56,7 +56,11 @@
*/
%typemap(arginit, noblock=1) const ldns_rdf *
{
+#if SWIG_VERSION >= 0x040200
+ PyObject *$1_bytes = NULL;
+#else
char *$1_str = NULL;
+#endif
}
/*
@@ -66,11 +70,17 @@
%typemap(in, noblock=1) const ldns_rdf * (void* argp, $1_ltype tmp = 0, int res)
{
if (Python_str_Check($input)) {
+ const char *argstr;
+#if SWIG_VERSION >= 0x040200
+ argstr = SWIG_PyUnicode_AsUTF8AndSize($input, NULL, &$1_bytes);
+#else
$1_str = SWIG_Python_str_AsChar($input);
- if ($1_str == NULL) {
+ argstr = $1_str;
+#endif
+ if (argstr == NULL) {
%argument_fail(SWIG_TypeError, "char *", $symname, $argnum);
}
- tmp = ldns_dname_new_frm_str($1_str);
+ tmp = ldns_dname_new_frm_str(argstr);
if (tmp == NULL) {
%argument_fail(SWIG_TypeError, "char *", $symname, $argnum);
}
@@ -90,10 +100,17 @@
*/
%typemap(freearg, noblock=1) const ldns_rdf *
{
+#if SWIG_VERSION >= 0x040200
+ if ($1_bytes != NULL) {
+ /* Is not NULL only when a conversion form string occurred. */
+ Py_XDECREF($1_bytes);
+ }
+#else
if ($1_str != NULL) {
/* Is not NULL only when a conversion form string occurred. */
SWIG_Python_str_DelForPy3($1_str); /* Is a empty macro for Python < 3. */
}
+#endif
}
%nodefaultctor ldns_struct_rdf; /* No default constructor. */

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Mon Nov 4 11:08:29 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- update to 1.8.4:
* Fix Resolver uses nameserver commented out in /etc/resolv.conf
* Added RESINFO rrtype
* Added WALLET rrtype
* Added NXNAME rrtype
* Fix static code analysis findings, and developer visible fixes
* improve 'next-label' algorithm in ldns-walk
* Add functions to extract RFC 8914 extended errors
* Build system fixes and fixes for dependencies
- upstreamed, droped: ldns-swig-4.2.patch, ldns-swig-32bit.patch
- ldns-1.8.4-swig-3.4.0.patch: fix build with Swig 3.4.0 [boo#1231584]
-------------------------------------------------------------------
Wed Jul 10 13:43:44 UTC 2024 - Martin Jambor <mjambor@suse.com>

View File

@ -2,6 +2,7 @@
# spec file for package ldns
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,7 +19,7 @@
%define libname libldns3
Name: ldns
Version: 1.8.3
Version: 1.8.4
Release: 0
Summary: A library for developing the Domain Name System
License: BSD-3-Clause
@ -27,8 +28,7 @@ URL: https://www.nlnetlabs.nl/projects/ldns/
Source: https://www.nlnetlabs.nl/downloads/ldns/ldns-%{version}.tar.gz
Source1: https://www.nlnetlabs.nl/downloads/ldns/ldns-%{version}.tar.gz.asc
Source2: ldns.keyring
Patch0: ldns-swig-4.2.patch
Patch1: ldns-swig-32bit.patch
Patch2: ldns-1.8.4-swig-3.4.0.patch
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: libopenssl-devel
@ -81,7 +81,7 @@ Python bindings for the ldns library
Summary: Perl bindings for ldns
Group: Development/Languages/Perl
Requires: %{libname} >= %{version}
%libperl_requires
%{libperl_requires}
%description -n perl-DNS-LDNS
Perl bindings for the ldns library.
@ -109,13 +109,13 @@ export PYTHON=%{_bindir}/python3
--with-examples \
--with-ca-path=%{_sysconfdir}/ssl/certs/ \
$DISABLE_DANE
make %{?_smp_mflags}
%make_build
# We cannot use the built-in --with-p5-dns-ldns
pushd contrib/DNS-LDNS
LD_LIBRARY_PATH="../../lib:$LD_LIBRARY_PATH" perl \
Makefile.PL INSTALLDIRS=vendor INC="-I. -I../.." LIBS="-L../../lib"
make %{?_smp_mflags}
%make_build
popd
%install
@ -136,10 +136,10 @@ rm -f %{buildroot}%{perl_vendorarch}/auto/DNS/LDNS/{.packlist,LDNS.bs}
rm -v %{buildroot}%{_libdir}/libldns.*a
%fdupes %{buildroot}%{_mandir}
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%ldconfig_scriptlets -n %{libname}
%files
%license LICENSE
%{_bindir}/drill
%{_bindir}/ldns-chaos
%{_bindir}/ldns-compare-zones
@ -174,6 +174,7 @@ rm -v %{buildroot}%{_libdir}/libldns.*a
%{_libdir}/libldns.so.*
%files devel
%license LICENSE
%{_bindir}/ldns-config
%{_includedir}/ldns/
%{_libdir}/libldns.so
@ -182,6 +183,7 @@ rm -v %{buildroot}%{_libdir}/libldns.*a
%doc libdns.vim README*
%files -n perl-DNS-LDNS
%license LICENSE
%{perl_vendorarch}/DNS/LDNS.pm
%dir %{perl_vendorarch}/DNS/
%{perl_vendorarch}/DNS/LDNS/
@ -190,6 +192,7 @@ rm -v %{buildroot}%{_libdir}/libldns.*a
%{_mandir}/man3/DNS::LDNS*3pm*
%files -n python3-ldns
%license LICENSE
%{python3_sitearch}/*ldns*
%changelog