A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
feat(release): ship a glibc 2.31 server build with OpenSSL built in
RoversX9a13841e884a
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex c1a56057..d8b4edbc 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -155,7 +155,10 @@ jobs:# glibc 2.35) also covers Ubuntu 24.04, Debian 12/13 and their# derivatives -- a separate Debian 12 build would ship a strictly# less portable deb with the same dependencies.+ # 20.04 builds only the server tarball, OpenSSL built in, for+ # hosts below 22.04's glibc: theirs is OpenSSL 1.1.[ {name: "ubuntu22.04", container: "ubuntu:22.04", appimage: true},+ {name: "ubuntu20.04", container: "ubuntu:20.04", appimage: false, old_glibc: true},{name: "fedora41", container: "fedora:41", appimage: false} ] as $distros| [ if $x then {arch: "x86_64", runs_on: "ubuntu-latest"} else empty end,if $a then {arch: "arm64", runs_on: "ubuntu-24.04-arm"} else empty end ] as $arches@@ -545,6 +548,8 @@ jobs:# Job-wide, not per-step: ./get-deps pulls in tzdata and friends, and a# debconf prompt there would hang until timeout-minutes with no output.DEBIAN_FRONTEND: noninteractive+ # The 20.04 leg: build, check and pack the old-glibc server alone.+ OLD_GLIBC_SERVER: ${{ matrix.old_glibc && '1' || '' }}steps:# git has to exist before actions/checkout runs, otherwise it silently@@ -593,7 +598,7 @@ jobs:with:toolchain: stable- # rust-cache keys on the job id, which is just "linux" for all six legs.+ # rust-cache keys on the job id, which is just "linux" for every leg.# Without an explicit key a fedora job would happily restore a target dir# built inside ubuntu, and whichever leg finishes first wins the write# while the others burn minutes compressing an entry they cannot save.@@ -607,22 +612,34 @@ jobs:- name: Install system depsrun: env CI=yes PATH=$PATH ./get-deps+ # One cargo build for every program: features unify across it, so the+ # 20.04 leg's vendored-openssl on the mux server reaches them all.- name: Buildrun: |- cargo build --profile "$CARGO_PROFILE" \- -p wezterm \- -p wezterm-gui \- -p wezterm-mux-server \- -p thinkterm-plugin-server \- -p thinkterm-tailnet-node \- -p strip-ansi-escapes+ if [ -n "$OLD_GLIBC_SERVER" ]; then+ cargo build --profile "$CARGO_PROFILE" \+ -p wezterm \+ -p wezterm-mux-server \+ -p thinkterm-plugin-server \+ -p thinkterm-tailnet-node \+ -p strip-ansi-escapes \+ --features wezterm-mux-server/vendored-openssl+ else+ cargo build --profile "$CARGO_PROFILE" \+ -p wezterm \+ -p wezterm-gui \+ -p wezterm-mux-server \+ -p thinkterm-plugin-server \+ -p thinkterm-tailnet-node \+ -p strip-ansi-escapes+ fi# install.sh, and the clients that install over ssh, let a host in by# the glibc each variant needs; the tarballs they install come from- # the Ubuntu leg, so its binaries are held to those numbers.+ # the Ubuntu legs, so their binaries are held to those numbers.- name: Check glibc floorsif: startsWith(matrix.name, 'ubuntu')- run: bash ci/check-glibc.sh "target/$CARGO_PROFILE"+ run: bash ci/check-glibc.sh "target/$CARGO_PROFILE" ${OLD_GLIBC_SERVER:+old-server}- name: Fetch the browser bundleuses: actions/download-artifact@v8diff --git a/ci/check-glibc.sh b/ci/check-glibc.shindex 5c1f7402..b99ecdca 100755--- a/ci/check-glibc.sh+++ b/ci/check-glibc.sh@@ -7,20 +7,27 @@# why the desktop needs 2.35) would leave hosts that install.sh lets through# with binaries that fail to load.#-# ci/check-glibc.sh target/release+# ci/check-glibc.sh target/release the Ubuntu 22.04 leg+# ci/check-glibc.sh target/release old-server the Ubuntu 20.04 legset -eu-dir=${1:?usage: ci/check-glibc.sh <directory of the built binaries>}+dir=${1:?usage: ci/check-glibc.sh <directory of the built binaries> [old-server]}+mode=${2:-}+case "$mode" in+ "" | old-server) ;;+ *) echo "unknown mode '$mode'; the only one is old-server" >&2; exit 2 ;;+esacscript="$(dirname "$0")/../install.sh"floor() {sed -n "s/^$1=\"\([0-9.]*\)\".*/\1/p" "$script"}server=$(floor min_glibc_server)+server_main=$(floor min_glibc_server_main)desktop=$(floor min_glibc_desktop)-if [ -z "$server" ] || [ -z "$desktop" ]; then- echo "install.sh sets no min_glibc_server or min_glibc_desktop" >&2+if [ -z "$server" ] || [ -z "$server_main" ] || [ -z "$desktop" ]; then+ echo "install.sh sets no min_glibc_server, min_glibc_server_main or min_glibc_desktop" >&2exit 1fi@@ -42,10 +49,23 @@ check() {}# The server tarball's binaries; the desktop's are the same and the GUI.-for bin in thinkterm wezterm thinkterm-mux-server thinkterm-plugin-server \- thinkterm-tailnet strip-ansi-escapes; do- check "$bin" "$server"-done-check thinkterm-gui "$desktop"+servers="thinkterm wezterm thinkterm-mux-server thinkterm-plugin-server thinkterm-tailnet strip-ansi-escapes"++if [ "$mode" = old-server ]; then+ # The server for hosts below min_glibc_server_main. Their own OpenSSL is+ # 1.1, which upstream no longer fixes, so this build has to carry its own.+ for bin in $servers; do+ check "$bin" "$server"+ if objdump -p "$dir/$bin" | grep -qE 'NEEDED +lib(ssl|crypto)\.so'; then+ echo "$bin links the host's OpenSSL; the old-glibc server has to carry its own" >&2+ status=1+ fi+ done+else+ for bin in $servers; do+ check "$bin" "$server_main"+ done+ check thinkterm-gui "$desktop"+fiexit $statusdiff --git a/ci/deploy.sh b/ci/deploy.shindex 5ff9ab43..f9f0f3cb 100755--- a/ci/deploy.sh+++ b/ci/deploy.sh@@ -711,9 +711,12 @@ EOFfirm -rf "pkg/$variant"}- build_deb desktop- build_deb server- rm -rf pkg+ # The Ubuntu 20.04 leg built the server alone, for the tarball below.+ if [[ -z "${OLD_GLIBC_SERVER:-}" ]] ; then+ build_deb desktop+ build_deb server+ rm -rf pkg+ fi# The tarballs install.sh downloads: one per variant, both built here# rather than in the Fedora leg because this is the oldest glibc we@@ -731,13 +734,23 @@ EOF# arch is uname -m as-is (x86_64, aarch64): install.sh runs the same# command on the target host and wants a name it can build without a# mapping table.+ #+ # With OLD_GLIBC_SERVER, the Ubuntu 20.04 leg, only the server is+ # packed, for hosts below install.sh's min_glibc_server_main: OpenSSL+ # is built into it, and its name ends -glibc<min_glibc_server>, the+ # glibc it needs, which is how install.sh asks for it.+ suffix=""+ if [[ -n "${OLD_GLIBC_SERVER:-}" ]] ; then+ suffix=-glibc$(sed -n 's/^min_glibc_server="\([0-9.]*\)".*/\1/p' install.sh)+ [[ "$suffix" != -glibc ]] || { echo "error: install.sh sets no min_glibc_server" >&2 ; exit 1 ; }+ filinux_tarball() {local variant=$1 tardirshiftif [[ "$BUILD_REASON" == "Schedule" ]] ; then- tardir=$variant-nightly-linux-$(uname -m)+ tardir=$variant-nightly-linux-$(uname -m)$suffixelse- tardir=$variant-$TAG_NAME-linux-$(uname -m)+ tardir=$variant-$TAG_NAME-linux-$(uname -m)$suffixfirm -rf "$tardir" "$tardir.tar.gz"install -Dsm755 -t "$tardir/bin" "$@"@@ -756,14 +769,16 @@ EOFtar czf "$tardir.tar.gz" --owner=0 --group=0 "$tardir"rm -rf "$tardir"}- linux_tarball thinkterm \- $TARGET_DIR/$PROFILE/thinkterm \- $TARGET_DIR/$PROFILE/wezterm \- $TARGET_DIR/$PROFILE/thinkterm-mux-server \- $TARGET_DIR/$PROFILE/thinkterm-gui \- $TARGET_DIR/$PROFILE/thinkterm-plugin-server \- $TARGET_DIR/$PROFILE/thinkterm-tailnet \- $TARGET_DIR/$PROFILE/strip-ansi-escapes+ if [[ -z "${OLD_GLIBC_SERVER:-}" ]] ; then+ linux_tarball thinkterm \+ $TARGET_DIR/$PROFILE/thinkterm \+ $TARGET_DIR/$PROFILE/wezterm \+ $TARGET_DIR/$PROFILE/thinkterm-mux-server \+ $TARGET_DIR/$PROFILE/thinkterm-gui \+ $TARGET_DIR/$PROFILE/thinkterm-plugin-server \+ $TARGET_DIR/$PROFILE/thinkterm-tailnet \+ $TARGET_DIR/$PROFILE/strip-ansi-escapes+ filinux_tarball thinkterm-server \$TARGET_DIR/$PROFILE/thinkterm \$TARGET_DIR/$PROFILE/wezterm \diff --git a/ci/release-notes.sh b/ci/release-notes.shindex 1be1df1f..bd4c55f9 100755--- a/ci/release-notes.sh+++ b/ci/release-notes.sh@@ -92,10 +92,12 @@ filinux=''# The tarballs are what install.sh fetches; the links are here for anyone who# would rather unpack by hand. The desktop glob pins the digit after the-# name so it cannot also match thinkterm-server-*.+# name so it cannot also match thinkterm-server-*, and the server glob the+# 64 of the arch so it cannot also match the build for older glibc.desktop=$(links_by_arch 'thinkterm-[0-9]*-linux-*.tar.gz') || desktop=''-server=$(links_by_arch 'thinkterm-server-*.tar.gz') || server=''-if [ -n "$desktop$server" ]; then+server=$(links_by_arch 'thinkterm-server-*-linux-*64.tar.gz') || server=''+server_old=$(links_by_arch 'thinkterm-server-*-glibc*.tar.gz') || server_old=''+if [ -n "$desktop$server$server_old" ]; thenlinux="$linux**Install script** — \`curl -fsSL https://raw.githubusercontent.com/RoversX/thinkterm/main/install.sh | sh\` puts ThinkTerm under \`~/.local\` without root and asks which variant you want; \`--desktop\` or \`--server\` (headless remote host, no GUI) skips the question"@@ -104,6 +106,9 @@ Desktop tarball: $desktop"[ -z "$server" ] || linux="$linuxServer tarball: $server+"+ [ -z "$server_old" ] || linux="$linux+Server tarball for older glibc (Ubuntu 20.04, Debian 11; OpenSSL built in): $server_old"fiif appimage=$(links_by_arch '*.AppImage'); thendiff --git a/install.sh b/install.shindex 3b35a0b2..ae3738b0 100755--- a/install.sh+++ b/install.sh@@ -48,9 +48,13 @@ set -eurepo="RoversX/thinkterm"# The oldest glibc each variant's Linux binaries load on: the newest glibc# symbol version any of them needs. ci/check-glibc.sh holds every release to-# these, and thinkterm-update carries the same two numbers.-min_glibc_server="2.34"-min_glibc_desktop="2.35" # the GUI's alone; the rest need no more than the server+# these, and thinkterm-update carries the same numbers.+min_glibc_server="2.31"+min_glibc_desktop="2.35" # the GUI's alone; the rest need min_glibc_server_main+# The server is built twice. From this glibc on, a host gets the build made+# beside the desktop's, which links the host's OpenSSL 3; an older host has+# only OpenSSL 1.1 and gets the one made on Ubuntu 20.04 with OpenSSL built in.+min_glibc_server_main="2.34"# Hosts that proxy github.com downloads, for --mirror auto, in the order# tried. thinkterm-update carries the same list for Settings.mirrors="ghfast.top gh-proxy.org ghproxy.net gh.llkk.cc"@@ -65,6 +69,7 @@ app_dir_opt=""from=""mirror="auto"dry_run=""+old_glibc=""usage() {cat <<'EOF'@@ -413,7 +418,7 @@ if [ "$os" = linux ]; then# symbol version rather than the real cause. Check here, in words.if [ "$variant" = server ]; thenmin_glibc=$min_glibc_server- newer="Ubuntu 22.04, Debian 12, RHEL 9"+ newer="Ubuntu 20.04, Debian 11, RHEL 9"elsemin_glibc=$min_glibc_desktopnewer="Ubuntu 22.04, Debian 12, RHEL 10"@@ -432,6 +437,10 @@ if [ "$os" = linux ]; thenalso=" The server variant (--server) runs on it."fidie "glibc $glibc is too old: the $variant binaries need >= $min_glibc ($newer or newer). Build from source instead.$also"+ elif [ "$variant" = server ] && [ "$(printf '%s\n%s\n' "$min_glibc_server_main" "$glibc" \+ | sort -V 2>/dev/null | head -n1)" != "$min_glibc_server_main" ]; then+ old_glibc=1+ note "glibc $glibc: the server built for older glibc, with OpenSSL built in"fihave tar || die "tar is required"else@@ -489,7 +498,7 @@ size=""asset_name() {case "$os/$variant" inlinux/desktop) echo "thinkterm-$1-linux-$arch.tar.gz" ;;- linux/server) echo "thinkterm-server-$1-linux-$arch.tar.gz" ;;+ linux/server) echo "thinkterm-server-$1-linux-$arch${old_glibc:+-glibc$min_glibc_server}.tar.gz" ;;# One bundle serves both variants: it already holds every binary.macos/*) echo "ThinkTerm-macos-$arch-$1.zip" ;;esac@@ -559,7 +568,7 @@ elseelseversion=$(basename "$from" | sed -n \-e 's/^ThinkTerm-macos-[^-]*-\([0-9A-Za-z][0-9A-Za-z.+-]*\)\.zip$/\1/p' \- -e 's/^thinkterm-\(server-\)\{0,1\}\([0-9A-Za-z][0-9A-Za-z.+-]*\)-linux-[^-]*\.tar\.gz$/\2/p')+ -e 's/^thinkterm-\(server-\)\{0,1\}\([0-9A-Za-z][0-9A-Za-z.+-]*\)-linux-[^-]*\(-glibc[0-9.]*\)\{0,1\}\.tar\.gz$/\2/p')fifi@@ -813,9 +822,9 @@ case "$os" infi# With --from there was no release lookup, so the version comes from the# directory name ci/deploy.sh gave the tarball:- # thinkterm[-server]-<ver>-linux-<arch>.+ # thinkterm[-server]-<ver>-linux-<arch>[-glibc<floor>].if [ -z "$version" ]; then- version=$(basename "$root" | sed -n 's/^thinkterm-\(server-\)\{0,1\}\([0-9A-Za-z][0-9A-Za-z.+-]*\)-linux-[^-]*$/\2/p')+ version=$(basename "$root" | sed -n 's/^thinkterm-\(server-\)\{0,1\}\([0-9A-Za-z][0-9A-Za-z.+-]*\)-linux-[^-]*\(-glibc[0-9.]*\)\{0,1\}$/\2/p')fi;;macos)diff --git a/thinkterm-update/src/lib.rs b/thinkterm-update/src/lib.rsindex 12d6f1f1..4613fd3e 100644--- a/thinkterm-update/src/lib.rs+++ b/thinkterm-update/src/lib.rs@@ -145,15 +145,44 @@ const API_COMMITS: &str = "https://api.github.com/repos/RoversX/thinkterm/commit/// The oldest glibc the Linux release binaries of `variant` ("server" or/// "desktop", as `install.sh` takes it) load on: the newest glibc symbol/// version any of them needs, which `ci/check-glibc.sh` holds every release-/// to. Only the GUI needs 2.35. `install.sh` carries the same numbers and-/// refuses older hosts; this copy lets a client refuse before it even offers.+/// to. Only the GUI needs 2.35; the server reaches back to 2.31 by way of a+/// second build (see `MAIN_SERVER_GLIBC`). `install.sh` carries the same+/// numbers and refuses older hosts; this copy lets a client refuse before it+/// even offers.pub fn min_glibc(variant: &str) -> (u32, u32) {match variant {- "server" => (2, 34),+ "server" => (2, 31),_ => (2, 35),}}+/// From this glibc on, a host gets the server built beside the desktop,+/// which links the host's OpenSSL 3. An older host has only OpenSSL 1.1 and+/// gets the build made on Ubuntu 20.04 with OpenSSL built in, its archive+/// named for the glibc it needs. `install.sh` calls this+/// `min_glibc_server_main`.+const MAIN_SERVER_GLIBC: (u32, u32) = (2, 34);++/// The glibc this machine runs on; None off Linux, or where it cannot say.+pub fn local_glibc() -> Option<(u32, u32)> {+ static GLIBC: std::sync::OnceLock<Option<(u32, u32)>> = std::sync::OnceLock::new();+ if !cfg!(target_os = "linux") {+ return None;+ }+ *GLIBC.get_or_init(|| {+ let out = std::process::Command::new("getconf")+ .arg("GNU_LIBC_VERSION")+ .stdin(std::process::Stdio::null())+ .stderr(std::process::Stdio::null())+ .output()+ .ok()?;+ if !out.status.success() {+ return None;+ }+ parse_glibc_version(&String::from_utf8_lossy(&out.stdout))+ })+}+/// Parse `getconf GNU_LIBC_VERSION` output ("glibc 2.31") or a bare/// "2.31" into (major, minor).pub fn parse_glibc_version(text: &str) -> Option<(u32, u32)> {@@ -1158,17 +1187,36 @@ pub fn takeover_command() -> String {/// The release archive `install.sh` installs for `variant` on this machine,/// named exactly as its `asset_name` names it; None where it has no build.pub fn install_asset_name(variant: &str, version: &str) -> Option<String> {- asset_name_for(std::env::consts::OS, std::env::consts::ARCH, variant, version)+ asset_name_for(+ std::env::consts::OS,+ std::env::consts::ARCH,+ variant,+ version,+ local_glibc(),+ )}-fn asset_name_for(os: &str, arch: &str, variant: &str, version: &str) -> Option<String> {+fn asset_name_for(+ os: &str,+ arch: &str,+ variant: &str,+ version: &str,+ glibc: Option<(u32, u32)>,+) -> Option<String> {match (os, arch, variant) {("linux", "x86_64" | "aarch64", "desktop") => {Some(format!("thinkterm-{version}-linux-{arch}.tar.gz"))}- ("linux", "x86_64" | "aarch64", "server") => {- Some(format!("thinkterm-server-{version}-linux-{arch}.tar.gz"))- }+ // A glibc it cannot read gets the main build, as in install.sh.+ ("linux", "x86_64" | "aarch64", "server") => match glibc {+ Some(glibc) if glibc < MAIN_SERVER_GLIBC => {+ let (major, minor) = min_glibc("server");+ Some(format!(+ "thinkterm-server-{version}-linux-{arch}-glibc{major}.{minor}.tar.gz"+ ))+ }+ _ => Some(format!("thinkterm-server-{version}-linux-{arch}.tar.gz")),+ },// One bundle serves both variants, named the way uname -m names// the architecture there.("macos", "aarch64", _) => Some(format!("ThinkTerm-macos-arm64-{version}.zip")),@@ -1714,29 +1762,58 @@ mod tests {let start = script.find("asset_name() {").expect("install.sh defines asset_name");let end = start + script[start..].find("\n}\n").expect("asset_name ends") + 3;let function = &script[start..end];- // (Rust's os and arch, install.sh's os and arch, variant)+ // (Rust's os and arch, install.sh's os and arch, variant, glibc)let cases = [- ("linux", "x86_64", "linux", "x86_64", "desktop"),- ("linux", "aarch64", "linux", "aarch64", "server"),- ("macos", "aarch64", "macos", "arm64", "desktop"),- ("macos", "x86_64", "macos", "x86_64", "server"),+ ("linux", "x86_64", "linux", "x86_64", "desktop", Some((2, 39))),+ ("linux", "aarch64", "linux", "aarch64", "server", Some((2, 39))),+ ("linux", "x86_64", "linux", "x86_64", "server", Some((2, 31))),+ ("linux", "aarch64", "linux", "aarch64", "server", None),+ ("macos", "aarch64", "macos", "arm64", "desktop", None),+ ("macos", "x86_64", "macos", "x86_64", "server", None),];- for (os, arch, sh_os, sh_arch, variant) in cases {+ let (major, minor) = min_glibc("server");+ for (os, arch, sh_os, sh_arch, variant, glibc) in cases {+ // What install.sh's preflight sets on a host below the main+ // server build's glibc.+ let old = match glibc {+ Some(glibc) if glibc < MAIN_SERVER_GLIBC => {+ format!("old_glibc=1; min_glibc_server={major}.{minor}; ")+ }+ _ => String::new(),+ };let out = std::process::Command::new("sh").arg("-c").arg(format!(- "{function}os={sh_os}; arch={sh_arch}; variant={variant}; asset_name 1.2.3"+ "{function}{old}os={sh_os}; arch={sh_arch}; variant={variant}; asset_name 1.2.3")).output().unwrap();assert!(out.status.success());assert_eq!(- asset_name_for(os, arch, variant, "1.2.3").as_deref(),+ asset_name_for(os, arch, variant, "1.2.3", glibc).as_deref(),Some(String::from_utf8_lossy(&out.stdout).trim()),- "{os}/{arch}/{variant}"+ "{os}/{arch}/{variant}/{glibc:?}"+ );+ }+ assert_eq!(asset_name_for("windows", "x86_64", "desktop", "1.2.3", None), None);+ }++ #[test]+ fn an_old_glibc_gets_the_server_with_openssl_built_in() {+ let name = |glibc| asset_name_for("linux", "x86_64", "server", "1.2.3", glibc);+ // Ubuntu 20.04, Debian 11.+ assert_eq!(+ name(Some((2, 31))).as_deref(),+ Some("thinkterm-server-1.2.3-linux-x86_64-glibc2.31.tar.gz")+ );+ // RHEL 9 and on, and a host that would not say.+ for glibc in [Some((2, 34)), Some((2, 39)), None] {+ assert_eq!(+ name(glibc).as_deref(),+ Some("thinkterm-server-1.2.3-linux-x86_64.tar.gz"),+ "{glibc:?}");}- assert_eq!(asset_name_for("windows", "x86_64", "desktop", "1.2.3"), None);}#[test]@@ -1764,16 +1841,18 @@ mod tests {assert_eq!(parse_glibc_version("glibc 2.31\n"), Some((2, 31)));assert_eq!(parse_glibc_version("2.35"), Some((2, 35)));assert_eq!(parse_glibc_version(""), None);- assert!(parse_glibc_version("glibc 2.31").unwrap() < min_glibc("server"));+ assert!(parse_glibc_version("glibc 2.28").unwrap() < min_glibc("server"));assert!(parse_glibc_version("glibc 2.39").unwrap() >= min_glibc("desktop"));}#[test]fn a_server_takes_a_glibc_the_desktop_does_not() {- // RHEL 9 and its kin, Amazon Linux 2023.- let glibc = parse_glibc_version("glibc 2.34").unwrap();- assert!(glibc >= min_glibc("server"));- assert!(glibc < min_glibc("desktop"));+ // RHEL 9 and its kin, Amazon Linux 2023; Ubuntu 20.04, Debian 11.+ for text in ["glibc 2.34", "glibc 2.31"] {+ let glibc = parse_glibc_version(text).unwrap();+ assert!(glibc >= min_glibc("server"), "{text}");+ assert!(glibc < min_glibc("desktop"), "{text}");+ }}#[test]@@ -1788,6 +1867,7 @@ mod tests {};assert_eq!(floor("min_glibc_server"), min_glibc("server"));assert_eq!(floor("min_glibc_desktop"), min_glibc("desktop"));+ assert_eq!(floor("min_glibc_server_main"), MAIN_SERVER_GLIBC);}#[test]diff --git a/wezterm-client/src/remote_update.rs b/wezterm-client/src/remote_update.rsindex 80a3112d..009743e6 100644--- a/wezterm-client/src/remote_update.rs+++ b/wezterm-client/src/remote_update.rs@@ -544,7 +544,11 @@ mod tests {assert_eq!(release_refusal(rhel9, "server"), None);let refused = release_refusal(rhel9, "desktop").expect("the GUI needs 2.35");assert!(refused.contains("glibc 2.34"), "{refused}");- assert!(release_refusal("Linux\nx86_64\nglibc 2.31\n", "server").is_some());+ // Ubuntu 20.04, Debian 11: the server built for older glibc, no GUI.+ let focal = "Linux\nx86_64\nglibc 2.31\n";+ assert_eq!(release_refusal(focal, "server"), None);+ assert!(release_refusal(focal, "desktop").is_some());+ assert!(release_refusal("Linux\nx86_64\nglibc 2.28\n", "server").is_some());assert_eq!(release_refusal("Linux\nx86_64\nglibc 2.39\n", "desktop"),Nonediff --git a/wezterm-mux-server-impl/src/web_relay.rs b/wezterm-mux-server-impl/src/web_relay.rsindex 82ee5966..b9cddce0 100644--- a/wezterm-mux-server-impl/src/web_relay.rs+++ b/wezterm-mux-server-impl/src/web_relay.rs@@ -1355,32 +1355,15 @@ impl Probe {// glibc it would not name) it may not.os != "linux"|| matches!(- (thinkterm_update::parse_glibc_version(&self.libc), local_glibc()),+ (+ thinkterm_update::parse_glibc_version(&self.libc),+ thinkterm_update::local_glibc()+ ),(Some(there), Some(here)) if there >= here)}}-/// The glibc this server runs on; None off Linux, or where it cannot say.-fn local_glibc() -> Option<(u32, u32)> {- static GLIBC: std::sync::OnceLock<Option<(u32, u32)>> = std::sync::OnceLock::new();- if !cfg!(target_os = "linux") {- return None;- }- *GLIBC.get_or_init(|| {- let out = std::process::Command::new("getconf")- .arg("GNU_LIBC_VERSION")- .stdin(std::process::Stdio::null())- .stderr(std::process::Stdio::null())- .output()- .ok()?;- if !out.status.success() {- return None;- }- thinkterm_update::parse_glibc_version(&String::from_utf8_lossy(&out.stdout))- })-}-/// The version `thinkterm --version` printed, among whatever else a login/// script there put around it: the word after `thinkterm`, compared whole/// (0.1.1 is not 0.1.10).@@ -3099,7 +3082,7 @@ mod tests {}};// On Linux, a host with this server's glibc or newer.- let glibc = local_glibc();+ let glibc = thinkterm_update::local_glibc();if os == "Linux" && glibc.is_none() {return;}@@ -3353,9 +3336,11 @@ mod tests {assert_eq!(linux("x86_64", "glibc 2.39").cannot_take_a_release(), None);assert!(linux("armv7l", "glibc 2.39").cannot_take_a_release().is_some());assert!(linux("x86_64", "musl libc (x86_64)").cannot_take_a_release().is_some());- assert!(linux("aarch64", "glibc 2.31").cannot_take_a_release().is_some());+ assert!(linux("aarch64", "glibc 2.28").cannot_take_a_release().is_some());// RHEL 9 and its kin: what is installed there is the server.assert_eq!(linux("aarch64", "glibc 2.34").cannot_take_a_release(), None);+ // Ubuntu 20.04, Debian 11: the server built for older glibc.+ assert_eq!(linux("x86_64", "glibc 2.31").cannot_take_a_release(), None);let mac = Probe {os: "Darwin".into(),arch: "arm64".into(),diff --git a/wezterm-mux-server/Cargo.toml b/wezterm-mux-server/Cargo.tomlindex 00df1d5b..f27edb8b 100644--- a/wezterm-mux-server/Cargo.toml+++ b/wezterm-mux-server/Cargo.toml@@ -21,6 +21,10 @@ default = ["tailnet"]# server keeps `thinkterm-tailnet` running, which holds the machine's node in# a process of its own (see thinkterm-tailnet-node).tailnet = ["dep:thinkterm-tailnet"]+# OpenSSL built in rather than the host's: the Linux server made for hosts+# whose own is 1.1 (see install.sh). Cargo unifies features, so everything+# built alongside this server in one `cargo build` gets the same OpenSSL.+vendored-openssl = ["openssl/vendored"][dependencies]thinkterm-tailnet = { workspace = true, optional = true }