From 8d72c83ca983554d06842cdc5144382ef48164da Mon Sep 17 00:00:00 2001 From: openoms <43343391+openoms@users.noreply.github.com> Date: Sat, 8 Jul 2023 12:51:11 +0000 Subject: [PATCH] amd64 image update to Debian 12.0.0 and Python compatibility (#3967) * build: use python 3.11 if available * ci: update amd64 base image to Debian 12.0.0 * use netcat-openbsd package --- build_sdcard.sh | 20 ++++++++++++++------ ci/amd64/debian/amd64-debian.json | 4 ++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 280ab807e..bffade2f0 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -332,7 +332,7 @@ echo -e "\n*** SOFTWARE UPDATE ***" # rsync -> is needed to copy from HDD # net-tools -> ifconfig # xxd -> display hex codes -# netcat -> for proxy +# netcat-openbsd -> for proxy # openssh-client openssh-sftp-server sshpass -> install OpenSSH client + server # psmisc -> install killall, fuser # ufw -> firewall @@ -343,7 +343,7 @@ general_utils="policykit-1 htop git curl bash-completion vim jq dphys-swapfile b # python3-mako --> https://github.com/rootzoll/raspiblitz/issues/3441 python_dependencies="python3-venv python3-dev python3-wheel python3-jinja2 python3-pip python3-mako" -server_utils="rsync net-tools xxd netcat openssh-client openssh-sftp-server sshpass psmisc ufw sqlite3" +server_utils="rsync net-tools xxd netcat-openbsd openssh-client openssh-sftp-server sshpass psmisc ufw sqlite3" [ "${baseimage}" = "armbian" ] && armbian_dependencies="armbian-config" # add armbian-config [ "${architecture}" = "amd64" ] && amd64_dependencies="network-manager" # add amd64 dependency @@ -353,15 +353,23 @@ apt autoremove -y echo -e "\n*** Python DEFAULT libs & dependencies ***" -if [ -f "/usr/bin/python3.9" ]; then - # use python 3.9 if available - update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 - echo "python calls python3.9" +if [ -f "/usr/bin/python3.11" ]; then + # use python 3.11 if available + update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 + # keep pyhton backwards compatible + ln -s /usr/bin/python3.11 /usr/bin/python3.9 + ln -s /usr/bin/python3.11 /usr/bin/python3.10 + echo "python calls python3.10" elif [ -f "/usr/bin/python3.10" ]; then # use python 3.10 if available update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 + # keep pyhton backwards compatible ln -s /usr/bin/python3.10 /usr/bin/python3.9 echo "python calls python3.10" +elif [ -f "/usr/bin/python3.9" ]; then + # use python 3.9 if available + update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 + echo "python calls python3.9" elif [ -f "/usr/bin/python3.8" ]; then # use python 3.8 if available update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 diff --git a/ci/amd64/debian/amd64-debian.json b/ci/amd64/debian/amd64-debian.json index 4b7bfdab6..1e5a7a9af 100644 --- a/ci/amd64/debian/amd64-debian.json +++ b/ci/amd64/debian/amd64-debian.json @@ -12,8 +12,8 @@ "http_directory": "{{template_dir}}/http", "http_proxy": "{{env `http_proxy`}}", "https_proxy": "{{env `https_proxy`}}", - "iso_checksum": "eb3f96fd607e4b67e80f4fc15670feb7d9db5be50f4ca8d0bf07008cb025766b", - "iso_name": "debian-11.7.0-amd64-netinst.iso", + "iso_checksum": "3b0e9718e3653435f20d8c2124de6d363a51a1fd7f911b9ca0c6db6b3d30d53e", + "iso_name": "debian-12.0.0-amd64-netinst.iso", "memory": "4096", "mirror": "http://cdimage.debian.org/cdimage/release", "mirror_directory": "current/amd64/iso-cd",