From 728373b067837cdf4e21e92df5425b1655545178 Mon Sep 17 00:00:00 2001 From: mofeng-git Date: Wed, 16 Sep 2026 23:18:51 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E6=92=A4=E9=94=80=20Debian=2011=20?= =?UTF-8?q?=E5=BF=AB=E7=85=A7=E4=BF=AE=E5=A4=8D=E5=B9=B6=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E8=87=B3=20Debian=2012?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cross.toml | 2 +- build/Dockerfile.runtime | 6 +++--- build/Dockerfile.runtime-full | 6 +++--- build/build-images.sh | 2 +- build/cross/Dockerfile.arm64 | 22 +++++++++++----------- build/cross/Dockerfile.armv7 | 22 +++++++++++----------- build/cross/Dockerfile.x86_64 | 18 +++++++++--------- build/package-deb.sh | 6 +++--- 8 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Cross.toml b/Cross.toml index ad6e799b..0c142f77 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,5 +1,5 @@ # Cross-compilation configuration for One-KVM -# Uses pre-built custom Debian 11 based images for consistent build/runtime environment +# Uses pre-built custom Debian 12 based images for consistent build/runtime environment # See: https://github.com/cross-rs/cross [build] diff --git a/build/Dockerfile.runtime b/build/Dockerfile.runtime index c334977f..e3154901 100644 --- a/build/Dockerfile.runtime +++ b/build/Dockerfile.runtime @@ -1,18 +1,18 @@ # One-KVM Runtime Image # This Dockerfile only packages pre-compiled binaries (no compilation) # Used after cross-compiling with `cross build` -# Using Debian 11 for maximum compatibility (GLIBC 2.31) +# Using Debian 12 to match the build images (GLIBC 2.36) ARG TARGETPLATFORM=linux/amd64 -FROM debian:11-slim +FROM debian:12-slim ARG TARGETPLATFORM # Install runtime dependencies in a single layer # All codec libraries (libx264, libx265, libopus) are now statically linked # Only hardware acceleration drivers and core system libraries remain dynamic -RUN sed -i 's/ main$/ main contrib non-free/' /etc/apt/sources.list && \ +RUN sed -i 's/^Components: main$/Components: main contrib non-free non-free-firmware/' /etc/apt/sources.list.d/debian.sources && \ apt-get update && \ apt-get install -y --no-install-recommends \ # Core runtime (all platforms) - no codec libs needed diff --git a/build/Dockerfile.runtime-full b/build/Dockerfile.runtime-full index fb5ae61e..3e5b3100 100644 --- a/build/Dockerfile.runtime-full +++ b/build/Dockerfile.runtime-full @@ -1,18 +1,18 @@ # One-KVM Runtime Image (full) # This Dockerfile only packages pre-compiled binaries (no compilation) # Used after cross-compiling with `cross build` -# Using Debian 11 for maximum compatibility (GLIBC 2.31) +# Using Debian 12 to match the build images (GLIBC 2.36) ARG TARGETPLATFORM=linux/amd64 -FROM debian:11-slim +FROM debian:12-slim ARG TARGETPLATFORM # Install runtime dependencies in a single layer # All codec libraries (libx264, libx265, libopus) are now statically linked # Only hardware acceleration drivers and core system libraries remain dynamic -RUN sed -i 's/ main$/ main contrib non-free/' /etc/apt/sources.list && \ +RUN sed -i 's/^Components: main$/Components: main contrib non-free non-free-firmware/' /etc/apt/sources.list.d/debian.sources && \ apt-get update && \ apt-get install -y --no-install-recommends \ # Core runtime (all platforms) - no codec libs needed diff --git a/build/build-images.sh b/build/build-images.sh index 23e373a6..6398ea62 100755 --- a/build/build-images.sh +++ b/build/build-images.sh @@ -21,7 +21,7 @@ build_arch() { case "${CHINAMIRRO:-}" in 1|true|TRUE|yes|YES|on|ON) - local cross_build_opts="${CROSS_BUILD_OPTS:+$CROSS_BUILD_OPTS }--progress=plain --build-arg CHINAMIRRO=1 --build-arg GH_PROXY=${GH_PROXY:-https://gh-proxy.com/} --build-arg DEBIAN_IMAGE=${DEBIAN_IMAGE:-docker.1ms.run/library/debian:11}" + local cross_build_opts="${CROSS_BUILD_OPTS:+$CROSS_BUILD_OPTS }--progress=plain --build-arg CHINAMIRRO=1 --build-arg GH_PROXY=${GH_PROXY:-https://gh-proxy.com/} --build-arg DEBIAN_IMAGE=${DEBIAN_IMAGE:-docker.1ms.run/library/debian:12}" cross_build_opts="$cross_build_opts --build-arg HTTP_PROXY= --build-arg HTTPS_PROXY= --build-arg ALL_PROXY= --build-arg NO_PROXY=" cross_build_opts="$cross_build_opts --build-arg http_proxy= --build-arg https_proxy= --build-arg all_proxy= --build-arg no_proxy=" echo "=== China mirror acceleration: enabled ===" diff --git a/build/cross/Dockerfile.arm64 b/build/cross/Dockerfile.arm64 index 91d9b1c5..2716976c 100644 --- a/build/cross/Dockerfile.arm64 +++ b/build/cross/Dockerfile.arm64 @@ -1,10 +1,9 @@ -# Cross-compilation image for ARM64 based on Debian 11 -# Build on Debian 11 (GLIBC 2.31) for maximum runtime compatibility +# Cross-compilation image for ARM64 based on Debian 12 +# Build on Debian 12 (GLIBC 2.36) to match the runtime images -ARG DEBIAN_IMAGE=debian:11 +ARG DEBIAN_IMAGE=debian:12 FROM ${DEBIAN_IMAGE} -ARG DEBIAN_SNAPSHOT=20260713T000000Z ARG CHINAMIRRO=0 ARG GH_PROXY=https://gh-proxy.com/ ARG RUSTUP_DIST_SERVER_CN=https://rsproxy.cn @@ -20,11 +19,12 @@ ARG RKMPP_BRANCH=jellyfin-mpp ARG RKRGA_BRANCH=jellyfin-rga ARG FFMPEG_ROCKCHIP_REV=40c412daccf08164493da0de990eb99a8948116b -RUN printf '%s\n' \ - "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT}/ bullseye main" \ - "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/${DEBIAN_SNAPSHOT}/ bullseye-security main" \ - "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT}/ bullseye-updates main" \ - > /etc/apt/sources.list +# Optionally use China mirrors for builds in China. +RUN if [ "$CHINAMIRRO" = "1" ]; then \ + sed -i -E \ + -e 's@http://deb.debian.org/debian([[:space:]]|$)@http://mirrors.tuna.tsinghua.edu.cn/debian\1@g' \ + /etc/apt/sources.list.d/debian.sources; \ + fi # Install Rust toolchain RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -83,8 +83,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Install ARM64 development libraries (without VAAPI/X11 for ARM) RUN apt-get update && apt-get install -y --no-install-recommends \ - libssl1.1 \ - libssl1.1:arm64 \ + libssl3 \ + libssl3:arm64 \ libasound2-dev:arm64 \ libv4l-dev:arm64 \ libudev-dev:arm64 \ diff --git a/build/cross/Dockerfile.armv7 b/build/cross/Dockerfile.armv7 index 9a61e28f..32e9eca4 100644 --- a/build/cross/Dockerfile.armv7 +++ b/build/cross/Dockerfile.armv7 @@ -1,10 +1,9 @@ -# Cross-compilation image for ARMv7 based on Debian 11 -# Build on Debian 11 (GLIBC 2.31) for maximum runtime compatibility +# Cross-compilation image for ARMv7 based on Debian 12 +# Build on Debian 12 (GLIBC 2.36) to match the runtime images -ARG DEBIAN_IMAGE=debian:11 +ARG DEBIAN_IMAGE=debian:12 FROM ${DEBIAN_IMAGE} -ARG DEBIAN_SNAPSHOT=20260713T000000Z ARG CHINAMIRRO=0 ARG GH_PROXY=https://gh-proxy.com/ ARG RUSTUP_DIST_SERVER_CN=https://rsproxy.cn @@ -20,11 +19,12 @@ ARG RKMPP_BRANCH=jellyfin-mpp ARG RKRGA_BRANCH=jellyfin-rga ARG FFMPEG_ROCKCHIP_REV=40c412daccf08164493da0de990eb99a8948116b -RUN printf '%s\n' \ - "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT}/ bullseye main" \ - "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/${DEBIAN_SNAPSHOT}/ bullseye-security main" \ - "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT}/ bullseye-updates main" \ - > /etc/apt/sources.list +# Optionally use China mirrors for builds in China. +RUN if [ "$CHINAMIRRO" = "1" ]; then \ + sed -i -E \ + -e 's@http://deb.debian.org/debian([[:space:]]|$)@http://mirrors.tuna.tsinghua.edu.cn/debian\1@g' \ + /etc/apt/sources.list.d/debian.sources; \ + fi # Install Rust toolchain RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -83,8 +83,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Install ARMv7 development libraries (without VAAPI/X11 for ARM) RUN apt-get update && apt-get install -y --no-install-recommends \ - libssl1.1 \ - libssl1.1:armhf \ + libssl3 \ + libssl3:armhf \ libasound2-dev:armhf \ libv4l-dev:armhf \ libudev-dev:armhf \ diff --git a/build/cross/Dockerfile.x86_64 b/build/cross/Dockerfile.x86_64 index aac7e69f..406b98b9 100644 --- a/build/cross/Dockerfile.x86_64 +++ b/build/cross/Dockerfile.x86_64 @@ -1,10 +1,9 @@ -# Cross-compilation image for x86_64 based on Debian 11 -# Build on Debian 11 (GLIBC 2.31) for maximum runtime compatibility +# Cross-compilation image for x86_64 based on Debian 12 +# Build on Debian 12 (GLIBC 2.36) to match the runtime images -ARG DEBIAN_IMAGE=debian:11 +ARG DEBIAN_IMAGE=debian:12 FROM ${DEBIAN_IMAGE} -ARG DEBIAN_SNAPSHOT=20260713T000000Z ARG CHINAMIRRO=0 ARG GH_PROXY=https://gh-proxy.com/ ARG RUSTUP_DIST_SERVER_CN=https://rsproxy.cn @@ -18,11 +17,12 @@ ARG X265_VERSION=3.4 ARG OPUS_VERSION=1.5.2 ARG FFMPEG_ROCKCHIP_REV=40c412daccf08164493da0de990eb99a8948116b -RUN printf '%s\n' \ - "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT}/ bullseye main" \ - "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/${DEBIAN_SNAPSHOT}/ bullseye-security main" \ - "deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT}/ bullseye-updates main" \ - > /etc/apt/sources.list +# Optionally use China mirrors for builds in China. +RUN if [ "$CHINAMIRRO" = "1" ]; then \ + sed -i -E \ + -e 's@http://deb.debian.org/debian([[:space:]]|$)@http://mirrors.tuna.tsinghua.edu.cn/debian\1@g' \ + /etc/apt/sources.list.d/debian.sources; \ + fi # Install Rust toolchain RUN apt-get update && apt-get install -y --no-install-recommends \ diff --git a/build/package-deb.sh b/build/package-deb.sh index 5c8277c5..1515ed9e 100755 --- a/build/package-deb.sh +++ b/build/package-deb.sh @@ -1,6 +1,6 @@ #!/bin/bash # Build deb packages from pre-compiled binaries -# Binaries are compiled once on Debian 11 (GLIBC 2.31) via build-images.sh +# Binaries are compiled once on Debian 12 (GLIBC 2.36) via build-images.sh # This script packages them directly on the host using dpkg-deb # Usage: ./build/build-deb.sh [arch] # Example: ./build/build-deb.sh aarch64 @@ -125,7 +125,7 @@ EOF chmod 755 "$PKG_DIR/DEBIAN/prerm" # Create control file - BASE_DEPS="libc6 (>= 2.31), libgcc-s1, libstdc++6, libasound2t64 (>= 1.1) | libasound2 (>= 1.1), libdrm2 (>= 2.4)" + BASE_DEPS="libc6 (>= 2.36), libgcc-s1, libstdc++6, libasound2t64 (>= 1.1) | libasound2 (>= 1.1), libdrm2 (>= 2.4)" AMD64_DEPS="libva2 (>= 2.0), libva-drm2 (>= 2.10), libva-x11-2 (>= 2.10), libmfx-gen1.2 (>= 22.0) | libmfx1 (>= 21.1), libx11-6 (>= 1.6), libxcb1 (>= 1.14), i965-va-driver-shaders (>= 2.4), intel-media-va-driver-non-free (>= 21.1)" DEPS="$BASE_DEPS" if [ "$DEB_ARCH" = "amd64" ]; then @@ -143,7 +143,7 @@ Recommends: bluez Maintainer: SilentWind Description: A open and lightweight IP-KVM solution Enables BIOS-level remote management of servers and workstations. - Built on Debian 11, compatible with Debian 11+, Ubuntu 20.04+. + Built on Debian 12, compatible with Debian 12+, Ubuntu 24.04+. EOF # Build deb directly on host