diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 560b8d8e8b..06020c20e1 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -146,7 +146,7 @@ case $HW_ARCH in 2) iarch='ARMv7' parch='armhf';; 3) iarch='ARMv8' parch='arm64';; 10) iarch='x86_64' parch='amd64';; - 11) iarch='RISC-V' parch='riscv64' DISTRO=8 repo='https://deb.debian.org/debian-ports/' keyring='/usr/share/keyrings/debian-ports-archive-keyring.gpg';; # RISC-V architecture is available on Debian ports only + 11) iarch='RISC-V' parch='riscv64' DISTRO=8;; # RISC-V architecture is available on Sid only, but internally DietPi handles it as Trixie *) G_DIETPI-NOTIFY 1 "Invalid architecture \"$HW_ARCH\" passed, aborting..."; exit 1;; esac @@ -157,7 +157,7 @@ case $DISTRO in 7|8) exclude=',gcc-8-base,gcc-9-base,gcc-10-base,gcc-11-base' [[ $DISTRO == 7 ]] && distro='bookworm' || distro='trixie' exclude+=',gcc-12-base' - [[ $HW_ARCH == 11 ]] && distro='sid' # RISC-V architecture is available on Debian Sid/unstable only + [[ $HW_ARCH == 11 ]] && distro='sid' # RISC-V architecture is available on Sid only # Raise root size where required case $HW_MODEL in 1[256]|54|61|7[4569]) ((root_size+=128));; @@ -220,7 +220,6 @@ if [[ ! -f $keyring ]] then case $keyring in *'raspbian'*) url='https://archive.raspbian.org/raspbian/pool/main/r/raspbian-archive-keyring/raspbian-archive-keyring_20120528.2_all.deb';; - *'debian-ports'*) url='https://deb.debian.org/debian/pool/main/d/debian-ports-archive-keyring/debian-ports-archive-keyring_2023.02.01~deb11u1_all.deb';; *) url='https://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2023.4_all.deb';; esac G_EXEC curl -sSf "$url" -o /tmp/keyring.deb @@ -401,7 +400,6 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' -[[ $HW_ARCH == 11 ]] && packages+=',debian-ports-archive-keyring' G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat /dev/shm/rootfs/debootstrap/debootstrap.log; } G_EXEC_OUTPUT=1 G_EXEC debootstrap --variant=minbase --exclude="gcc-7-base$exclude" --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index faa40376ec..d4d9a5bf1c 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1342,9 +1342,6 @@ _EOF_ unset -v apackages fi - # RISC-V: Install Debian ports repository key - (( $G_HW_ARCH == 11 )) && aPACKAGES_REQUIRED_INSTALL+=('debian-ports-archive-keyring') - # WiFi and firmware packages: Usually no firmware should be necessary for VMs. If user manually passes though some USB device, user might need to install the firmware then. if (( $G_HW_MODEL != 20 && $G_HW_MODEL != 75 )) then diff --git a/.update/pre-patches b/.update/pre-patches index f961470db7..77ab764a00 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -308,5 +308,14 @@ _EOF_ fi fi +# v8.23 +if (( $G_DIETPI_VERSION_CORE < 8 || ( $G_DIETPI_VERSION_CORE == 8 && $G_DIETPI_VERSION_SUB < 22 ) )) +then + # RISC-V: Migrate from Debian ports to regular Debian Sid + G_DIETPI-NOTIFY 2 'Migrating from Debian ports to regular Debian Sid repository, which now supports RISC-V' + G_EXEC eval 'echo '\''deb https://deb.debian.org/debian/ sid main contrib non-free non-free-firmware'\'' > /etc/apt/sources.list' + dpkg-query -s 'debian-ports-archive-keyring' &> /dev/null && G_EXEC apt-mark auto debian-ports-archive-keyring +fi + exit 0 } diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 019bbcc82f..3d570535af 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -105,11 +105,10 @@ $FP_SCRIPT disable_ssh_password_logins [01]|root| Whether to disable SSH local rpi_distro=${G_DISTRO_NAME/trixie/bookworm} (( $G_HW_MODEL < 10 || ( $G_HW_MODEL == 75 && ${G_RASPBIAN:-0} == 1 ) )) && G_EXEC eval "echo 'deb https://archive.raspberrypi.org/debian/ ${rpi_distro/bookworm/bullseye} main' > /etc/apt/sources.list.d/raspi.list" - # RISC-V: Provided via Debian ports and Sid only + # RISC-V: Provided via Sid only if (( $G_HW_ARCH == 11 )) then - G_EXEC eval 'echo '\''deb https://deb.debian.org/debian-ports/ sid main contrib non-free non-free-firmware -deb https://deb.debian.org/debian-ports/ unreleased main contrib non-free non-free-firmware'\'' > /etc/apt/sources.list' + G_EXEC eval 'echo '\''deb https://deb.debian.org/debian/ sid main contrib non-free non-free-firmware'\'' > /etc/apt/sources.list' # Raspbian elif (( $G_RASPBIAN ))