external/libsodium: remove
We shipped our own because Ubuntu xenial (16.4) had an ancient one. Changelog-Changed: Build: libsodium version >= 1.0.4 now required (released 2015-06-11) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
1
.github/scripts/setup.sh
vendored
1
.github/scripts/setup.sh
vendored
@@ -30,6 +30,7 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
|
||||
libicu-dev \
|
||||
libpq-dev \
|
||||
libprotobuf-c-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libtool \
|
||||
|
||||
3
.github/workflows/bsd.yml
vendored
3
.github/workflows/bsd.yml
vendored
@@ -40,6 +40,7 @@ jobs:
|
||||
bash \
|
||||
gettext \
|
||||
sqlite3 \
|
||||
libsodium \
|
||||
lowdown \
|
||||
pkgconf \
|
||||
jq \
|
||||
@@ -60,7 +61,7 @@ jobs:
|
||||
git clone https://github.com/lightning/bolts.git ../bolts
|
||||
# fatal: unsafe repository ('/Users/runner/work/lightning/lightning' is owned by someone else)
|
||||
git config --global --add safe.directory `pwd`
|
||||
for d in libsodium libwally-core gheap jsmn libbacktrace; do git config --global --add safe.directory `pwd`/external/$d; done
|
||||
for d in libwally-core gheap jsmn libbacktrace; do git config --global --add safe.directory `pwd`/external/$d; done
|
||||
git submodule update --init --recursive
|
||||
|
||||
./configure CC="$CC" --disable-valgrind
|
||||
|
||||
2
.github/workflows/macos.yaml
vendored
2
.github/workflows/macos.yaml
vendored
@@ -37,7 +37,7 @@ jobs:
|
||||
run: |
|
||||
export PATH="/usr/local/opt:/Users/runner/.local/bin:/opt/homebrew/bin/python3.10/bin:$PATH"
|
||||
|
||||
brew install gnu-sed autoconf automake libtool protobuf openssl lowdown
|
||||
brew install gnu-sed autoconf automake libtool protobuf openssl lowdown libsodium
|
||||
|
||||
# https://github.com/grpc/grpc/issues/31737#issuecomment-1323796842
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,9 +1,6 @@
|
||||
[submodule "daemon/jsmn"]
|
||||
path = external/jsmn
|
||||
url = https://github.com/zserge/jsmn
|
||||
[submodule "libsodium"]
|
||||
path = external/libsodium
|
||||
url = https://github.com/jedisct1/libsodium.git
|
||||
[submodule "external/libbacktrace"]
|
||||
path = external/libbacktrace
|
||||
url = https://github.com/ianlancetaylor/libbacktrace.git
|
||||
|
||||
5
configure
vendored
5
configure
vendored
@@ -629,6 +629,11 @@ while IFS='=' read VAR VAL; do
|
||||
eval $VAR=\"$VAL\"
|
||||
done < $CONFIG_VAR_FILE.$$
|
||||
|
||||
if [ "$HAVE_GOOD_LIBSODIUM" != 1 ]; then
|
||||
echo "*** We need a libsodium >= 1.0.4 (released 2015-06-11)." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$HAVE_SQLITE3" = 0 -a "$HAVE_POSTGRES" = 0 ]; then
|
||||
# I have no database yet I must schema!)
|
||||
echo "*** We need a database, but neither sqlite3 nor postgres found" >&2
|
||||
|
||||
@@ -24,7 +24,6 @@ Here's a list of parts, with notes:
|
||||
|
||||
- external/ - external libraries from other sources
|
||||
- libbacktrace - library to provide backtraces when things go wrong.
|
||||
- libsodium - encryption library (should be replaced soon with built-in)
|
||||
- libwally-core - bitcoin helper library
|
||||
- secp256k1 - bitcoin curve encryption library within libwally-core
|
||||
- jsmn - tiny JSON parsing helper
|
||||
|
||||
@@ -237,7 +237,7 @@ lightningd --network=testnet
|
||||
OS version: FreeBSD 11.1-RELEASE or above
|
||||
|
||||
```shell
|
||||
pkg install git python py39-pip gmake libtool gmp sqlite3 postgresql13-client gettext autotools lowdown
|
||||
pkg install git python py39-pip gmake libtool gmp sqlite3 postgresql13-client gettext autotools lowdown libsodium
|
||||
https://github.com/ElementsProject/lightning.git
|
||||
pip install --upgrade pip
|
||||
pip3 install mako
|
||||
|
||||
21
external/Makefile
vendored
21
external/Makefile
vendored
@@ -1,5 +1,4 @@
|
||||
SUBMODULES = \
|
||||
external/libsodium \
|
||||
external/libwally-core \
|
||||
external/gheap \
|
||||
external/jsmn \
|
||||
@@ -13,7 +12,6 @@ else
|
||||
TARGET_DIR := external/build-$(shell ${CC} -dumpmachine)
|
||||
endif
|
||||
|
||||
LIBSODIUM_HEADERS := external/libsodium/src/libsodium/include/sodium.h
|
||||
LIBWALLY_HEADERS := external/libwally-core/include/wally_bip32.h \
|
||||
external/libwally-core/include/wally_core.h \
|
||||
external/libwally-core/include/wally_psbt.h \
|
||||
@@ -25,7 +23,7 @@ JSMN_HEADERS := external/jsmn/jsmn.h
|
||||
GHEAP_HEADERS := external/gheap/gheap.h
|
||||
LIBBACKTRACE_HEADERS := external/libbacktrace/backtrace.h
|
||||
|
||||
EXTERNAL_HEADERS := $(LIBSODIUM_HEADERS) $(LIBWALLY_HEADERS) $(LIBSECP_HEADERS) $(JSMN_HEADERS) $(GHEAP_HEADERS) $(LIBBACKTRACE_HEADERS)
|
||||
EXTERNAL_HEADERS := $(LIBWALLY_HEADERS) $(LIBSECP_HEADERS) $(JSMN_HEADERS) $(GHEAP_HEADERS) $(LIBBACKTRACE_HEADERS)
|
||||
EXTERNAL_LIBS := ${TARGET_DIR}/libwallycore.a ${TARGET_DIR}/libsecp256k1.a ${TARGET_DIR}/libjsmn.a ${TARGET_DIR}/libbacktrace.a
|
||||
|
||||
EXTERNAL_INCLUDE_FLAGS := \
|
||||
@@ -36,14 +34,7 @@ EXTERNAL_INCLUDE_FLAGS := \
|
||||
-I external/gheap/ \
|
||||
-I ${TARGET_DIR}/libbacktrace-build
|
||||
|
||||
ifneq ($(HAVE_GOOD_LIBSODIUM),1)
|
||||
EXTERNAL_INCLUDE_FLAGS += -I external/libsodium/src/libsodium/include \
|
||||
-I external/libsodium/src/libsodium/include/sodium \
|
||||
-I $(TARGET_DIR)/libsodium-build/src/libsodium/include
|
||||
EXTERNAL_LIBS += ${TARGET_DIR}/libsodium.a
|
||||
else
|
||||
LDLIBS += $(SODIUM_LDLIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ZLIB),1)
|
||||
LDLIBS += -lz
|
||||
@@ -59,15 +50,6 @@ endif
|
||||
|
||||
$(EXTERNAL_HEADERS): submodcheck
|
||||
|
||||
# We build libsodium, since Ubuntu xenial has one too old.
|
||||
$(TARGET_DIR)/libsodium.a: $(TARGET_DIR)/libsodium-build/src/libsodium/libsodium.la
|
||||
$(MAKE) -C $(TARGET_DIR)/libsodium-build DESTDIR=$$(pwd)/$(TARGET_DIR) install-exec
|
||||
|
||||
$(TARGET_DIR)/libsodium-build/src/libsodium/libsodium.la: external/libsodium/src/libsodium/include/sodium.h
|
||||
cd external/libsodium && ./autogen.sh
|
||||
mkdir -p ${TARGET_DIR}/libsodium-build
|
||||
cd $(TARGET_DIR)/libsodium-build && $(TOP)/libsodium/configure CC="$(CC)" CFLAGS="$(FUZZFLAGS)" LDFLAGS="$(FUZZFLAGS)" --enable-static=yes $(CROSSCOMPILE_OPTS) --enable-shared=no --prefix=/ --libdir=/ && $(MAKE)
|
||||
|
||||
# libsecp included in libwally.
|
||||
# Wildcards here are magic. See http://stackoverflow.com/questions/2973445/gnu-makefile-rule-generating-a-few-targets-from-a-single-source-file
|
||||
$(TARGET_DIR)/libsecp256k1.% $(TARGET_DIR)/libwallycore.%: $(TARGET_DIR)/libwally-core-build/src/secp256k1/libsecp256k1.la $(TARGET_DIR)/libwally-core-build/src/libwallycore.la
|
||||
@@ -117,6 +99,5 @@ external-clean:
|
||||
$(RM) -rf $(TARGET_DIR)
|
||||
|
||||
external-distclean:
|
||||
make -C external/libsodium distclean || true
|
||||
$(RM) -rf ${TARGET_DIR}/libbacktrace-build ${TARGET_DIR}/libsodium-build ${TARGET_DIR}/libwally-core-build ${TARGET_DIR}/jsmn-build
|
||||
$(RM) -r `git status --ignored --porcelain external/libwally-core | grep '^!! ' | cut -c3-`
|
||||
|
||||
Reference in New Issue
Block a user