From 93f66b08f47188b40e93d27903cb0ec47bc89f57 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Wed, 24 May 2023 10:28:23 +0000 Subject: [PATCH] feat: add debian 12 bookworm image --- tools/qemu-debian-img/Dockerfile.template | 2 +- tools/qemu-debian-img/generate-images.sh | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tools/qemu-debian-img/Dockerfile.template b/tools/qemu-debian-img/Dockerfile.template index 48d02b3..156eae0 100644 --- a/tools/qemu-debian-img/Dockerfile.template +++ b/tools/qemu-debian-img/Dockerfile.template @@ -1,4 +1,4 @@ -FROM debian:_VERSION_ +FROM debian:_RELEASE_ ENV DEBIAN_FRONTEND=noninteractive diff --git a/tools/qemu-debian-img/generate-images.sh b/tools/qemu-debian-img/generate-images.sh index bc849ce..a4b29a5 100755 --- a/tools/qemu-debian-img/generate-images.sh +++ b/tools/qemu-debian-img/generate-images.sh @@ -4,7 +4,7 @@ set -eux cd $(dirname $(realpath $0)) -for version in 7 8 9 10 11; do +for version in 7 8 9 10 11 12; do if [[ $version -eq 7 ]]; then release=wheezy last_version=7.11.0 @@ -25,17 +25,27 @@ for version in 7 8 9 10 11; do release=bullseye last_version=11.6.0 fi + if [[ $version -eq 12 ]]; then + release=bookworm + last_version=12.0.0 + fi mkdir $version sed "s/_VERSION_/${version}/" Dockerfile.template >> $version/Dockerfile sed -i "s/_RELEASE_/${release}/" $version/Dockerfile - if [[ $version -eq 11 ]]; then + if [[ $version -eq 11 || $version -eq 12 ]]; then sed -i "s/,policykit-1//" $version/Dockerfile fi - repository=$(wget -q -O - https://cdimage.debian.org/mirror/cdimage/archive/${last_version}/amd64/jigdo-bd/debian-${last_version}-amd64-BD-1.jigdo | gunzip | awk -F= '/snapshot.debian.org/ {print $2}' | cut -d ' ' -f 1) + # TODO: grep -Po 'http://snapshot[^ ]*' /etc/apt/sources.list | head -n1 + + if [[ $version -eq 12 ]]; then + repository=http://deb.debian.org/debian + else + repository=$(wget -q -O - https://cdimage.debian.org/mirror/cdimage/archive/${last_version}/amd64/jigdo-bd/debian-${last_version}-amd64-BD-1.jigdo | gunzip | awk -F= '/snapshot.debian.org/ {print $2}' | cut -d ' ' -f 1) + fi sed -i "s;_REPOSITORY_;${repository};" $version/Dockerfile