diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1702d6a..ba26dcc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,10 @@ jobs: - os: macos-latest target: aarch64-apple-darwin - os: ubuntu-22.04 - target: x86_64-unknown-linux-gnu + # musl → a fully static Linux binary with no glibc version + # dependency, so it runs on old distros (e.g. Ubuntu 20.04 / + # glibc 2.31) that the glibc build's GLIBC_2.3x symbols break on. + target: x86_64-unknown-linux-musl steps: - uses: actions/checkout@v4 @@ -29,6 +32,14 @@ jobs: with: targets: ${{ matrix.target }} + # musl-gcc is needed to compile the C sources we statically link: + # rusqlite's bundled SQLite amalgamation and ring (ureq's rustls TLS). + - name: Install musl build tools + if: contains(matrix.target, 'musl') + run: | + sudo apt-get update + sudo apt-get install -y musl-tools + - name: Cache cargo registry + build uses: actions/cache@v4 with: diff --git a/README.md b/README.md index 31bd0da..fdfae96 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Detects your platform, downloads the latest release tarball from GitHub, verifie Download from the [GitHub Releases](https://github.com/rollysys/auditui/releases) page. Available targets: - `aarch64-apple-darwin` — macOS Apple Silicon (M1/M2/M3/M4) -- `x86_64-unknown-linux-gnu` — Linux x86_64 +- `x86_64-unknown-linux-musl` — Linux x86_64 (static; runs on any glibc, incl. old distros) > **Intel Mac (x86_64-apple-darwin)**: build from source with the steps below — Intel runners on GitHub Actions are deprecated and prebuilt artifacts are no longer published. diff --git a/README.zh.md b/README.zh.md index 42f8c23..749207b 100644 --- a/README.zh.md +++ b/README.zh.md @@ -78,7 +78,7 @@ curl -fsSL https://github.com/rollysys/auditui/releases/latest/download/install. 去 [GitHub Releases](https://github.com/rollysys/auditui/releases) 页面下载。提供的目标平台: - `aarch64-apple-darwin` — macOS Apple Silicon (M1/M2/M3/M4) -- `x86_64-unknown-linux-gnu` — Linux x86_64 +- `x86_64-unknown-linux-musl` — Linux x86_64(静态链接;任意 glibc 版本均可运行,含老发行版) > **Intel Mac (x86_64-apple-darwin)**: 请用下面的源码编译方式 — GitHub Actions 的 Intel runner 已 deprecated,不再发布预编译产物。 diff --git a/install.sh b/install.sh index fccc7ed..a3f35e2 100755 --- a/install.sh +++ b/install.sh @@ -38,7 +38,9 @@ case "$os-$arch" in Darwin-arm64|Darwin-aarch64) target="aarch64-apple-darwin" ;; Linux-x86_64|Linux-amd64) - target="x86_64-unknown-linux-gnu" ;; + # Statically-linked musl build: runs on any x86_64 Linux regardless + # of glibc version (no GLIBC_2.3x dependency). + target="x86_64-unknown-linux-musl" ;; Darwin-x86_64) red "Intel Mac (Darwin x86_64) — prebuilt binary not published." red "Please build from source:"