From 3ef5ff47bc1d57fe7a6c03d16acd049ce4150aac Mon Sep 17 00:00:00 2001 From: zenobit Date: Sun, 16 Jan 2022 04:38:45 +0100 Subject: [PATCH 1/4] added initial support for void linux --- quickemu | 14 ++++++++++---- quickget | 43 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/quickemu b/quickemu index 5507580..df15b80 100755 --- a/quickemu +++ b/quickemu @@ -393,8 +393,11 @@ function vm_boot() { EFI_CODE="/usr/share/OVMF/x64/OVMF_CODE.secboot.fd" efi_vars "/usr/share/OVMF/x64/OVMF_VARS.fd" "${EFI_VARS}" elif [ -e "/usr/share/edk2-ovmf/OVMF_CODE.fd" ]; then - EFI_CODE="/usr/share/edk2-ovmf/OVMF_CODE.secboot.fd" - efi_vars "/usr/share/edk2-ovmf/OVMF_VARS.fd" "${EFI_VARS}" + EFI_CODE="/usr/share/edk2-ovmf/OVMF_CODE.secboot.fd" + efi_vars "/usr/share/edk2-ovmf/OVMF_VARS.fd" "${EFI_VARS}" + elif [ -e "/usr/share/qemu/edk2-x86_64-secure-code.fd" ]; then + EFI_CODE="/usr/share/qemu/edk2-x86_64-secure-code.fd" + efi_vars "/usr/share/qemu/edk2-x86_64-code.fd" "${EFI_VARS}" else echo "ERROR! SecureBoot was requested but no SecureBoot capable firmware was found." echo " Please install OVMF firmware." @@ -415,8 +418,11 @@ function vm_boot() { EFI_CODE="/usr/share/OVMF/x64/OVMF_CODE.fd" efi_vars "/usr/share/OVMF/x64/OVMF_VARS.fd" "${EFI_VARS}" elif [ -e "/usr/share/edk2-ovmf/OVMF_CODE.fd" ]; then - EFI_CODE="/usr/share/edk2-ovmf/OVMF_CODE.fd" - efi_vars "/usr/share/edk2-ovmf/OVMF_VARS.fd" "${EFI_VARS}" + EFI_CODE="/usr/share/edk2-ovmf/OVMF_CODE.fd" + efi_vars "/usr/share/edk2-ovmf/OVMF_VARS.fd" "${EFI_VARS}" + elif [ -e "/usr/share/qemu/edk2-x86_64-code.fd" ]; then + EFI_CODE="/usr/share/qemu/edk2-x86_64-code.fd" + efi_vars "/usr/share/qemu/edk2-x86_64-code.fd" "${EFI_VARS}" else echo "ERROR! EFI boot requested but no EFI firmware found." echo " Please install OVMF firmware." diff --git a/quickget b/quickget index 235fd9a..6b4be89 100755 --- a/quickget +++ b/quickget @@ -59,6 +59,7 @@ function pretty_name() { ubuntu-kylin) PRETTY_NAME="Ubuntu Kylin";; ubuntu-mate) PRETTY_NAME="Ubuntu MATE";; ubuntu-studio) PRETTY_NAME="Ubuntu Studio";; + void) PRETTY_NAME="Void Linux";; zorin) PRETTY_NAME="Zorin OS";; *) PRETTY_NAME="${SIMPLE_NAME^}";; esac @@ -191,6 +192,7 @@ function os_support() { ubuntu-kylin \ ubuntu-mate \ ubuntu-studio \ + void \ windows \ xubuntu \ zorin @@ -352,6 +354,15 @@ function releases_ubuntu() { canary } +function releases_void() { + echo i686-20210930 \ + i686-20210930-xfce \ + x86_64-20210930 \ + x86_64-20210930-xfce \ + x86_64-musl-20210930 \ + x86_64-musl-20210930-xfce +} + function languages_windows() { LANGS=(Arabic "Brazilian Portuguese" @@ -570,6 +581,9 @@ function make_vm_config() { elif [[ "${OS}" == *"ubuntu"* ]]; then GUEST="linux" IMAGE_TYPE="iso" + elif [ "${OS}" == "void" ]; then + GUEST="linux" + IMAGE_TYPE="iso" elif [ "${OS}" == "macos" ]; then GUEST="macos" IMAGE_TYPE="img" @@ -615,6 +629,10 @@ EOF 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) @@ -842,6 +860,7 @@ function get_linuxmint() { web_get "${URL}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" + } function get_nixos() { local FLAVOR="" @@ -857,6 +876,7 @@ function get_nixos() { web_get "${URL}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" + } function get_openbsd() { local HASH="" @@ -872,6 +892,23 @@ function get_openbsd() { make_vm_config "${ISO}" } +function get_void() { + local FLAVOR="" + local HASH="" + local ISO="" + local URL="" + local arch="x86_64" + # TODO: only one hardcoded version of void added.. Add more and make it automatic + if + validate_release "releases_void" + URL="https://alpha.de.repo.voidlinux.org/live/current" + ISO="void-live-x86_64-20210930-xfce.iso" + #ISO="void-live-${ARCH}${LIBC}-${VERSION}-${FLAVOR}.iso" + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function get_zorin() { local ISO="" local URL="" @@ -1149,6 +1186,7 @@ function get_ubuntu() { make_vm_config "${ISO}" fi } + function get_garuda() { local HASH="" local ISO="" @@ -1480,7 +1518,6 @@ function unattended_windows() { EOF } - function dbg_windows() { local DEBUG=0 if [ ${DEBUG} -eq 1 ]; then @@ -1627,6 +1664,8 @@ if [ -n "${2}" ]; then get_android elif [ "${OS}" == "archlinux" ]; then get_archlinux + elif [ "${OS}" == "void" ]; then + get_void elif [ "${OS}" == "debian" ]; then if [ -n "${3}" ]; then FREEDOM="${3}" @@ -1768,6 +1807,8 @@ else releases_solus elif [[ "${OS}" == *"ubuntu"* ]]; then releases_ubuntu + elif [ "${OS}" == "void" ]; then + releases_void elif [ "${OS}" == "windows" ]; then releases_windows elif [ "${OS}" == "zorin" ]; then From 18f92bc7852c9df95a21c644225e26b07d213142 Mon Sep 17 00:00:00 2001 From: zenobit <6384793+zen0bit@users.noreply.github.com> Date: Sun, 30 Jan 2022 18:46:55 +0100 Subject: [PATCH 2/4] fix --- quickget | 1 - 1 file changed, 1 deletion(-) diff --git a/quickget b/quickget index 6b4be89..a7b77d4 100755 --- a/quickget +++ b/quickget @@ -899,7 +899,6 @@ function get_void() { local URL="" local arch="x86_64" # TODO: only one hardcoded version of void added.. Add more and make it automatic - if validate_release "releases_void" URL="https://alpha.de.repo.voidlinux.org/live/current" ISO="void-live-x86_64-20210930-xfce.iso" From 3d30f8b1d76ac658d2db8c347fc0a267134eb00b Mon Sep 17 00:00:00 2001 From: zenobit <6384793+zen0bit@users.noreply.github.com> Date: Mon, 31 Jan 2022 01:15:53 +0100 Subject: [PATCH 3/4] Update quickget --- quickget | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/quickget b/quickget index a7b77d4..1e12803 100755 --- a/quickget +++ b/quickget @@ -893,16 +893,34 @@ function get_openbsd() { } function get_void() { - local FLAVOR="" local HASH="" local ISO="" local URL="" - local arch="x86_64" - # TODO: only one hardcoded version of void added.. Add more and make it automatic + local HASH_URL="" + validate_release "releases_void" - URL="https://alpha.de.repo.voidlinux.org/live/current" - ISO="void-live-x86_64-20210930-xfce.iso" - #ISO="void-live-${ARCH}${LIBC}-${VERSION}-${FLAVOR}.iso" + DATE=$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | awk 'NR == 1' |cut -d'.' -f1| cut -d'-' -f4) + URL="http://mirror.fit.cvut.cz/voidlinux/live/current" + 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";; + esac + case ${RELEASE} in + base) + HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-${DATE}.iso" | cut -d' ' -f4)";; + musl) + HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-musl-${DATE}.iso" | cut -d' ' -f4)";; + xfce) + HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-${DATE}-xfce.iso" | cut -d' ' -f4)";; + xfce-musl) + HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-musl-${DATE}.iso" | cut -d' ' -f4)";; + esac web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" From 6de821561c38bcb127f54b5d31c724dd6f89140c Mon Sep 17 00:00:00 2001 From: zenobit <6384793+zen0bit@users.noreply.github.com> Date: Mon, 31 Jan 2022 01:25:02 +0100 Subject: [PATCH 4/4] Update quickget --- quickget | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/quickget b/quickget index 1e12803..e0ffc72 100755 --- a/quickget +++ b/quickget @@ -355,12 +355,10 @@ function releases_ubuntu() { } function releases_void() { - echo i686-20210930 \ - i686-20210930-xfce \ - x86_64-20210930 \ - x86_64-20210930-xfce \ - x86_64-musl-20210930 \ - x86_64-musl-20210930-xfce + echo base \ + musl \ + xfce \ + xfce-musl } function languages_windows() {