From 16c8371ca30e9c830d66f97fe7d1230deea2719c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Sat, 3 Nov 2018 11:38:42 +0100
Subject: [PATCH] community/whois: upgrade to 5.4.0

---
 community/whois/APKBUILD                      |  8 +++----
 .../whois/enable-sha256-sha512-mkpasswd.patch | 24 +++++++++++--------
 2 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/community/whois/APKBUILD b/community/whois/APKBUILD
index cd00abf59b93..e12f8ee2faf2 100644
--- a/community/whois/APKBUILD
+++ b/community/whois/APKBUILD
@@ -1,8 +1,8 @@
 # Contributor: Stuart Cardall <developer@it-offshore.co.uk>
 # Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
 pkgname=whois
-pkgver=5.3.2
-pkgrel=1
+pkgver=5.4.0
+pkgrel=0
 pkgdesc="Intelligent WHOIS client by Marco d'Itri"
 url="https://github.com/rfc1036/whois"
 arch="all"
@@ -36,6 +36,6 @@ package() {
 	install -D -m644 whois.conf "$pkgdir/etc/whois.conf"
 }
 
-sha512sums="0e61e9fce08ec9b5ca6fe0c21b5bde687505b0609b778e62277c35b00d394268e6525d8fdbf18a7574b86eace1336ea0f009e9d83f7d2c034a0240b08238d410  whois-5.3.2.tar.gz
+sha512sums="f50568ee0d027d3a5d7ff05be7bbf31ab01d96a597c68da235e0d06914c9cb90ca9ac59a50df1523773a6d119fc8d2b0fe397578a945907f78d60e9c992d2f23  whois-5.4.0.tar.gz
 efa32ec848e3d3e61481567815e8c02757eab32712eb5a431adb13b59fd359f735eb684fbdf8a5b8334410d17052dc93d65bdda27a328617e2b6772b23717487  undefined-libintl.patch
-ef455fd21403995524a3de6039db41261b6549181f3dd234c6a28a10a65d09a6e86c71b6ddb752aa15f0e4ff2232887ff65bd72ed9a977b8da2ed40ea11519f1  enable-sha256-sha512-mkpasswd.patch"
+66a6b36e4caa00d58ab44c8fb55bfe919994fc6c7631cc283d9f37f9d69bf3e911ab365b27b1720065103e8d7abbf7549dfb260e156c1b52726a8c8b8820c836  enable-sha256-sha512-mkpasswd.patch"
diff --git a/community/whois/enable-sha256-sha512-mkpasswd.patch b/community/whois/enable-sha256-sha512-mkpasswd.patch
index b2ea8db3d9b0..643438390caa 100644
--- a/community/whois/enable-sha256-sha512-mkpasswd.patch
+++ b/community/whois/enable-sha256-sha512-mkpasswd.patch
@@ -1,14 +1,18 @@
---- whois-5.2.15/mkpasswd.c
-+++ whois-5.2.15/mkpasswd.c.new
-@@ -104,11 +104,9 @@
- #if defined FreeBSD
-     { "nt",		"$3$",  0,	0,	0, "NT-Hash" },
+diff -upr whois-5.4.0.orig/mkpasswd.c whois-5.4.0/mkpasswd.c
+--- whois-5.4.0.orig/mkpasswd.c	2018-11-03 11:37:41.579032463 +0100
++++ whois-5.4.0/mkpasswd.c	2018-11-03 11:37:47.892515510 +0100
+@@ -108,14 +108,12 @@ static const struct crypt_method methods
+     { "bcrypt",		"$2b$", 22,	22,	2, "bcrypt" },
+     { "bcrypt-a",	"$2a$", 22,	22,	2, "bcrypt (obsolete $2a$ version)" },
  #endif
 -#if defined HAVE_SHA_CRYPT
      /* http://people.redhat.com/drepper/SHA-crypt.txt */
-     { "sha-256",	"$5$",	8,	16,	1, "SHA-256" },
-     { "sha-512",	"$6$",	8,	16,	1, "SHA-512" },
+     { "sha512crypt",	"$6$",	8,	16,	1, "SHA-512" },
+     { "sha256crypt",	"$5$",	8,	16,	1, "SHA-256" },
+     /* compatibility aliases for mkpasswd versions < 5.4.0 */
+     { "sha-256",	"$5$",	8,	16,	1, NULL },
+     { "sha-512",	"$6$",	8,	16,	1, NULL },
 -#endif
-     /* http://www.crypticide.com/dropsafe/article/1389 */
-     /*
-      * Actually the maximum salt length is arbitrary, but Solaris by default
+ #if (defined __SVR4 && defined __sun) || defined XCRYPT_VERSION_NUM
+     { "sunmd5",		"$md5$", 8,	8,	1, "SunMD5" },
+ #endif
-- 
GitLab