diff --git a/.gitea/workflows/base-build.yml b/.gitea/workflows/base-build.yml index 87fde7a..ff3a7e5 100644 --- a/.gitea/workflows/base-build.yml +++ b/.gitea/workflows/base-build.yml @@ -27,7 +27,7 @@ jobs: - name: Build all Debian rootfs versions sequentially run: | - versions=(bullseye bookworm docker-build) + versions=(buster bullseye bookworm trixie docker-build) for version in "${versions[@]}"; do echo "[INFO] Building Debian $version rootfs..." @@ -112,7 +112,7 @@ jobs: IMAGE_ORG=fithwum IMAGE_REPO=debian-base - for TAG in bullseye bookworm docker-build; do + for TAG in buster bullseye bookworm trixie docker-build; do FULL_IMAGE="${IMAGE_REGISTRY}/${IMAGE_ORG}/${IMAGE_REPO}:${TAG}" echo "[INFO] Building and pushing $FULL_IMAGE" docker buildx build --platform linux/amd64 --push -t "$FULL_IMAGE" "./$TAG" @@ -132,7 +132,7 @@ jobs: - name: Generate per-version changelogs run: | cd upload-repo - for version in bullseye bookworm docker-build; do + for version in buster bullseye bookworm trixie docker-build; do echo "[INFO] Updating changelog for $version" changelog="$version/CHANGES.md" @@ -195,7 +195,7 @@ jobs: } cd upload-repo - for version in bullseye bookworm docker-build; do + for version in buster bullseye bookworm trixie docker-build; do echo "[INFO] Generating build-info.json for $version" mkdir -p "$version" infofile="$version/build-info.json" @@ -241,7 +241,7 @@ jobs: git push # Tag the commit for each version - for version in bullseye bookworm docker-build; do + for version in buster bullseye bookworm trixie docker-build; do TAG="build-$version" # Delete local tag if exists git tag -d "$TAG" 2>/dev/null || true diff --git a/base-image-script/debian-bookworm_pt1.sh b/base-image-script/debian-bookworm_pt1.sh index f5c3bc0..776a7ab 100644 --- a/base-image-script/debian-bookworm_pt1.sh +++ b/base-image-script/debian-bookworm_pt1.sh @@ -7,7 +7,7 @@ set -o pipefail DEBIAN_RELEASE="bookworm" ROOTFS_DIR="debian-${DEBIAN_RELEASE}" SCRIPTS_DIR="base-image-script" -PT2_SCRIPT="debian-${DEBIAN_RELEASE}_pt2.sh" +PT2_SCRIPT="debian-build_pt2.sh" PT3_SCRIPT="debian-build_pt3.sh" echo "[INFO] Preparing environment..." diff --git a/base-image-script/debian-bookworm_pt2.sh b/base-image-script/debian-build_pt2.sh similarity index 83% rename from base-image-script/debian-bookworm_pt2.sh rename to base-image-script/debian-build_pt2.sh index 8b80d38..5d9a354 100644 --- a/base-image-script/debian-bookworm_pt2.sh +++ b/base-image-script/debian-build_pt2.sh @@ -9,6 +9,11 @@ apt-get upgrade apt-get install --no-install-recommends software-properties-common bash wget curl nano locales +echo "[CHROOT] Generating locales..." +echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen +locale-gen +update-locale LANG=en_US.UTF-8 + echo "[CHROOT] Removing unnecessary packages..." apt-get remove --purge --allow-remove-essential pinentry-curses whiptail kmod iptables iproute2 dmidecode || true diff --git a/base-image-script/debian-bullseye_pt1.sh b/base-image-script/debian-bullseye_pt1.sh index 07dc3cd..fe58b70 100644 --- a/base-image-script/debian-bullseye_pt1.sh +++ b/base-image-script/debian-bullseye_pt1.sh @@ -7,7 +7,7 @@ set -o pipefail DEBIAN_RELEASE="bullseye" ROOTFS_DIR="debian-${DEBIAN_RELEASE}" SCRIPTS_DIR="base-image-script" -PT2_SCRIPT="debian-${DEBIAN_RELEASE}_pt2.sh" +PT2_SCRIPT="debian-build_pt2.sh" PT3_SCRIPT="debian-build_pt3.sh" echo "[INFO] Preparing environment..." diff --git a/base-image-script/debian-bullseye_pt2.sh b/base-image-script/debian-bullseye_pt2.sh deleted file mode 100644 index d8b8197..0000000 --- a/base-image-script/debian-bullseye_pt2.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# Copyright (c) 2025 fithwum -# All rights reserved -echo "[CHROOT] Configuring Debian system..." -echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/10-assume_yes - -apt-get update -apt-get upgrade - -apt-get install --no-install-recommends software-properties-common bash wget curl nano locales - -echo "[CHROOT] Removing unnecessary packages..." -apt-get remove --purge --allow-remove-essential pinentry-curses whiptail kmod iptables iproute2 dmidecode || true - -echo "[CHROOT] Cleaning up..." -apt-get clean -apt-get install -f -find /var/lib/apt/lists/ -type f -delete - -echo "[CHROOT] Done. Type 'exit' to return." -exit diff --git a/base-image-script/debian-buster_pt1.sh b/base-image-script/debian-buster_pt1.sh index 2d09fcb..380cf45 100644 --- a/base-image-script/debian-buster_pt1.sh +++ b/base-image-script/debian-buster_pt1.sh @@ -7,7 +7,7 @@ set -o pipefail DEBIAN_RELEASE="buster" ROOTFS_DIR="debian-${DEBIAN_RELEASE}" SCRIPTS_DIR="base-image-script" -PT2_SCRIPT="debian-${DEBIAN_RELEASE}_pt2.sh" +PT2_SCRIPT="debian-build_pt2.sh" PT3_SCRIPT="debian-build_pt3.sh" echo "[INFO] Preparing environment..." diff --git a/base-image-script/debian-buster_pt2.sh b/base-image-script/debian-buster_pt2.sh deleted file mode 100644 index 4a38213..0000000 --- a/base-image-script/debian-buster_pt2.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# Copyright (c) 2025 fithwum -# All rights reserved -echo "[CHROOT] Configuring Debian system..." -echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/10-assume_yes - -apt-get update -apt-get upgrade - -apt-get install --no-install-recommends software-properties-common bash wget curl nano locales - -echo "[CHROOT] Removing unnecessary packages..." -apt-get remove --purge --allow-remove-essential pinentry-curses whiptail kmod iptables iproute2 dmidecode || true - -echo "[CHROOT] Cleaning up..." -apt-get clean -apt-get install -f -find /var/lib/apt/lists/ -type f -delete - -echo "[CHROOT] Done. Exiting." -exit \ No newline at end of file diff --git a/base-image-script/debian-trixie_pt1.sh b/base-image-script/debian-trixie_pt1.sh new file mode 100644 index 0000000..03390a5 --- /dev/null +++ b/base-image-script/debian-trixie_pt1.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Copyright (c) 2025 fithwum +# All rights reserved +set -e +set -o pipefail + +DEBIAN_RELEASE="trixie" +ROOTFS_DIR="debian-${DEBIAN_RELEASE}" +SCRIPTS_DIR="base-image-script" +PT2_SCRIPT="debian-build_pt2.sh" +PT3_SCRIPT="debian-build_pt3.sh" + +echo "[INFO] Preparing environment..." +apt-get update -y +apt-get upgrade -y +apt-get install -y --no-install-recommends debootstrap bash curl wget dirmngr bzip2 + +for SCRIPT in $PT2_SCRIPT $PT3_SCRIPT; do + if [ ! -f "./${SCRIPTS_DIR}/$SCRIPT" ]; then + echo "[ERROR] Missing script: ${SCRIPTS_DIR}/$SCRIPT" + exit 1 + fi +done + +echo "[INFO] Bootstrapping Debian $DEBIAN_RELEASE rootfs..." +debootstrap --variant=minbase --components=main,contrib,non-free --include=apt,ca-certificates --arch=amd64 "$DEBIAN_RELEASE" "$ROOTFS_DIR" http://deb.debian.org/debian/ + +for dir in dev dev/pts proc sys; do + mount --bind "/$dir" "$ROOTFS_DIR/$dir" +done + +cp "./${SCRIPTS_DIR}/$PT2_SCRIPT" "$ROOTFS_DIR/root/$PT2_SCRIPT" +chmod +x "$ROOTFS_DIR/root/$PT2_SCRIPT" + +chroot "$ROOTFS_DIR" /root/$PT2_SCRIPT + +bash "./${SCRIPTS_DIR}/$PT3_SCRIPT" "$ROOTFS_DIR" \ No newline at end of file diff --git a/trixie/Dockerfile b/trixie/Dockerfile new file mode 100644 index 0000000..44d0771 --- /dev/null +++ b/trixie/Dockerfile @@ -0,0 +1,4 @@ +FROM scratch +LABEL maintainer="fithwum" +ADD /debian-trixie.tar.bz2 / +CMD ["/bin/bash"] \ No newline at end of file