From 226533958aef0d9719dde2a401cebfba25218a00 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 26 Oct 2025 18:44:27 +1030 Subject: [PATCH] external/lowdown: remove. Every distribution we have packages this now. Changelog-Changed: Build: lowdown is now required (we no longer bundle our own). Signed-off-by: Rusty Russell --- .github/scripts/setup.sh | 1 + .github/workflows/bsd.yml | 2 +- .github/workflows/ci.yaml | 1 - .github/workflows/macos.yaml | 2 +- .gitmodules | 4 ---- configure | 8 +++----- doc/Makefile | 9 --------- doc/getting-started/getting-started/installation.md | 8 +++----- external/Makefile | 13 ------------- tools/build-release.sh | 5 ----- 10 files changed, 9 insertions(+), 44 deletions(-) diff --git a/.github/scripts/setup.sh b/.github/scripts/setup.sh index 6e3e50cc8..bc8cec9d2 100755 --- a/.github/scripts/setup.sh +++ b/.github/scripts/setup.sh @@ -35,6 +35,7 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \ libtool \ libxml2-utils \ locales \ + lowdown \ net-tools \ postgresql \ python-pkg-resources \ diff --git a/.github/workflows/bsd.yml b/.github/workflows/bsd.yml index eee34d937..630bed94f 100644 --- a/.github/workflows/bsd.yml +++ b/.github/workflows/bsd.yml @@ -60,7 +60,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 lowdown; do git config --global --add safe.directory `pwd`/external/$d; done + for d in libsodium 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 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index de198b3cc..78fc45adc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -196,7 +196,6 @@ jobs: run: | bash -x .github/scripts/setup.sh sudo apt-get update -qq - sudo apt-get install -y -qq lowdown # We're going to check BOLT quotes, so get the latest version git clone https://github.com/lightning/bolts.git ../${BOLTDIR} diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index 99f8a3dc3..560e5674a 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -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 + brew install gnu-sed autoconf automake libtool protobuf openssl lowdown # https://github.com/grpc/grpc/issues/31737#issuecomment-1323796842 export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 diff --git a/.gitmodules b/.gitmodules index 4788bedb3..a23dfd76b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,7 +14,3 @@ [submodule "external/gheap"] path = external/gheap url = https://github.com/valyala/gheap -[submodule "external/lowdown"] - path = external/lowdown - url = https://github.com/kristapsdz/lowdown.git - ignore = dirty diff --git a/configure b/configure index 5e480e9b6..0195172da 100755 --- a/configure +++ b/configure @@ -518,10 +518,9 @@ else HAVE_PYTHON3_MAKO=0 fi -if check_command 'lowdown' lowdown; then - HAVE_LOWDOWN=1 -else - HAVE_LOWDOWN=0 +if ! check_command 'lowdown' lowdown; then + echo "*** We need lowdown!" >&2 + exit 1 fi if echo | check_command sha256sum sha256sum; then @@ -615,7 +614,6 @@ add_var ASAN "$ASAN" add_var UBSAN "$UBSAN" add_var TEST_NETWORK "$TEST_NETWORK" add_var HAVE_PYTHON3_MAKO "$HAVE_PYTHON3_MAKO" -add_var HAVE_LOWDOWN "$HAVE_LOWDOWN" add_var SHA256SUM "$SHA256SUM" add_var FUZZING "$FUZZING" add_var RUST "$RUST" diff --git a/doc/Makefile b/doc/Makefile index c4c2192ab..c3f178f7e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -202,16 +202,7 @@ RBRACKET=) $(MARKDOWNPAGES_WITH_EXT): doc/%.7.md: doc/schemas/%.json tools/fromschema.py @tools/fromschema.py --markdownfile=$@ $< > $@.tmp && mv $@.tmp $@ -# If we need to build lowdown, make tools/md2man.sh depend on it. -# That way it's not used in SHA256STAMP (which only uses direct -# dependencies), but make will be forced to build it. -ifeq ($(HAVE_LOWDOWN),0) -LOWDOWN := $(TARGET_DIR)/lowdown-build/bin/lowdown -tools/md2man.sh: $(LOWDOWN) - touch $@ -else LOWDOWN := lowdown -endif # For versions in documentation, we don't change with every git version, to # save build time. We build them on new tags or keep them on pre-next-release version. diff --git a/doc/getting-started/getting-started/installation.md b/doc/getting-started/getting-started/installation.md index 045bfbc0d..45974315a 100644 --- a/doc/getting-started/getting-started/installation.md +++ b/doc/getting-started/getting-started/installation.md @@ -83,7 +83,7 @@ Get dependencies: sudo apt-get update sudo apt-get install -y \ jq autoconf automake build-essential git libtool libsqlite3-dev libffi-dev \ - python3 python3-pip net-tools zlib1g-dev libsodium-dev gettext + python3 python3-pip net-tools zlib1g-dev libsodium-dev gettext lowdown pip3 install --upgrade pip curl -LsSf https://astral.sh/uv/install.sh | sh ``` @@ -121,8 +121,6 @@ sudo apt-get install -y valgrind libpq-dev shellcheck cppcheck \ libsecp256k1-dev lowdown ``` -If you can't install `lowdown`, a version will be built in-tree. - If you want to build the Rust plugins (cln-grpc, clnrest, cln-bip353 and wss-proxy): ```shell @@ -239,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 +pkg install git python py39-pip gmake libtool gmp sqlite3 postgresql13-client gettext autotools lowdown https://github.com/ElementsProject/lightning.git pip install --upgrade pip pip3 install mako @@ -331,7 +329,7 @@ make Assuming you have Xcode and Homebrew installed. Install dependencies: ```shell -brew install autoconf automake libtool python3 gnu-sed gettext libsodium protobuf +brew install autoconf automake libtool python3 gnu-sed gettext libsodium protobuf lowdown export PATH="/usr/local/opt:$PATH" ``` diff --git a/external/Makefile b/external/Makefile index 7ca251205..311c94bc8 100644 --- a/external/Makefile +++ b/external/Makefile @@ -5,10 +5,6 @@ SUBMODULES = \ external/jsmn \ external/libbacktrace -ifeq ($(HAVE_LOWDOWN),0) -SUBMODULES += external/lowdown -endif - TOP := ../.. ifdef BUILD CROSSCOMPILE_OPTS := --host="$(MAKE_HOST)" --build="$(BUILD)" @@ -32,10 +28,6 @@ LIBBACKTRACE_HEADERS := external/libbacktrace/backtrace.h EXTERNAL_HEADERS := $(LIBSODIUM_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 -ifeq ($(HAVE_LOWDOWN),0) -EXTERNAL_HEADERS += external/lowdown/lowdown.h -endif - EXTERNAL_INCLUDE_FLAGS := \ -I external/libwally-core/include/ \ -I external/libwally-core/src/secp256k1/include/ \ @@ -117,10 +109,6 @@ $(TARGET_DIR)/libbacktrace.a: external/libbacktrace/backtrace.h cd $(TARGET_DIR)/libbacktrace-build && $(TOP)/libbacktrace/configure CC="$(CC)" --enable-static=yes $(CROSSCOMPILE_OPTS) --enable-shared=no --prefix=/ --libdir=/ && $(MAKE) $(MAKE) -C $(TARGET_DIR)/libbacktrace-build DESTDIR=$$(pwd)/$(TARGET_DIR) install-exec -$(TARGET_DIR)/lowdown-build/bin/lowdown: external/lowdown/lowdown.h - cd external/lowdown && CC="$(CC)" CFLAGS="$(FUZZFLAGS)" ./configure LDFLAGS="$(FUZZFLAGS)" PREFIX=`pwd`/$(TOP)/$(TARGET_DIR)/lowdown-build/ - $(MAKE) -C external/lowdown install - distclean: external-distclean clean: external-clean @@ -130,6 +118,5 @@ external-clean: external-distclean: make -C external/libsodium distclean || true - if [ -f external/lowdown/Makefile.configure ]; then $(MAKE) -C external/lowdown distclean; fi $(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-` diff --git a/tools/build-release.sh b/tools/build-release.sh index 1280d7999..7a96a22a8 100755 --- a/tools/build-release.sh +++ b/tools/build-release.sh @@ -141,11 +141,6 @@ echo "Current Timestamp: $DATE" mkdir -p "$RELEASEDIR" if [ "$WITHOUT_ZIP" = "false" ]; then - # submodcheck needs to know if we have lowdown - touch config.vars - ./configure --reconfigure - # If you don't have lowdown, your zip file will include it: we assume everyone has it now! - grep -q "HAVE_LOWDOWN=1" config.vars || (echo "Please install lowdown" >&2; exit 1) # If it's a completely clean directory, we need submodules! make submodcheck