Linux: engines and apps build in an Ubuntu 26.04 container, glibc 2.43 at most (L1.4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-11 11:00:48 -04:00
1 parent c2f16bc899
commit e3bfe8ade4
11 files changed
+110 -5

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
# Linux builds on glibc 2.43 run on Ubuntu 26.04 onward.
FROM ubuntu:26.04@sha256:f144425ff09be612d6d9ad965196e9cdc23dae1f42110a8a11a3e9a8198759f7
ENV DEBIAN_FRONTEND=noninteractive
RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources \
&& apt-get update \
&& apt-get build-dep -y libreoffice \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl ca-certificates git rsync patch file jq python3 nodejs npm rustup \
cmake ninja-build pkg-config nasm \
libssl-dev libjitterentropy3-dev libzstd-dev zlib1g-dev \
libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libx11-xcb-dev libxcb1-dev libfontconfig-dev \
&& rm -rf /var/lib/apt/lists/*
ENV RUSTUP_HOME=/opt/rustup
# As rust-toolchain.toml pins it.
RUN rustup toolchain install 1.96.0 --profile minimal --component rustfmt,clippy \
&& rustup default 1.96.0 \
&& chmod -R a+rX /opt/rustup
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Usage: container.sh <command...>; runs it in Ubuntu 26.04.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
[ $# -gt 0 ] || {
echo "container.sh: give a command, such as scripts/build-libreoffice.sh" >&2
exit 1
}
image=ely-office-linux-build
docker build -q -t "$image" "$root/packaging/linux" >/dev/null
# Own target and Cargo home: host builds need newer glibc.
mkdir -p "$root/target/ubuntu" "$root/target/ubuntu-cargo" "$root/target/ubuntu-home"
docker run --rm --user "$(id -u):$(id -g)" -v "$root:$root" -w "$root" \
-e HOME="$root/target/ubuntu-home" -e CARGO_HOME="$root/target/ubuntu-cargo" \
-e CARGO_TARGET_DIR="$root/target/ubuntu" -e ELY_RELEASE_TOKEN \
"$image" "$@"
+4 -3
View File
@@ -25,16 +25,17 @@ need() { # path, what to run
}
}
build() { cargo build --manifest-path "$root/Cargo.toml" --release "$@"; }
release=${CARGO_TARGET_DIR:-$root/target}/release
rm -rf "$out"
mkdir -p "$out"
build -p "$slug"
cp "$root/target/release/$slug$exe" "$out/"
cp "$release/$slug$exe" "$out/"
if uses ely-lok; then
lo=${ELY_LO_DIR:-$root/engines/lo-src/instdir}
need "$lo/program" scripts/build-libreoffice.sh
build -p ely-lok --bin ely-lok-worker
cp "$root/target/release/ely-lok-worker$exe" "$out/"
cp "$release/ely-lok-worker$exe" "$out/"
# The kernel in LibreOffice's layout, beside the app.
mkdir "$out/libreoffice"
cp -R "$lo/program" "$lo/share" "$lo/presets" "$out/libreoffice/"
@@ -56,7 +57,7 @@ if uses ely-pdf-engine; then
tessdata=${ELY_TESSDATA:-$root/engines/tessdata}
need "$tessdata/eng.traineddata" scripts/fetch-tessdata.sh
build -p ely-pdf-engine --bin ely-pdf-worker
cp "$root/target/release/ely-pdf-worker$exe" "$out/"
cp "$release/ely-pdf-worker$exe" "$out/"
mkdir "$out/tessdata"
cp "$tessdata"/{eng,chi_sim,chi_tra}.traineddata "$out/tessdata/"
fi