forked from pool/whois
- drop whois-5.2.15-fix-CIDR-with-libidn2.patch, no longer required
with libidn2 >= 2.0.3 OBS-URL: https://build.opensuse.org/package/show/network:utilities/whois?expand=0&rev=82
This commit is contained in:
parent
516d26f838
commit
fa332275f1
@ -1,76 +0,0 @@
|
||||
From d6e33ff64742f48f2022980fd4889ec36662cc30 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Stieger <astieger@suse.com>
|
||||
Date: Tue, 4 Apr 2017 18:27:37 +0200
|
||||
Subject: [PATCH 1/2] Fix CIDR notation and IPv6 queries with libidn2
|
||||
|
||||
Fixes #50
|
||||
Fixes https://bugzilla.opensuse.org/show_bug.cgi?id=1026831
|
||||
Signed-off-by: Andreas Stieger <astieger@suse.com>
|
||||
---
|
||||
whois.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/whois.c b/whois.c
|
||||
index 8f5f1f1..7259c7f 100644
|
||||
--- a/whois.c
|
||||
+++ b/whois.c
|
||||
@@ -1172,6 +1172,12 @@ char *normalize_domain(const char *dom)
|
||||
int prefix_len;
|
||||
|
||||
#ifdef HAVE_LIBIDN2
|
||||
+ /* skip CIDR notation */
|
||||
+ if (NULL != strchr(domain_start, '/'))
|
||||
+ return ret;
|
||||
+ /* skip IPv6 */
|
||||
+ if (NULL != strchr(domain_start, ':'))
|
||||
+ return ret;
|
||||
if (idn2_lookup_ul(domain_start, &q, IDN2_NONTRANSITIONAL) != IDN2_OK)
|
||||
return ret;
|
||||
#else
|
||||
@@ -1193,6 +1199,12 @@ char *normalize_domain(const char *dom)
|
||||
char *q;
|
||||
|
||||
#ifdef HAVE_LIBIDN2
|
||||
+ /* skip CIDR notation */
|
||||
+ if (NULL != strchr(ret, '/'))
|
||||
+ return ret;
|
||||
+ /* skip IPv6 */
|
||||
+ if (NULL != strchr(ret, ':'))
|
||||
+ return ret;
|
||||
if (idn2_lookup_ul(ret, &q, IDN2_NONTRANSITIONAL) != IDN2_OK)
|
||||
return ret;
|
||||
#else
|
||||
|
||||
From 1e6a7b3f0d585768f7136abda2db797c64159157 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Stieger <astieger@suse.com>
|
||||
Date: Tue, 23 May 2017 23:30:11 +0200
|
||||
Subject: [PATCH 2/2] When using libidn2, also try IDNA 2008 transitional
|
||||
|
||||
---
|
||||
whois.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/whois.c b/whois.c
|
||||
index 7259c7f..00ca962 100644
|
||||
--- a/whois.c
|
||||
+++ b/whois.c
|
||||
@@ -1179,7 +1179,8 @@ char *normalize_domain(const char *dom)
|
||||
if (NULL != strchr(domain_start, ':'))
|
||||
return ret;
|
||||
if (idn2_lookup_ul(domain_start, &q, IDN2_NONTRANSITIONAL) != IDN2_OK)
|
||||
- return ret;
|
||||
+ if (idn2_lookup_ul(domain_start, &q, IDN2_TRANSITIONAL) != IDN2_OK)
|
||||
+ return ret;
|
||||
#else
|
||||
if (idna_to_ascii_lz(domain_start, &q, 0) != IDNA_SUCCESS)
|
||||
return ret;
|
||||
@@ -1206,7 +1207,8 @@ char *normalize_domain(const char *dom)
|
||||
if (NULL != strchr(ret, ':'))
|
||||
return ret;
|
||||
if (idn2_lookup_ul(ret, &q, IDN2_NONTRANSITIONAL) != IDN2_OK)
|
||||
- return ret;
|
||||
+ if (idn2_lookup_ul(ret, &q, IDN2_TRANSITIONAL) != IDN2_OK)
|
||||
+ return ret;
|
||||
#else
|
||||
if (idna_to_ascii_lz(ret, &q, 0) != IDNA_SUCCESS)
|
||||
return ret;
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 18 09:32:25 UTC 2017 - astieger@suse.com
|
||||
|
||||
- drop whois-5.2.15-fix-CIDR-with-libidn2.patch, no longer required
|
||||
with libidn2 >= 2.0.3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 16 12:24:36 UTC 2017 - astieger@suse.com
|
||||
|
||||
|
@ -30,7 +30,6 @@ Source2: %{name}.keyring
|
||||
# rename .dsc to not build the package in OBS
|
||||
Source3: http://ftp.debian.org/debian/pool/main/w/whois/%{name}_%{version}.dsc#/%{name}.asc
|
||||
Patch0: whois-nobsdsource.patch
|
||||
Patch1: whois-5.2.15-fix-CIDR-with-libidn2.patch
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: xz
|
||||
BuildRequires: pkgconfig(libidn2)
|
||||
@ -65,7 +64,6 @@ echo "`grep -A1 "Checksums-Sha256" %{SOURCE3} | grep %{name}_%{version}.tar.xz |
|
||||
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
make all mkpasswd HAVE_LIBIDN2=1 HAVE_ICONV=1 %{?_smp_mflags} \
|
||||
|
Loading…
Reference in New Issue
Block a user