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
This commit is contained in:
openoms 2023-07-08 12:51:11 +00:00 committed by GitHub
parent 5d346e9062
commit 8d72c83ca9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 8 deletions

View file

@ -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

View file

@ -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",