From 1e32e803827682a22a02ebf42d97034ec0a76ea9 Mon Sep 17 00:00:00 2001 From: sanohiro Date: Sun, 27 Sep 2026 22:59:54 +0900 Subject: [PATCH 1/3] fix: ship a legacy build for glibc 2.34+ distros Release binaries are built on Ubuntu 24.04 and require GLIBC_2.39, so they fail to start on Ubuntu 22.04, Debian 12 (bookworm) and Raspberry Pi OS (bookworm). The .deb declared no libc6 dependency, so apt installed it without complaint and the failure only appeared at runtime (#22). Build a second set of binaries inside an ubuntu:22.04 container. They need only glibc 2.34, which covers jammy and bookworm, and are published under a new apt "legacy" suite alongside the unchanged "stable" suite. install.sh reads the system's glibc and picks the suite, so existing 24.04+ installs keep getting exactly the same packages as before. Also: - Pass --yes to gpg --dearmor in install.sh. Re-running the installer hung on the overwrite prompt once the keyring existed, which made "just run it again" impossible under curl | sh. - Derive the .deb libc6 dependency from the binary's own symbol versions so apt refuses a build the system cannot run. - Add libsystemd-dev to the build dependencies. libseat.pc requires it and it only worked because the runner image preinstalls it; a clean build following docs/installation.md failed at libseat-sys. - Name the legacy packages bcon_legacy_.deb, since dpkg-scanpackages --arch filters by filename suffix and silently produced empty Packages files for bcon__legacy.deb. Verified in containers: 22.04, bookworm and 24.04 each select the right suite and apt install resolves. Co-Authored-By: Claude Opus 5 (1M context) --- .github/install.sh | 19 +- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 329 ++++++++++++++++++++++------------ README.md | 4 + docs/installation.ja.md | 30 +++- docs/installation.md | 30 +++- 6 files changed, 296 insertions(+), 118 deletions(-) diff --git a/.github/install.sh b/.github/install.sh index fa1fec8..5d5a8a3 100644 --- a/.github/install.sh +++ b/.github/install.sh @@ -4,11 +4,24 @@ set -e -# Add GPG key -curl -fsSL https://sanohiro.github.io/bcon/bcon.gpg | gpg --dearmor -o /usr/share/keyrings/bcon.gpg +# Pick the suite that matches this system's glibc. +# +# stable - built on Ubuntu 24.04, needs glibc 2.39+ +# (Ubuntu 24.04+, Debian 13 trixie+) +# legacy - built on Ubuntu 22.04, needs glibc 2.34+ +# (Ubuntu 22.04, Debian 12 bookworm, Raspberry Pi OS bookworm) +SUITE=stable +GLIBC=$(ldd --version 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+$' || true) +if [ -n "${GLIBC}" ] && [ "$(printf '2.39\n%s\n' "${GLIBC}" | sort -V | head -1)" != "2.39" ]; then + SUITE=legacy +fi +echo "Detected glibc ${GLIBC:-unknown}, using '${SUITE}' suite." + +# Add GPG key (--yes so re-running this script does not prompt) +curl -fsSL https://sanohiro.github.io/bcon/bcon.gpg | gpg --dearmor --yes -o /usr/share/keyrings/bcon.gpg # Add repository -echo "deb [signed-by=/usr/share/keyrings/bcon.gpg] https://sanohiro.github.io/bcon stable main" > /etc/apt/sources.list.d/bcon.list +echo "deb [signed-by=/usr/share/keyrings/bcon.gpg] https://sanohiro.github.io/bcon ${SUITE} main" > /etc/apt/sources.list.d/bcon.list # Update package list apt update diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb8f1f8..836e167 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: libxkbcommon-dev libinput-dev libudev-dev \ libdbus-1-dev libwayland-dev \ libfontconfig1-dev libfreetype-dev \ - libseat-dev \ + libseat-dev libsystemd-dev \ pkg-config cmake clang - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d59b76..38f7ef5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: libxkbcommon-dev libinput-dev libudev-dev \ libdbus-1-dev libwayland-dev \ libfontconfig1-dev libfreetype-dev \ - libseat-dev \ + libseat-dev libsystemd-dev \ pkg-config cmake clang - name: Install Rust @@ -72,7 +72,7 @@ jobs: libxkbcommon-dev libinput-dev libudev-dev \ libdbus-1-dev libwayland-dev \ libfontconfig1-dev libfreetype-dev \ - libseat-dev \ + libseat-dev libsystemd-dev \ pkg-config cmake clang - name: Install Rust @@ -98,8 +98,102 @@ jobs: name: bcon-linux-aarch64 path: bcon-linux-aarch64.tar.gz + + # Legacy builds: run inside an Ubuntu 22.04 container so the binary only + # requires glibc 2.34+, covering Ubuntu 22.04, Debian 12 bookworm and + # Raspberry Pi OS bookworm. Published under the apt "legacy" suite. + build-legacy-x86_64: + runs-on: ubuntu-24.04 + container: ubuntu:22.04 + env: + DEBIAN_FRONTEND: noninteractive + + steps: + - name: Install dependencies + run: | + apt-get update + apt-get install -y \ + git curl ca-certificates \ + libdrm-dev libgbm-dev \ + libegl1-mesa-dev libgles2-mesa-dev \ + libxkbcommon-dev libinput-dev libudev-dev \ + libdbus-1-dev libwayland-dev \ + libfontconfig1-dev libfreetype-dev \ + libseat-dev libsystemd-dev \ + build-essential pkg-config cmake clang + + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Build + run: cargo build --release + + - name: Create archive + run: | + mkdir -p dist + cp target/release/bcon dist/ + cp bcon@.service dist/ + cp bcon.desktop dist/ + cp bcon-session dist/ + cp README.md dist/ + cd dist + tar -czvf ../bcon-linux-x86_64-legacy.tar.gz * + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: bcon-linux-x86_64-legacy + path: bcon-linux-x86_64-legacy.tar.gz + + build-legacy-aarch64: + runs-on: ubuntu-24.04-arm + container: ubuntu:22.04 + env: + DEBIAN_FRONTEND: noninteractive + + steps: + - name: Install dependencies + run: | + apt-get update + apt-get install -y \ + git curl ca-certificates \ + libdrm-dev libgbm-dev \ + libegl1-mesa-dev libgles2-mesa-dev \ + libxkbcommon-dev libinput-dev libudev-dev \ + libdbus-1-dev libwayland-dev \ + libfontconfig1-dev libfreetype-dev \ + libseat-dev libsystemd-dev \ + build-essential pkg-config cmake clang + + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Build + run: cargo build --release + + - name: Create archive + run: | + mkdir -p dist + cp target/release/bcon dist/ + cp bcon@.service dist/ + cp bcon.desktop dist/ + cp bcon-session dist/ + cp README.md dist/ + cd dist + tar -czvf ../bcon-linux-aarch64-legacy.tar.gz * + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: bcon-linux-aarch64-legacy + path: bcon-linux-aarch64-legacy.tar.gz + release: - needs: [build-x86_64, build-aarch64] + needs: [build-x86_64, build-aarch64, build-legacy-x86_64, build-legacy-aarch64] runs-on: ubuntu-latest steps: @@ -126,63 +220,50 @@ jobs: VERSION="${GITHUB_REF#refs/tags/v}" fi - # amd64 .deb - mkdir -p /tmp/bcon-x86_64 - tar -xzf release/bcon-linux-x86_64.tar.gz -C /tmp/bcon-x86_64 - mkdir -p deb-amd64/DEBIAN deb-amd64/usr/local/bin deb-amd64/lib/systemd/system deb-amd64/usr/share/doc/bcon deb-amd64/usr/share/xsessions deb-amd64/usr/share/bcon - cp /tmp/bcon-x86_64/bcon deb-amd64/usr/local/bin/ - cp /tmp/bcon-x86_64/bcon-session deb-amd64/usr/local/bin/ - cp /tmp/bcon-x86_64/bcon@.service deb-amd64/lib/systemd/system/ - cp /tmp/bcon-x86_64/bcon.desktop deb-amd64/usr/share/xsessions/ - cp /tmp/bcon-x86_64/README.md deb-amd64/usr/share/doc/bcon/ - chmod 755 deb-amd64/usr/local/bin/bcon - chmod 755 deb-amd64/usr/local/bin/bcon-session - cat > deb-amd64/DEBIAN/control << 'CTRL' - Package: bcon - Version: VERSION_PLACEHOLDER - Section: utils - Priority: optional - Architecture: amd64 - Depends: libdrm2, libgbm1, libegl1, libgles2, libxkbcommon0, libinput10, libudev1, libdbus-1-3, libseat1, libfontconfig1, fonts-dejavu-core - Maintainer: sanohiro - Homepage: https://github.com/sanohiro/bcon - Description: GPU-accelerated terminal emulator for Linux console - bcon brings modern terminal features directly to the Linux console. - GPU acceleration, True Color, Sixel/Kitty graphics, Japanese input - without X11/Wayland. - CTRL - sed -i 's/^ //' deb-amd64/DEBIAN/control - sed -i "s/VERSION_PLACEHOLDER/${VERSION}/" deb-amd64/DEBIAN/control - dpkg-deb --build deb-amd64 release/bcon_amd64.deb - - # arm64 .deb - mkdir -p /tmp/bcon-aarch64 - tar -xzf release/bcon-linux-aarch64.tar.gz -C /tmp/bcon-aarch64 - mkdir -p deb-arm64/DEBIAN deb-arm64/usr/local/bin deb-arm64/lib/systemd/system deb-arm64/usr/share/doc/bcon deb-arm64/usr/share/xsessions deb-arm64/usr/share/bcon - cp /tmp/bcon-aarch64/bcon deb-arm64/usr/local/bin/ - cp /tmp/bcon-aarch64/bcon-session deb-arm64/usr/local/bin/ - cp /tmp/bcon-aarch64/bcon@.service deb-arm64/lib/systemd/system/ - cp /tmp/bcon-aarch64/bcon.desktop deb-arm64/usr/share/xsessions/ - cp /tmp/bcon-aarch64/README.md deb-arm64/usr/share/doc/bcon/ - chmod 755 deb-arm64/usr/local/bin/bcon - chmod 755 deb-arm64/usr/local/bin/bcon-session - cat > deb-arm64/DEBIAN/control << 'CTRL' - Package: bcon - Version: VERSION_PLACEHOLDER - Section: utils - Priority: optional - Architecture: arm64 - Depends: libdrm2, libgbm1, libegl1, libgles2, libxkbcommon0, libinput10, libudev1, libdbus-1-3, libseat1, libfontconfig1, fonts-dejavu-core - Maintainer: sanohiro - Homepage: https://github.com/sanohiro/bcon - Description: GPU-accelerated terminal emulator for Linux console - bcon brings modern terminal features directly to the Linux console. - GPU acceleration, True Color, Sixel/Kitty graphics, Japanese input - without X11/Wayland. - CTRL - sed -i 's/^ //' deb-arm64/DEBIAN/control - sed -i "s/VERSION_PLACEHOLDER/${VERSION}/" deb-arm64/DEBIAN/control - dpkg-deb --build deb-arm64 release/bcon_arm64.deb + # Minimum glibc the binary actually needs, taken from its symbol + # versions. Falls back to the given default when objdump cannot read + # the ELF (e.g. a foreign architecture). + glibc_req() { + _v=$(objdump -T "$1" 2>/dev/null \ + | grep -oE 'GLIBC_[0-9]+\.[0-9]+' | sed 's/GLIBC_//' \ + | sort -V | tail -1) + echo "${_v:-$2}" + } + + build_deb() { # arch tarball fallback_glibc output + arch="$1"; tarball="$2"; fallback="$3"; out="$4" + src=$(mktemp -d); root=$(mktemp -d)/pkg + tar -xzf "${tarball}" -C "${src}" + libc=$(glibc_req "${src}/bcon" "${fallback}") + echo "==> ${out}: Depends libc6 (>= ${libc})" + mkdir -p "${root}/DEBIAN" "${root}/usr/local/bin" "${root}/lib/systemd/system" \ + "${root}/usr/share/doc/bcon" "${root}/usr/share/xsessions" "${root}/usr/share/bcon" + cp "${src}/bcon" "${src}/bcon-session" "${root}/usr/local/bin/" + cp "${src}/bcon@.service" "${root}/lib/systemd/system/" + cp "${src}/bcon.desktop" "${root}/usr/share/xsessions/" + cp "${src}/README.md" "${root}/usr/share/doc/bcon/" + chmod 755 "${root}/usr/local/bin/bcon" "${root}/usr/local/bin/bcon-session" + { + echo "Package: bcon" + echo "Version: ${VERSION}" + echo "Section: utils" + echo "Priority: optional" + echo "Architecture: ${arch}" + echo "Depends: libc6 (>= ${libc}), libdrm2, libgbm1, libegl1, libgles2, libxkbcommon0, libinput10, libudev1, libdbus-1-3, libseat1, libfontconfig1, fonts-dejavu-core" + echo "Maintainer: sanohiro " + echo "Homepage: https://github.com/sanohiro/bcon" + echo "Description: GPU-accelerated terminal emulator for Linux console" + echo " bcon brings modern terminal features directly to the Linux console." + echo " GPU acceleration, True Color, Sixel/Kitty graphics, Japanese input" + echo " without X11/Wayland." + } > "${root}/DEBIAN/control" + dpkg-deb --build "${root}" "${out}" + } + + build_deb amd64 release/bcon-linux-x86_64.tar.gz 2.39 release/bcon_amd64.deb + build_deb arm64 release/bcon-linux-aarch64.tar.gz 2.39 release/bcon_arm64.deb + build_deb amd64 release/bcon-linux-x86_64-legacy.tar.gz 2.34 release/bcon_legacy_amd64.deb + build_deb arm64 release/bcon-linux-aarch64-legacy.tar.gz 2.34 release/bcon_legacy_arm64.deb ls -la release/ @@ -199,76 +280,100 @@ jobs: files: release/* generate_release_notes: true draft: false + body: | + ### Installing + + ```sh + curl -fsSL https://sanohiro.github.io/bcon/install.sh | sudo sh + sudo apt install bcon + ``` + + The installer picks the right build for your system automatically. + + ### Which file do I need? + + If you prefer to download directly, pick by your distribution: + + | Your system | glibc | Download | + |---|---|---| + | Ubuntu 24.04+, Debian 13 (trixie) | 2.39+ | `bcon_amd64.deb` / `bcon_arm64.deb`
`bcon-linux-x86_64.tar.gz` / `bcon-linux-aarch64.tar.gz` | + | Ubuntu 22.04, Debian 12 (bookworm), Raspberry Pi OS (bookworm) | 2.34+ | `bcon_legacy_amd64.deb` / `bcon_legacy_arm64.deb`
`bcon-linux-x86_64-legacy.tar.gz` / `bcon-linux-aarch64-legacy.tar.gz` | + + The `legacy` builds are compiled against an older glibc and run + everywhere the regular builds do. Ubuntu 20.04 and Debian 11 (glibc + 2.31) are not supported. + + Run `ldd --version` if you are unsure which glibc you have. env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update apt repository env: APT_GPG_PRIVATE_KEY: ${{ secrets.APT_GPG_PRIVATE_KEY }} - INPUT_TAG: ${{ github.event.inputs.tag }} run: | if [ -z "${APT_GPG_PRIVATE_KEY}" ]; then echo "APT_GPG_PRIVATE_KEY not set, skipping apt repo update" exit 0 fi - if [ -n "${INPUT_TAG}" ]; then - VERSION="${INPUT_TAG#v}" - else - VERSION="${GITHUB_REF#refs/tags/v}" - fi - # Import GPG key echo "${APT_GPG_PRIVATE_KEY}" | gpg --batch --import - # Create apt repo structure - mkdir -p apt-repo/pool/main/b/bcon - mkdir -p apt-repo/dists/stable/main/binary-amd64 - mkdir -p apt-repo/dists/stable/main/binary-arm64 + # Two suites, each with its own pool so dpkg-scanpackages does not + # mix them up: + # stable - glibc 2.39+ builds (Ubuntu 24.04+, Debian 13 trixie+) + # legacy - glibc 2.34+ builds (Ubuntu 22.04, Debian 12 bookworm) + # install.sh selects the suite from the system's glibc version. + mkdir -p apt-repo/pool/main/b/bcon apt-repo/pool/legacy/b/bcon + mkdir -p apt-repo/dists/stable/main/binary-amd64 apt-repo/dists/stable/main/binary-arm64 + mkdir -p apt-repo/dists/legacy/main/binary-amd64 apt-repo/dists/legacy/main/binary-arm64 - # Copy .deb files - cp release/bcon_amd64.deb apt-repo/pool/main/b/bcon/ - cp release/bcon_arm64.deb apt-repo/pool/main/b/bcon/ + cp release/bcon_amd64.deb release/bcon_arm64.deb apt-repo/pool/main/b/bcon/ + cp release/bcon_legacy_amd64.deb release/bcon_legacy_arm64.deb apt-repo/pool/legacy/b/bcon/ - # Generate Packages files cd apt-repo - dpkg-scanpackages --arch amd64 pool/ > dists/stable/main/binary-amd64/Packages - dpkg-scanpackages --arch arm64 pool/ > dists/stable/main/binary-arm64/Packages - gzip -k dists/stable/main/binary-amd64/Packages - gzip -k dists/stable/main/binary-arm64/Packages - - # Generate Release file - cat > dists/stable/Release << 'EOF' - Origin: bcon - Label: bcon - Suite: stable - Codename: stable - Architectures: amd64 arm64 - Components: main - Description: bcon apt repository - EOF - sed -i 's/^ //' dists/stable/Release - echo "Date: $(date -Ru)" >> dists/stable/Release - - # Add checksums to Release - cd dists/stable - echo "MD5Sum:" >> Release - for f in main/binary-*/Packages*; do - size=$(wc -c < "$f") - hash=$(md5sum "$f" | cut -d' ' -f1) - echo " ${hash} ${size} ${f}" >> Release - done - echo "SHA256:" >> Release - for f in main/binary-*/Packages*; do - size=$(wc -c < "$f") - hash=$(sha256sum "$f" | cut -d' ' -f1) - echo " ${hash} ${size} ${f}" >> Release - done - cd ../.. - - # Sign Release file - gpg --batch --yes --armor --detach-sign -o dists/stable/Release.gpg dists/stable/Release - gpg --batch --yes --armor --clearsign -o dists/stable/InRelease dists/stable/Release + + make_suite() { # suite pool_dir + suite="$1"; pooldir="$2" + + for arch in amd64 arm64; do + dpkg-scanpackages --arch "${arch}" "${pooldir}" > "dists/${suite}/main/binary-${arch}/Packages" + gzip -kf "dists/${suite}/main/binary-${arch}/Packages" + done + + { + echo "Origin: bcon" + echo "Label: bcon" + echo "Suite: ${suite}" + echo "Codename: ${suite}" + echo "Architectures: amd64 arm64" + echo "Components: main" + echo "Description: bcon apt repository (${suite})" + echo "Date: $(date -Ru)" + } > "dists/${suite}/Release" + + ( + cd "dists/${suite}" + echo "MD5Sum:" >> Release + for f in main/binary-*/Packages*; do + size=$(wc -c < "$f") + hash=$(md5sum "$f" | cut -d' ' -f1) + echo " ${hash} ${size} ${f}" >> Release + done + echo "SHA256:" >> Release + for f in main/binary-*/Packages*; do + size=$(wc -c < "$f") + hash=$(sha256sum "$f" | cut -d' ' -f1) + echo " ${hash} ${size} ${f}" >> Release + done + ) + + gpg --batch --yes --armor --detach-sign -o "dists/${suite}/Release.gpg" "dists/${suite}/Release" + gpg --batch --yes --armor --clearsign -o "dists/${suite}/InRelease" "dists/${suite}/Release" + } + + make_suite stable pool/main/ + make_suite legacy pool/legacy/ # Export public key gpg --armor --export > bcon.gpg diff --git a/README.md b/README.md index faba154..96e3333 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,10 @@ sudo systemctl enable --now bcon@tty2 - Linux with DRM/KMS support (Debian/Ubuntu recommended) - GPU with OpenGL ES 3.0+ +- glibc 2.34 or newer — Ubuntu 22.04+, Debian 12 (bookworm)+, Raspberry Pi OS (bookworm)+ + +See [Supported Systems](docs/installation.md#supported-systems) for which build +applies to your distribution. The installer picks it automatically. ## Limitations diff --git a/docs/installation.ja.md b/docs/installation.ja.md index 6347c3d..1f59b98 100644 --- a/docs/installation.ja.md +++ b/docs/installation.ja.md @@ -2,6 +2,34 @@ **[English](installation.md)** | Japanese +## 対応システム + +bcon は 2 種類のバイナリを配布しています。`install.sh` が glibc のバージョンを +判定して適切な方を選ぶため、通常はどちらか意識する必要はありません。 + +| ディストリビューション | glibc | apt suite | +|---|---|---| +| Ubuntu 24.04+, Debian 13 (trixie)+ | 2.39+ | `stable` | +| Ubuntu 22.04, Debian 12 (bookworm), Raspberry Pi OS (bookworm) | 2.34+ | `legacy` | + +Ubuntu 20.04 と Debian 11 (bullseye) は glibc 2.31 のため非対応です。 +`ldd --version` で確認できます。 + +`legacy` ビルドは Ubuntu 22.04 上でビルドしたもので、機能は同一です。 +古い glibc にリンクしている点だけが異なります。 + +> **Ubuntu 22.04 / Debian 12 で以前のバージョンから更新する場合** +> +> 以前のリリースは `stable` ビルドのみだったため、起動時に +> `version 'GLIBC_2.39' not found` で失敗します。この状態で `apt upgrade` を +> 実行しても、必要な glibc が無いため bcon は *kept back* となり更新されません。 +> インストーラを再実行すると `legacy` に切り替わります。 +> +> ```bash +> curl -fsSL https://sanohiro.github.io/bcon/install.sh | sudo sh +> sudo apt install bcon +> ``` + ## 基本セットアップ (Debian/Ubuntu) 日本語環境が必要な場合は [日本語環境セットアップ](#日本語環境セットアップ) を参照してください。 @@ -111,7 +139,7 @@ sudo apt install \ libxkbcommon-dev libinput-dev libudev-dev \ libdbus-1-dev libwayland-dev \ libfontconfig1-dev libfreetype-dev \ - libseat-dev \ + libseat-dev libsystemd-dev \ pkg-config cmake clang # Rust ツールチェイン (1.82+) が必要 diff --git a/docs/installation.md b/docs/installation.md index dda1bf6..ad13807 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -2,6 +2,34 @@ English | **[Japanese](installation.ja.md)** +## Supported Systems + +bcon ships two sets of binaries. `install.sh` reads your glibc version and picks +the matching one, so normally you do not need to care which is which. + +| Distribution | glibc | apt suite | +|---|---|---| +| Ubuntu 24.04+, Debian 13 (trixie)+ | 2.39+ | `stable` | +| Ubuntu 22.04, Debian 12 (bookworm), Raspberry Pi OS (bookworm) | 2.34+ | `legacy` | + +Ubuntu 20.04 and Debian 11 (bullseye) ship glibc 2.31 and are not supported. +Run `ldd --version` to check what you have. + +The `legacy` build is compiled on Ubuntu 22.04 and is identical in features — it +is only linked against an older glibc. + +> **Upgrading from an older install on Ubuntu 22.04 / Debian 12** +> +> Earlier releases only shipped the `stable` build, which fails at startup with +> `version 'GLIBC_2.39' not found`. On these systems `apt upgrade` reports bcon +> as *kept back* and leaves the old version in place, since the newer package +> requires a glibc you do not have. Re-run the installer to switch to `legacy`: +> +> ```bash +> curl -fsSL https://sanohiro.github.io/bcon/install.sh | sudo sh +> sudo apt install bcon +> ``` + ## Basic Setup (Debian/Ubuntu) For Japanese environment, see [Japanese Environment Setup](#japanese-environment-setup) below. @@ -112,7 +140,7 @@ sudo apt install \ libxkbcommon-dev libinput-dev libudev-dev \ libdbus-1-dev libwayland-dev \ libfontconfig1-dev libfreetype-dev \ - libseat-dev \ + libseat-dev libsystemd-dev \ pkg-config cmake clang # Rust toolchain (1.82+) required From 0adb581d6f6caab74e1e5c3bea203c057880042f Mon Sep 17 00:00:00 2001 From: sanohiro Date: Mon, 28 Sep 2026 06:58:18 +0900 Subject: [PATCH 2/3] fix: address review feedback on the legacy build - Build packages with dpkg-deb --root-owner-group. The release job runs as the runner user (uid 1001), so every path in the .deb carried that uid and installed files ended up owned by whichever local user happens to hold it rather than root. bcon runs as root from systemd, so that user could replace the binary. Pre-existing, but this block was rewritten here. - Default install.sh to the legacy suite when the glibc version cannot be parsed. legacy runs everywhere stable does, so a detection failure now degrades to a working install instead of an unsatisfiable libc6 dependency. - Document Raspberry Pi OS support as 64-bit only. Only amd64 and arm64 are built and the Release file declares as much, so on 32-bit armhf the installer succeeds and apt install then fails with "Unable to locate package bcon" and no explanation. - Note that apt replaces the package across a suite switch even when the version is unchanged, since the installed version is no longer offered by any configured suite. Two other review findings did not hold up. Ubuntu's objdump (binutils 2.42) is multi-target and reads aarch64 ELFs from an amd64 runner, so the symbol version lookup is not silently falling back for arm64. And switching suites at an identical version does replace the package, so --reinstall is not needed; both were checked in containers. Co-Authored-By: Claude Opus 5 (1M context) --- .github/install.sh | 8 +++++--- .github/workflows/release.yml | 4 ++-- README.md | 2 +- docs/installation.ja.md | 5 ++++- docs/installation.md | 5 ++++- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/install.sh b/.github/install.sh index 5d5a8a3..22edb8b 100644 --- a/.github/install.sh +++ b/.github/install.sh @@ -10,10 +10,12 @@ set -e # (Ubuntu 24.04+, Debian 13 trixie+) # legacy - built on Ubuntu 22.04, needs glibc 2.34+ # (Ubuntu 22.04, Debian 12 bookworm, Raspberry Pi OS bookworm) -SUITE=stable +# Default to legacy: it runs on every supported system, so a glibc version we +# cannot parse degrades to a working install rather than an uninstallable one. +SUITE=legacy GLIBC=$(ldd --version 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+$' || true) -if [ -n "${GLIBC}" ] && [ "$(printf '2.39\n%s\n' "${GLIBC}" | sort -V | head -1)" != "2.39" ]; then - SUITE=legacy +if [ -n "${GLIBC}" ] && [ "$(printf '2.39\n%s\n' "${GLIBC}" | sort -V | head -1)" = "2.39" ]; then + SUITE=stable fi echo "Detected glibc ${GLIBC:-unknown}, using '${SUITE}' suite." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38f7ef5..304b199 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -257,7 +257,7 @@ jobs: echo " GPU acceleration, True Color, Sixel/Kitty graphics, Japanese input" echo " without X11/Wayland." } > "${root}/DEBIAN/control" - dpkg-deb --build "${root}" "${out}" + dpkg-deb --root-owner-group --build "${root}" "${out}" } build_deb amd64 release/bcon-linux-x86_64.tar.gz 2.39 release/bcon_amd64.deb @@ -297,7 +297,7 @@ jobs: | Your system | glibc | Download | |---|---|---| | Ubuntu 24.04+, Debian 13 (trixie) | 2.39+ | `bcon_amd64.deb` / `bcon_arm64.deb`
`bcon-linux-x86_64.tar.gz` / `bcon-linux-aarch64.tar.gz` | - | Ubuntu 22.04, Debian 12 (bookworm), Raspberry Pi OS (bookworm) | 2.34+ | `bcon_legacy_amd64.deb` / `bcon_legacy_arm64.deb`
`bcon-linux-x86_64-legacy.tar.gz` / `bcon-linux-aarch64-legacy.tar.gz` | + | Ubuntu 22.04, Debian 12 (bookworm), Raspberry Pi OS (bookworm, 64-bit) | 2.34+ | `bcon_legacy_amd64.deb` / `bcon_legacy_arm64.deb`
`bcon-linux-x86_64-legacy.tar.gz` / `bcon-linux-aarch64-legacy.tar.gz` | The `legacy` builds are compiled against an older glibc and run everywhere the regular builds do. Ubuntu 20.04 and Debian 11 (glibc diff --git a/README.md b/README.md index 96e3333..a2befd5 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ sudo systemctl enable --now bcon@tty2 - Linux with DRM/KMS support (Debian/Ubuntu recommended) - GPU with OpenGL ES 3.0+ -- glibc 2.34 or newer — Ubuntu 22.04+, Debian 12 (bookworm)+, Raspberry Pi OS (bookworm)+ +- glibc 2.34 or newer — Ubuntu 22.04+, Debian 12 (bookworm)+, Raspberry Pi OS (bookworm, 64-bit)+ See [Supported Systems](docs/installation.md#supported-systems) for which build applies to your distribution. The installer picks it automatically. diff --git a/docs/installation.ja.md b/docs/installation.ja.md index 1f59b98..237a548 100644 --- a/docs/installation.ja.md +++ b/docs/installation.ja.md @@ -10,7 +10,7 @@ bcon は 2 種類のバイナリを配布しています。`install.sh` が glib | ディストリビューション | glibc | apt suite | |---|---|---| | Ubuntu 24.04+, Debian 13 (trixie)+ | 2.39+ | `stable` | -| Ubuntu 22.04, Debian 12 (bookworm), Raspberry Pi OS (bookworm) | 2.34+ | `legacy` | +| Ubuntu 22.04, Debian 12 (bookworm), Raspberry Pi OS (bookworm, 64-bit) | 2.34+ | `legacy` | Ubuntu 20.04 と Debian 11 (bullseye) は glibc 2.31 のため非対応です。 `ldd --version` で確認できます。 @@ -29,6 +29,9 @@ Ubuntu 20.04 と Debian 11 (bullseye) は glibc 2.31 のため非対応です。 > curl -fsSL https://sanohiro.github.io/bcon/install.sh | sudo sh > sudo apt install bcon > ``` +> +> バージョンが変わらない場合でも、インストール済みのパッケージがどの suite からも +> 提供されなくなるため、apt は legacy 版で置き換えます。 ## 基本セットアップ (Debian/Ubuntu) diff --git a/docs/installation.md b/docs/installation.md index ad13807..edb1450 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -10,7 +10,7 @@ the matching one, so normally you do not need to care which is which. | Distribution | glibc | apt suite | |---|---|---| | Ubuntu 24.04+, Debian 13 (trixie)+ | 2.39+ | `stable` | -| Ubuntu 22.04, Debian 12 (bookworm), Raspberry Pi OS (bookworm) | 2.34+ | `legacy` | +| Ubuntu 22.04, Debian 12 (bookworm), Raspberry Pi OS (bookworm, 64-bit) | 2.34+ | `legacy` | Ubuntu 20.04 and Debian 11 (bullseye) ship glibc 2.31 and are not supported. Run `ldd --version` to check what you have. @@ -29,6 +29,9 @@ is only linked against an older glibc. > curl -fsSL https://sanohiro.github.io/bcon/install.sh | sudo sh > sudo apt install bcon > ``` +> +> apt replaces the package even when the version is unchanged, because the +> installed one is no longer offered by any configured suite. ## Basic Setup (Debian/Ubuntu) From feebe19142ea665168c874579a046c18c2fa9490 Mon Sep 17 00:00:00 2001 From: sanohiro Date: Mon, 28 Sep 2026 07:14:43 +0900 Subject: [PATCH 3/3] chore: make test scripts executable All four carry a shebang and are meant to be run directly. tests/automation/bcon-test-input had lost its executable bit, which breaks the symlink-into-PATH workflow described in tests/automation/README.md. CI only runs `bash -n` on it, so nothing would have caught this. Co-Authored-By: Claude Opus 5 (1M context) --- tests/rootless-stress.py | 0 tests/rotation-mouse-check.py | 0 tests/visual-smoke.sh | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tests/rootless-stress.py mode change 100644 => 100755 tests/rotation-mouse-check.py mode change 100644 => 100755 tests/visual-smoke.sh diff --git a/tests/rootless-stress.py b/tests/rootless-stress.py old mode 100644 new mode 100755 diff --git a/tests/rotation-mouse-check.py b/tests/rotation-mouse-check.py old mode 100644 new mode 100755 diff --git a/tests/visual-smoke.sh b/tests/visual-smoke.sh old mode 100644 new mode 100755