[packages/libspf2] Rel 3; small fixes from debian
arekm
arekm at pld-linux.org
Sat Sep 30 15:31:47 CEST 2023
commit 819739d2a668f9b330fbebe8e20100a5105a99c5
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Sep 30 14:47:11 2023 +0200
Rel 3; small fixes from debian
abolish-spf-rrtype.patch | 16 ++++++++++
libspf2.spec | 6 +++-
spf_dns-include-std-headers.patch | 62 +++++++++++++++++++++++++++++++++++++++
3 files changed, 83 insertions(+), 1 deletion(-)
---
diff --git a/libspf2.spec b/libspf2.spec
index 5d1f41f..4fdba22 100644
--- a/libspf2.spec
+++ b/libspf2.spec
@@ -5,7 +5,7 @@ Summary: Implementation of the SPF specification
Summary(pl.UTF-8): Implementacja specyfikacji SPF
Name: libspf2
Version: 1.2.11
-Release: 2
+Release: 3
License: LGPL
Group: Libraries
# Source0: http://www.libspf2.org/spf/%{name}-%{version}.tar.gz
@@ -15,6 +15,8 @@ Patch0: %{name}-link.patch
Patch1: 0001-remove-libreplace-unneeded-on-Linux.patch
# https://github.com/shevek/libspf2/pull/44
Patch2: integer-underflow.patch
+Patch3: spf_dns-include-std-headers.patch
+Patch4: abolish-spf-rrtype.patch
URL: http://www.libspf2.org/
BuildRequires: autoconf >= 2.59
BuildRequires: automake
@@ -77,6 +79,8 @@ Statyczna biblioteka libspf2.
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
+%patch4 -p1
%build
%{__libtoolize}
diff --git a/abolish-spf-rrtype.patch b/abolish-spf-rrtype.patch
new file mode 100644
index 0000000..8b0a100
--- /dev/null
+++ b/abolish-spf-rrtype.patch
@@ -0,0 +1,16 @@
+Description: Stop trying to look up the dedicated SPF DNS RR type,
+ which was abolished by RFC 7208. The rr_type variable and the all the
+ "goto retry" commands could be deleted as well, but let's keep the
+ patch minimal.
+
+--- a/src/libspf2/spf_server.c 2012-01-28 09:24:47.000000000 +0100
++++ b/src/libspf2/spf_server.c 2014-06-19 14:09:07.000000000 +0200
+@@ -346,7 +346,7 @@
+ spf_response, spf_recordp);
+
+ /* I am VERY, VERY sorry about the gotos. Shevek. */
+- rr_type = ns_t_spf;
++ rr_type = ns_t_txt;
+ retry:
+ rr_txt = SPF_dns_lookup(resolver, domain, rr_type, TRUE);
+
diff --git a/spf_dns-include-std-headers.patch b/spf_dns-include-std-headers.patch
new file mode 100755
index 0000000..33fdada
--- /dev/null
+++ b/spf_dns-include-std-headers.patch
@@ -0,0 +1,62 @@
+Author: Magnus Holmgren <holmgren at debian.org>
+Description: Include arpa/nameser.h and netdb.h from spf_dns.h
+ instead of defining the constants needed unless certain HAVE_ macros are defined.
+ Updated for libspf2 1.2.8/9 by Scott Kitterman <scott at kitterman.com>
+
+--- libspf2-1.2.9~/src/include/spf_dns.h 2008-10-27 12:27:14.000000000 -0400
++++ libspf2-1.2.9/src/include/spf_dns.h 2008-11-04 10:10:58.000000000 -0500
+@@ -63,48 +63,19 @@
+ *
+ */
+
++/* The following two header files might not exist on all platforms,
++ * but at least they exist on Debian with libc6.
++ */
++#include <arpa/nameser.h>
++#include <netdb.h>
+
+ /*
+- * For those who don't have <arpa/nameserv.h>
++ * Type 99 decl does not exist in Debian libc6 (not even 2.7)
+ */
+-
+-/* XXX This should use a more sensible define. */
+-#if !defined( HAVE_NS_TYPE )
+-
+-#define ns_t_invalid 0
+-#define ns_t_a 1
+-#define ns_t_ns 2
+-#define ns_t_cname 5
+-#define ns_t_ptr 12
+-#define ns_t_mx 15
+-#define ns_t_txt 16
+-#define ns_t_aaaa 28
+-/* #define ns_t_a6 38 */
+-#define ns_t_any 255 /**< Wildcard match. */
+-
+-typedef int ns_type;
+-#endif
+-
+ #if ! HAVE_DECL_NS_T_SPF
+ #define ns_t_spf 99
+ #endif
+
+-#if ! HAVE_DECL_NS_T_INVALID
+-#define ns_t_invalid 0
+-#endif
+-
+-
+-/*
+- * For those who don't have <netdb.h>
+- */
+-
+-#if !defined(HAVE_NETDB_H) && !defined(_WIN32)
+-#define NETDB_SUCCESS 0
+-#define HOST_NOT_FOUND 1 /**< NXDOMAIN (authoritative answer)*/
+-#define TRY_AGAIN 2 /**< SERVFAIL (no authoritative answer)*/
+-#define NO_RECOVERY 3 /**< invalid/unimplmeneted query */
+-#define NO_DATA 4 /**< host found, but no RR of req type*/
+-#endif
+ typedef int SPF_dns_stat_t;
+
+ typedef struct SPF_dns_server_struct SPF_dns_server_t;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libspf2.git/commitdiff/819739d2a668f9b330fbebe8e20100a5105a99c5
More information about the pld-cvs-commit
mailing list