From 3da874371b0d3e95110fbcff025caa16b577c73c Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 9 Oct 2021 01:25:21 +0100 Subject: [PATCH] libsodium: include ed25519_core in minimal build Functions from ed25519_core are needed for GNUnet to build. Include them in the minimal build of libsodium so we don't need to switch to the full build just for that. Signed-off-by: Daniel Golle --- libs/libsodium/Makefile | 2 +- .../100-minimal-build-with-ed25519-core.patch | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 libs/libsodium/patches/100-minimal-build-with-ed25519-core.patch diff --git a/libs/libsodium/Makefile b/libs/libsodium/Makefile index 14abb17218..2ab2bbdd33 100644 --- a/libs/libsodium/Makefile +++ b/libs/libsodium/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libsodium PKG_VERSION:=1.0.18 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://download.libsodium.org/libsodium/releases \ diff --git a/libs/libsodium/patches/100-minimal-build-with-ed25519-core.patch b/libs/libsodium/patches/100-minimal-build-with-ed25519-core.patch new file mode 100644 index 0000000000..99d780958c --- /dev/null +++ b/libs/libsodium/patches/100-minimal-build-with-ed25519-core.patch @@ -0,0 +1,36 @@ +--- a/src/libsodium/Makefile.am ++++ b/src/libsodium/Makefile.am +@@ -12,6 +12,7 @@ libsodium_la_SOURCES = \ + crypto_box/crypto_box_easy.c \ + crypto_box/crypto_box_seal.c \ + crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c \ ++ crypto_core/ed25519/core_ed25519.c \ + crypto_core/ed25519/ref10/ed25519_ref10.c \ + crypto_core/hchacha20/core_hchacha20.c \ + crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c \ +@@ -152,7 +153,6 @@ if !MINIMAL + libsodium_la_SOURCES += \ + crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c \ + crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c \ +- crypto_core/ed25519/core_ed25519.c \ + crypto_core/ed25519/core_ristretto255.c \ + crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c \ + crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h \ +--- a/src/libsodium/include/sodium.h ++++ b/src/libsodium/include/sodium.h +@@ -14,6 +14,7 @@ + #include "sodium/crypto_auth_hmacsha512256.h" + #include "sodium/crypto_box.h" + #include "sodium/crypto_box_curve25519xsalsa20poly1305.h" ++#include "sodium/crypto_core_ed25519.h" + #include "sodium/crypto_core_hsalsa20.h" + #include "sodium/crypto_core_hchacha20.h" + #include "sodium/crypto_core_salsa20.h" +@@ -56,7 +57,6 @@ + + #ifndef SODIUM_LIBRARY_MINIMAL + # include "sodium/crypto_box_curve25519xchacha20poly1305.h" +-# include "sodium/crypto_core_ed25519.h" + # include "sodium/crypto_core_ristretto255.h" + # include "sodium/crypto_scalarmult_ristretto255.h" + # include "sodium/crypto_secretbox_xchacha20poly1305.h"