From patchwork Thu Nov 21 08:12:23 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pascal de Bruijn
X-Patchwork-Id: 1198804
Return-Path:
X-Original-To: incoming-buildroot@patchwork.ozlabs.org
Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org
Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized)
smtp.mailfrom=busybox.net (client-ip=140.211.166.133;
helo=hemlock.osuosl.org;
envelope-from=buildroot-bounces@busybox.net;
receiver=)
Authentication-Results: ozlabs.org;
dmarc=none (p=none dis=none) header.from=unilogic.nl
Authentication-Results: ozlabs.org;
dkim=fail reason="signature verification failed" (2048-bit key;
unprotected) header.d=unilogic.nl header.i=@unilogic.nl
header.b="im7uneBH"; dkim-atps=neutral
Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
bits)) (No client certificate requested)
by ozlabs.org (Postfix) with ESMTPS id 47JXPJ32z6z9sPj
for ;
Thu, 21 Nov 2019 19:13:08 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by hemlock.osuosl.org (Postfix) with ESMTP id D446588508;
Thu, 21 Nov 2019 08:13:06 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from hemlock.osuosl.org ([127.0.0.1])
by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id W95diianYvul; Thu, 21 Nov 2019 08:13:04 +0000 (UTC)
Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34])
by hemlock.osuosl.org (Postfix) with ESMTP id 0473888515;
Thu, 21 Nov 2019 08:13:04 +0000 (UTC)
X-Original-To: buildroot@lists.busybox.net
Delivered-To: buildroot@osuosl.org
Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])
by ash.osuosl.org (Postfix) with ESMTP id CCD501BF277
for ;
Thu, 21 Nov 2019 08:13:01 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by whitealder.osuosl.org (Postfix) with ESMTP id AB8DE864E0
for ;
Thu, 21 Nov 2019 08:13:01 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from whitealder.osuosl.org ([127.0.0.1])
by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id pemelD9TlMma for ;
Thu, 21 Nov 2019 08:12:59 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from mail-out123.unilogicnetworks.net
(mail-out123.unilogicnetworks.net [62.133.206.123])
by whitealder.osuosl.org (Postfix) with ESMTPS id 8CFE985C88
for ; Thu, 21 Nov 2019 08:12:59 +0000 (UTC)
Received: from mail.unilogic.nl (unknown [62.133.204.111])
by mail.unilogicnetworks.net (Postfix) with ESMTPS id 4AF234A1C0
for ; Thu, 21 Nov 2019 09:12:56 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=unilogic.nl; s=mail;
h=from:subject:date:message-id:to:cc;
bh=MpwirPNp2A/j90o/TSu75tFzwP9zYEvFLmrRtWsAEx0=;
b=im7uneBHNu0ihhVZjQ6rgYgeMWGN0jTP7iZiRKbnfQSazhc5jxtC7MJLrrTxJjC0JUb7og/w8LalR
q2+lhN+uoQbzBD3Ul+oL/QyO5yN3H8uGIp8Xy/40PRogu75CM38DPmFs7Mez//nKKjA82mbDo0YYHe
cCNJwaH6DbQ+EleDB+CtYaUIeckEeptbwXntTecGQ8rDk4QD4voY6SrEiVz+rYjufT8QuOJQWJKdp/
0wPvWjmdOR2t4ldsg4vURD3pecwHv70HVYt1k/TnNzBG2Fx3Ow9vmemXLAWcvPr0OWRjETpjqnYNat
Tm3HIPqErkLW8xSxz5KVeERj60PtG5g==
X-Kerio-Anti-Spam: Build: [Engines: 2.15.9.1281, Stamp: 3], Multi: [Enabled,
t: (0.000007, 0.008378)], BW: [Enabled, t: (0.000007,
0.000001)], RTDA:
[Enabled, t: (0.052575), Hit: No, Details: v2.7.64;
Id: 15.1i6i46b.1dq6gatja.7rp49], total: 0(700)
X-Footer: dW5pbG9naWMubmw=
Received: from localhost ([127.0.0.1]) by mail.unilogic.nl with ESMTPSA
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits));
Thu, 21 Nov 2019 09:12:55 +0100
From: Pascal de Bruijn
To: buildroot@busybox.net
Date: Thu, 21 Nov 2019 09:12:23 +0100
Message-Id: <20191121081223.2883-1-p.debruijn@unilogic.nl>
X-Mailer: git-send-email 2.17.1
Subject: [Buildroot] [PATCH 1/2] package/libargon2: new package
X-BeenThere: buildroot@busybox.net
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Discussion and development of buildroot
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Cc: Pascal de Bruijn
MIME-Version: 1.0
Errors-To: buildroot-bounces@busybox.net
Sender: "buildroot"
Signed-off-by: Pascal de Bruijn
---
package/Config.in | 1 +
...1-libargon2-dont-fail-on-existing-symlink.patch | 23 +++++++++++++++++
package/libargon2/Config.in | 8 ++++++
package/libargon2/libargon2.hash | 3 +++
package/libargon2/libargon2.mk | 29 ++++++++++++++++++++++
5 files changed, 64 insertions(+)
create mode 100644 package/libargon2/0001-libargon2-dont-fail-on-existing-symlink.patch
create mode 100644 package/libargon2/Config.in
create mode 100644 package/libargon2/libargon2.hash
create mode 100644 package/libargon2/libargon2.mk
diff --git a/package/Config.in b/package/Config.in
index c2b48a6..37dec3e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1262,6 +1262,7 @@ menu "Crypto"
source "package/libscrypt/Config.in"
source "package/libsecret/Config.in"
source "package/libsha1/Config.in"
+ source "package/libargon2/Config.in"
source "package/libsodium/Config.in"
source "package/libssh/Config.in"
source "package/libssh2/Config.in"
diff --git a/package/libargon2/0001-libargon2-dont-fail-on-existing-symlink.patch b/package/libargon2/0001-libargon2-dont-fail-on-existing-symlink.patch
new file mode 100644
index 0000000..43a6deb
--- /dev/null
+++ b/package/libargon2/0001-libargon2-dont-fail-on-existing-symlink.patch
@@ -0,0 +1,23 @@
+From b997b9e7d4744020409223afddc7299a771eb52d Mon Sep 17 00:00:00 2001
+From: Pascal de Bruijn
+Date: Thu, 7 Nov 2019 09:55:32 +0100
+Subject: [PATCH] Don't fail on existing symlink
+
+Signed-off-by: Pascal de Bruijn
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 837e7f7..7c116c9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -238,7 +238,7 @@ install: $(RUN) libs
+ $(INSTALL) -d $(INST_LIBRARY)
+ $(INSTALL) -m 0644 $(LIBRARIES) $(INST_LIBRARY)
+ ifdef LINKED_LIB_SH
+- cd $(INST_LIBRARY) && ln -s $(notdir $(LIB_SH) $(LINKED_LIB_SH))
++ cd $(INST_LIBRARY) && ln -sf $(notdir $(LIB_SH) $(LINKED_LIB_SH))
+ endif
+ $(INSTALL) -d $(INST_BINARY)
+ $(INSTALL) $(RUN) $(INST_BINARY)
diff --git a/package/libargon2/Config.in b/package/libargon2/Config.in
new file mode 100644
index 0000000..aea861a
--- /dev/null
+++ b/package/libargon2/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBARGON2
+ bool "libargon2"
+ depends on BR2_USE_MMU
+ depends on !BR2_STATIC_LIBS
+ help
+ A modern password hashing algorithm
+
+ https://password-hashing.net/#argon2
diff --git a/package/libargon2/libargon2.hash b/package/libargon2/libargon2.hash
new file mode 100644
index 0000000..c524b42
--- /dev/null
+++ b/package/libargon2/libargon2.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 eaea0172c1f4ee4550d1b6c9ce01aab8d1ab66b4207776aa67991eb5872fdcd8 libargon2-20171227.tar.gz
+sha256 220f8736a89ff51c92ef3d497f413b48e6cf1df3d6278bc909c6308c78e1718e LICENSE
diff --git a/package/libargon2/libargon2.mk b/package/libargon2/libargon2.mk
new file mode 100644
index 0000000..db87d15
--- /dev/null
+++ b/package/libargon2/libargon2.mk
@@ -0,0 +1,29 @@
+################################################################################
+#
+# libargon2
+#
+################################################################################
+
+LIBARGON2_VERSION = 20171227 # 20190702 is not recognized by php7.3
+LIBARGON2_SITE = $(call github,P-H-C,phc-winner-argon2,$(LIBARGON2_VERSION))
+LIBARGON2_LICENSE = CC0
+LIBARGON2_LICENSE_FILES = LICENSE
+LIBARGON2_INSTALL_STAGING = YES
+
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
+LIBARGON2_OPTS += NO_THREADS=1
+endif
+
+define LIBARGON2_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) OPTTARGET=$(GCC_TARGET_ARCH) $(LIBARGON2_OPTS)
+endef
+
+define LIBARGON2_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+define LIBARGON2_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+$(eval $(generic-package))