diff --git a/whois-5.2.15-fix-CIDR-with-libidn2.patch b/whois-5.2.15-fix-CIDR-with-libidn2.patch deleted file mode 100644 index 8d34089..0000000 --- a/whois-5.2.15-fix-CIDR-with-libidn2.patch +++ /dev/null @@ -1,76 +0,0 @@ -From d6e33ff64742f48f2022980fd4889ec36662cc30 Mon Sep 17 00:00:00 2001 -From: Andreas Stieger -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 ---- - 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 -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; diff --git a/whois.changes b/whois.changes index 9af2ab2..98dc39f 100644 --- a/whois.changes +++ b/whois.changes @@ -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 diff --git a/whois.spec b/whois.spec index 9738b10..6f07652 100644 --- a/whois.spec +++ b/whois.spec @@ -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} \