forked from pool/whois
Accepting request 460663 from network:utilities
whois 5.2.15 disable libidn2 bsc#1026831 https://github.com/rfc1036/whois/issues/50 OBS-URL: https://build.opensuse.org/request/show/460663 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/whois?expand=0&rev=60
This commit is contained in:
commit
b28b74f465
@ -1,131 +0,0 @@
|
|||||||
From b998d78f17088d891b822344ebdc8b5266e7a5e5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
|
|
||||||
Date: Thu, 19 Jan 2017 16:56:43 +0100
|
|
||||||
Subject: [PATCH] Add code for libidn2 (IDNA 2008 + TR46 non-transitional)
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Set HAVE_LIBIDN2 instead of HAVE_LIBIDN for IDNA2008/TR46.
|
|
||||||
With IDNA2003, german sharp s will be stranslated into ss.
|
|
||||||
Thus straße.de and strasse.de will result in the same whois lookup.
|
|
||||||
TR46 preprocessing also takes care for a few other things, like
|
|
||||||
decomposed Unicode characters.
|
|
||||||
---
|
|
||||||
Makefile | 5 +++++
|
|
||||||
whois.c | 36 ++++++++++++++++++++++++++++--------
|
|
||||||
2 files changed, 33 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index 2634a9a..79aa922 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -32,10 +32,15 @@ ifdef LOCALEDIR
|
|
||||||
DEFS += -DLOCALEDIR=\"$(BASEDIR)$(prefix)/share/locale\"
|
|
||||||
endif
|
|
||||||
|
|
||||||
+ifdef HAVE_LIBIDN2
|
|
||||||
+whois_LDADD += -lidn2
|
|
||||||
+DEFS += -DHAVE_LIBIDN2
|
|
||||||
+else
|
|
||||||
ifdef HAVE_LIBIDN
|
|
||||||
whois_LDADD += -lidn
|
|
||||||
DEFS += -DHAVE_LIBIDN
|
|
||||||
endif
|
|
||||||
+endif
|
|
||||||
|
|
||||||
ifdef HAVE_ICONV
|
|
||||||
whois_OBJECTS += simple_recode.o
|
|
||||||
diff --git a/whois.c b/whois.c
|
|
||||||
index 7c987ae..711a7d5 100644
|
|
||||||
--- a/whois.c
|
|
||||||
+++ b/whois.c
|
|
||||||
@@ -31,7 +31,9 @@
|
|
||||||
#ifdef HAVE_REGEXEC
|
|
||||||
#include <regex.h>
|
|
||||||
#endif
|
|
||||||
-#ifdef HAVE_LIBIDN
|
|
||||||
+#ifdef HAVE_LIBIDN2
|
|
||||||
+#include <idn2.h>
|
|
||||||
+#elif defined HAVE_LIBIDN
|
|
||||||
#include <idna.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_INET_PTON
|
|
||||||
@@ -653,7 +655,7 @@ char *queryformat(const char *server, const char *flags, const char *query)
|
|
||||||
simple_recode_input_charset = "utf-8"; /* then try UTF-8 */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#ifdef HAVE_LIBIDN
|
|
||||||
+#if defined HAVE_LIBIDN || defined HAVE_LIBIDN2
|
|
||||||
# define DENIC_PARAM_ACE ",ace"
|
|
||||||
#else
|
|
||||||
# define DENIC_PARAM_ACE ""
|
|
||||||
@@ -939,9 +941,8 @@ int openconn(const char *server, const char *port)
|
|
||||||
hints.ai_family = AF_UNSPEC;
|
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
|
||||||
hints.ai_flags = AI_ADDRCONFIG;
|
|
||||||
-#ifdef HAVE_LIBIDN
|
|
||||||
- hints.ai_flags |= AI_IDN;
|
|
||||||
-#endif
|
|
||||||
+
|
|
||||||
+ server = normalize_domain(server);
|
|
||||||
|
|
||||||
if ((err = getaddrinfo(server, port ? port : "nicname", &hints, &res))
|
|
||||||
!= 0) {
|
|
||||||
@@ -1145,7 +1146,7 @@ const char *is_new_gtld(const char *s)
|
|
||||||
char *normalize_domain(const char *dom)
|
|
||||||
{
|
|
||||||
char *p, *ret;
|
|
||||||
-#ifdef HAVE_LIBIDN
|
|
||||||
+#if defined HAVE_LIBIDN || defined HAVE_LIBIDN2
|
|
||||||
char *domain_start = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -1160,7 +1161,7 @@ char *normalize_domain(const char *dom)
|
|
||||||
p--;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef HAVE_LIBIDN
|
|
||||||
+#if defined HAVE_LIBIDN || defined HAVE_LIBIDN2
|
|
||||||
/* find the start of the last word if there are spaces in the query */
|
|
||||||
for (p = ret; *p; p++)
|
|
||||||
if (*p == ' ')
|
|
||||||
@@ -1170,9 +1171,18 @@ char *normalize_domain(const char *dom)
|
|
||||||
char *q, *r;
|
|
||||||
int prefix_len;
|
|
||||||
|
|
||||||
+#ifdef HAVE_LIBIDN2
|
|
||||||
+#if IDN2_VERSION_NUMBER >= 0x00140000
|
|
||||||
+ if (idn2_lookup_ul(domain_start, &q, IDN2_NONTRANSITIONAL) != IDN2_OK)
|
|
||||||
+ return ret;
|
|
||||||
+#else
|
|
||||||
+ if (idn2_lookup_ul(domain_start, &q, IDN2_NFC_INPUT) != IDN2_OK)
|
|
||||||
+ return ret;
|
|
||||||
+#endif
|
|
||||||
+#else
|
|
||||||
if (idna_to_ascii_lz(domain_start, &q, 0) != IDNA_SUCCESS)
|
|
||||||
return ret;
|
|
||||||
-
|
|
||||||
+#endif
|
|
||||||
/* reassemble the original query in a new buffer */
|
|
||||||
prefix_len = domain_start - ret;
|
|
||||||
r = malloc(prefix_len + strlen(q) + 1);
|
|
||||||
@@ -1186,8 +1196,18 @@ char *normalize_domain(const char *dom)
|
|
||||||
} else {
|
|
||||||
char *q;
|
|
||||||
|
|
||||||
+#ifdef HAVE_LIBIDN2
|
|
||||||
+#if IDN2_VERSION_NUMBER >= 0x00140000
|
|
||||||
+ if (idn2_lookup_ul(ret, &q, IDN2_NONTRANSITIONAL) != IDN2_OK)
|
|
||||||
+ return ret;
|
|
||||||
+#else
|
|
||||||
+ if (idn2_lookup_ul(ret, &q, IDN2_NFC_INPUT) != IDN2_OK)
|
|
||||||
+ return ret;
|
|
||||||
+#endif
|
|
||||||
+#else
|
|
||||||
if (idna_to_ascii_lz(ret, &q, 0) != IDNA_SUCCESS)
|
|
||||||
return ret;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
free(ret);
|
|
||||||
return q;
|
|
30
whois.asc
30
whois.asc
@ -5,7 +5,7 @@ Format: 3.0 (native)
|
|||||||
Source: whois
|
Source: whois
|
||||||
Binary: whois
|
Binary: whois
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Version: 5.2.14
|
Version: 5.2.15
|
||||||
Maintainer: Marco d'Itri <md@linux.it>
|
Maintainer: Marco d'Itri <md@linux.it>
|
||||||
Standards-Version: 3.9.8
|
Standards-Version: 3.9.8
|
||||||
Vcs-Browser: https://github.com/rfc1036/whois
|
Vcs-Browser: https://github.com/rfc1036/whois
|
||||||
@ -14,23 +14,23 @@ Build-Depends: debhelper (>= 5), gettext, libidn11-dev
|
|||||||
Package-List:
|
Package-List:
|
||||||
whois deb net standard arch=any
|
whois deb net standard arch=any
|
||||||
Checksums-Sha1:
|
Checksums-Sha1:
|
||||||
80d92c1e8f8ac94efcf7a1076c53b5866604d7d6 81888 whois_5.2.14.tar.xz
|
ff38902176a59fd09c78edc2cc7ad46d0ea945ef 82048 whois_5.2.15.tar.xz
|
||||||
Checksums-Sha256:
|
Checksums-Sha256:
|
||||||
a41daf41abed0fbfa8c9c4b0e4a3f5f22d9876dd6feb9091aac12f8f4c38b0d2 81888 whois_5.2.14.tar.xz
|
7a5a6b690bfc6360d92d9328adbe5c1f096a41f0d6548ce0df4aa664dcb37188 82048 whois_5.2.15.tar.xz
|
||||||
Files:
|
Files:
|
||||||
f5fb84dca2225162a1af2824c0143943 81888 whois_5.2.14.tar.xz
|
ef99ddbb9105106aa72f7485960d8a10 82048 whois_5.2.15.tar.xz
|
||||||
|
|
||||||
-----BEGIN PGP SIGNATURE-----
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
iQGzBAEBCAAdFiEEGBsIcS5ipP0URKfyK/WlwSLE96QFAlhlitIACgkQK/WlwSLE
|
iQGzBAEBCAAdFiEEGBsIcS5ipP0URKfyK/WlwSLE96QFAlizbdIACgkQK/WlwSLE
|
||||||
96Te0wwAoMY3leSCLyQb272bMDFwyhQFTPCs2UeGqIRzjjio5slbb/jWoDNE1lHJ
|
96TQYQwAnaFSlIZXBUsxuMz+oI5A0rdCncNkGNWalSS74CdXXBtKoyixRbC0D8sK
|
||||||
mAH+HWS0bMTDZlcyr+HvW46MlUpv63i/DXccnJyfRaLB7ub0poTF96C5AOrJkJRg
|
9bjxC+8Jgzuu7o2bMbbHPTViK7b74+Shh8fv2kUAYs7rhdb4Cwm1YyilYbIqtc+3
|
||||||
8PamaZBdj35RlyDrSt/6Eg5X5EITUTvW2eJ/vWnLR2TzKPzzgM2Ixj6zf8TYv5pd
|
PH3aMeO/9uli65icSWtEwCSklO5xVW+bWD178xXZS3wfjkGKb+b6L/bTVuJS3/uf
|
||||||
PGiimo+ADBmZee2Grf1yAxn7YHISS2qxhykSNNSwSQQRCgXMGA0HrD522tlR2v33
|
WKDsQHYnCconuReCad0yO1Tobe9TR6dhI8c/mn8eC2xsn3FyIYA0z1XdOzN8wnSf
|
||||||
exFDQzA8qGhn+bF7b57m8w75QU6ZHz72kK1TCCDFlIzNTqFyk2eLApBe/Z3Nb4W/
|
s7zB5+2gQxjdHTdGrstGPSXr7y62pF4DOz9qCNshGgnFKDfdjiqsEDgFaxPIZajQ
|
||||||
zN5D2eDDPiFEiYaWRnGZK0PkW2liai/PKnsH2668IF05DmgtDrmPkxmN4NxBBwJ1
|
tsfiLUNOSP3hEmoi99VSe7QIqQXL1x2sKbgF//2aLPpqgC5wPyq/Eh6DFahHRSUn
|
||||||
v8LVzaIwBHcAPcj7GHXwhMC/6aFXp05GI61GCjiN81tdg5boEKLMWjvzHu8ZxAbD
|
X13FQRqAMLSxLtWKyVXAq73YwRpi8I1AIuYu6DxFA5voxaijtarf1Pjaq4zX/yGL
|
||||||
kFVGa8c8BnQ0SOLM16R4Z3KgfDwVpfZOHyHvPgEKt4o4VD94cGVESRdw4gkotMrW
|
UgzKkOehl/FY4gZ4h9P+bsAftHnQyjUDws0b6X1zFJrYJSauNI6Q6PXyjy3sVYOc
|
||||||
TxvaAV0p
|
Cqcmsg+0
|
||||||
=1jj8
|
=9RBC
|
||||||
-----END PGP SIGNATURE-----
|
-----END PGP SIGNATURE-----
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 27 10:00:11 UTC 2017 - astieger@suse.com
|
||||||
|
|
||||||
|
- whois 5.2.15:
|
||||||
|
* Update the .gf and .mq TLD servers
|
||||||
|
* Update the list of new gTLDs
|
||||||
|
* Update the charset for whois.nic.kz
|
||||||
|
* Fix minor compiler warnings with no practical effects
|
||||||
|
* Support for libidn2 is upstream FATE#321897
|
||||||
|
remove whois-5.2.14-IDNA2008.patch
|
||||||
|
But disable to fix bsc#1026831
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 6 21:49:09 UTC 2017 - astieger@suse.com
|
Mon Feb 6 21:49:09 UTC 2017 - astieger@suse.com
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: whois
|
Name: whois
|
||||||
Version: 5.2.14
|
Version: 5.2.15
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Intelligent WHOIS client
|
Summary: Intelligent WHOIS client
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
@ -30,8 +30,7 @@ Source2: %{name}.keyring
|
|||||||
# rename .dsc to not build the package in OBS
|
# rename .dsc to not build the package in OBS
|
||||||
Source3: http://ftp.debian.org/debian/pool/main/w/whois/%{name}_%{version}.dsc#/%{name}.asc
|
Source3: http://ftp.debian.org/debian/pool/main/w/whois/%{name}_%{version}.dsc#/%{name}.asc
|
||||||
Patch0: whois-nobsdsource.patch
|
Patch0: whois-nobsdsource.patch
|
||||||
Patch1: whois-5.2.14-IDNA2008.patch
|
BuildRequires: libidn-devel
|
||||||
BuildRequires: libidn2-devel
|
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
Provides: ripe-whois-tools
|
Provides: ripe-whois-tools
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@ -64,10 +63,9 @@ echo "`grep -A1 "Checksums-Sha256" %{SOURCE3} | grep %{name}_%{version}.tar.xz |
|
|||||||
|
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make all mkpasswd HAVE_LIBIDN2=1 HAVE_ICONV=1 %{?_smp_mflags} \
|
make all mkpasswd HAVE_LIBIDN=1 HAVE_ICONV=1 %{?_smp_mflags} \
|
||||||
%if 0%{?suse_version} <= 1140
|
%if 0%{?suse_version} <= 1140
|
||||||
HAVE_XCRYPT=1 \
|
HAVE_XCRYPT=1 \
|
||||||
%else
|
%else
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:a41daf41abed0fbfa8c9c4b0e4a3f5f22d9876dd6feb9091aac12f8f4c38b0d2
|
|
||||||
size 81888
|
|
3
whois_5.2.15.tar.xz
Normal file
3
whois_5.2.15.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7a5a6b690bfc6360d92d9328adbe5c1f096a41f0d6548ce0df4aa664dcb37188
|
||||||
|
size 82048
|
Loading…
Reference in New Issue
Block a user