From a4b7b33aaf2de50efb74cee54eddbd7c68ebf744 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 02:44:01 +0000 Subject: [PATCH 01/59] Refactor get_slackware() --- quickget | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/quickget b/quickget index bae921a..7ee7449 100755 --- a/quickget +++ b/quickget @@ -1155,24 +1155,23 @@ function get_slackware() { local ISO="" local URL="" - local arch="64" - - if [[ "${RELEASE}" == "current" ]]; then - URL="https://slackware.nl/slackware/slackware${arch}-current-iso/slackware${arch}-current-install-dvd.iso" - else - URL="https://mirrors.slackware.com/slackware/slackware-iso/slackware${arch}-${RELEASE}-iso/slackware${arch}-${RELEASE}-install-dvd.iso" - fi + case ${RELEASE} in + current) + URL="https://slackware.nl/slackware/slackware64-current-iso" + ISO="slackware64-current-install-dvd.iso" + ;; + *) + URL="https://mirrors.slackware.com/slackware/slackware-iso/slackware64-${RELEASE}-iso" + ISO="slackware64-${RELEASE}-install-dvd.iso" + ;; + esac - ISO="slackware${arch}-${RELEASE}-install-dvd.iso" - HASH=$(wget -q -O- "${URL}.md5" | cut -d' ' -f1) - - - web_get "${URL}" "${VM_PATH}" + HASH=$(wget -q -O- "${URL}/${ISO}.md5" | cut -d' ' -f1) + web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" } - function get_solus() { local RELNUM="" local RELTYPE="" From af7ed8c2d6aec460e40b03af429de5e23b1e762c Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 03:20:13 +0000 Subject: [PATCH 02/59] Add Devuan. Closes #345 --- quickget | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/quickget b/quickget index 7ee7449..bf0d43e 100755 --- a/quickget +++ b/quickget @@ -194,6 +194,7 @@ function os_support() { arcolinux \ cachyos \ debian \ + devaun \ elementary \ freebsd \ fedora \ @@ -294,6 +295,11 @@ function releases_cachyos() { 2022.02.11 } +function releases_devuan() { + echo beowulf \ + chimaera +} + function releases_elementary() { echo 6.1 } @@ -875,6 +881,26 @@ function get_debian() { make_vm_config "${ISO}" } +function get_devuan() { + local HASH="" + local ISO="" + local URL="" + local VERSION="" + + validate_release "releases_devuan" + case ${RELEASE} in + beowulf) VERSION="3.1.1";; + chimaera) VERSION="4.0.0";; + esac + + URL="https://files.devuan.org/devuan_${RELEASE}/desktop-live" + ISO="devuan_${RELEASE}_${VERSION}_amd64_desktop-live.iso" + HASH=$(wget -q -O- "${URL}/SHASUMS.txt" | grep "${ISO}" | cut -d' ' -f1) + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function get_elementary() { local ISO="" local ISOTAG="20211218-rc" @@ -1938,6 +1964,8 @@ if [ -n "${2}" ]; then fi VM_PATH="${OS}-${RELEASE}-${FREEDOM}" get_debian "${FREEDOM}" + elif [ "${OS}" == "devuan" ]; then + get_devuan elif [ "${OS}" == "elementary" ]; then get_elementary elif [ "${OS}" == "macos" ]; then @@ -2051,6 +2079,8 @@ else releases_arcolinux elif [ "${OS}" == "debian" ]; then releases_debian + elif [ "${OS}" == "devuan" ]; then + releases_devuan elif [ "${OS}" == "elementary" ]; then releases_elementary elif [ "${OS}" == "freebsd" ]; then From da3fe3b8f30eefbb1b88e15fee2b753ad9df5e90 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 03:21:57 +0000 Subject: [PATCH 03/59] Refactor gentoo and haiku in pretty_name() The catch all works for Gentoo and Haiku. --- quickget | 2 -- 1 file changed, 2 deletions(-) diff --git a/quickget b/quickget index bf0d43e..303e4bc 100755 --- a/quickget +++ b/quickget @@ -43,9 +43,7 @@ function pretty_name() { cachyos) PRETTY_NAME="CachyOS";; elementary) PRETTY_NAME="elementary OS";; freebsd) PRETTY_NAME="FreeBSD";; - gentoo) PRETTY_NAME="Gentoo";; garuda) PRETTY_NAME="Garuda Linux";; - haiku) PRETTY_NAME="Haiku";; kdeneon) PRETTY_NAME="KDE Neon";; kolibrios) PRETTY_NAME="KolibriOS";; linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";; From 2d72601fbf706c5dbe0180b1f8bd8545c565eb71 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 03:52:39 +0000 Subject: [PATCH 04/59] Refactor Debian support Drop non-free support, that is irrelevant in a VM. releases_debian() lists actual releases and get_debian() support the different desktop edition, which are exposed in the csv/json lists. --- quickget | 58 ++++++++++++++++++++------------------------------------ 1 file changed, 21 insertions(+), 37 deletions(-) diff --git a/quickget b/quickget index 303e4bc..4a01250 100755 --- a/quickget +++ b/quickget @@ -164,14 +164,14 @@ function list_csv() { for OPTION in "${LANGS[@]}"; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done + elif [ "${OS}" == "debian" ]; then + for OPTION in cinnamon gnome kde lxde lxqt mate standard xfce; do + echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" + done elif [ "${OS}" == "popos" ]; then for OPTION in intel nvidia; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done - elif [ "${OS}" == "debian" ]; then - for OPTION in standard nonfree; do - echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" - done elif [ "${OS}" == "alma" ]; then for OPTION in minimal dvd; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" @@ -275,17 +275,8 @@ function releases_arcolinux() { echo latest } -# later refactor these DE variants like languages and avoid the arch ? -# all these are available with a "nonfree" option too function releases_debian() { - echo cinnamon \ - gnome \ - kde \ - lxde \ - lxqt \ - mate \ - standard \ - xfce + echo 11.2.0 } function releases_cachyos() { @@ -855,25 +846,18 @@ function get_cachyos() { } function get_debian() { + local DESKTOP="standard" local HASH="" - local HASHLINE="" local ISO="" - local URL="" + local URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid" - validate_release "releases_debian" - - if [ "${1}" == "nonfree" ]; then - RELEASE="${RELEASE}+nonfree" + if [ -n "${1}" ]; then + DESKTOP="${1}" fi - case ${RELEASE} in - *+nonfree) URL="http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid";; - *) URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid";; - esac - - HASHLINE=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${RELEASE}.iso") - ISO="$(echo "${HASHLINE}" | awk '{print $NF}')" - HASH=$(echo "${HASHLINE}" | cut -d'\' -f1) + validate_release "releases_debian" + ISO="debian-live-${RELEASE}-amd64-${DESKTOP}.iso" + HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" @@ -1948,20 +1932,20 @@ if [ -n "${2}" ]; then get_void elif [ "${OS}" == "debian" ]; then if [ -n "${3}" ]; then - FREEDOM="${3}" - FREEDOMS=(standard nonfree) - if [[ ! ${FREEDOMS[*]} =~ ${FREEDOM} ]]; then - echo "ERROR! ${FREEDOM} is not a supported freedom:" - for DRIVER in "${FREEDOMS[@]}"; do - echo "${FREEDOM}" + DESKTOP="${3}" + DESKTOPS=(cinnamon gnome kde lxde lxqt mate standard xfce) + if [[ ! ${DESKTOPS[*]} =~ ${DESKTOP} ]]; then + echo "ERROR! ${DESKTOP} is not a supported Desktop Environment:" + for DESKTOP in "${DESKTOPS[@]}"; do + echo "${DESKTOP}" done exit 1 fi else - FREEDOM="standard" + DESKTOP="standard" fi - VM_PATH="${OS}-${RELEASE}-${FREEDOM}" - get_debian "${FREEDOM}" + VM_PATH="${OS}-${RELEASE}-${DESKTOP}" + get_debian "${DESKTOP}" elif [ "${OS}" == "devuan" ]; then get_devuan elif [ "${OS}" == "elementary" ]; then From 67d07dfb895564e060ab0002a43709c57efe08fb Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 03:53:19 +0000 Subject: [PATCH 05/59] White space clean up --- quickget | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/quickget b/quickget index 4a01250..50e4148 100755 --- a/quickget +++ b/quickget @@ -327,7 +327,7 @@ function releases_garuda() { function releases_haiku() { echo r1beta3-x86_64 \ - r1beta3-x86_gcc2h + r1beta3-x86_gcc2h } function releases_kali() { @@ -1344,7 +1344,6 @@ function get_popos() { make_vm_config "${ISO}" } - function get_regolith() { local HASH="" local ISO="" From e0308b4957e876882d189a42b9118b041013bcf8 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 04:01:03 +0000 Subject: [PATCH 06/59] Refactor Alma Linux support Uses the minimal image only. --- quickget | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/quickget b/quickget index 50e4148..2bfe7a3 100755 --- a/quickget +++ b/quickget @@ -172,10 +172,6 @@ function list_csv() { for OPTION in intel nvidia; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done - elif [ "${OS}" == "alma" ]; then - for OPTION in minimal dvd; do - echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" - done else echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}" fi @@ -764,14 +760,7 @@ function get_alma() { local URL="" validate_release "releases_alma" - - if [ -n "${1}" ]; then - ISOTYPE="${1}" - fi - - # The mirror url returns 10 or so local mirrors with some kind or RR rotation/load balancing - # We'll just grab the first - URL=$(wget -qq -O- "https://mirrors.almalinux.org/isos/x86_64/${RELEASE}.html" | awk -F"
  • |
  • " '{for(i=2;i<=NF;i+=2) {print $i}}' RS="" | grep href | cut -d'"' -f2 | head -1) + URL="http://lon.mirror.rackspace.com/almalinux/${RELEASE}/isos/x86_64/" ISO="AlmaLinux-${RELEASE}-x86_64-${ISOTYPE}.iso" HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep \("${ISO}" | cut -d'\' -f4)" web_get "${URL}/${ISO}" "${VM_PATH}" @@ -1904,21 +1893,7 @@ if [ -n "${2}" ]; then RELEASE="${2,,}" VM_PATH="${OS}-${RELEASE}" if [ "${OS}" == "alma" ]; then - if [ -n "${3}" ]; then - ISOTYPE="${3,,}" - ISOTYPES=(minimal dvd) - if [[ ! ${ISOTYPES[*]} =~ ${ISOTYPE} ]]; then - echo "iso ${ISOTYPE} is not supported:" - for ISOTYPE in "${ISOTYPES[@]}"; do - echo "${ISOTYPE}" - done - exit 1 - fi - else - ISOTYPE="minimal" - fi - VM_PATH="${OS}-${RELEASE}-${ISOTYPE}" - get_alma "${ISOTYPE}" + get_alma elif [ "${OS}" == "alpine" ]; then get_alpine elif [ "${OS}" == "android" ]; then From 2dbbe869d016546b8431ae50e9ebc01aa4dd7508 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 04:01:35 +0000 Subject: [PATCH 07/59] Refactor Rocky Linux support Uses the minimal image only. --- quickget | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/quickget b/quickget index 2bfe7a3..e4b3a3a 100755 --- a/quickget +++ b/quickget @@ -1136,9 +1136,6 @@ function get_rocky() { local URL="" validate_release "releases_rockylinux" - if [ -n "${1}" ]; then - ISOTYPE="${1}" - fi URL="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/x86_64" ISO="Rocky-${RELEASE}-x86_64-${ISOTYPE}.iso" HASH=$(wget -q -O- "${URL}/CHECKSUM" | grep "SHA256" | grep "${ISO}" | cut -d' ' -f4) @@ -1979,21 +1976,7 @@ if [ -n "${2}" ]; then elif [ "${OS}" == "regolith" ]; then get_regolith elif [ "${OS}" == "rockylinux" ]; then - if [ -n "${3}" ]; then - ISOTYPE="${3}" - ISOTYPES=(minimal dvd1 boot) - if [[ ! ${ISOTYPES[*]} =~ ${ISOTYPE} ]]; then - echo "iso ${ISOTYPE} is not supported:" - for ISOTYPE in "${ISOTYPES[@]}"; do - echo "${ISOTYPE}" - done - exit 1 - fi - else - ISOTYPE="dvd1" - fi - VM_PATH="${OS}-${RELEASE}-${ISOTYPE}" - get_rocky "${ISOTYPE}" + get_rocky elif [ "${OS}" == "solus" ]; then get_solus elif [[ "${OS}" == "tails"* ]]; then From 21f7c0fa5119b1b3ca798785cd17640aef5c891f Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 04:23:29 +0000 Subject: [PATCH 08/59] Refactor Manjaro support Treat the desktop editions as release since Manjaro is rolling. Drop support for Minimal and Minimal LTS selection. --- quickget | 61 ++++++++++++++------------------------------------------ 1 file changed, 15 insertions(+), 46 deletions(-) diff --git a/quickget b/quickget index e4b3a3a..25c6fd9 100755 --- a/quickget +++ b/quickget @@ -49,14 +49,6 @@ function pretty_name() { linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";; linuxmint-mate) PRETTY_NAME="Linux Mint MATE";; linuxmint-xfce) PRETTY_NAME="Linux Mint XFCE";; - manjaro-xfce) PRETTY_NAME="Manjaro XFCE";; - manjaro-kde) PRETTY_NAME="Manjaro KDE";; - manjaro-gnome) PRETTY_NAME="Manjaro Gnome";; - manjaro-budgie) PRETTY_NAME="Manjaro Budgie";; - manjaro-cinnamon) PRETTY_NAME="Manjaro Cinnamon";; - manjaro-deepin) PRETTY_NAME="Manjaro Deepin";; - manjaro-i3) PRETTY_NAME="Manjaro i3";; - manjaro-mate) PRETTY_NAME="Manjaro MATE";; mxlinux-xfce) PRETTY_NAME="MX Linux XFCE";; mxlinux-kde) PRETTY_NAME="MX Linux KDE";; mxlinux-fluxbox) PRETTY_NAME="MX Linux Fluxbox";; @@ -202,14 +194,7 @@ function os_support() { linuxmint-cinnamon \ linuxmint-mate \ linuxmint-xfce \ - manjaro-xfce \ - manjaro-kde \ - manjaro-gnome \ - manjaro-budgie \ - manjaro-cinnamon \ - manjaro-deepin \ - manjaro-i3 \ - manjaro-mate \ + manjaro \ mxlinux-xfce \ mxlinux-kde \ mxlinux-fluxbox \ @@ -387,13 +372,14 @@ function releases_macos() { } function releases_manjaro() { - case ${OS} in - *xfce|*kde|*gnome) echo full \ - minimal \ - minimal-lts;; - *budgie|*cinnamon|*deepin|*i3|*mate) echo full \ - minimal;; - esac + echo xfce \ + gnome \ + kde \ + budgie \ + cinnamon \ + deepin \ + i3 \ + mate } function releases_popos() { @@ -1001,37 +987,20 @@ function get_linuxmint() { } function get_manjaro() { - local FLAVOR="" local MANIFESTURL="" local HASH="" local ISO="" - local KEY_ISO="" - local KEY_HASH="" + local KEY_ISO="Download_x64 =" + local KEY_HASH="Download_x64_Checksum =" local URL="" validate_release "releases_manjaro" - FLAVOR=$(echo "${OS}" | cut -d'-' -f2) - case ${FLAVOR} in + case ${RELEASE} in gnome|kde|xfce) BRANCH="official";; budgie|cinnamon|deepin|i3|mate) BRANCH="community";; esac - case ${RELEASE} in - full) - KEY_ISO="Download_x64 =" - KEY_HASH="Download_x64_Checksum =" - ;; - minimal) - KEY_ISO="Download_Minimal_x64 =" - KEY_HASH="Download_Minimal_x64_Checksum =" - ;; - minimal-lts) - KEY_ISO="Download_Minimal_lts =" - KEY_HASH="Download_Minimal_x64_Checksum_lts =" - ;; - esac - - MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/${BRANCH}/${FLAVOR}.md" + MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/${BRANCH}/${RELEASE}.md" URL="$(wget -qO- "${MANIFESTURL}" | grep "${KEY_ISO}" | cut -d'"' -f2)" ISO="${URL##*/}" HASH=$(wget -qO- "${MANIFESTURL}" | grep "${KEY_HASH}" | cut -d'"' -f2) @@ -1943,7 +1912,7 @@ if [ -n "${2}" ]; then get_kolibrios elif [[ "${OS}" == *"linuxmint-"* ]]; then get_linuxmint - elif [[ "${OS}" == *"manjaro-"* ]]; then + elif [ "${OS}" == "manjaro" ]; then get_manjaro elif [[ "${OS}" == *"mxlinux-"* ]]; then get_mxlinux @@ -2040,7 +2009,7 @@ else releases_kolibrios elif [[ "${OS}" == *"linuxmint-"* ]]; then releases_linuxmint - elif [[ "${OS}" == *"manjaro-"* ]]; then + elif [ "${OS}" == "manjaro" ]; then releases_manjaro elif [[ "${OS}" == *"mxlinux-"* ]]; then releases_mxlinux From b5dc52265f5bcd8928d1071e574ac4ea71d6708b Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 04:35:33 +0000 Subject: [PATCH 09/59] Refactor MX Linux support MX Linux is listed once. XFCE is the default desktop, but KDE and FLuxbox can be selected as editions. --- quickget | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/quickget b/quickget index 25c6fd9..14795bb 100755 --- a/quickget +++ b/quickget @@ -49,9 +49,7 @@ function pretty_name() { linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";; linuxmint-mate) PRETTY_NAME="Linux Mint MATE";; linuxmint-xfce) PRETTY_NAME="Linux Mint XFCE";; - mxlinux-xfce) PRETTY_NAME="MX Linux XFCE";; - mxlinux-kde) PRETTY_NAME="MX Linux KDE";; - mxlinux-fluxbox) PRETTY_NAME="MX Linux Fluxbox";; + mxlinux) PRETTY_NAME="MX Linux";; nixos-gnome) PRETTY_NAME="NixOS Gnome";; nixos-plasma5) PRETTY_NAME="NixOS KDE";; nixos-minimal) PRETTY_NAME="NixOS Minimal";; @@ -120,10 +118,6 @@ function list_csv() { FUNC="ubuntu" elif [[ "${OS}" == *"linuxmint"* ]]; then FUNC="linuxmint" - elif [[ "${OS}" == *"manjaro"* ]]; then - FUNC="manjaro" - elif [[ "${OS}" == *"mxlinux"* ]]; then - FUNC="mxlinux" elif [[ "${OS}" == *"nixos"* ]]; then FUNC="nixos" else @@ -160,6 +154,10 @@ function list_csv() { for OPTION in cinnamon gnome kde lxde lxqt mate standard xfce; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done + elif [ "${OS}" == "mxlinux" ]; then + for OPTION in xfce kde fluxbox; do + echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" + done elif [ "${OS}" == "popos" ]; then for OPTION in intel nvidia; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" @@ -195,9 +193,7 @@ function os_support() { linuxmint-mate \ linuxmint-xfce \ manjaro \ - mxlinux-xfce \ - mxlinux-kde \ - mxlinux-fluxbox \ + mxlinux \ nixos-gnome \ nixos-plasma5 \ nixos-minimal \ @@ -1010,14 +1006,17 @@ function get_manjaro() { } function get_mxlinux() { - local FLAVOR="" + local DESKTOP="xfce" local HASH="" local ISO="" local URL="" + if [ -n "${1}" ]; then + DESKTOP="${1}" + fi + validate_release "releases_mxlinux" - FLAVOR=$(echo "${OS}" | cut -d'-' -f2) - case ${FLAVOR} in + case ${DESKTOP} in xfce) URL="https://sourceforge.net/projects/mx-linux/files/Final/Xfce" ISO="MX-${RELEASE}_x64.iso" @@ -1914,8 +1913,22 @@ if [ -n "${2}" ]; then get_linuxmint elif [ "${OS}" == "manjaro" ]; then get_manjaro - elif [[ "${OS}" == *"mxlinux-"* ]]; then - get_mxlinux + elif [ "${OS}" == "mxlinux" ]; then + if [ -n "${3}" ]; then + DESKTOP="${3}" + DESKTOPS=(xfce kde fluxbox) + if [[ ! ${DESKTOPS[*]} =~ ${DESKTOP} ]]; then + echo "ERROR! ${DESKTOP} is not a supported Desktop Environment:" + for DESKTOP in "${DESKTOPS[@]}"; do + echo "${DESKTOP}" + done + exit 1 + fi + else + DESKTOP="xfce" + fi + VM_PATH="${OS}-${RELEASE}-${DESKTOP}" + get_mxlinux "${DESKTOP}" elif [[ "${OS}" == *"nixos-"* ]]; then get_nixos elif [ "${OS}" == "openbsd" ]; then @@ -2011,7 +2024,7 @@ else releases_linuxmint elif [ "${OS}" == "manjaro" ]; then releases_manjaro - elif [[ "${OS}" == *"mxlinux-"* ]]; then + elif [ "${OS}" == "mxlinux" ]; then releases_mxlinux elif [[ "${OS}" == *"nixos-"* ]]; then releases_nixos From d6c9d5d359bd620f7989240c3bf47db2bf1d41b2 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 04:37:37 +0000 Subject: [PATCH 10/59] Fix Devuan csv/json --- quickget | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickget b/quickget index 14795bb..d638e8e 100755 --- a/quickget +++ b/quickget @@ -178,7 +178,7 @@ function os_support() { arcolinux \ cachyos \ debian \ - devaun \ + devuan \ elementary \ freebsd \ fedora \ From 7d71a28547017c6d4817ebb5e1f7b30611954fd9 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 04:49:19 +0000 Subject: [PATCH 11/59] Refactor NixOS support GNOME is the default download, but Plasma5 and Minimal can be selected as editions. --- quickget | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/quickget b/quickget index d638e8e..6cb1c09 100755 --- a/quickget +++ b/quickget @@ -50,9 +50,7 @@ function pretty_name() { linuxmint-mate) PRETTY_NAME="Linux Mint MATE";; linuxmint-xfce) PRETTY_NAME="Linux Mint XFCE";; mxlinux) PRETTY_NAME="MX Linux";; - nixos-gnome) PRETTY_NAME="NixOS Gnome";; - nixos-plasma5) PRETTY_NAME="NixOS KDE";; - nixos-minimal) PRETTY_NAME="NixOS Minimal";; + nixos) PRETTY_NAME="NixOS";; macos) PRETTY_NAME="macOS";; openbsd) PRETTY_NAME="OpenBSD";; opensuse) PRETTY_NAME="openSUSE";; @@ -118,8 +116,6 @@ function list_csv() { FUNC="ubuntu" elif [[ "${OS}" == *"linuxmint"* ]]; then FUNC="linuxmint" - elif [[ "${OS}" == *"nixos"* ]]; then - FUNC="nixos" else FUNC="${OS}" fi @@ -158,6 +154,10 @@ function list_csv() { for OPTION in xfce kde fluxbox; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done + elif [ "${OS}" == "nixos" ]; then + for OPTION in gnome plasma5 minimal; do + echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" + done elif [ "${OS}" == "popos" ]; then for OPTION in intel nvidia; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" @@ -194,9 +194,7 @@ function os_support() { linuxmint-xfce \ manjaro \ mxlinux \ - nixos-gnome \ - nixos-plasma5 \ - nixos-minimal \ + nixos \ lubuntu \ macos \ openbsd \ @@ -1037,15 +1035,19 @@ function get_mxlinux() { } function get_nixos() { - local FLAVOR="" + local DESKTOP="gnome" local HASH="" local ISO="" local URL="" + if [ -n "${1}" ]; then + DESKTOP="${1}" + fi + validate_release "releases_nixos" URL="https://channels.nixos.org/nixos-${RELEASE}" FLAVOR=$(echo "${OS}" | cut -d'-' -f2) - ISO="latest-nixos-${FLAVOR}-x86_64-linux.iso" + ISO="latest-nixos-${DESKTOP}-x86_64-linux.iso" HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" @@ -1929,8 +1931,22 @@ if [ -n "${2}" ]; then fi VM_PATH="${OS}-${RELEASE}-${DESKTOP}" get_mxlinux "${DESKTOP}" - elif [[ "${OS}" == *"nixos-"* ]]; then - get_nixos + elif [ "${OS}" == "nixos" ]; then + if [ -n "${3}" ]; then + DESKTOP="${3}" + DESKTOPS=(gnome plasma5 minimal) + if [[ ! ${DESKTOPS[*]} =~ ${DESKTOP} ]]; then + echo "ERROR! ${DESKTOP} is not a supported Desktop Environment:" + for DESKTOP in "${DESKTOPS[@]}"; do + echo "${DESKTOP}" + done + exit 1 + fi + else + DESKTOP="gnome" + fi + VM_PATH="${OS}-${RELEASE}-${DESKTOP}" + get_nixos ${DESKTOP} elif [ "${OS}" == "openbsd" ]; then get_openbsd elif [ "${OS}" == "opensuse" ]; then @@ -2026,7 +2042,7 @@ else releases_manjaro elif [ "${OS}" == "mxlinux" ]; then releases_mxlinux - elif [[ "${OS}" == *"nixos-"* ]]; then + elif [ "${OS}" == "nixos" ]; then releases_nixos elif [ "${OS}" == "opensuse" ]; then releases_opensuse From 28b48c7b8ead8bcc9bfc3854e0a1b7253d8745bc Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 05:01:35 +0000 Subject: [PATCH 12/59] Refactor KDE Neon support No longer uses zsync --- quickget | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/quickget b/quickget index 6cb1c09..8726ed4 100755 --- a/quickget +++ b/quickget @@ -136,8 +136,6 @@ function list_csv() { DOWNLOADER="${DL}" elif [ "${OS}" == "gentoo" ]; then DOWNLOADER="${DL}" - elif [[ "${OS}" == *"kdeneon"* ]]; then - DOWNLOADER="${DL}" else DOWNLOADER="wget" fi @@ -942,15 +940,15 @@ function get_kali() { function get_kdeneon() { local ISO="" + local HASH="" local URL="" validate_release "releases_kdeneon" - ISO="neon-${RELEASE}-current.iso" - # Get the URL of the mirror closest to the user's location - URL=$(wget -q -O- "https://files.kde.org/neon/images/${RELEASE}/current/neon-${RELEASE}-current.iso.zsync.mirrorlist" | \ - grep "neon-${RELEASE}-current.iso.zsync" | grep '>1.<' | cut -d\" -f 6 | sed 's/https/http/g' | xargs dirname) - zsync_get "${URL}/${ISO}" "${VM_PATH}" - check_hash "${ISO}" "$(wget -q -O- "https://files.kde.org/neon/images/${RELEASE}/current/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f1)" + URL="https://files.kde.org/neon/images/${RELEASE}/current" + ISO=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f3-) + HASH=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f1) + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" } From 7e397ced4ea173cf0239e29a03cfd4a8d6fa6962 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 05:02:21 +0000 Subject: [PATCH 13/59] Clean up list_csv() --- quickget | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/quickget b/quickget index 8726ed4..df190be 100755 --- a/quickget +++ b/quickget @@ -104,7 +104,7 @@ function list_csv() { # check if we have a zsync installed somewhere ZS="$(which zsync)" - if [ -x "${ZS}" ]; then + if [ -x "${ZS}" ]; then DL="zsync" else DL="wget" @@ -122,7 +122,6 @@ function list_csv() { PNG="https://quickemu-project.github.io/quickemu-icons/png/${FUNC}/${FUNC}-quickemu-white-pinkbg.png" SVG="https://quickemu-project.github.io/quickemu-icons/svg/${FUNC}/${FUNC}-quickemu-white-pinkbg.svg" - for RELEASE in $("releases_${FUNC}"); do if [ "${OS}" == "macos" ]; then DOWNLOADER="macrecovery" @@ -130,12 +129,6 @@ function list_csv() { DOWNLOADER="${DL}" elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ]; then DOWNLOADER="${DL}" - elif [ "${OS}" == "cachyos" ]; then - DOWNLOADER="${DL}" - elif [ "${OS}" == "garuda" ]; then - DOWNLOADER="${DL}" - elif [ "${OS}" == "gentoo" ]; then - DOWNLOADER="${DL}" else DOWNLOADER="wget" fi From f93a7249a8ff280719c2aec71c57723eba76cc7e Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 05:08:33 +0000 Subject: [PATCH 14/59] Refactor Linux Mint support Cinnamon is the default download. MATE and XFCE can be selected as editions. --- quickget | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/quickget b/quickget index df190be..ef11803 100755 --- a/quickget +++ b/quickget @@ -46,9 +46,7 @@ function pretty_name() { garuda) PRETTY_NAME="Garuda Linux";; kdeneon) PRETTY_NAME="KDE Neon";; kolibrios) PRETTY_NAME="KolibriOS";; - linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";; - linuxmint-mate) PRETTY_NAME="Linux Mint MATE";; - linuxmint-xfce) PRETTY_NAME="Linux Mint XFCE";; + linuxmint) PRETTY_NAME="Linux Mint";; mxlinux) PRETTY_NAME="MX Linux";; nixos) PRETTY_NAME="NixOS";; macos) PRETTY_NAME="macOS";; @@ -114,8 +112,6 @@ function list_csv() { DISPLAY_NAME="$(pretty_name "${OS}")" if [[ "${OS}" == *"ubuntu"* ]]; then FUNC="ubuntu" - elif [[ "${OS}" == *"linuxmint"* ]]; then - FUNC="linuxmint" else FUNC="${OS}" fi @@ -141,6 +137,10 @@ function list_csv() { for OPTION in cinnamon gnome kde lxde lxqt mate standard xfce; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done + elif [ "${OS}" == "linuxmint" ]; then + for OPTION in cinnamon mate xfce; do + echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" + done elif [ "${OS}" == "mxlinux" ]; then for OPTION in xfce kde fluxbox; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" @@ -180,9 +180,7 @@ function os_support() { kdeneon \ kolibrios \ kubuntu \ - linuxmint-cinnamon \ - linuxmint-mate \ - linuxmint-xfce \ + linuxmint \ manjaro \ mxlinux \ nixos \ @@ -956,15 +954,19 @@ function get_kolibrios() { } function get_linuxmint() { - local FLAVOR="" + local DESKTOP="cinnamon" local HASH="" local ISO="" local URL="" + if [ -n "${1}" ]; then + DESKTOP="${1}" + fi + validate_release "releases_linuxmint" FLAVOR=$(echo "${OS}" | cut -d'-' -f2) URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}" - ISO="linuxmint-${RELEASE}-${FLAVOR}-64bit.iso" + ISO="linuxmint-${RELEASE}-${DESKTOP}-64bit.iso" HASH=$(wget -q -O- "${URL}/${RELEASE}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" @@ -1902,8 +1904,22 @@ if [ -n "${2}" ]; then get_kdeneon elif [ "${OS}" == "kolibrios" ]; then get_kolibrios - elif [[ "${OS}" == *"linuxmint-"* ]]; then - get_linuxmint + elif [ "${OS}" == "linuxmint" ]; then + if [ -n "${3}" ]; then + DESKTOP="${3}" + DESKTOPS=(cinnamon mate xfce) + if [[ ! ${DESKTOPS[*]} =~ ${DESKTOP} ]]; then + echo "ERROR! ${DESKTOP} is not a supported Desktop Environment:" + for DESKTOP in "${DESKTOPS[@]}"; do + echo "${DESKTOP}" + done + exit 1 + fi + else + DESKTOP="cinnamon" + fi + VM_PATH="${OS}-${RELEASE}-${DESKTOP}" + get_linuxmint ${DESKTOP} elif [ "${OS}" == "manjaro" ]; then get_manjaro elif [ "${OS}" == "mxlinux" ]; then @@ -2027,7 +2043,7 @@ else releases_kali elif [ "${OS}" == "kolibrios" ]; then releases_kolibrios - elif [[ "${OS}" == *"linuxmint-"* ]]; then + elif [ "${OS}" == "linuxmint" ]; then releases_linuxmint elif [ "${OS}" == "manjaro" ]; then releases_manjaro From 105aea46efb806c64f567ed62ce4464251200a67 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 05:12:11 +0000 Subject: [PATCH 15/59] Correct conditionals for Tails --- quickget | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index ef11803..eb154df 100755 --- a/quickget +++ b/quickget @@ -1984,7 +1984,7 @@ if [ -n "${2}" ]; then get_rocky elif [ "${OS}" == "solus" ]; then get_solus - elif [[ "${OS}" == "tails"* ]]; then + elif [ "${OS}" == "tails" ]; then get_tails elif [[ "${OS}" == *"ubuntu"* ]]; then get_ubuntu @@ -2069,7 +2069,7 @@ else releases_slackware elif [ "${OS}" == "solus" ]; then releases_solus - elif [[ "${OS}" == "tails"* ]]; then + elif [ "${OS}" == "tails" ]; then releases_tails elif [[ "${OS}" == *"ubuntu"* ]]; then releases_ubuntu From 056afa9575d2977623771c6f1ea98ce710c3a8e8 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 05:23:43 +0000 Subject: [PATCH 16/59] Fix SPICE audio. Close #272 --- quickemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickemu b/quickemu index b83729b..92a1d4e 100755 --- a/quickemu +++ b/quickemu @@ -657,7 +657,7 @@ function vm_boot() { # Setup the appropriate audio device based on the display output case ${OUTPUT} in - spice|spice-app|none) AUDIO_DEV="spice,id=audio0,out.mixing-engine=off";; + spice|spice-app|none) AUDIO_DEV="spice,id=audio0";; *) AUDIO_DEV="pa,id=audio0,out.mixing-engine=off,out.stream-name=${LAUNCHER}-${VMNAME},in.stream-name=${LAUNCHER}-${VMNAME}";; esac From 22c664ad932c285978f519abf5064f4afd5351f0 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 05:30:27 +0000 Subject: [PATCH 17/59] Bump the version to 3.12 --- quickemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 92a1d4e..a63689e 100755 --- a/quickemu +++ b/quickemu @@ -1132,7 +1132,7 @@ VMPATH="" readonly LAUNCHER=$(basename "${0}") readonly DISK_MIN_SIZE=$((197632 * 8)) -readonly VERSION="3.11" +readonly VERSION="3.12" # PUBLICSHARE is the only directory exposed to guest VMs for file # sharing via 9P, spice-webdavd and Samba. This path is not configurable. From 8f41c4c90f495367aced95102d40d7807de95cc6 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 05:33:23 +0000 Subject: [PATCH 18/59] Drop shorthand options --- quickemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickemu b/quickemu index a63689e..481f219 100755 --- a/quickemu +++ b/quickemu @@ -1172,7 +1172,7 @@ if [ $# -lt 1 ]; then else while [ $# -gt 0 ]; do case "${1}" in - -acc|--acc|-accessible|--accessible|-accessibility|--accessibility) + -accessible|--accessible|-accessibility|--accessibility) ACCESSIBLE="${2}" accessible_param_check shift From 5bfec8a9d3742ba8f927422552bf165ddbcd6aac Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 05:57:59 +0000 Subject: [PATCH 19/59] Consolidate BSD, Haiku and Linux guests --- quickemu | 19 ++++++------------- quickget | 11 ++++------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/quickemu b/quickemu index 481f219..e6e0b56 100755 --- a/quickemu +++ b/quickemu @@ -464,14 +464,19 @@ function vm_boot() { # Make any OS specific adjustments case ${guest_os} in - freebsd|linux|openbsd) + *bsd|haiku|linux) CPU="-cpu host,kvm=on" if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then CPU="${CPU},topoext" fi + if [ "${guest_os}" == "freebsd" ]; then MOUSE="usb-mouse" + elif [ "${guest_os}" == "haiku" ]; then + MACHINE_TYPE="pc" + NET_DEVICE="rtl8139" fi + if [ -z "${disk_size}" ]; then disk_size="16G" fi @@ -483,22 +488,10 @@ function vm_boot() { fi MACHINE_TYPE="pc" NET_DEVICE="rtl8139" - GUEST_TWEAKS="-boot d" if [ -z "${disk_size}" ]; then disk_size="256M" fi ;; - haiku) - CPU="-cpu host,kvm=on" - MACHINE_TYPE="pc" - NET_DEVICE="rtl8139" - if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then - CPU="${CPU},topoext" - fi - if [ -z "${disk_size}" ]; then - disk_size="32G" - fi - ;; macos) #https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/ # A CPU with SSE4.1 support is required for >= macOS Sierra diff --git a/quickget b/quickget index eb154df..38f9cf7 100755 --- a/quickget +++ b/quickget @@ -588,8 +588,8 @@ function make_vm_config() { IMAGE_FILE="${1}" ISO_FILE="${2}" case "${OS}" in - freebsd ) - GUEST="freebsd" + freebsd|openbsd) + GUEST="bsd" IMAGE_TYPE="iso";; haiku) GUEST="haiku" @@ -597,13 +597,10 @@ function make_vm_config() { kolibrios) GUEST="kolibrios" IMAGE_TYPE="iso";; - openbsd ) - GUEST="openbsd" - IMAGE_TYPE="iso";; - macos ) + macos) GUEST="macos" IMAGE_TYPE="img";; - windows ) + windows) GUEST="windows" IMAGE_TYPE="iso";; *) From 5f26733687e5b298755bfb6dcabf30708797e60f Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 07:03:53 +0000 Subject: [PATCH 20/59] Update adding an OS to quickget guide --- quickget | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/quickget b/quickget index 38f9cf7..dd8679c 100755 --- a/quickget +++ b/quickget @@ -1,12 +1,11 @@ #!/usr/bin/env bash - # Here the quick 'n dirty guide to adding a new OS to quickget # # 1. Add the new OS, all lowercase, to os_support() # 2. Add a "pretty name" display name to pretty_name() # 3. Create a releases_newos() generator that outputs the currently supported release versions -# 4. Add the new OS to make_vm_config() +# 4. Add the new OS to make_vm_config(); (only if required) # 5. Create a get_newos() function that does something like this: # function get_newos() { # local HASH="" @@ -15,8 +14,8 @@ # # validate_release "releases_newos" # ISO="newos-${RELEASE}-amd64.iso" -# URL="https://www.newos.org/download/${ISO}" -# web_get "${URL}" "${VM_PATH}" +# URL="https://www.newos.org/download" +# web_get "${URL}/${ISO}" "${VM_PATH}" # web_get "${URL}/SHA256SUMS" "${VM_PATH}" # HASH=$(cat "${VM_PATH}/SHA256SUMS" | cut -d' ' -f1) # check_hash "${ISO}" "${HASH}" From 559e2ae886705e7bb087f5fa9263d50fb281f2aa Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 07:06:06 +0000 Subject: [PATCH 21/59] Refactor aria2c and zsync support If aria2 is installed, it will now be listed in the csv/json --- quickget | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/quickget b/quickget index dd8679c..fdc6039 100755 --- a/quickget +++ b/quickget @@ -89,6 +89,7 @@ function list_json() { function list_csv() { local DISPLAY_NAME + local DL="" local DOWNLOADER local FUNC local OPTION @@ -96,16 +97,19 @@ function list_csv() { local PNG local RELEASE local SVG - local ZS="" - local DL="" + local HAS_ZSYNC=0 -# check if we have a zsync installed somewhere - ZS="$(which zsync)" - if [ -x "${ZS}" ]; then - DL="zsync" - else + # Check if zsync is available + if command -v zsync &>/dev/null; then + HAS_ZSYNC=1 + fi + + if command -v aria2c &>/dev/null; then + DL="aria2c" + elif command -v wget &>/dev/null; then DL="wget" fi + echo "Display Name,OS,Release,Option,Downloader,PNG,SVG" for OS in $(os_support); do DISPLAY_NAME="$(pretty_name "${OS}")" @@ -120,12 +124,12 @@ function list_csv() { for RELEASE in $("releases_${FUNC}"); do if [ "${OS}" == "macos" ]; then DOWNLOADER="macrecovery" - elif [ "${OS}" == "ubuntu" ] && [ "${RELEASE}" == "canary" ]; then - DOWNLOADER="${DL}" - elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ]; then - DOWNLOADER="${DL}" + elif [ "${OS}" == "ubuntu" ] && [ "${RELEASE}" == "canary" ] && [ ${HAS_ZSYNC} -eq 1 ]; then + DOWNLOADER="zsync" + elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ] && [ ${HAS_ZSYNC} -eq 1 ]; then + DOWNLOADER="zsync" else - DOWNLOADER="wget" + DOWNLOADER="${DL}" fi if [ "${OS}" == "windows" ]; then @@ -518,7 +522,7 @@ function web_get() { exit 1 fi - if command -v aria2c > /dev/null; then + if command -v aria2c &>/dev/null; then if ! aria2c -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" -o "${DIR}/${FILE}"; then echo #Necessary as aria2c in suppressed mode does not have new lines echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again." @@ -538,12 +542,11 @@ function zsync_get() { local FILE="" local OUT="" local URL="${1}" - FILE="${URL##*/}" local ZS="" -# check if we have a zsync installed somewhere - ZS="$(which zsync)" - if [ -x "${ZS}" ]; then + FILE="${URL##*/}" + + if command -v zsync &>/dev/null; then if [ -n "${3}" ]; then OUT="${3}" else @@ -564,7 +567,7 @@ function zsync_get() { rm "${DIR}/${OUT}.zs-old" fi else - echo "INFO: zsync not found, falling back to wget" + echo "INFO: zsync not found, falling back to wget/aria2c" web_get "${ISO}" "${DIR}" fi } From 2490060192403f105b8264e37eb50908ee30454d Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 07:10:13 +0000 Subject: [PATCH 22/59] Refactor Braille support --- README.md | 2 +- quickemu | 27 +++++++++++---------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 896b282..ec4f320 100644 --- a/README.md +++ b/README.md @@ -688,7 +688,7 @@ Usage quickemu --vm ubuntu.conf You can also pass optional parameters - --accessible : Select accessible facilitation. 'braille' (default - currently requires --display sdl ) + --braille : Enable braille support. Requires SDL. --delete-disk : Delete the disk image and EFI variables --delete-vm : Delete the entire VM and it's configuration --display : Select display backend. 'sdl' (default), 'gtk', 'none', or 'spice' diff --git a/quickemu b/quickemu index e6e0b56..037bc72 100755 --- a/quickemu +++ b/quickemu @@ -897,8 +897,9 @@ function vm_boot() { -monitor none -serial mon:stdio) - if [[ "${ACCESSIBLE}" == "braille" ]] || [[ "${ACCESSIBLE}" == "brl" ]]; then - # shellcheck disable=SC2054 + # FIXME: Check for device availability. qemu will fail to start otherwise + if [ -n "${BRAILLE}" ]; then + # shellcheck disable=SC2054 args+=(-chardev braille,id=brltty -device usb-braille,id=usbbrl,chardev=brltty) fi @@ -1049,7 +1050,7 @@ function usage() { echo " ${LAUNCHER} --vm ubuntu.conf" echo echo "You can also pass optional parameters" - echo " --accessible : Select accessible facilitation. 'braille' (default - currently requires --display sdl )" + echo " --braille : Enable braille support. Requires SDL." echo " --delete-disk : Delete the disk image and EFI variables" echo " --delete-vm : Delete the entire VM and it's configuration" echo " --display : Select display backend. 'sdl' (default), 'gtk', 'none', or 'spice'" @@ -1066,14 +1067,6 @@ function usage() { exit 1 } -# -function accessible_param_check() { - if [ "${ACCESSIBLE}" != "braille" ] && [ "${ACCESSIBLE}" != "brl" ] ; then - echo "ERROR! Requested accessiblility '${ACCESSIBLE}' is not recognised." - exit 1 - # TODO can we check the device/API is available - fi -} function display_param_check() { if [ "${OUTPUT}" != "gtk" ] && [ "${OUTPUT}" != "none" ] && [ "${OUTPUT}" != "sdl" ] && [ "${OUTPUT}" != "spice" ]; then echo "ERROR! Requested output '${OUTPUT}' is not recognised." @@ -1104,6 +1097,7 @@ tpm="off" usb_devices=() extra_args="" +BRAILLE="" DELETE_DISK=0 DELETE_VM=0 FULLSCREEN="" @@ -1165,10 +1159,8 @@ if [ $# -lt 1 ]; then else while [ $# -gt 0 ]; do case "${1}" in - -accessible|--accessible|-accessibility|--accessibility) - ACCESSIBLE="${2}" - accessible_param_check - shift + -braille|--braille) + BRAILLE="on" shift;; -delete|--delete|-delete-disk|--delete-disk) DELETE_DISK=1 @@ -1251,7 +1243,10 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then fi if [ -z "${OUTPUT}" ]; then - if [ -z "${display}" ]; then + # Braille support requires SDL. Override OUTPUT if braille was requested. + if [ -n "${BRAILLE}" ]; then + OUTPUT="sdl" + elif [ -z "${display}" ]; then OUTPUT="sdl" else OUTPUT="${display}" From 93a5a49d522294fbafc7ba9c7c439d96c070b36f Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 09:19:07 +0000 Subject: [PATCH 23/59] Refactor OS and releases parser Makes quickget much easier to maintain. Add "editions" generators for those OSs that have editions, such as Linux Mint and MX Linux. Use introspection to automatically parse editions and call the appropriate get_() and releases_() functions. --- quickget | 339 +++++++++++++++---------------------------------------- 1 file changed, 89 insertions(+), 250 deletions(-) diff --git a/quickget b/quickget index fdc6039..0659669 100755 --- a/quickget +++ b/quickget @@ -5,23 +5,28 @@ # 1. Add the new OS, all lowercase, to os_support() # 2. Add a "pretty name" display name to pretty_name() # 3. Create a releases_newos() generator that outputs the currently supported release versions -# 4. Add the new OS to make_vm_config(); (only if required) -# 5. Create a get_newos() function that does something like this: +# 4. If the OS has "editions" (Linux Mint for example), create editions_newos() generator +# 5. Add the new OS to make_vm_config(); (only if required) +# 6. Create a get_newos() function that does something like this: # function get_newos() { +# local EDITION="" # local HASH="" # local ISO="" # local URL="" # +# if [ -n "${1}" ]; then +# EDITION="${1}" +# fi +# # validate_release "releases_newos" # ISO="newos-${RELEASE}-amd64.iso" # URL="https://www.newos.org/download" # web_get "${URL}/${ISO}" "${VM_PATH}" # web_get "${URL}/SHA256SUMS" "${VM_PATH}" -# HASH=$(cat "${VM_PATH}/SHA256SUMS" | cut -d' ' -f1) +# HASH=$(cut -d' ' -f1 < "${VM_PATH}/SHA256SUMS") # check_hash "${ISO}" "${HASH}" # make_vm_config "${ISO}" # } -# 6. Add new OS to the argument parser at the bottom of the script function cleanup() { if [ -n "$(jobs -p)" ]; then @@ -132,30 +137,15 @@ function list_csv() { DOWNLOADER="${DL}" fi - if [ "${OS}" == "windows" ]; then + # If the OS has an editions_() function, use it. + if [[ $(type -t "editions_${OS}") == function ]]; then + for OPTION in $(editions_"${OS}"); do + echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" + done + elif [ "${OS}" == "windows" ]; then for OPTION in "${LANGS[@]}"; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done - elif [ "${OS}" == "debian" ]; then - for OPTION in cinnamon gnome kde lxde lxqt mate standard xfce; do - echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" - done - elif [ "${OS}" == "linuxmint" ]; then - for OPTION in cinnamon mate xfce; do - echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" - done - elif [ "${OS}" == "mxlinux" ]; then - for OPTION in xfce kde fluxbox; do - echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" - done - elif [ "${OS}" == "nixos" ]; then - for OPTION in gnome plasma5 minimal; do - echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" - done - elif [ "${OS}" == "popos" ]; then - for OPTION in intel nvidia; do - echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" - done else echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}" fi @@ -246,6 +236,17 @@ function releases_debian() { echo 11.2.0 } +function editions_debian() { + echo standard \ + cinnamon \ + gnome \ + kde \ + lxde \ + lxqt \ + mate \ + xfce +} + function releases_cachyos() { echo 2022.01.09 \ 2022.02.11 @@ -317,15 +318,34 @@ function releases_linuxmint(){ echo 20.2 } +function editions_linuxmint(){ + echo cinnamon \ + mate \ + xfce +} + function releases_mxlinux(){ echo 21 } +function editions_mxlinux(){ + echo xfce \ + kde \ + fluxbox +} + function releases_nixos(){ echo 21.05 \ 21.11 } +function editions_nixos(){ + echo gnome \ + plasma5 \ + minimal +} + + function releases_openbsd(){ echo 7.0 } @@ -374,6 +394,11 @@ function releases_popos() { 21.10 } +function editions_popos() { + echo intel \ + nvidia +} + function releases_regolith() { echo 1.6.0_hirsute \ 1.6.0_focal \ @@ -803,17 +828,17 @@ function get_cachyos() { } function get_debian() { - local DESKTOP="standard" + local EDITION="" local HASH="" local ISO="" local URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid" if [ -n "${1}" ]; then - DESKTOP="${1}" + EDITION="${1}" fi validate_release "releases_debian" - ISO="debian-live-${RELEASE}-amd64-${DESKTOP}.iso" + ISO="debian-live-${RELEASE}-amd64-${EDITION}.iso" HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" @@ -953,19 +978,18 @@ function get_kolibrios() { } function get_linuxmint() { - local DESKTOP="cinnamon" + local EDITION="" local HASH="" local ISO="" local URL="" if [ -n "${1}" ]; then - DESKTOP="${1}" + EDITION="${1}" fi validate_release "releases_linuxmint" - FLAVOR=$(echo "${OS}" | cut -d'-' -f2) URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}" - ISO="linuxmint-${RELEASE}-${DESKTOP}-64bit.iso" + ISO="linuxmint-${RELEASE}-${EDITION}-64bit.iso" HASH=$(wget -q -O- "${URL}/${RELEASE}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" @@ -996,17 +1020,17 @@ function get_manjaro() { } function get_mxlinux() { - local DESKTOP="xfce" + local EDITION="" local HASH="" local ISO="" local URL="" if [ -n "${1}" ]; then - DESKTOP="${1}" + EDITION="${1}" fi validate_release "releases_mxlinux" - case ${DESKTOP} in + case ${EDITION} in xfce) URL="https://sourceforge.net/projects/mx-linux/files/Final/Xfce" ISO="MX-${RELEASE}_x64.iso" @@ -1027,19 +1051,18 @@ function get_mxlinux() { } function get_nixos() { - local DESKTOP="gnome" + local EDITION="" local HASH="" local ISO="" local URL="" if [ -n "${1}" ]; then - DESKTOP="${1}" + EDITION="${1}" fi validate_release "releases_nixos" URL="https://channels.nixos.org/nixos-${RELEASE}" - FLAVOR=$(echo "${OS}" | cut -d'-' -f2) - ISO="latest-nixos-${DESKTOP}-x86_64-linux.iso" + ISO="latest-nixos-${EDITION}-x86_64-linux.iso" HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" @@ -1848,239 +1871,55 @@ else exit 1 fi +if [[ ! $(os_support) =~ ${OS} ]]; then + echo -e "ERROR! ${OS} is not a supported OS.\n" + os_support + exit 1 +fi + if [ -n "${2}" ]; then RELEASE="${2,,}" VM_PATH="${OS}-${RELEASE}" - if [ "${OS}" == "alma" ]; then - get_alma - elif [ "${OS}" == "alpine" ]; then - get_alpine - elif [ "${OS}" == "android" ]; then - get_android - elif [ "${OS}" == "archlinux" ]; then - get_archlinux - elif [ "${OS}" == "arcolinux" ]; then - get_arcolinux - elif [ "${OS}" == "void" ]; then - get_void - elif [ "${OS}" == "debian" ]; then + + # If the OS has an editions_() function, use it. + if [[ $(type -t "editions_${OS}") == function ]]; then + EDITIONS=($(editions_${OS})) + EDITION=${EDITIONS[0]} if [ -n "${3}" ]; then - DESKTOP="${3}" - DESKTOPS=(cinnamon gnome kde lxde lxqt mate standard xfce) - if [[ ! ${DESKTOPS[*]} =~ ${DESKTOP} ]]; then - echo "ERROR! ${DESKTOP} is not a supported Desktop Environment:" - for DESKTOP in "${DESKTOPS[@]}"; do - echo "${DESKTOP}" + EDITION="${3}" + if [[ ! ${EDITIONS[*]} =~ ${EDITION} ]]; then + echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition:\n" + for EDITION in "${EDITIONS[@]}"; do + echo -n "${EDITION} " done exit 1 fi - else - DESKTOP="standard" fi - VM_PATH="${OS}-${RELEASE}-${DESKTOP}" - get_debian "${DESKTOP}" - elif [ "${OS}" == "devuan" ]; then - get_devuan - elif [ "${OS}" == "elementary" ]; then - get_elementary - elif [ "${OS}" == "macos" ]; then - get_macos - elif [ "${OS}" == "freebsd" ]; then - get_freebsd - elif [ "${OS}" == "fedora" ]; then - get_fedora - elif [ "${OS}" == "garuda" ]; then - get_garuda - elif [ "${OS}" == "cachyos" ]; then - get_cachyos - elif [ "${OS}" == "gentoo" ]; then - get_gentoo - elif [ "${OS}" == "haiku" ]; then - get_haiku - elif [ "${OS}" == "kali" ]; then - get_kali - elif [ "${OS}" == "kdeneon" ]; then - get_kdeneon - elif [ "${OS}" == "kolibrios" ]; then - get_kolibrios - elif [ "${OS}" == "linuxmint" ]; then - if [ -n "${3}" ]; then - DESKTOP="${3}" - DESKTOPS=(cinnamon mate xfce) - if [[ ! ${DESKTOPS[*]} =~ ${DESKTOP} ]]; then - echo "ERROR! ${DESKTOP} is not a supported Desktop Environment:" - for DESKTOP in "${DESKTOPS[@]}"; do - echo "${DESKTOP}" - done - exit 1 - fi - else - DESKTOP="cinnamon" - fi - VM_PATH="${OS}-${RELEASE}-${DESKTOP}" - get_linuxmint ${DESKTOP} - elif [ "${OS}" == "manjaro" ]; then - get_manjaro - elif [ "${OS}" == "mxlinux" ]; then - if [ -n "${3}" ]; then - DESKTOP="${3}" - DESKTOPS=(xfce kde fluxbox) - if [[ ! ${DESKTOPS[*]} =~ ${DESKTOP} ]]; then - echo "ERROR! ${DESKTOP} is not a supported Desktop Environment:" - for DESKTOP in "${DESKTOPS[@]}"; do - echo "${DESKTOP}" - done - exit 1 - fi - else - DESKTOP="xfce" - fi - VM_PATH="${OS}-${RELEASE}-${DESKTOP}" - get_mxlinux "${DESKTOP}" - elif [ "${OS}" == "nixos" ]; then - if [ -n "${3}" ]; then - DESKTOP="${3}" - DESKTOPS=(gnome plasma5 minimal) - if [[ ! ${DESKTOPS[*]} =~ ${DESKTOP} ]]; then - echo "ERROR! ${DESKTOP} is not a supported Desktop Environment:" - for DESKTOP in "${DESKTOPS[@]}"; do - echo "${DESKTOP}" - done - exit 1 - fi - else - DESKTOP="gnome" - fi - VM_PATH="${OS}-${RELEASE}-${DESKTOP}" - get_nixos ${DESKTOP} - elif [ "${OS}" == "openbsd" ]; then - get_openbsd - elif [ "${OS}" == "opensuse" ]; then - get_opensuse - elif [ "${OS}" == "oraclelinux" ]; then - get_oraclelinux - elif [ "${OS}" == "slackware" ]; then - get_slackware - elif [ "${OS}" == "popos" ]; then - if [ -n "${3}" ]; then - DRIVER="${3}" - DRIVERS=(intel nvidia) - if [[ ! ${DRIVERS[*]} =~ ${DRIVER} ]]; then - echo "ERROR! ${DRIVER} is not a supported driver:" - for DRIVER in "${DRIVERS[@]}"; do - echo "${DRIVER}" - done - exit 1 - fi - else - DRIVER="intel" - fi - VM_PATH="${OS}-${RELEASE}-${DRIVER}" - get_popos "${DRIVER}" - elif [ "${OS}" == "regolith" ]; then - get_regolith - elif [ "${OS}" == "rockylinux" ]; then - get_rocky - elif [ "${OS}" == "solus" ]; then - get_solus - elif [ "${OS}" == "tails" ]; then - get_tails + VM_PATH="${OS}-${RELEASE}-${EDITION}" + get_${OS} "${EDITION}" elif [[ "${OS}" == *"ubuntu"* ]]; then - get_ubuntu + get_ubuntu elif [ "${OS}" == "windows" ]; then + LANG_NAME="English International" if [ -n "${3}" ]; then LANG_NAME="${3}" if [[ ! ${LANGS[*]} =~ "${LANG_NAME}" ]]; then - echo "ERROR! ${LANG_NAME} is not a supported language:" + echo -e "ERROR! ${LANG_NAME} is not a supported Windows language:\n" for LANG in "${LANGS[@]}"; do - echo "${LANG}" + echo -n "${LANG} " done exit 1 fi - else - LANG_NAME="English International" fi get_windows "${LANG_NAME}" - elif [ "${OS}" == "zorin" ]; then - get_zorin else - echo "ERROR! ${OS} is unknown:" - os_support - exit 1 + get_"${OS}" fi else echo -n "ERROR! You must specify a release: " - if [ "${OS}" == "alma" ]; then - releases_alma - elif [ "${OS}" == "alpine" ]; then - releases_alpine - elif [ "${OS}" == "android" ]; then - releases_android - elif [ "${OS}" == "archlinux" ]; then - releases_archlinux - elif [ "${OS}" == "arcolinux" ]; then - releases_arcolinux - elif [ "${OS}" == "debian" ]; then - releases_debian - elif [ "${OS}" == "devuan" ]; then - releases_devuan - elif [ "${OS}" == "elementary" ]; then - releases_elementary - elif [ "${OS}" == "freebsd" ]; then - releases_freebsd - elif [ "${OS}" == "fedora" ]; then - releases_fedora - elif [ "${OS}" == "garuda" ]; then - releases_garuda - elif [ "${OS}" == "cachyos" ]; then - releases_cachyos - elif [ "${OS}" == "gentoo" ]; then - releases_gentoo - elif [ "${OS}" == "haiku" ]; then - releases_haiku - elif [ "${OS}" == "kali" ]; then - releases_kali - elif [ "${OS}" == "kolibrios" ]; then - releases_kolibrios - elif [ "${OS}" == "linuxmint" ]; then - releases_linuxmint - elif [ "${OS}" == "manjaro" ]; then - releases_manjaro - elif [ "${OS}" == "mxlinux" ]; then - releases_mxlinux - elif [ "${OS}" == "nixos" ]; then - releases_nixos - elif [ "${OS}" == "opensuse" ]; then - releases_opensuse - elif [ "${OS}" == "oraclelinux" ]; then - releases_oraclelinux - elif [ "${OS}" == "openbsd" ]; then - releases_openbsd - elif [ "${OS}" == "macos" ]; then - releases_macos - elif [ "${OS}" == "popos" ]; then - releases_popos - elif [ "${OS}" == "regolith" ]; then - releases_regolith - elif [ "${OS}" == "rockylinux" ]; then - releases_rockylinux - elif [ "${OS}" == "slackware" ]; then - releases_slackware - elif [ "${OS}" == "solus" ]; then - releases_solus - elif [ "${OS}" == "tails" ]; then - releases_tails - elif [[ "${OS}" == *"ubuntu"* ]]; then - releases_ubuntu - elif [ "${OS}" == "void" ]; then - releases_void - elif [ "${OS}" == "windows" ]; then - releases_windows - elif [ "${OS}" == "zorin" ]; then - releases_zorin - else - echo "${OS} is unknown" - os_support - fi + case ${OS} in + *ubuntu*) releases_ubuntu;; + *) releases_"${OS}";; + esac exit 1 fi From 6ddf92c7728f07d3438c3faf09e931274066d368 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 09:47:47 +0000 Subject: [PATCH 24/59] Refactor get_zorin() --- quickget | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quickget b/quickget index 0659669..7cc2c8b 100755 --- a/quickget +++ b/quickget @@ -1107,9 +1107,10 @@ function get_zorin() { local URL="" validate_release "releases_zorin" - # their redirector returns an href so we need to get that and parse out the iso - URL=$(curl -s "https://zrn.co/${RELEASE}" | cut -d'"' -f2) - ISO=$(echo "${URL}" | awk -F\/ ' {print $NF}') + # Parse out the iso URL from the redirector + URL=$(wget -q -S -O- --max-redirect=0 "https://zrn.co/${RELEASE}" 2>&1 | grep Location | cut -d' ' -f4) + #ISO=$(echo "${URL}" | awk -F\/ ' {print $NF}') + ISO="${URL##*/}" web_get "${URL}" "${VM_PATH}" make_vm_config "${ISO}" } From 344c7f93a53157c21b645dc847de24c078c8495b Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 10:11:25 +0000 Subject: [PATCH 25/59] Make Windows LANGS consistent with other OS EDITIONS --- quickget | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/quickget b/quickget index 7cc2c8b..3bbc80d 100755 --- a/quickget +++ b/quickget @@ -449,6 +449,12 @@ function releases_void() { xfce-musl } +function releases_windows() { + echo 8 \ + 10 \ + 11 +} + function languages_windows() { LANGS=(Arabic "Brazilian Portuguese" @@ -490,13 +496,6 @@ function languages_windows() { Ukrainian) } - -function releases_windows() { - echo 8 \ - 10 \ - 11 -} - function releases_zorin() { echo 16core64 \ 16lite64 \ @@ -1884,7 +1883,7 @@ if [ -n "${2}" ]; then # If the OS has an editions_() function, use it. if [[ $(type -t "editions_${OS}") == function ]]; then - EDITIONS=($(editions_${OS})) + EDITIONS=("$(editions_"${OS}")") EDITION=${EDITIONS[0]} if [ -n "${3}" ]; then EDITION="${3}" @@ -1897,24 +1896,24 @@ if [ -n "${2}" ]; then fi fi VM_PATH="${OS}-${RELEASE}-${EDITION}" - get_${OS} "${EDITION}" + get_"${OS}" "${EDITION}" elif [[ "${OS}" == *"ubuntu"* ]]; then - get_ubuntu + get_ubuntu elif [ "${OS}" == "windows" ]; then - LANG_NAME="English International" + LANG="English International" if [ -n "${3}" ]; then - LANG_NAME="${3}" - if [[ ! ${LANGS[*]} =~ "${LANG_NAME}" ]]; then - echo -e "ERROR! ${LANG_NAME} is not a supported Windows language:\n" + EDITION="${3}" + if [[ ! ${LANGS[*]} =~ "${LANG}" ]]; then + echo -e "ERROR! ${LANG} is not a supported Windows language:\n" for LANG in "${LANGS[@]}"; do echo -n "${LANG} " done exit 1 fi fi - get_windows "${LANG_NAME}" + get_windows "${LANG}" else - get_"${OS}" + get_"${OS}" fi else echo -n "ERROR! You must specify a release: " From a4080559d620dd505da5da87777dd22574f5e2e9 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 10:13:11 +0000 Subject: [PATCH 26/59] Cleanup get_zorin() --- quickget | 1 - 1 file changed, 1 deletion(-) diff --git a/quickget b/quickget index 3bbc80d..b9b9b6a 100755 --- a/quickget +++ b/quickget @@ -1108,7 +1108,6 @@ function get_zorin() { validate_release "releases_zorin" # Parse out the iso URL from the redirector URL=$(wget -q -S -O- --max-redirect=0 "https://zrn.co/${RELEASE}" 2>&1 | grep Location | cut -d' ' -f4) - #ISO=$(echo "${URL}" | awk -F\/ ' {print $NF}') ISO="${URL##*/}" web_get "${URL}" "${VM_PATH}" make_vm_config "${ISO}" From ba91b7965d7d2f05bfb1870fad5bc0737c28ddd1 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 14:57:11 +0000 Subject: [PATCH 27/59] Refactor Solus support to add editions --- quickget | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/quickget b/quickget index b9b9b6a..f88dea8 100755 --- a/quickget +++ b/quickget @@ -423,10 +423,14 @@ function releases_slackware() { } function releases_solus() { - echo 4.3-budgie \ - 4.3-gnome \ - 4.3-mate \ - 4.3-plasma + echo 4.3 +} + +function editions_solus() { + echo budgie \ + gnome \ + mate \ + plasma } function releases_tails() { @@ -1151,24 +1155,24 @@ function get_slackware() { } function get_solus() { - local RELNUM="" - local RELTYPE="" + local EDITION="" local HASH="" local ISO="" local URL="" validate_release "releases_solus" - RELNUM=$(echo "${RELEASE}" | cut -d'-' -f1) - RELTYPE=$(echo "${RELEASE}" | cut -d'-' -f2) - case ${RELTYPE} in + EDITION="${1}" + fi + + case ${EDITION} in mate|gnome) - RELTYPE=${RELTYPE^^};; + EDITION=${EDITION^^};; *) - RELTYPE=${RELTYPE^};; + EDITION=${EDITION^};; esac - ISO="Solus-${RELNUM}-${RELTYPE}.iso" - URL="https://mirrors.rit.edu/solus/images/${RELNUM}" + URL="https://mirrors.rit.edu/solus/images/${RELEASE}" + ISO="Solus-${RELEASE}-${EDITION}.iso" HASH=$(wget -q -O- "${URL}.sha256sum" | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" @@ -1882,7 +1886,7 @@ if [ -n "${2}" ]; then # If the OS has an editions_() function, use it. if [[ $(type -t "editions_${OS}") == function ]]; then - EDITIONS=("$(editions_"${OS}")") + EDITIONS=($(editions_${OS})) EDITION=${EDITIONS[0]} if [ -n "${3}" ]; then EDITION="${3}" From 04e65d953af85b7acb0645309c844f8693910486 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 15:04:03 +0000 Subject: [PATCH 28/59] Call validate_release() automatically validate_release() is called automatically before get_(), this removes some bioler plate that every get_() function requires and makes quickget easier to maintain. --- quickget | 46 ++++++++-------------------------------------- 1 file changed, 8 insertions(+), 38 deletions(-) diff --git a/quickget b/quickget index f88dea8..23749bb 100755 --- a/quickget +++ b/quickget @@ -18,7 +18,6 @@ # EDITION="${1}" # fi # -# validate_release "releases_newos" # ISO="newos-${RELEASE}-amd64.iso" # URL="https://www.newos.org/download" # web_get "${URL}/${ISO}" "${VM_PATH}" @@ -80,8 +79,8 @@ function validate_release() { DISPLAY_NAME="$(pretty_name "${OS}")" RELEASES=$(${RELEASE_GENERATOR}) if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then - echo "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release." - echo "${RELEASES}" + echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release.\n" + echo -n "${RELEASES}" exit 1 fi } @@ -726,7 +725,6 @@ function get_android() { local ISO="" local URL="" - validate_release "releases_android" fosshubVersionInfo=$(wget -O - -q "https://www.fosshub.com/Android-x86-old.html" | grep "var settings =") version="android-x86-${RELEASE}" releaseJson=$(echo "${fosshubVersionInfo:16}" | jq --arg ver "${version}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))') @@ -771,7 +769,6 @@ function get_alpine() { local VERSION="" local BRANCH="" - validate_release "releases_alpine" case ${RELEASE} in latest) BRANCH="latest-stable";; *) BRANCH="v${RELEASE}";; @@ -793,7 +790,6 @@ function get_archlinux() { local URL="" local VERSION="" - validate_release "releases_archlinux" VERSION=$(wget -q -O- 'https://archlinux.org/releng/releases/json/' | jq '.latest_version' | cut -d "\"" -f 2) URL="https://mirror.rackspace.com/archlinux/iso/${VERSION}" ISO="archlinux-${VERSION}-x86_64.iso" @@ -809,7 +805,6 @@ function get_arcolinux() { local URL="" local VERSION="" - validate_release "releases_arcolinux" URL="https://ant.seedhost.eu/arcolinux/.quick/" VERSION=$(wget -q -O- "${URL}/info" | cut -d' ' -f 2) ISO="arcolinuxl-${VERSION}-x86_64.iso" @@ -824,7 +819,6 @@ function get_cachyos() { local ISO="" local URL="https://mirror.cachyos.org/ISO" - validate_release "releases_cachyos" ISO="cachyos-${RELEASE}-x86_64.iso" web_get "${URL}/${ISO}" "${VM_PATH}" make_vm_config "${ISO}" @@ -840,7 +834,6 @@ function get_debian() { EDITION="${1}" fi - validate_release "releases_debian" ISO="debian-live-${RELEASE}-amd64-${EDITION}.iso" HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" @@ -854,7 +847,6 @@ function get_devuan() { local URL="" local VERSION="" - validate_release "releases_devuan" case ${RELEASE} in beowulf) VERSION="3.1.1";; chimaera) VERSION="4.0.0";; @@ -874,7 +866,6 @@ function get_elementary() { local URL="" local B66tim="" - validate_release "releases_elementary" B66tim=$(date +%s | base64) ISO="elementaryos-${RELEASE}-stable.${ISOTAG}.iso" # TODO: derive region from geoIP @@ -888,7 +879,6 @@ function get_freebsd() { local ISO="" local URL="" - validate_release "releases_freebsd" ISO="FreeBSD-${RELEASE}-RELEASE-amd64-dvd1.iso" HASH=$(wget -q -O- "https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}/CHECKSUM.SHA512-FreeBSD-${RELEASE}-RELEASE-amd64" | grep '('"${ISO}"')' | cut -d' ' -f4) URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}/${ISO}" @@ -905,7 +895,6 @@ function get_fedora() { local URL="" local VERSION_NUM="" - validate_release "releases_fedora" FEDORA_VERSIONS=$(wget -q -O- "https://getfedora.org/releases.json" | jq '.[] | select((.variant=="Workstation" or .variant=="Spins") and .arch=="x86_64")') if [[ "${RELEASE}" == *"beta"* ]]; then VERSION_NUM=${RELEASE%"_beta"} @@ -928,7 +917,6 @@ function get_gentoo() { local ISO="" local URL="https://mirror.bytemark.co.uk/gentoo/releases/amd64/autobuilds/" - validate_release "releases_gentoo" ISO=$(wget -q -O- "${URL}/${RELEASE}-iso.txt" | grep install | cut -d' ' -f1) HASH=$( wget -q -O- "${URL}/${ISO}.DIGESTS" | grep iso | grep -v CONTENTS | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" @@ -942,7 +930,6 @@ function get_kali() { local URL="" local SUBDIR="" - validate_release "releases_kali" case ${RELEASE} in latest) SUBDIR="current";; *) SUBDIR="kali-weekly";; @@ -961,7 +948,6 @@ function get_kdeneon() { local HASH="" local URL="" - validate_release "releases_kdeneon" URL="https://files.kde.org/neon/images/${RELEASE}/current" ISO=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f3-) HASH=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f1) @@ -975,7 +961,6 @@ function get_kolibrios() { local ISO="kolibri.iso" local URL="https://builds.kolibrios.org/eng" - validate_release "releases_kolibrios" web_get "${URL}/${ISO}" "${VM_PATH}" make_vm_config "${ISO}" } @@ -990,7 +975,6 @@ function get_linuxmint() { EDITION="${1}" fi - validate_release "releases_linuxmint" URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}" ISO="linuxmint-${RELEASE}-${EDITION}-64bit.iso" HASH=$(wget -q -O- "${URL}/${RELEASE}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1) @@ -1007,7 +991,6 @@ function get_manjaro() { local KEY_HASH="Download_x64_Checksum =" local URL="" - validate_release "releases_manjaro" case ${RELEASE} in gnome|kde|xfce) BRANCH="official";; budgie|cinnamon|deepin|i3|mate) BRANCH="community";; @@ -1032,7 +1015,6 @@ function get_mxlinux() { EDITION="${1}" fi - validate_release "releases_mxlinux" case ${EDITION} in xfce) URL="https://sourceforge.net/projects/mx-linux/files/Final/Xfce" @@ -1063,7 +1045,6 @@ function get_nixos() { EDITION="${1}" fi - validate_release "releases_nixos" URL="https://channels.nixos.org/nixos-${RELEASE}" ISO="latest-nixos-${EDITION}-x86_64-linux.iso" HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1) @@ -1077,7 +1058,6 @@ function get_openbsd() { local ISO="" local URL="" - validate_release "releases_openbsd" URL="https://cdn.openbsd.org/pub/OpenBSD/${RELEASE}/amd64" ISO="install${RELEASE//\./}.iso" HASH=$(wget -q -O- "${URL}/SHA256" | grep "${ISO}" | cut -d' ' -f4) @@ -1091,7 +1071,6 @@ function get_void() { local ISO="" local URL="https://alpha.de.repo.voidlinux.org/live/current" - validate_release "releases_void" DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4) case ${RELEASE} in base) ISO="void-live-x86_64-${DATE}.iso";; @@ -1109,7 +1088,6 @@ function get_zorin() { local ISO="" local URL="" - validate_release "releases_zorin" # Parse out the iso URL from the redirector URL=$(wget -q -S -O- --max-redirect=0 "https://zrn.co/${RELEASE}" 2>&1 | grep Location | cut -d' ' -f4) ISO="${URL##*/}" @@ -1160,7 +1138,7 @@ function get_solus() { local ISO="" local URL="" - validate_release "releases_solus" + if [ -n "${1}" ]; then EDITION="${1}" fi @@ -1184,7 +1162,6 @@ function get_opensuse() { local ISO="" local URL="" - validate_release "releases_opensuse" if [ "${RELEASE}" == "tumbleweed" ]; then ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso" URL="https://download.opensuse.org/tumbleweed/iso/${ISO}" @@ -1214,7 +1191,6 @@ function get_oraclelinux() { local VER_MAJ="" local VER_MIN="" - validate_release "releases_oraclelinux" VER_MAJ=${RELEASE::1} VER_MIN=${RELEASE:2:1} URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64/" @@ -1307,7 +1283,7 @@ function get_popos() { DRIVER="${1}" fi - validate_release "releases_popos" + URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq ".url") URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${DRIVER}" | jq ".url") URL="${URL//\"/}" ISO=$(echo "${URL}" | sed -e "s/.*\/\([^\/]*\)$/\1/") @@ -1323,7 +1299,6 @@ function get_regolith() { local ISO="" local URL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download" - validate_release "releases_regolith" case ${RELEASE} in 1.6.0_focal) URL="${URL}/release-release-focal-focal_standard-1.6.0" @@ -1353,7 +1328,6 @@ function get_tails() { local RELEASE_JSON="" local URL="" - validate_release "releases_tails" RELEASE_JSON_URL="https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json" RELEASE_JSON="$(wget -q -O- "${RELEASE_JSON_URL}")" URL=$(echo "${RELEASE_JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].url') @@ -1386,8 +1360,6 @@ function get_ubuntu() { if [ "${RELEASE}" == "canary" ] && [ "${OS}" != "ubuntu" ]; then echo "ERROR! Canary is currently only available for Ubuntu." exit 1 - else - validate_release "releases_ubuntu" fi if [ "${RELEASE}" == "canary" ]; then @@ -1422,8 +1394,6 @@ function get_garuda() { local LATEST_URL="" local HASH_URL="" - validate_release "releases_garuda" - case ${RELEASE} in mate|cinnamon) REL_TYPE="community";; @@ -1449,8 +1419,6 @@ function get_haiku() { local URL="" local HASH="" - validate_release "releases_haiku" - BASE=$(echo "${RELEASE}" | cut -d'-' -f1) URL="https://cdn.haiku-os.org/haiku-release/${BASE}" ISO="haiku-${RELEASE}-anyboot.iso" @@ -1776,8 +1744,6 @@ function get_windows() { local DOWNLOAD_ID="" local DOWNLOAD_URL="" - validate_release "releases_windows" - # Ignore the most recent Windows 10 release for now. if [ "${RELEASE}" -eq 10 ]; then INDEX=0 @@ -1899,8 +1865,10 @@ if [ -n "${2}" ]; then fi fi VM_PATH="${OS}-${RELEASE}-${EDITION}" + validate_release releases_"${OS}" get_"${OS}" "${EDITION}" elif [[ "${OS}" == *"ubuntu"* ]]; then + validate_release releases_"${OS}" get_ubuntu elif [ "${OS}" == "windows" ]; then LANG="English International" @@ -1914,8 +1882,10 @@ if [ -n "${2}" ]; then exit 1 fi fi + validate_release releases_windows get_windows "${LANG}" else + validate_release releases_"${OS}" get_"${OS}" fi else From a78ab882d3809e48ec343ba2c7988cc9dccf8585 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 15:05:15 +0000 Subject: [PATCH 29/59] Refactor Alma Linux support to add editions --- quickget | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/quickget b/quickget index 23749bb..bb2b7f5 100755 --- a/quickget +++ b/quickget @@ -199,11 +199,15 @@ function os_support() { } function releases_alma() { - # consider flavours for boot and dvd as well as echo 8.4 \ 8.5 } +function editions_alma() { + echo minimal \ + dvd +} + function releases_alpine() { echo latest \ 3.12 \ @@ -748,14 +752,17 @@ function get_android() { } function get_alma() { + local EDITION="" local HASH="" local ISO="" - local ISOTYPE="minimal" local URL="" - validate_release "releases_alma" + if [ -n "${1}" ]; then + EDITION="${1}" + fi + URL="http://lon.mirror.rackspace.com/almalinux/${RELEASE}/isos/x86_64/" - ISO="AlmaLinux-${RELEASE}-x86_64-${ISOTYPE}.iso" + ISO="AlmaLinux-${RELEASE}-x86_64-${EDITION}.iso" HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep \("${ISO}" | cut -d'\' -f4)" web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" From 830c38818af05e8993ea004d8dd3a87d73bbbf2d Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 15:05:55 +0000 Subject: [PATCH 30/59] Refactor Rocky Linux support to add editions --- quickget | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/quickget b/quickget index bb2b7f5..cbc2c02 100755 --- a/quickget +++ b/quickget @@ -419,6 +419,11 @@ function releases_rockylinux() { 8.0 } +function editions_rockylinux() { + echo minimal \ + dvd1 +} + function releases_slackware() { echo 14.2 \ 15.0 \ @@ -1102,15 +1107,18 @@ function get_zorin() { make_vm_config "${ISO}" } -function get_rocky() { +function get_rockylinux() { + local EDITION="" local HASH="" local ISO="" - local ISOTYPE="minimal" local URL="" - validate_release "releases_rockylinux" + if [ -n "${1}" ]; then + EDITION="${1}" + fi + URL="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/x86_64" - ISO="Rocky-${RELEASE}-x86_64-${ISOTYPE}.iso" + ISO="Rocky-${RELEASE}-x86_64-${EDITION}.iso" HASH=$(wget -q -O- "${URL}/CHECKSUM" | grep "SHA256" | grep "${ISO}" | cut -d' ' -f4) web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" From bbcc470751edd4720d379b42b2840445a5b75d27 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 15:07:15 +0000 Subject: [PATCH 31/59] Refactor Pop!_OS support to be consistent with other OSs with editions --- quickget | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/quickget b/quickget index cbc2c02..f8e8c98 100755 --- a/quickget +++ b/quickget @@ -1289,20 +1289,19 @@ function get_macos() { } function get_popos() { - local DRIVER="intel" + local EDITION="" local HASH="" local ISO="" local URL="" if [ -n "${1}" ]; then - DRIVER="${1}" + EDITION="${1}" fi URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq ".url") - URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${DRIVER}" | jq ".url") URL="${URL//\"/}" ISO=$(echo "${URL}" | sed -e "s/.*\/\([^\/]*\)$/\1/") - HASH=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${DRIVER}" | jq ".sha_sum") + HASH=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq ".sha_sum") HASH="${HASH//\"/}" web_get "${URL}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" From 6e92a8e0d93204a3669315e63fcce47406e39174 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 15:08:09 +0000 Subject: [PATCH 32/59] Minor clean up of various get_() functions --- quickget | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/quickget b/quickget index f8e8c98..799f767 100755 --- a/quickget +++ b/quickget @@ -932,7 +932,7 @@ function get_gentoo() { ISO=$(wget -q -O- "${URL}/${RELEASE}-iso.txt" | grep install | cut -d' ' -f1) HASH=$( wget -q -O- "${URL}/${ISO}.DIGESTS" | grep iso | grep -v CONTENTS | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" - check_hash "$(basename ${ISO})" "${HASH}" + check_hash "$(basename "${ISO}")" "${HASH}" make_vm_config "${ISO}" } @@ -956,8 +956,8 @@ function get_kali() { } function get_kdeneon() { - local ISO="" local HASH="" + local ISO="" local URL="" URL="https://files.kde.org/neon/images/${RELEASE}/current" @@ -996,11 +996,12 @@ function get_linuxmint() { } function get_manjaro() { - local MANIFESTURL="" + local BRANCH="" local HASH="" local ISO="" local KEY_ISO="Download_x64 =" local KEY_HASH="Download_x64_Checksum =" + local MANIFESTURL="" local URL="" case ${RELEASE} in @@ -1079,6 +1080,7 @@ function get_openbsd() { } function get_void() { + local DATE="" local HASH="" local ISO="" local URL="https://alpha.de.repo.voidlinux.org/live/current" From 8924d5cac4c831c2045a915d9ea16c748cfb3ae6 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 15:24:25 +0000 Subject: [PATCH 33/59] Refactor Void Linux support to add editions --- quickget | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/quickget b/quickget index 799f767..9f6dd34 100755 --- a/quickget +++ b/quickget @@ -455,9 +455,13 @@ function releases_ubuntu() { } function releases_void() { - echo base \ + echo current +} + +function editions_void() { + echo glibc \ musl \ - xfce \ + xfce-glibc \ xfce-musl } @@ -1081,16 +1085,20 @@ function get_openbsd() { function get_void() { local DATE="" + local EDITION="" local HASH="" local ISO="" local URL="https://alpha.de.repo.voidlinux.org/live/current" DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4) - case ${RELEASE} in - base) ISO="void-live-x86_64-${DATE}.iso";; - musl) ISO="void-live-x86_64-musl-${DATE}.iso";; - xfce) ISO="void-live-x86_64-${DATE}-xfce.iso";; - xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";; + if [ -n "${1}" ]; then + EDITION="${1}" + fi + case ${EDITION} in + glibc) ISO="void-live-x86_64-${DATE}.iso";; + musl) ISO="void-live-x86_64-musl-${DATE}.iso";; + xfce-glibc) ISO="void-live-x86_64-${DATE}-xfce.iso";; + xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";; esac HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)" web_get "${URL}/${ISO}" "${VM_PATH}" From 5ef7a856871661ec3774b0c105c9dc7aff4c86b4 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 15:35:10 +0000 Subject: [PATCH 34/59] Fix validate_release() for Ubuntu flavours --- quickget | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/quickget b/quickget index 9f6dd34..7c987de 100755 --- a/quickget +++ b/quickget @@ -73,10 +73,15 @@ function pretty_name() { function validate_release() { local DISPLAY_NAME="" - local RELEASE_GENERATOR="${1}" + local RELEASE_GENERATOR="" local RELEASES="" DISPLAY_NAME="$(pretty_name "${OS}")" + case ${OS} in + *ubuntu*) RELEASE_GENERATOR="releases_ubuntu";; + *) RELEASE_GENERATOR="${1}";; + esac + RELEASES=$(${RELEASE_GENERATOR}) if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release.\n" From 5d7d9ec350e685f1d3f05b17d05e528cb25acf47 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 15:40:08 +0000 Subject: [PATCH 35/59] Display available editions alongside releases --- quickget | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/quickget b/quickget index 7c987de..da2b739 100755 --- a/quickget +++ b/quickget @@ -1897,7 +1897,7 @@ if [ -n "${2}" ]; then validate_release releases_"${OS}" get_"${OS}" "${EDITION}" elif [[ "${OS}" == *"ubuntu"* ]]; then - validate_release releases_"${OS}" + validate_release releases_ubuntu get_ubuntu elif [ "${OS}" == "windows" ]; then LANG="English International" @@ -1918,10 +1918,20 @@ if [ -n "${2}" ]; then get_"${OS}" fi else - echo -n "ERROR! You must specify a release: " + echo "ERROR! You must specify a release." case ${OS} in - *ubuntu*) releases_ubuntu;; - *) releases_"${OS}";; + *ubuntu*) + echo -n " - Releases: " + releases_ubuntu + ;; + *) + echo -n " - Releases: " + releases_"${OS}" + if [[ $(type -t "editions_${OS}") == function ]]; then + echo -n " - Editions: " + editions_"${OS}" + fi + ;; esac exit 1 fi From 46c7805ad1b0bad3a746cf6b5eb6e7161d0a99a3 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 15:57:32 +0000 Subject: [PATCH 36/59] Refactor OS tweaks in make_vm_config() --- quickget | 57 +++++--------------------------------------------------- 1 file changed, 5 insertions(+), 52 deletions(-) diff --git a/quickget b/quickget index da2b739..8ff887b 100755 --- a/quickget +++ b/quickget @@ -670,58 +670,11 @@ EOF echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${OS}-${RELEASE}.conf" fi - if [ "${OS}" == "alma" ] && [ "${ISOTYPE}" == "dvd" ]; then - echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" - fi - - if [ "${OS}" == "kolibrios" ]; then - echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf" - fi - - if [ "${OS}" == "openbsd" ]; then - echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf" - fi - - if [ "${OS}" == "tails" ]; then - echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf" - fi - - if [ "${OS}" == "macos" ]; then - echo "macos_release=\"${RELEASE}\"" >> "${OS}-${RELEASE}.conf" - fi - - if [ "${OS}" == "cachyos" ]; then - echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" - fi - - if [ "${OS}" == "garuda" ]; then - echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" - fi - - if [ "${OS}" == "slackware" ]; then - echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" - echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf" - fi - - if [ "${OS}" == "haiku" ]; then - echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf" - echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" - fi - - if [ "${OS}" == "oraclelinux" ]; then - echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf" - fi - - if [ "${OS}" == "void" ]; then - echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf" - fi - - if [ "${OS}" == "zorin" ]; then - case ${RELEASE} in - 15education64|15edulite64|15edulite32) - echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf";; - esac - fi + case ${OS} in + alma|cachyos|garuda|oraclelinux|rockylinux|void|zorin) echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf";; + haiku|kolibrios|openbsd|slackware|tails) echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf";; + macos) echo "macos_release=\"${RELEASE}\"" >> "${OS}-${RELEASE}.conf";; + esac # Enable TPM for Windows 11 if [ "${OS}" == "windows" ] && [ "${RELEASE}" -ge 11 ]; then From 3f72f79e59d999caf5ae900488e37d03aa1e7365 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 15:58:12 +0000 Subject: [PATCH 37/59] Update adding a new OS to quickget guide --- quickget | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickget b/quickget index 8ff887b..66efd72 100755 --- a/quickget +++ b/quickget @@ -3,7 +3,7 @@ # Here the quick 'n dirty guide to adding a new OS to quickget # # 1. Add the new OS, all lowercase, to os_support() -# 2. Add a "pretty name" display name to pretty_name() +# 2. Add a "pretty name" to pretty_name() # 3. Create a releases_newos() generator that outputs the currently supported release versions # 4. If the OS has "editions" (Linux Mint for example), create editions_newos() generator # 5. Add the new OS to make_vm_config(); (only if required) From 35216cef15c4dbd8ce76dc07ff417a50af62e73d Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 16:29:42 +0000 Subject: [PATCH 38/59] Reorder get_() and releases_() functions --- quickget | 510 +++++++++++++++++++++++++++---------------------------- 1 file changed, 254 insertions(+), 256 deletions(-) diff --git a/quickget b/quickget index 66efd72..4de5f4a 100755 --- a/quickget +++ b/quickget @@ -168,8 +168,8 @@ function os_support() { debian \ devuan \ elementary \ - freebsd \ fedora \ + freebsd \ garuda \ gentoo \ haiku \ @@ -240,6 +240,11 @@ function releases_arcolinux() { echo latest } +function releases_cachyos() { + echo 2022.01.09 \ + 2022.02.11 +} + function releases_debian() { echo 11.2.0 } @@ -255,11 +260,6 @@ function editions_debian() { xfce } -function releases_cachyos() { - echo 2022.01.09 \ - 2022.02.11 -} - function releases_devuan() { echo beowulf \ chimaera @@ -269,19 +269,15 @@ function releases_elementary() { echo 6.1 } -function releases_freebsd(){ - echo 12.2 \ - 13.0 -} - function releases_fedora(){ echo 33 \ 34 \ 35 } -function releases_gentoo(){ - echo latest +function releases_freebsd(){ + echo 12.2 \ + 13.0 } function releases_garuda() { @@ -301,6 +297,10 @@ function releases_garuda() { cinnamon } +function releases_gentoo(){ + echo latest +} + function releases_haiku() { echo r1beta3-x86_64 \ r1beta3-x86_gcc2h @@ -342,6 +342,25 @@ function editions_mxlinux(){ fluxbox } +function releases_macos() { + echo high-sierra \ + mojave \ + catalina \ + big-sur \ + monterey +} + +function releases_manjaro() { + echo xfce \ + gnome \ + kde \ + budgie \ + cinnamon \ + deepin \ + i3 \ + mate +} + function releases_nixos(){ echo 21.05 \ 21.11 @@ -353,7 +372,6 @@ function editions_nixos(){ minimal } - function releases_openbsd(){ echo 7.0 } @@ -377,25 +395,6 @@ function releases_oraclelinux() { 7.7 } -function releases_macos() { - echo high-sierra \ - mojave \ - catalina \ - big-sur \ - monterey -} - -function releases_manjaro() { - echo xfce \ - gnome \ - kde \ - budgie \ - cinnamon \ - deepin \ - i3 \ - mate -} - function releases_popos() { echo 20.04 \ 21.04 \ @@ -414,7 +413,6 @@ function releases_regolith() { 2.0.0_hirsute } - function releases_rockylinux() { echo 8.5 \ 8.4 \ @@ -848,19 +846,6 @@ function get_elementary() { make_vm_config "${ISO}" } -function get_freebsd() { - local HASH="" - local ISO="" - local URL="" - - ISO="FreeBSD-${RELEASE}-RELEASE-amd64-dvd1.iso" - HASH=$(wget -q -O- "https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}/CHECKSUM.SHA512-FreeBSD-${RELEASE}-RELEASE-amd64" | grep '('"${ISO}"')' | cut -d' ' -f4) - URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}/${ISO}" - web_get "${URL}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" -} - function get_fedora() { local FEDORA_RELEASE="" local FEDORA_VERSIONS="" @@ -886,6 +871,47 @@ function get_fedora() { make_vm_config "${ISO}" } +function get_freebsd() { + local HASH="" + local ISO="" + local URL="" + + ISO="FreeBSD-${RELEASE}-RELEASE-amd64-dvd1.iso" + HASH=$(wget -q -O- "https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}/CHECKSUM.SHA512-FreeBSD-${RELEASE}-RELEASE-amd64" | grep '('"${ISO}"')' | cut -d' ' -f4) + URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}/${ISO}" + web_get "${URL}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + +function get_garuda() { + local DATE="" + local HASH="" + local ISO="" + local URL="http://mirrors.fossho.st/garuda/iso" + local REL_TYPE="" + local LATEST_URL="" + local HASH_URL="" + + case ${RELEASE} in + mate|cinnamon) + REL_TYPE="community";; + *) + REL_TYPE="garuda";; + esac + + # Follow daily releases and use SHA hash file to derive .iso and date + LATEST_URL="${URL}/latest/${REL_TYPE}/${RELEASE}/latest.iso.sha256" + HASH_URL="$(wget -q -O- "${LATEST_URL}")" + ISO="$(echo "${HASH_URL}" | awk '{print $NF}')" + HASH=$(echo "${HASH_URL}" | cut -d' ' -f1) + DATE=$(echo "${ISO}" | awk -F'-' '{print $NF}' | cut -d'.' -f1) + URL="${URL}/${REL_TYPE}/${RELEASE}/${DATE}" + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${OS}-${RELEASE}.iso" +} + function get_gentoo() { local HASH="" local ISO="" @@ -898,6 +924,21 @@ function get_gentoo() { make_vm_config "${ISO}" } +function get_haiku() { + local BASE="" + local ISO="" + local URL="" + local HASH="" + + BASE=$(echo "${RELEASE}" | cut -d'-' -f1) + URL="https://cdn.haiku-os.org/haiku-release/${BASE}" + ISO="haiku-${RELEASE}-anyboot.iso" + HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4) + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function get_kali() { local HASH="" local ISO="" @@ -957,6 +998,74 @@ function get_linuxmint() { make_vm_config "${ISO}" } +function get_macos() { + local BOARD_ID="" + local CWD="" + local MACRECOVERY="" + local MLB="" + + case ${RELEASE} in + high-sierra) + BOARD_ID="Mac-7BA5B2D9E42DDD94" + MLB="00000000000J80300";; + mojave) + BOARD_ID="Mac-7BA5B2DFE22DDD8C" + MLB="00000000000KXPG00";; + catalina) + BOARD_ID="Mac-CFF7D910A743CAAF" + MLB="00000000000PHCD00";; + big-sur) + BOARD_ID="Mac-35C1E88140C3E6CF" + MLB="00000000000000000";; + monterey) + BOARD_ID="Mac-06F11F11946D27C5" + MLB="00000000000000000";; + *) echo "ERROR! Unknown release: ${RELEASE}" + releases_macos + exit 1;; + esac + + # Use a bundled macrecovery if possible + CWD="$(dirname "${0}")" + if [ -x "${CWD}/macrecovery" ]; then + MACRECOVERY="${CWD}/macrecovery" + elif [ -x /usr/bin/macrecovery ]; then + MACRECOVERY="/usr/bin/macrecovery" + else + web_get "https://raw.githubusercontent.com/wimpysworld/quickemu/master/macrecovery" "${HOME}/.quickemu" + MACRECOVERY="python3 ${HOME}/.quickemu/macrecovery" + fi + + if [ -z "${MACRECOVERY}" ]; then + echo "ERROR! Can not find a usable macrecovery." + exit 1 + fi + + # Get firmware + web_get "https://github.com/kholia/OSX-KVM/raw/master/OpenCore/OpenCore.qcow2" "${VM_PATH}" + web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_CODE.fd" "${VM_PATH}" + if [ ! -e "${VM_PATH}/OVMF_VARS-1024x768.fd" ]; then + web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_VARS-1024x768.fd" "${VM_PATH}" + fi + + if [ ! -e "${VM_PATH}/RecoveryImage.chunklist" ]; then + echo "Downloading ${RELEASE}..." + ${MACRECOVERY} \ + --board-id "${BOARD_ID}" \ + --mlb "${MLB}" \ + --basename RecoveryImage \ + --outdir "${VM_PATH}" \ + download + fi + + if [ -e "${VM_PATH}/RecoveryImage.dmg" ] && [ ! -e "${VM_PATH}/RecoveryImage.img" ]; then + echo "Converting RecoveryImage..." + qemu-img convert "${VM_PATH}/RecoveryImage.dmg" -O raw "${VM_PATH}/RecoveryImage.img" + fi + + make_vm_config RecoveryImage.img +} + function get_manjaro() { local BRANCH="" local HASH="" @@ -1041,37 +1150,98 @@ function get_openbsd() { make_vm_config "${ISO}" } -function get_void() { - local DATE="" - local EDITION="" +function get_opensuse() { local HASH="" local ISO="" - local URL="https://alpha.de.repo.voidlinux.org/live/current" + local URL="" - DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4) - if [ -n "${1}" ]; then - EDITION="${1}" + if [ "${RELEASE}" == "tumbleweed" ]; then + ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso" + URL="https://download.opensuse.org/tumbleweed/iso/${ISO}" + HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1) + elif [ "${RELEASE}" == "microos" ]; then + ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso" + URL="https://download.opensuse.org/tumbleweed/iso/${ISO}" + HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1) + elif [ "$RELEASE" == 15.0 ] || [ "$RELEASE" == 15.1 ]; then + ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64.iso" + URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}" + HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1) + else + ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64-Current.iso" + URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}" + HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1) fi - case ${EDITION} in - glibc) ISO="void-live-x86_64-${DATE}.iso";; - musl) ISO="void-live-x86_64-musl-${DATE}.iso";; - xfce-glibc) ISO="void-live-x86_64-${DATE}-xfce.iso";; - xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";; - esac - HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)" + web_get "${URL}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + +function get_oraclelinux() { + local HASH="" + local ISO="" + local URL="" + local VER_MAJ="" + local VER_MIN="" + + VER_MAJ=${RELEASE::1} + VER_MIN=${RELEASE:2:1} + URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64/" + if [ "${VER_MAJ}" == "8" ]; then + ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso" + else + ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso" + fi + HASH=$(wget -q -O- "https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64.checksum" | grep "${ISO}" | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" } -function get_zorin() { +function get_popos() { + local EDITION="" + local HASH="" local ISO="" local URL="" - # Parse out the iso URL from the redirector - URL=$(wget -q -S -O- --max-redirect=0 "https://zrn.co/${RELEASE}" 2>&1 | grep Location | cut -d' ' -f4) - ISO="${URL##*/}" + if [ -n "${1}" ]; then + EDITION="${1}" + fi + + URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq ".url") + URL="${URL//\"/}" + ISO=$(echo "${URL}" | sed -e "s/.*\/\([^\/]*\)$/\1/") + HASH=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq ".sha_sum") + HASH="${HASH//\"/}" web_get "${URL}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + +function get_regolith() { + local HASH="" + local ISO="" + local URL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download" + + case ${RELEASE} in + 1.6.0_focal) + URL="${URL}/release-release-focal-focal_standard-1.6.0" + HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1) + ;; + 1.6.0_hirsute) + URL="${URL}/release-release-hirsute-hirsute_standard-1.6.0" + HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1) + ;; + 2.0.0_impish) + URL="${URL}/regolith-linux-2.0-impish-latest";; + 2.0.0_hirsute) + URL="${URL}/regolith-linux-2.0-hirsute-latest";; + esac + ISO="Regolith_${RELEASE}.iso" + web_get "${URL}/${ISO}" "${VM_PATH}" + if [ -n "${HASH}" ]; then + check_hash "${ISO}" "${HASH}" + fi make_vm_config "${ISO}" } @@ -1140,169 +1310,6 @@ function get_solus() { make_vm_config "${ISO}" } -function get_opensuse() { - local HASH="" - local ISO="" - local URL="" - - if [ "${RELEASE}" == "tumbleweed" ]; then - ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso" - URL="https://download.opensuse.org/tumbleweed/iso/${ISO}" - HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1) - elif [ "${RELEASE}" == "microos" ]; then - ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso" - URL="https://download.opensuse.org/tumbleweed/iso/${ISO}" - HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1) - elif [ "$RELEASE" == 15.0 ] || [ "$RELEASE" == 15.1 ]; then - ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64.iso" - URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}" - HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1) - else - ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64-Current.iso" - URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}" - HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1) - fi - web_get "${URL}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" -} - -function get_oraclelinux() { - local HASH="" - local ISO="" - local URL="" - local VER_MAJ="" - local VER_MIN="" - - VER_MAJ=${RELEASE::1} - VER_MIN=${RELEASE:2:1} - URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64/" - if [ "${VER_MAJ}" == "8" ]; then - ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso" - else - ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso" - fi - HASH=$(wget -q -O- "https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64.checksum" | grep "${ISO}" | cut -d' ' -f1) - web_get "${URL}/${ISO}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" -} - -function get_macos() { - local BOARD_ID="" - local CWD="" - local MACRECOVERY="" - local MLB="" - - case ${RELEASE} in - high-sierra) - BOARD_ID="Mac-7BA5B2D9E42DDD94" - MLB="00000000000J80300";; - mojave) - BOARD_ID="Mac-7BA5B2DFE22DDD8C" - MLB="00000000000KXPG00";; - catalina) - BOARD_ID="Mac-CFF7D910A743CAAF" - MLB="00000000000PHCD00";; - big-sur) - BOARD_ID="Mac-35C1E88140C3E6CF" - MLB="00000000000000000";; - monterey) - BOARD_ID="Mac-06F11F11946D27C5" - MLB="00000000000000000";; - *) echo "ERROR! Unknown release: ${RELEASE}" - releases_macos - exit 1;; - esac - - # Use a bundled macrecovery if possible - CWD="$(dirname "${0}")" - if [ -x "${CWD}/macrecovery" ]; then - MACRECOVERY="${CWD}/macrecovery" - elif [ -x /usr/bin/macrecovery ]; then - MACRECOVERY="/usr/bin/macrecovery" - else - web_get "https://raw.githubusercontent.com/wimpysworld/quickemu/master/macrecovery" "${HOME}/.quickemu" - MACRECOVERY="python3 ${HOME}/.quickemu/macrecovery" - fi - - if [ -z "${MACRECOVERY}" ]; then - echo "ERROR! Can not find a usable macrecovery." - exit 1 - fi - - # Get firmware - web_get "https://github.com/kholia/OSX-KVM/raw/master/OpenCore/OpenCore.qcow2" "${VM_PATH}" - web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_CODE.fd" "${VM_PATH}" - if [ ! -e "${VM_PATH}/OVMF_VARS-1024x768.fd" ]; then - web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_VARS-1024x768.fd" "${VM_PATH}" - fi - - if [ ! -e "${VM_PATH}/RecoveryImage.chunklist" ]; then - echo "Downloading ${RELEASE}..." - ${MACRECOVERY} \ - --board-id "${BOARD_ID}" \ - --mlb "${MLB}" \ - --basename RecoveryImage \ - --outdir "${VM_PATH}" \ - download - fi - - if [ -e "${VM_PATH}/RecoveryImage.dmg" ] && [ ! -e "${VM_PATH}/RecoveryImage.img" ]; then - echo "Converting RecoveryImage..." - qemu-img convert "${VM_PATH}/RecoveryImage.dmg" -O raw "${VM_PATH}/RecoveryImage.img" - fi - - make_vm_config RecoveryImage.img -} - -function get_popos() { - local EDITION="" - local HASH="" - local ISO="" - local URL="" - - if [ -n "${1}" ]; then - EDITION="${1}" - fi - - URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq ".url") - URL="${URL//\"/}" - ISO=$(echo "${URL}" | sed -e "s/.*\/\([^\/]*\)$/\1/") - HASH=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq ".sha_sum") - HASH="${HASH//\"/}" - web_get "${URL}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" -} - -function get_regolith() { - local HASH="" - local ISO="" - local URL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download" - - case ${RELEASE} in - 1.6.0_focal) - URL="${URL}/release-release-focal-focal_standard-1.6.0" - HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1) - ;; - 1.6.0_hirsute) - URL="${URL}/release-release-hirsute-hirsute_standard-1.6.0" - HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1) - ;; - 2.0.0_impish) - URL="${URL}/regolith-linux-2.0-impish-latest";; - 2.0.0_hirsute) - URL="${URL}/regolith-linux-2.0-hirsute-latest";; - esac - ISO="Regolith_${RELEASE}.iso" - web_get "${URL}/${ISO}" "${VM_PATH}" - if [ -n "${HASH}" ]; then - check_hash "${ISO}" "${HASH}" - fi - make_vm_config "${ISO}" -} - function get_tails() { local ISO="" local HASH="" @@ -1367,46 +1374,37 @@ function get_ubuntu() { fi } -function get_garuda() { +function get_void() { local DATE="" + local EDITION="" local HASH="" local ISO="" - local URL="http://mirrors.fossho.st/garuda/iso" - local REL_TYPE="" - local LATEST_URL="" - local HASH_URL="" + local URL="https://alpha.de.repo.voidlinux.org/live/current" - case ${RELEASE} in - mate|cinnamon) - REL_TYPE="community";; - *) - REL_TYPE="garuda";; + DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4) + if [ -n "${1}" ]; then + EDITION="${1}" + fi + case ${EDITION} in + glibc) ISO="void-live-x86_64-${DATE}.iso";; + musl) ISO="void-live-x86_64-musl-${DATE}.iso";; + xfce-glibc) ISO="void-live-x86_64-${DATE}-xfce.iso";; + xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";; esac - - # Follow daily releases and use SHA hash file to derive .iso and date - LATEST_URL="${URL}/latest/${REL_TYPE}/${RELEASE}/latest.iso.sha256" - HASH_URL="$(wget -q -O- "${LATEST_URL}")" - ISO="$(echo "${HASH_URL}" | awk '{print $NF}')" - HASH=$(echo "${HASH_URL}" | cut -d' ' -f1) - DATE=$(echo "${ISO}" | awk -F'-' '{print $NF}' | cut -d'.' -f1) - URL="${URL}/${REL_TYPE}/${RELEASE}/${DATE}" + HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)" web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" - make_vm_config "${OS}-${RELEASE}.iso" + make_vm_config "${ISO}" } -function get_haiku() { - local BASE="" +function get_zorin() { local ISO="" local URL="" - local HASH="" - BASE=$(echo "${RELEASE}" | cut -d'-' -f1) - URL="https://cdn.haiku-os.org/haiku-release/${BASE}" - ISO="haiku-${RELEASE}-anyboot.iso" - HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4) - web_get "${URL}/${ISO}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" + # Parse out the iso URL from the redirector + URL=$(wget -q -S -O- --max-redirect=0 "https://zrn.co/${RELEASE}" 2>&1 | grep Location | cut -d' ' -f4) + ISO="${URL##*/}" + web_get "${URL}" "${VM_PATH}" make_vm_config "${ISO}" } From 21344246b8112894bcac4d9f4bb11ccd88589fd9 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 16:35:54 +0000 Subject: [PATCH 39/59] Update README.md --- README.md | 68 ++++++++++++++----------------------------------------- 1 file changed, 17 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index ec4f320..3dadd44 100644 --- a/README.md +++ b/README.md @@ -32,41 +32,21 @@ Features -------- - **macOS** Monterey, Big Sur, Catalina, Mojave & High Sierra - - **Windows** 8.1, 10 and 11 including TPM 2.0 - -- [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu - flavours](https://ubuntu.com/download/flavours)** -- [Fedora](https://getfedora.org/) & openSUSE - ([Leap](https://get.opensuse.org/leap/), - [Tumbleweed](https://get.opensuse.org/tumbleweed/), - [MicroOS](https://microos.opensuse.org/)) -- [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE), - [elementary OS](https://elementary.io/), - [Pop!\_OS](https://pop.system76.com/) -- [Arch Linux](https://www.archlinux.org/), - [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/), - [ZorinOS](https://zorin.com/os/) & [NixOS](https://nixos.org/) -- [Regolith Linux](https://regolith-linux.org/) (Release 1.6 and - latest 2.0.0 pre-release ) - -- [FreeBSD](https://www.freebsd.org/) & - [OpenBSD](https://www.openbsd.org/) - +- [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu flavours](https://ubuntu.com/download/flavours)** +- **And over 30 other operating systems are supported:** - Full SPICE support including host/guest clipboard sharing - VirtIO-webdavd file sharing for Linux and Windows guests - VirtIO-9p file sharing for Linux and macOS guests -- [QEMU Guest Agent - support](https://wiki.qemu.org/Features/GuestAgent); provides access - to a system-level agent via standard QMP commands -- Samba file sharing for Linux, macOS and Windows guests (*if `smbd` - is installed on the host*) +- [QEMU Guest Agent support](https://wiki.qemu.org/Features/GuestAgent); provides access to a system-level agent via standard QMP commands +- Samba file sharing for Linux, macOS and Windows guests (*if `smbd` is installed on the host*) - VirGL acceleration - USB device pass-through - Smartcard pass-through - Automatic SSH port forwarding to guests - Network port forwarding - Full duplex audio +- Braille support - EFI (with or without SecureBoot) and Legacy BIOS boot - Graphical user interfaces available @@ -86,8 +66,7 @@ QEMU](https://img.youtube.com/vi/AOTYWEgw0hI/0.jpg)](https://www.youtube.com/wat Requirements ------------ -- [QEMU](https://www.qemu.org/) (*6.0.0 or newer*) **with GTK, SDL, - SPICE & VirtFS support** +- [QEMU](https://www.qemu.org/) (*6.0.0 or newer*) **with GTK, SDL, SPICE & VirtFS support** - [bash](https://www.gnu.org/software/bash/) (*4.0 or newer*) - [Coreutils](https://www.gnu.org/software/coreutils/) - [EDK II](https://github.com/tianocore/edk2) @@ -223,57 +202,44 @@ with your preferred flavour. - `ubuntu` (Ubuntu) - `xubuntu` (Xubuntu) -Other Linux Guests ------------------- +Other Operating Systems +----------------------- `quickget` also supports: - `alma` (Alma Linux) - `alpine` (Alpine Linux) +- `android` (Android x86) - `archlinux` (Arch Linux) - `arcolinux` (Arco Linux) - `cachyos` (CachyOS) - `debian` (Debian) +- `devuan` (Devuan) - `elementary` (elementary OS) - `fedora` (Fedora) +- `freebsd` (FreeBSD) - `garuda` (Garuda Linux) - `gentoo` (Gentoo) - `haiku` (Haiku) - `kali` (Kali) - `kdeneon` (KDE Neon) - `kolibrios` (KolibriOS) -- `linuxmint-cinnamon` (Linux Mint Cinnamon) -- `linuxmint-mate` (Linux Mint MATE) -- `linuxmint-xfce` (Linux Mint XFCE) -- `manjaro-budgie` (Manjaro Budgie) -- `manjaro-cinnamon` (Manjaro Cinnamon) -- `manjaro-deepin` (Manjaro Deepin) -- `manjaro-gnome` (Manjaro Gnome) -- `manjaro-i3` (Manjaro i3) -- `manjaro-kde` (Manjaro KDE) -- `manjaro-mate` (Manjaro MATE) -- `manjaro-xfce` (Manjaro XFCE) -- `mxlinux-fluxbox` (MX Linux Fluxbox) -- `mxlinux-kde` (MX Linux KDE) -- `mxlinux-xfce` (MX Linux XFCE) -- `nixos-gnome` (NixOS Gnome) -- `nixos-minimal` (NixOS Minimal) -- `nixos-plasma5` (NixOS KDE) +- `linuxmint` (Linux Mint) +- `manjaro` (Manjaro) +- `mxlinux` (MX Linux) +- `nixos` (NixOS) +- `openbsd` (OpenBSD) - `opensuse` (openSUSE) - `oraclelinux` (Oracle Linux) - `popos` (Pop!\_OS) - `regolith` (Regolith Linux) - `rockylinux` (Rocky Linux) +- `slackware` (Slackware) - `solus` (Solus) - `tails` (Tails) - `void` (Void Linux) - `zorin` (Zorin OS) -### BSD Guest Support - -- `freebsd` (FreeBSD) -- `openbsd` (OpenBSD) - Or you can download a Linux image and manually create a VM configuration. From b9ca7a39f8c3aeb6eff0486e07e1dfd380001f34 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 16:40:32 +0000 Subject: [PATCH 40/59] Remove duplication of other guests from README.md --- README.md | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/README.md b/README.md index 3dadd44..92d2773 100644 --- a/README.md +++ b/README.md @@ -396,45 +396,6 @@ tpm="on" - `tpm="on"` instructs `quickemu` to create a software emulated TPM device using `swtpm`. -BSD Guests ----------- - -`quickemu` supports FreeBSD and OpenBSD. - -``` {.bash} -quickget freebsd 13_0 -quickemu --vm freebsd-13_0.conf -``` - -Other Guests ------------- - -- `android` (Android x86) - -Haiku Guests ------------- - -`quickemu` supports [Haiku](https://www.haiku-os.org/). - -``` {.bash} -quickget quickget haiku r1beta3-x86_64 -quickemu --vm haiku-r1beta3-x86_64.conf -``` - -At the moment the only way to share files between host and a Haiku guest -is by using SSH (having a SSH server running on the host): - -On guest: - -``` {.bash} -scp example.txt user@host-local-ip:/home/user # sending a file from guest to host -scp user@host-local-ip:/home/user/example.txt . # receiving a file from host to guest -``` - -`quickget` cannot automatically download and create virtual machines for -Haiku nightly versions, but they work if the ISO and configuration are -set up manually. - SPICE ===== From 596ffa86a67e8e5fb1c9531eee8b9aca68511624 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 16:41:26 +0000 Subject: [PATCH 41/59] Add netboot.xyz. Closes #351 --- README.md | 1 + quickget | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 92d2773..463b5d3 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,7 @@ Other Operating Systems - `linuxmint` (Linux Mint) - `manjaro` (Manjaro) - `mxlinux` (MX Linux) +- `netboot` (netboot.xyz) - `nixos` (NixOS) - `openbsd` (OpenBSD) - `opensuse` (openSUSE) diff --git a/quickget b/quickget index 4de5f4a..8065112 100755 --- a/quickget +++ b/quickget @@ -51,6 +51,7 @@ function pretty_name() { kolibrios) PRETTY_NAME="KolibriOS";; linuxmint) PRETTY_NAME="Linux Mint";; mxlinux) PRETTY_NAME="MX Linux";; + netboot) PRETTY_NAME="netboot.xyz";; nixos) PRETTY_NAME="NixOS";; macos) PRETTY_NAME="macOS";; openbsd) PRETTY_NAME="OpenBSD";; @@ -180,6 +181,7 @@ function os_support() { linuxmint \ manjaro \ mxlinux \ + netboot \ nixos \ lubuntu \ macos \ @@ -361,6 +363,10 @@ function releases_manjaro() { mate } +function releases_netboot() { + echo latest +} + function releases_nixos(){ echo 21.05 \ 21.11 @@ -1119,6 +1125,17 @@ function get_mxlinux() { make_vm_config "${ISO}" } +function get_netboot() { + local ISO="netboot.xyz.iso" + local HASH="" + local URL="https://boot.netboot.xyz/ipxe" + + HASH=$(wget -q -O- "${URL}/netboot.xyz-sha256-checksums.txt" | grep "${ISO}" | cut -d' ' -f1) + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function get_nixos() { local EDITION="" local HASH="" From e13b931538a0b5dd953409a4578c47dcdaf9d985 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 17:33:36 +0000 Subject: [PATCH 42/59] Refactor Regolith support to add editions --- quickget | 55 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/quickget b/quickget index 8065112..d639036 100755 --- a/quickget +++ b/quickget @@ -413,10 +413,14 @@ function editions_popos() { } function releases_regolith() { - echo 1.6.0_hirsute \ - 1.6.0_focal \ - 2.0.0_impish \ - 2.0.0_hirsute + echo focal \ + hirsute \ + impish +} + +function editions_regolith() { + echo 1.6.0 \ + 2.0.0 } function releases_rockylinux() { @@ -1236,25 +1240,24 @@ function get_popos() { } function get_regolith() { + local EDITION="" local HASH="" local ISO="" - local URL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download" + local SUBDIR="" + local URL="" - case ${RELEASE} in - 1.6.0_focal) - URL="${URL}/release-release-focal-focal_standard-1.6.0" - HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1) - ;; - 1.6.0_hirsute) - URL="${URL}/release-release-hirsute-hirsute_standard-1.6.0" - HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1) - ;; - 2.0.0_impish) - URL="${URL}/regolith-linux-2.0-impish-latest";; - 2.0.0_hirsute) - URL="${URL}/regolith-linux-2.0-hirsute-latest";; + if [ -n "${1}" ]; then + EDITION="${1}" + fi + + case ${EDITION} in + 1.6.0) SUBDIR="release-release-${RELEASE}-${RELEASE}_standard-${EDITION}";; + 2.0.0) SUBDIR="regolith-linux-2.0-${RELEASE}-latest";; esac - ISO="Regolith_${RELEASE}.iso" + + URL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download/${SUBDIR}" + ISO="Regolith_${EDITION}_${RELEASE}.iso" + HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" if [ -n "${HASH}" ]; then check_hash "${ISO}" "${HASH}" @@ -1861,6 +1864,20 @@ if [ -n "${2}" ]; then exit 1 fi fi + + # Workaround for Regolith + if [ "${OS}" == "regolith" ]; then + if [ "${RELEASE}" == "focal" ] && [ "${EDITION}" == "2.0.0" ]; then + echo "WARNING! $(pretty_name "${OS}") ${EDITION} is not available for ${RELEASE}" + EDITION="1.6.0" + echo " - Setting edition to: ${EDITION}" + elif [ "${RELEASE}" == "impish" ] && [ "${EDITION}" == "1.6.0" ]; then + echo "WARNING! $(pretty_name "${OS}") ${EDITION} is not available for ${RELEASE}" + EDITION="2.0.0" + echo " - Setting edition to: ${EDITION}" + fi + fi + VM_PATH="${OS}-${RELEASE}-${EDITION}" validate_release releases_"${OS}" get_"${OS}" "${EDITION}" From 4cee4d3d63694af1dbd1121cd13c079a4d0f1f53 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 17:34:30 +0000 Subject: [PATCH 43/59] Make listing supported OSs consistent with releases and editions --- quickget | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickget b/quickget index d639036..0bb7c18 100755 --- a/quickget +++ b/quickget @@ -1835,7 +1835,8 @@ if [ -n "${1}" ]; then exit 0 fi else - echo "ERROR! You must specify an operating system:" + echo "ERROR! You must specify an operating system." + echo -n " - Operating Systems: " os_support exit 1 fi From 338a03c571d1979c3209beacd499ce84de67a750 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 17:40:50 +0000 Subject: [PATCH 44/59] Refactor Haiku support to add editions --- quickget | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/quickget b/quickget index 0bb7c18..aedb849 100755 --- a/quickget +++ b/quickget @@ -304,10 +304,15 @@ function releases_gentoo(){ } function releases_haiku() { - echo r1beta3-x86_64 \ - r1beta3-x86_gcc2h + echo r1beta3 } +function editions_haiku() { + echo x86_64 \ + x86_gcc2h +} + + function releases_kali() { echo latest \ weekly @@ -935,14 +940,17 @@ function get_gentoo() { } function get_haiku() { - local BASE="" + local EDITION="" local ISO="" local URL="" local HASH="" - BASE=$(echo "${RELEASE}" | cut -d'-' -f1) - URL="https://cdn.haiku-os.org/haiku-release/${BASE}" - ISO="haiku-${RELEASE}-anyboot.iso" + if [ -n "${1}" ]; then + EDITION="${1}" + fi + + URL="https://cdn.haiku-os.org/haiku-release/${RELEASE}" + ISO="haiku-${RELEASE}-${EDITION}-anyboot.iso" HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4) web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" From 9bf14c5bc00fd56783056c19e3a606e3389e1e6c Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 17:48:32 +0000 Subject: [PATCH 45/59] Refactor Zorin support to add editions --- quickget | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/quickget b/quickget index aedb849..9071f03 100755 --- a/quickget +++ b/quickget @@ -531,10 +531,14 @@ function languages_windows() { } function releases_zorin() { - echo 16core64 \ - 16lite64 \ - 16education64 \ - 16edulite64 + echo 16 +} + +function editions_zorin() { + echo core64 \ + lite64 \ + education64 \ + edulite64 } function check_hash() { @@ -1426,11 +1430,16 @@ function get_void() { } function get_zorin() { + local EDITION="" local ISO="" local URL="" + if [ -n "${1}" ]; then + EDITION="${1}" + fi + # Parse out the iso URL from the redirector - URL=$(wget -q -S -O- --max-redirect=0 "https://zrn.co/${RELEASE}" 2>&1 | grep Location | cut -d' ' -f4) + URL=$(wget -q -S -O- --max-redirect=0 "https://zrn.co/${RELEASE}${EDITION}" 2>&1 | grep Location | cut -d' ' -f4) ISO="${URL##*/}" web_get "${URL}" "${VM_PATH}" make_vm_config "${ISO}" From 614ea2f4c3e34d2ab82929ed3505519f92ea62b5 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 18:02:24 +0000 Subject: [PATCH 46/59] Improve the quickget quick 'n dirty dev guide --- quickget | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/quickget b/quickget index 9071f03..2834c14 100755 --- a/quickget +++ b/quickget @@ -2,12 +2,12 @@ # Here the quick 'n dirty guide to adding a new OS to quickget # -# 1. Add the new OS, all lowercase, to os_support() -# 2. Add a "pretty name" to pretty_name() -# 3. Create a releases_newos() generator that outputs the currently supported release versions -# 4. If the OS has "editions" (Linux Mint for example), create editions_newos() generator -# 5. Add the new OS to make_vm_config(); (only if required) -# 6. Create a get_newos() function that does something like this: +# 1. Update os_support() - add new OS, all lowercase +# 2. Update pretty_name() - add a pretty name for new OS *only if the catch all is not suitable* +# 3. Create a releases_newos() generator (required) outputs the current supported release versions +# 4. Create a editions_newos() generator (optional) outputs the editions if new OS has multiple flavours/editions +# 5. Update make_vm_config() - add any *required* new OS tweaks +# 6. Create a get_newos() function - that does something like this: # function get_newos() { # local EDITION="" # local HASH="" @@ -18,8 +18,8 @@ # EDITION="${1}" # fi # -# ISO="newos-${RELEASE}-amd64.iso" -# URL="https://www.newos.org/download" +# URL="https://www.newos.org/download/${RELEASE}/${EDITION}" +# ISO="newos-${RELEASE}-${EDITION}-amd64.iso" # web_get "${URL}/${ISO}" "${VM_PATH}" # web_get "${URL}/SHA256SUMS" "${VM_PATH}" # HASH=$(cut -d' ' -f1 < "${VM_PATH}/SHA256SUMS") From 6b54c5817378b81063c7e018c78705a46fec5742 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 20:07:58 +0000 Subject: [PATCH 47/59] Refactor Debian support to enable past releases --- quickget | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index 2834c14..3f1230e 100755 --- a/quickget +++ b/quickget @@ -248,7 +248,8 @@ function releases_cachyos() { } function releases_debian() { - echo 11.2.0 + echo 10.11.0 \ + 11.2.0 } function editions_debian() { @@ -819,12 +820,17 @@ function get_debian() { local EDITION="" local HASH="" local ISO="" - local URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid" + local URL="" if [ -n "${1}" ]; then EDITION="${1}" fi + case ${RELEASE} in + 11.2.0) URL="https://cdimage.debian.org/debian-cd/${RELEASE}-live/amd64/iso-hybrid";; + *) URL="https://cdimage.debian.org/cdimage/archive/${RELEASE}-live/amd64/iso-hybrid/" + esac + ISO="debian-live-${RELEASE}-amd64-${EDITION}.iso" HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1) web_get "${URL}/${ISO}" "${VM_PATH}" From a9392062882ce0f649000e04f48a7a155fc1b422 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 20:08:50 +0000 Subject: [PATCH 48/59] Refactor Garuda support to properly implement releases and editions --- quickget | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/quickget b/quickget index 3f1230e..951e759 100755 --- a/quickget +++ b/quickget @@ -284,20 +284,25 @@ function releases_freebsd(){ } function releases_garuda() { - echo bspwm \ - dr460nized \ + echo 220131 \ + 220220 +} + +function editions_garuda() { + echo dr460nized \ dr460nized-blackarch \ dr460nized-gaming \ + bspwm \ + cinnamon \ gnome \ i3 \ kde-barebones \ lxqt-kwin \ + mate \ qtile \ sway \ wayfire \ - xfce \ - mate \ - cinnamon + xfce } function releases_gentoo(){ @@ -910,28 +915,24 @@ function get_freebsd() { } function get_garuda() { - local DATE="" + local BRANCH="" + local EDITION="" local HASH="" local ISO="" - local URL="http://mirrors.fossho.st/garuda/iso" - local REL_TYPE="" - local LATEST_URL="" - local HASH_URL="" + local URL="" - case ${RELEASE} in - mate|cinnamon) - REL_TYPE="community";; - *) - REL_TYPE="garuda";; + if [ -n "${1}" ]; then + EDITION="${1}" + fi + + case ${EDITION} in + cinnamon|mate) BRANCH="community";; + *) BRANCH="garuda";; esac - # Follow daily releases and use SHA hash file to derive .iso and date - LATEST_URL="${URL}/latest/${REL_TYPE}/${RELEASE}/latest.iso.sha256" - HASH_URL="$(wget -q -O- "${LATEST_URL}")" - ISO="$(echo "${HASH_URL}" | awk '{print $NF}')" - HASH=$(echo "${HASH_URL}" | cut -d' ' -f1) - DATE=$(echo "${ISO}" | awk -F'-' '{print $NF}' | cut -d'.' -f1) - URL="${URL}/${REL_TYPE}/${RELEASE}/${DATE}" + URL="http://mirrors.fossho.st/garuda/iso/${BRANCH}/${EDITION}/${RELEASE}" + ISO="${OS}-${EDITION}-linux-zen-${RELEASE}.iso" + HASH="$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)" web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${OS}-${RELEASE}.iso" From 12d33eabcfd9c09fae0c2ac43ef5c3786255e861 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 20:29:22 +0000 Subject: [PATCH 49/59] Refactor make_vm_config() to create distinctive VM config filenames --- quickget | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/quickget b/quickget index 951e759..ba06496 100755 --- a/quickget +++ b/quickget @@ -640,15 +640,8 @@ function zsync_get() { fi } -function start_vm_info() { - echo - echo "To start your ${OS} ${RELEASE} virtual machine run:" - echo " quickemu --vm ${OS}-${RELEASE}.conf" - echo - exit 0 -} - function make_vm_config() { + local CONF_FILE="" local IMAGE_FILE="" local ISO_FILE="" local IMAGE_TYPE="" @@ -678,40 +671,47 @@ function make_vm_config() { IMAGE_TYPE="iso";; esac - if [ -n "${ISOTYPE}" ]; then - RELEASE=${RELEASE}-${ISOTYPE} + if [ -n "${EDITION}" ]; then + CONF_FILE="${OS}-${RELEASE}-${EDITION}.conf" + else + CONF_FILE="${OS}-${RELEASE}.conf" fi - if [ ! -e "${OS}-${RELEASE}.conf" ]; then - echo "Making VM configuration for ${OS}-${RELEASE}..." - cat << EOF > "${OS}-${RELEASE}.conf" + if [ ! -e "${CONF_FILE}" ]; then + echo "Making ${CONF_FILE}" + cat << EOF > "${CONF_FILE}" guest_os="${GUEST}" disk_img="${VM_PATH}/disk.qcow2" ${IMAGE_TYPE}="${VM_PATH}/${IMAGE_FILE}" EOF if [ -n "${ISO_FILE}" ]; then - echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${OS}-${RELEASE}.conf" + echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${CONF_FILE}" fi + # OS specific tweaks case ${OS} in - alma|cachyos|garuda|oraclelinux|rockylinux|void|zorin) echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf";; - haiku|kolibrios|openbsd|slackware|tails) echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf";; - macos) echo "macos_release=\"${RELEASE}\"" >> "${OS}-${RELEASE}.conf";; + alma|cachyos|garuda|oraclelinux|rockylinux|void|zorin) echo "disk_size=\"32G\"" >> "${CONF_FILE}";; + haiku|kolibrios|openbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";; + macos) echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}";; esac # Enable TPM for Windows 11 if [ "${OS}" == "windows" ] && [ "${RELEASE}" -ge 11 ]; then - echo "tpm=\"on\"" >> "${OS}-${RELEASE}.conf" + echo "tpm=\"on\"" >> "${CONF_FILE}" # Only force SecureBoot on for non-Debian/Ubuntu distros. if [ -e "/usr/share/OVMF/OVMF_CODE_4M.fd" ] && [ -e "/usr/share/OVMF/OVMF_VARS_4M.fd" ]; then SEC_BOOT="off" else SEC_BOOT="on" fi - echo "secureboot=\"${SEC_BOOT}\"" >> "${OS}-${RELEASE}.conf" + echo "secureboot=\"${SEC_BOOT}\"" >> "${CONF_FILE}" fi fi - start_vm_info + echo + echo "To start your $(pretty_name "${OS}") virtual machine run:" + echo " quickemu --vm ${CONF_FILE}" + echo + exit 0 } function get_android() { From 96287f369ec7eb412bea845afe927b881937e9b5 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 20:37:40 +0000 Subject: [PATCH 50/59] Refactor get_alpine() --- quickget | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/quickget b/quickget index ba06496..e1307be 100755 --- a/quickget +++ b/quickget @@ -771,12 +771,11 @@ function get_alpine() { *) BRANCH="v${RELEASE}";; esac - MANIFESTURL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/latest-releases.yaml" - VERSION=$(wget -qO- "${MANIFESTURL}" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}') + URL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64" + VERSION=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}') ISO="alpine-virt-${VERSION}-x86_64.iso" - URL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/${ISO}" - web_get "${URL}" "${VM_PATH}" - HASH=$(wget -qO- "${MANIFESTURL}" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}') + web_get "${URL}/${ISO}" "${VM_PATH}" + HASH=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}') check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" } From dabdfa49cc0d93764b156a1aadf227842f4596b7 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 21:12:20 +0000 Subject: [PATCH 51/59] Refactor Arco Linux support releases and editions --- quickget | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/quickget b/quickget index e1307be..274208d 100755 --- a/quickget +++ b/quickget @@ -239,7 +239,14 @@ function releases_archlinux() { } function releases_arcolinux() { - echo latest + echo v21.09.11 \ + v21.11.05 \ + v22.01.10 +} + +function editions_arcolinux() { + echo large \ + small } function releases_cachyos() { @@ -796,15 +803,18 @@ function get_archlinux() { } function get_arcolinux() { + local EDITION="" local HASH="" local ISO="" local URL="" - local VERSION="" - URL="https://ant.seedhost.eu/arcolinux/.quick/" - VERSION=$(wget -q -O- "${URL}/info" | cut -d' ' -f 2) - ISO="arcolinuxl-${VERSION}-x86_64.iso" - HASH=$(wget -q -O- "${URL}/arcolinuxl-${VERSION}-x86_64.iso.sha1" | cut -d' ' -f 1) + if [ -n "${1}" ]; then + EDITION="${1:0:1}" + fi + + URL="https://ant.seedhost.eu/arcolinux/iso/${RELEASE}" + ISO="arcolinux${EDITION}-${RELEASE}-x86_64.iso" + HASH=$(wget -q -O- "${URL}/${ISO}.sha1" | cut -d' ' -f 1) web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" From 36ea016fb3403930421d71ffffad23db5a93f614 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 22:18:50 +0000 Subject: [PATCH 52/59] Refactor Fedora support to add editions, including Fedora Spins This also removes all hardcoding in ISO filenames. --- quickget | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/quickget b/quickget index 274208d..128995c 100755 --- a/quickget +++ b/quickget @@ -279,14 +279,28 @@ function releases_elementary() { echo 6.1 } -function releases_fedora(){ +function releases_fedora() { echo 33 \ 34 \ 35 } +function editions_fedora() { + echo Workstation \ + Cinnamon \ + i3 \ + KDE \ + LXDE \ + LXQt \ + Mate \ + Xfce \ + Silverblue \ + Server +} + function releases_freebsd(){ echo 12.2 \ + 12.3 \ 13.0 } @@ -886,25 +900,26 @@ function get_elementary() { } function get_fedora() { - local FEDORA_RELEASE="" - local FEDORA_VERSIONS="" + local EDITION="" local HASH="" local ISO="" + local JSON="" local URL="" - local VERSION_NUM="" + local VARIANT="" - FEDORA_VERSIONS=$(wget -q -O- "https://getfedora.org/releases.json" | jq '.[] | select((.variant=="Workstation" or .variant=="Spins") and .arch=="x86_64")') - if [[ "${RELEASE}" == *"beta"* ]]; then - VERSION_NUM=${RELEASE%"_beta"} - FEDORA_RELEASE=$(echo "${FEDORA_VERSIONS}" | jq -c '. | select(.version | contains("Beta"))' | jq '. | select(.variant=="Workstation")') - ISO="Fedora-Workstation-Live-x86_64-${VERSION_NUM}_Beta-1.2.iso" - else - FEDORA_RELEASE=$(echo "${FEDORA_VERSIONS}" | jq '. | select(.variant=="Workstation" and .version=="'${RELEASE}'")') - ISO="Fedora-Workstation-Live-x86_64-${RELEASE}-1.2.iso" + if [ -n "${1}" ]; then + EDITION="${1}" fi - URL=$(echo "${FEDORA_RELEASE}" | jq -r '.link') - HASH=$(echo "${FEDORA_RELEASE}" | jq -r '.sha256') + case ${EDITION} in + Server|Silverblue|Workstation) VARIANT="${EDITION}";; + *) VARIANT="Spins";; + esac + + JSON=$(wget -q -O- "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'")') + URL=$(echo "${JSON}" | jq -r '.link' | head -n1) + ISO="${URL##*/}" + HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1) web_get "${URL}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" From 545b44763aeb8ecf08d3036191a7fd7f91de80d2 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 22:56:58 +0000 Subject: [PATCH 53/59] Refactor get_freebsd() --- quickget | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quickget b/quickget index 128995c..16a2356 100755 --- a/quickget +++ b/quickget @@ -930,10 +930,10 @@ function get_freebsd() { local ISO="" local URL="" + URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}" ISO="FreeBSD-${RELEASE}-RELEASE-amd64-dvd1.iso" - HASH=$(wget -q -O- "https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}/CHECKSUM.SHA512-FreeBSD-${RELEASE}-RELEASE-amd64" | grep '('"${ISO}"')' | cut -d' ' -f4) - URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}/${ISO}" - web_get "${URL}" "${VM_PATH}" + HASH=$(wget -q -O- "${URL}/CHECKSUM.SHA512-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | cut -d' ' -f4) + web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" } From 283927577efd6bcf62145a6887f5e923c07b18a4 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 22:57:40 +0000 Subject: [PATCH 54/59] Add more OpenBSD releases --- quickget | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quickget b/quickget index 16a2356..370f9b5 100755 --- a/quickget +++ b/quickget @@ -411,7 +411,10 @@ function editions_nixos(){ } function releases_openbsd(){ - echo 7.0 + echo 6.7 \ + 6.8 \ + 6.9 \ + 7.0 } function releases_opensuse(){ From 45eaaa08c2782849b81dba3522616b4ae427e3a9 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 23:32:50 +0000 Subject: [PATCH 55/59] Add GhostBSD Includes MATE and XFCE editions. --- README.md | 1 + quickemu | 2 +- quickget | 42 ++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 463b5d3..0d7d139 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,7 @@ Other Operating Systems - `freebsd` (FreeBSD) - `garuda` (Garuda Linux) - `gentoo` (Gentoo) +- `ghostbsd` (GhostBSD) - `haiku` (Haiku) - `kali` (Kali) - `kdeneon` (KDE Neon) diff --git a/quickemu b/quickemu index 037bc72..5530eee 100755 --- a/quickemu +++ b/quickemu @@ -470,7 +470,7 @@ function vm_boot() { CPU="${CPU},topoext" fi - if [ "${guest_os}" == "freebsd" ]; then + if [ "${guest_os}" == "freebsd" ] || [ "${guest_os}" == "ghostbsd" ]; then MOUSE="usb-mouse" elif [ "${guest_os}" == "haiku" ]; then MACHINE_TYPE="pc" diff --git a/quickget b/quickget index 370f9b5..4b5a2fb 100755 --- a/quickget +++ b/quickget @@ -47,6 +47,7 @@ function pretty_name() { elementary) PRETTY_NAME="elementary OS";; freebsd) PRETTY_NAME="FreeBSD";; garuda) PRETTY_NAME="Garuda Linux";; + ghostbsd) PRETTY_NAME="GhostBSD";; kdeneon) PRETTY_NAME="KDE Neon";; kolibrios) PRETTY_NAME="KolibriOS";; linuxmint) PRETTY_NAME="Linux Mint";; @@ -173,6 +174,7 @@ function os_support() { freebsd \ garuda \ gentoo \ + ghostbsd \ haiku \ kali \ kdeneon \ @@ -330,6 +332,17 @@ function releases_gentoo(){ echo latest } +function releases_ghostbsd(){ + echo 21.10.16 \ + 21.11.24 \ + 22.01.12 +} + +function editions_ghostbsd(){ + echo mate \ + xfce +} + function releases_haiku() { echo r1beta3 } @@ -675,8 +688,8 @@ function make_vm_config() { IMAGE_FILE="${1}" ISO_FILE="${2}" case "${OS}" in - freebsd|openbsd) - GUEST="bsd" + freebsd|ghostbsd) + GUEST="freebsd" IMAGE_TYPE="iso";; haiku) GUEST="haiku" @@ -687,6 +700,9 @@ function make_vm_config() { macos) GUEST="macos" IMAGE_TYPE="img";; + openbsd) + GUEST="openbsd" + IMAGE_TYPE="iso";; windows) GUEST="windows" IMAGE_TYPE="iso";; @@ -977,6 +993,28 @@ function get_gentoo() { make_vm_config "${ISO}" } +function get_ghostbsd() { + local EDITION="" + local ISO="" + local URL="" + local HASH="" + + if [ -n "${1}" ]; then + EDITION="${1}" + fi + + case ${EDITION} in + mate) ISO="GhostBSD-${RELEASE}.iso";; + xfce) ISO="GhostBSD-${RELEASE}-XFCE.iso";; + esac + + URL="https://download.ghostbsd.org/releases/amd64/${RELEASE}" + HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f3) + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function get_haiku() { local EDITION="" local ISO="" From bd87f98224b0569e4252e7a97e94648cd2de4355 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 00:51:34 +0000 Subject: [PATCH 56/59] Add NetBSD --- README.md | 3 ++- quickget | 27 +++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0d7d139..e09466a 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Features - **macOS** Monterey, Big Sur, Catalina, Mojave & High Sierra - **Windows** 8.1, 10 and 11 including TPM 2.0 - [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu flavours](https://ubuntu.com/download/flavours)** -- **And over 30 other operating systems are supported:** +- **Over 360 operating system editions are supported!** - Full SPICE support including host/guest clipboard sharing - VirtIO-webdavd file sharing for Linux and Windows guests - VirtIO-9p file sharing for Linux and macOS guests @@ -229,6 +229,7 @@ Other Operating Systems - `manjaro` (Manjaro) - `mxlinux` (MX Linux) - `netboot` (netboot.xyz) +- `netbsd` (NetBSD) - `nixos` (NixOS) - `openbsd` (OpenBSD) - `opensuse` (openSUSE) diff --git a/quickget b/quickget index 4b5a2fb..3f4c40f 100755 --- a/quickget +++ b/quickget @@ -53,6 +53,7 @@ function pretty_name() { linuxmint) PRETTY_NAME="Linux Mint";; mxlinux) PRETTY_NAME="MX Linux";; netboot) PRETTY_NAME="netboot.xyz";; + netbsd) PRETTY_NAME="NetBSD";; nixos) PRETTY_NAME="NixOS";; macos) PRETTY_NAME="macOS";; openbsd) PRETTY_NAME="OpenBSD";; @@ -184,6 +185,7 @@ function os_support() { manjaro \ mxlinux \ netboot \ + netbsd \ nixos \ lubuntu \ macos \ @@ -352,7 +354,6 @@ function editions_haiku() { x86_gcc2h } - function releases_kali() { echo latest \ weekly @@ -412,6 +413,12 @@ function releases_netboot() { echo latest } +function releases_netbsd() { + echo 9.2 \ + 9.1 \ + 9.0 +} + function releases_nixos(){ echo 21.05 \ 21.11 @@ -700,6 +707,9 @@ function make_vm_config() { macos) GUEST="macos" IMAGE_TYPE="img";; + netbsd) + GUEST="netbsd" + IMAGE_TYPE="iso";; openbsd) GUEST="openbsd" IMAGE_TYPE="iso";; @@ -731,7 +741,7 @@ EOF # OS specific tweaks case ${OS} in alma|cachyos|garuda|oraclelinux|rockylinux|void|zorin) echo "disk_size=\"32G\"" >> "${CONF_FILE}";; - haiku|kolibrios|openbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";; + haiku|kolibrios|openbsd|netbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";; macos) echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}";; esac @@ -1224,6 +1234,19 @@ function get_netboot() { make_vm_config "${ISO}" } +function get_netbsd() { + local HASH="" + local ISO="" + local URL="" + + URL="https://cdn.netbsd.org/pub/NetBSD/NetBSD-${RELEASE}/images/" + ISO="NetBSD-${RELEASE}-amd64.iso" + HASH=$(wget -q -O- "${URL}/MD5" | grep "${ISO}" | cut -d' ' -f4) + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function get_nixos() { local EDITION="" local HASH="" From 7ef1f5bc49fe61d338e67e8488c7023eac9eef20 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 00:51:54 +0000 Subject: [PATCH 57/59] Fix get_garuda() --- quickget | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickget b/quickget index 3f4c40f..751a416 100755 --- a/quickget +++ b/quickget @@ -988,7 +988,7 @@ function get_garuda() { HASH="$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)" web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" - make_vm_config "${OS}-${RELEASE}.iso" + make_vm_config "${ISO}" } function get_gentoo() { From 310027f17d702150f6ca87b4118b6bbc607f8aca Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 00:52:48 +0000 Subject: [PATCH 58/59] Remove excessive disk_size requirement from various distros --- quickget | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickget b/quickget index 751a416..7589942 100755 --- a/quickget +++ b/quickget @@ -740,7 +740,7 @@ EOF # OS specific tweaks case ${OS} in - alma|cachyos|garuda|oraclelinux|rockylinux|void|zorin) echo "disk_size=\"32G\"" >> "${CONF_FILE}";; + alma|oraclelinux|rockylinux) echo "disk_size=\"32G\"" >> "${CONF_FILE}";; haiku|kolibrios|openbsd|netbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";; macos) echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}";; esac From 4ec224cde8e579dbf649b3ee03da19d515a6d4b3 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 00:53:36 +0000 Subject: [PATCH 59/59] Tune KolibriOS --- quickget | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/quickget b/quickget index 7589942..540eef5 100755 --- a/quickget +++ b/quickget @@ -741,7 +741,12 @@ EOF # OS specific tweaks case ${OS} in alma|oraclelinux|rockylinux) echo "disk_size=\"32G\"" >> "${CONF_FILE}";; - haiku|kolibrios|openbsd|netbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";; + haiku|openbsd|netbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";; + kolibrios) + echo "boot=\"legacy\"" >> "${CONF_FILE}" + echo "disk_size=\"2G\"" >> "${CONF_FILE}" + echo "ram=\"128M\"" >> "${CONF_FILE}" + ;; macos) echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}";; esac