feat: 升级 Monero 至 v0.18.5.4,更新 OpenSSL 和 unbound

This commit is contained in:
wangdefa committed 2026-10-16 08:40:40 +05:30
1 parent 596ffc1567
commit 693095a3eb
4 files changed
+15 -15

No files matched your search

+6 -6
View File
@@ -46,7 +46,7 @@ sudo apt-get update && sudo apt-get install mond
```bash ```bash
curl -fSL -o mond.tar.gz \ curl -fSL -o mond.tar.gz \
https://gitea.bcde.io/api/packages/wangdefa/generic/mond/0.18.5.1/mond-amd64-linux-static-0.18.5.1.tar.gz https://gitea.bcde.io/api/packages/wangdefa/generic/mond/0.18.5.4/mond-amd64-linux-static-0.18.5.4.tar.gz
tar -xzf mond.tar.gz tar -xzf mond.tar.gz
./mond --config-file params.conf # 配置模板见仓库 conf/params.example.conf ./mond --config-file params.conf # 配置模板见仓库 conf/params.example.conf
``` ```
@@ -58,7 +58,7 @@ Gitea Actions 分为两条流水线:
- [.gitea/workflows/ci.yml](.gitea/workflows/ci.yml):分支推送时检查版本、配置和 shell 语法,并在 amd64、arm64 原生 runner 上编译、严格冒烟测试和验证 DEB 包内容。 - [.gitea/workflows/ci.yml](.gitea/workflows/ci.yml):分支推送时检查版本、配置和 shell 语法,并在 amd64、arm64 原生 runner 上编译、严格冒烟测试和验证 DEB 包内容。
- [.gitea/workflows/release.yml](.gitea/workflows/release.yml):tag 推送时构建 tar.gz 和 DEB,生成 `SHA256SUMS`,上传包仓库并创建或更新 Release。 - [.gitea/workflows/release.yml](.gitea/workflows/release.yml):tag 推送时构建 tar.gz 和 DEB,生成 `SHA256SUMS`,上传包仓库并创建或更新 Release。
musl 纯静态在 `alpine:3.23` 下手编 5 个静态库(OpenSSL 3.0.21、libsodium 1.0.20、libzmq 4.3.5、expat 2.6.4、unbound 1.25.1)并 patch monero CMakeLists(去 `-pie`、Linux `STATIC_FLAGS` 改真 `-static`),产出 static-pie 零依赖二进制。换名 + patch 逻辑见 [init.sh](init.sh)。 musl 纯静态在 `alpine:3.23` 下手编 5 个静态库(OpenSSL 3.0.22、libsodium 1.0.20、libzmq 4.3.5、expat 2.6.4、unbound 1.26.1)并 patch monero CMakeLists(去 `-pie`、Linux `STATIC_FLAGS` 改真 `-static`),产出 static-pie 零依赖二进制。换名 + patch 逻辑见 [init.sh](init.sh)。
本地构建: 本地构建:
@@ -73,15 +73,15 @@ docker buildx build --platform linux/amd64 \
ldd output/linux_amd64/mond ldd output/linux_amd64/mond
# 用产物 tar.gz 打 .deb # 用产物 tar.gz 打 .deb
./debian/build-deb.sh amd64 0.18.5.1 mond-amd64-linux-static-0.18.5.1.tar.gz ./debian/build-deb.sh amd64 0.18.5.4 mond-amd64-linux-static-0.18.5.4.tar.gz
``` ```
## 版本号约定 ## 版本号约定
- 根目录 [VERSION](VERSION) 是唯一版本来源,使用不带 `v` 的四段版本号。 - 根目录 [VERSION](VERSION) 是唯一版本来源,使用不带 `v` 的四段版本号。
- **上游源码 git tag** 带 `v`(如 `v0.18.5.1`),CI 构建时自动补回。 - **上游源码 git tag** 带 `v`(如 `v0.18.5.4`),CI 构建时自动补回。
- **包版本**(tar.gz / deb / registry 路径)一律用数字(如 `0.18.5.1`),符合 Debian 版本规范。 - **包版本**(tar.gz / deb / registry 路径)一律用数字(如 `0.18.5.4`),符合 Debian 版本规范。
- 发布 tag 可写成 `0.18.5.1` 或 `v0.18.5.1`,去掉 `v` 后必须与 VERSION 一致。 - 发布 tag 可写成 `0.18.5.4` 或 `v0.18.5.4`,去掉 `v` 后必须与 VERSION 一致。
发版时先更新 VERSION 并提交,再创建同版本 tag。 发版时先更新 VERSION 并提交,再创建同版本 tag。
+1 -1
View File
@@ -1 +1 @@
0.18.5.1 0.18.5.4
+1 -1
View File
@@ -4,7 +4,7 @@ set -e
# 参数检查 # 参数检查
if [ $# -ne 3 ]; then if [ $# -ne 3 ]; then
echo "Usage: $0 <ARCH> <VERSION> <TARGZ_FILE>" echo "Usage: $0 <ARCH> <VERSION> <TARGZ_FILE>"
echo "Example: $0 amd64 0.18.5.1 mond-amd64-linux-static-0.18.5.1.tar.gz" echo "Example: $0 amd64 0.18.5.4 mond-amd64-linux-static-0.18.5.4.tar.gz"
exit 1 exit 1
fi fi
+7 -7
View File
@@ -10,12 +10,12 @@ RUN apk add --no-cache g++ gcc make cmake git linux-headers autoconf automake li
ENV CFLAGS="-fPIC -O2" CXXFLAGS="-fPIC -O2" ENV CFLAGS="-fPIC -O2" CXXFLAGS="-fPIC -O2"
WORKDIR /deps WORKDIR /deps
# OpenSSL 3.0.21(与 Monero v0.18.5.1 depends 对齐;Alpine 仓库只有 .so,须源码编静态) # OpenSSL 3.0.22(与 Monero v0.18.5.4 depends 对齐;Alpine 仓库只有 .so,须源码编静态)
RUN wget -q https://github.com/openssl/openssl/releases/download/openssl-3.0.21/openssl-3.0.21.tar.gz && \ RUN wget -q https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz && \
tar xf openssl-3.0.21.tar.gz && cd openssl-3.0.21 && \ tar xf openssl-3.0.22.tar.gz && cd openssl-3.0.22 && \
if [ "$(uname -m)" = aarch64 ]; then OSSL_T=linux-aarch64; else OSSL_T=linux-x86_64; fi && \ if [ "$(uname -m)" = aarch64 ]; then OSSL_T=linux-aarch64; else OSSL_T=linux-x86_64; fi && \
./Configure no-shared no-tests --prefix=/usr --libdir=lib $OSSL_T && \ ./Configure no-shared no-tests --prefix=/usr --libdir=lib $OSSL_T && \
make -j"$(nproc)" && make install_sw && cd / && rm -rf /deps/openssl-3.0.21* make -j"$(nproc)" && make install_sw && cd / && rm -rf /deps/openssl-3.0.22*
# libsodium 1.0.20 # libsodium 1.0.20
RUN wget -q https://download.libsodium.org/libsodium/releases/libsodium-1.0.20.tar.gz && \ RUN wget -q https://download.libsodium.org/libsodium/releases/libsodium-1.0.20.tar.gz && \
@@ -35,9 +35,9 @@ RUN wget -q https://github.com/libexpat/libexpat/releases/download/R_2_6_4/expat
./configure --enable-static --disable-shared --prefix=/usr && \ ./configure --enable-static --disable-shared --prefix=/usr && \
make -j"$(nproc)" && make install && cd / && rm -rf /deps/expat-2.6.4* make -j"$(nproc)" && make install && cd / && rm -rf /deps/expat-2.6.4*
# unbound 1.25.1(DNSSEC,与 Monero v0.18.5.1 depends 对齐) # unbound 1.26.1(DNSSEC,与 Monero v0.18.5.4 depends 对齐)
RUN wget -q https://www.nlnetlabs.nl/downloads/unbound/unbound-1.25.1.tar.gz && \ RUN wget -q https://www.nlnetlabs.nl/downloads/unbound/unbound-1.26.1.tar.gz && \
tar xf unbound-1.25.1.tar.gz && cd unbound-1.25.1 && \ tar xf unbound-1.26.1.tar.gz && cd unbound-1.26.1 && \
./configure --disable-shared --enable-static --prefix=/usr --with-libexpat=/usr --with-ssl=/usr \ ./configure --disable-shared --enable-static --prefix=/usr --with-libexpat=/usr --with-ssl=/usr \
--with-libevent=no --without-pythonmodule --without-pyunbound --with-libunbound-only --with-pic && \ --with-libevent=no --without-pythonmodule --without-pyunbound --with-libunbound-only --with-pic && \
make -j"$(nproc)" && make install && cd / && rm -rf /deps/unbound* make -j"$(nproc)" && make install && cd / && rm -rf /deps/unbound*