From fb3b1ccb3dd9322e533a67b73dbed1df486f69c7 Mon Sep 17 00:00:00 2001 From: tigro Date: Wed, 18 Dec 2024 15:33:36 +0300 Subject: [PATCH] - Fix for SWIG 4.3.0 - Build with GOST support --- SOURCES/ldns-1.8.3-swig-4.3.patch | 84 +++++++++++++++++++++++++++++++ SPECS/ldns.spec | 10 +++- 2 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 SOURCES/ldns-1.8.3-swig-4.3.patch diff --git a/SOURCES/ldns-1.8.3-swig-4.3.patch b/SOURCES/ldns-1.8.3-swig-4.3.patch new file mode 100644 index 0000000..579a32c --- /dev/null +++ b/SOURCES/ldns-1.8.3-swig-4.3.patch @@ -0,0 +1,84 @@ +diff -Naur ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_buffer.i ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_buffer.i +--- ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_buffer.i 2024-10-08 08:43:40.888624013 +0100 ++++ ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_buffer.i 2024-10-08 08:45:01.576684910 +0100 +@@ -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 -Naur ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_key.i ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_key.i +--- ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_key.i 2024-10-08 08:43:40.888624013 +0100 ++++ ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_key.i 2024-10-08 08:45:01.364684753 +0100 +@@ -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 -Naur ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_packet.i ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_packet.i +--- ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_packet.i 2024-10-08 08:43:40.884624010 +0100 ++++ ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_packet.i 2024-10-08 08:45:01.396684776 +0100 +@@ -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 -Naur ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_rdf.i ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_rdf.i +--- ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_rdf.i 2024-10-08 08:43:40.884624010 +0100 ++++ ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_rdf.i 2024-10-08 08:45:01.540684883 +0100 +@@ -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 -Naur ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_resolver.i ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_resolver.i +--- ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_resolver.i 2024-10-08 08:43:40.888624013 +0100 ++++ ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_resolver.i 2024-10-08 08:45:01.460684824 +0100 +@@ -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 -Naur ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_rr.i ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_rr.i +--- ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_rr.i 2024-10-08 08:43:40.884624010 +0100 ++++ ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_rr.i 2024-10-08 08:45:01.508684860 +0100 +@@ -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 -Naur ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_zone.i ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_zone.i +--- ldns-1.8.3-original/ldns-1.8.3/contrib/python/ldns_zone.i 2024-10-08 08:43:40.888624013 +0100 ++++ ldns-1.8.3/ldns-1.8.3/contrib/python/ldns_zone.i 2024-10-08 08:45:01.428684800 +0100 +@@ -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 diff --git a/SPECS/ldns.spec b/SPECS/ldns.spec index 82c532b..4561e2f 100644 --- a/SPECS/ldns.spec +++ b/SPECS/ldns.spec @@ -16,7 +16,7 @@ %bcond_with dane_ta %endif # GOST is not allowed in Fedora/RHEL due to legal reasons (not NIST ECC) -%bcond_with gost +%bcond_without gost %if %{with python2} || %{with python3} %{?filter_setup: @@ -37,7 +37,7 @@ Summary: Low-level DNS(SEC) library with API Name: ldns Version: 1.8.3 -Release: 16%{?dist} +Release: 16%{?dist}.inferit License: BSD-3-Clause Url: https://www.nlnetlabs.nl/%{name}/ @@ -55,6 +55,8 @@ Patch4: ldns-swig-4.2.patch # https://github.com/NLnetLabs/ldns/pull/233 Patch5: ldns-swig-32bit.patch Patch6: ldns-1.8-openssl-engine.patch +# Fix for SWIG 4.3.0 +Patch7: ldns-1.8.3-swig-4.3.patch BuildRequires: libtool BuildRequires: autoconf @@ -362,6 +364,10 @@ rm -rf doc/man %doc doc %changelog +* Wed Dec 18 2024 Arkady L. Shane - 1.8.3-16.inferit +- Fix for SWIG 4.3.0 +- Build with GOST support + * Tue Nov 26 2024 MSVSphere Packaging Team - 1.8.3-16 - Rebuilt for MSVSphere 10