Skip to content

Commit 9688a81

Browse files
authored
Merge branch 'master' into docs/update-arch-process
2 parents f898026 + 193f24a commit 9688a81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+558
-243
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,22 @@ ENV LIGHTNINGD_VERSION=master
100100

101101
RUN dpkg --add-architecture ${target_arch_dpkg}
102102

103-
#TODO: python3-dev needs QEMU for post install scripts. find a workaround to not use QEMU
103+
# Install architecture-independent libraries
104104
RUN apt-get update && \
105105
apt-get install -qq -y --no-install-recommends \
106-
pkg-config:${target_arch_dpkg} \
107-
libffi-dev:${target_arch_dpkg} \
108-
python3-dev:${target_arch_dpkg} \
109-
libicu-dev:${target_arch_dpkg} \
110-
zlib1g-dev:${target_arch_dpkg} \
111-
libsqlite3-dev:${target_arch_dpkg} \
112-
libpq-dev:${target_arch_dpkg} \
113-
crossbuild-essential-${target_arch_dpkg}
106+
python3-dev \
107+
lowdown
108+
109+
# Install target-arch libraries
110+
RUN apt-get install -qq -y --no-install-recommends \
111+
pkg-config:${target_arch_dpkg} \
112+
libffi-dev:${target_arch_dpkg} \
113+
libicu-dev:${target_arch_dpkg} \
114+
zlib1g-dev:${target_arch_dpkg} \
115+
libsqlite3-dev:${target_arch_dpkg} \
116+
libpq-dev:${target_arch_dpkg} \
117+
libsodium-dev:${target_arch_dpkg} \
118+
crossbuild-essential-${target_arch_dpkg}
114119

115120
ARG AR=${target_arch}-ar
116121
ARG AS=${target_arch}-as
@@ -139,6 +144,8 @@ RUN ./install-uv.sh -q
139144
RUN ./install-rust.sh -y -q --profile minimal --component rustfmt --target ${target_arch_rust}
140145

141146
ENV PATH="/root/.cargo/bin:/root/.local/bin:${PATH}"
147+
ENV PKG_CONFIG_PATH=/usr/lib/${target_arch}/pkgconfig
148+
ENV PKG_CONFIG_LIBDIR=/usr/lib/${target_arch}/pkgconfig
142149

143150
WORKDIR /opt/lightningd
144151

@@ -161,7 +168,9 @@ RUN apt-get update && \
161168
inotify-tools \
162169
socat \
163170
jq \
164-
libpq5 && \
171+
libpq5 \
172+
libsqlite3-0 \
173+
libsodium23 && \
165174
apt-get clean && \
166175
rm -rf /var/lib/apt/lists/*
167176

Makefile

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,26 @@ man8dir = $(mandir)/man8
263263
ifeq ("$(OS)-$(ARCH)", "Darwin-arm64")
264264
CPATH := /opt/homebrew/include
265265
LIBRARY_PATH := /opt/homebrew/lib
266-
LDFLAGS := -L/opt/homebrew/opt/sqlite/lib -L/opt/homebrew/opt/openssl@3/lib
267-
CPPFLAGS := -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/openssl@3/include
268-
PKG_CONFIG_PATH=/opt/homebrew/opt/sqlite/lib/pkgconfig
269266
else
270267
CPATH := /usr/local/include
271268
LIBRARY_PATH := /usr/local/lib
272269
endif
273270

271+
# Detect OpenSSL and SQLite paths dynamically using brew --prefix
272+
ifeq ("$(OS)", "Darwin")
273+
OPENSSL_PREFIX := $(shell brew --prefix openssl@3 2>/dev/null || brew --prefix openssl 2>/dev/null || echo "")
274+
SQLITE_PREFIX := $(shell brew --prefix sqlite 2>/dev/null || echo "")
275+
ifneq ("$(OPENSSL_PREFIX)", "")
276+
LDFLAGS += -L$(OPENSSL_PREFIX)/lib
277+
CPPFLAGS += -I$(OPENSSL_PREFIX)/include
278+
endif
279+
ifneq ("$(SQLITE_PREFIX)", "")
280+
LDFLAGS += -L$(SQLITE_PREFIX)/lib
281+
CPPFLAGS += -I$(SQLITE_PREFIX)/include
282+
PKG_CONFIG_PATH := $(SQLITE_PREFIX)/lib/pkgconfig:$(PKG_CONFIG_PATH)
283+
endif
284+
endif
285+
274286
CPPFLAGS += -DCLN_NEXT_VERSION="\"$(CLN_NEXT_VERSION)\"" -DPKGLIBEXECDIR="\"$(pkglibexecdir)\"" -DBINDIR="\"$(bindir)\"" -DPLUGINDIR="\"$(plugindir)\"" -DCCAN_TAL_NEVER_RETURN_NULL=1
275287
CFLAGS = $(CPPFLAGS) $(CWARNFLAGS) $(CDEBUGFLAGS) $(COPTFLAGS) -I $(CCANDIR) $(EXTERNAL_INCLUDE_FLAGS) -I . -I$(CPATH) $(SQLITE3_CFLAGS) $(SODIUM_CFLAGS) $(POSTGRES_INCLUDE) $(FEATURES) $(COVFLAGS) $(DEV_CFLAGS) -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS $(PIE_CFLAGS) $(COMPAT_CFLAGS) $(CSANFLAGS)
276288

@@ -392,7 +404,12 @@ include cln-grpc/Makefile
392404
endif
393405
include plugins/Makefile
394406
include tests/plugins/Makefile
407+
408+
# Only include fuzz tests if OpenSSL >= 3.0, will be disabled on ubuntu focal
409+
OPENSSL_VERSION := $(shell openssl version | sed -n 's/OpenSSL \([0-9]\+\)\..*/\1/p')
410+
ifneq ($(shell test $(OPENSSL_VERSION) -ge 3 && echo yes),)
395411
include tests/fuzz/Makefile
412+
endif
396413

397414
ifneq ($V,1)
398415
MSGGEN_ARGS := -s

common/setup.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
static void *cln_wally_tal(size_t size)
1212
{
1313
assert(wally_tal_ctx);
14-
assert(tal_check(wally_tal_ctx, "cln_wally_tal ctx check"));
1514
return tal_arr_label(wally_tal_ctx, u8, size, "cln_wally_tal");
1615
}
1716

contrib/docker/Dockerfile.builder.fedora

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,17 @@ RUN dnf update -y && \
2020
jq \
2121
xz \
2222
zlib-devel \
23-
cargo && \
23+
cargo \
24+
libsodium-devel && \
25+
wget https://github.com/kristapsdz/lowdown/archive/refs/tags/VERSION_1_0_2.tar.gz && \
26+
tar -xzf VERSION_1_0_2.tar.gz && \
27+
cd lowdown-VERSION_1_0_2 && \
28+
./configure && \
29+
make && \
30+
make install && \
31+
ldconfig && \
32+
cd /tmp && \
33+
rm -rf VERSION_1_0_2.tar.gz lowdown-VERSION_1_0_2 && \
2434
dnf clean all
2535

2636
RUN wget https://storage.googleapis.com/c-lightning-tests/bitcoind/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz \

contrib/msggen/msggen/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27137,7 +27137,7 @@
2713727137
"description": [
2713827138
"It specifies the type of address wanted; currently *bech32* (e.g. `tb1qu9j4lg5f9rgjyfhvfd905vw46eg39czmktxqgg` on bitcoin testnet or `bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej` on bitcoin mainnet), or *p2tr* taproot addresses. The special value *all* generates all known address types for the same underlying key."
2713927139
],
27140-
"default": "*bech32* address",
27140+
"default": "*p2tr* address",
2714127141
"enum": [
2714227142
"bech32",
2714327143
"p2tr",

contrib/pyln-testing/pyln/testing/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ def restart(self, timeout=10, clean=True):
11061106
def fundchannel(self, l2, amount=FUNDAMOUNT, wait_for_active=True,
11071107
announce_channel=True, **kwargs):
11081108
# Give yourself some funds to work with
1109-
addr = self.rpc.newaddr()['bech32']
1109+
addr = self.rpc.newaddr('bech32')['bech32']
11101110

11111111
def has_funds_on_addr(addr):
11121112
"""Check if the given address has funds in the internal wallet.
@@ -1737,7 +1737,7 @@ def join_nodes(self, nodes, fundchannel=True, fundamount=FUNDAMOUNT, wait_for_an
17371737
bitcoind = nodes[0].bitcoin
17381738
# If we got here, we want to fund channels
17391739
for src, dst in connections:
1740-
addr = src.rpc.newaddr()['bech32']
1740+
addr = src.rpc.newaddr('bech32')['bech32']
17411741
bitcoind.rpc.sendtoaddress(addr, (fundamount + 1000000) / 10**8)
17421742

17431743
bitcoind.generate_block(1)

contrib/reprobuild/Dockerfile.focal

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,32 @@ RUN sed -i '/updates/d' /etc/apt/sources.list && \
1111
sed -i '/security/d' /etc/apt/sources.list
1212

1313
RUN apt-get update \
14-
&& apt-get install -y --no-install-recommends \
15-
autoconf \
16-
build-essential \
17-
ca-certificates \
18-
file \
19-
gettext \
20-
git \
21-
libpq-dev \
22-
libsodium23 \
23-
libtool \
24-
m4 \
25-
sudo \
26-
unzip \
27-
wget \
28-
git \
29-
zip
14+
&& apt-get install -y --no-install-recommends \
15+
autoconf \
16+
build-essential \
17+
ca-certificates \
18+
file \
19+
gettext \
20+
git \
21+
libpq-dev \
22+
libsodium23 \
23+
libsodium-dev \
24+
libtool \
25+
m4 \
26+
sudo \
27+
unzip \
28+
wget \
29+
zip \
30+
&& cd /tmp \
31+
&& wget https://github.com/kristapsdz/lowdown/archive/refs/tags/VERSION_1_0_2.tar.gz \
32+
&& tar -xzf VERSION_1_0_2.tar.gz \
33+
&& cd lowdown-VERSION_1_0_2 \
34+
&& ./configure \
35+
&& make \
36+
&& make install \
37+
&& ldconfig \
38+
&& cd / \
39+
&& rm -rf /tmp/VERSION_1_0_2.tar.gz /tmp/lowdown-VERSION_1_0_2
3040

3141
# Ensure correct ownership
3242
RUN chown root:root /etc/sudoers

contrib/reprobuild/Dockerfile.jammy

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,35 @@ ENV PROTOC_VERSION=29.4
1010
RUN sed -i '/updates/d' /etc/apt/sources.list && \
1111
sed -i '/security/d' /etc/apt/sources.list
1212

13-
RUN apt-get update \
14-
&& apt-get install -y --no-install-recommends \
15-
autoconf \
16-
build-essential \
17-
ca-certificates \
18-
file \
19-
gettext \
20-
git \
21-
libsqlite3-dev \
22-
libpq-dev \
23-
libsodium23 \
24-
libtool \
25-
m4 \
26-
sudo \
27-
unzip \
28-
wget \
29-
jq \
30-
zip
13+
RUN apt-get update && \
14+
apt-get install -y --no-install-recommends \
15+
autoconf \
16+
build-essential \
17+
ca-certificates \
18+
file \
19+
gettext \
20+
git \
21+
libsqlite3-dev \
22+
libpq-dev \
23+
libsodium23 \
24+
libsodium-dev \
25+
libtool \
26+
m4 \
27+
sudo \
28+
unzip \
29+
wget \
30+
jq \
31+
zip \
32+
&& cd /tmp \
33+
&& wget https://github.com/kristapsdz/lowdown/archive/refs/tags/VERSION_1_0_2.tar.gz \
34+
&& tar -xzf VERSION_1_0_2.tar.gz \
35+
&& cd lowdown-VERSION_1_0_2 \
36+
&& ./configure \
37+
&& make \
38+
&& make install \
39+
&& ldconfig \
40+
&& cd / \
41+
&& rm -rf /tmp/VERSION_1_0_2.tar.gz /tmp/lowdown-VERSION_1_0_2
3142

3243
# Ensure correct ownership
3344
RUN chown root:root /etc/sudoers

contrib/reprobuild/Dockerfile.noble

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ RUN apt-get update \
2222
libsqlite3-dev \
2323
libpq-dev \
2424
libsodium23 \
25+
libsodium-dev \
26+
lowdown \
2527
libtool \
2628
m4 \
2729
sudo \

0 commit comments

Comments
 (0)