From 516ececfbdf46b8d3f1b3b7b3915b02a15b7e3db Mon Sep 17 00:00:00 2001 From: Yannick Mauray Date: Tue, 19 Oct 2021 13:04:16 +0200 Subject: [PATCH] Added elementary OS support (#130) * Added elementary OS support * Updated README.md * Added pretty name for elementary OS --- README.md | 10 ++++++++++ quickget | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ca62938..c8f5334 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ comprehensive support for macOS and Windows**. * **macOS** High Sierra, Mojave, Catalina and Big Sur * **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)** + * [elementary OS](https://elementary.io/) (only with SPICE) * [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) * [Pop!_OS](https://pop.system76.com/) (only with SPICE) @@ -289,6 +290,15 @@ tpm="on" * `fixed_iso=` specifies the ISO image that provides VirtIO drivers. * `tpm="on"` instructs `quickemu` to create a software emulated TPM device using `swtpm`. +## elementary OS Guest + +`quickemu` supports elementary OS, but only installs using SPICE. + +```bash +quickget elementary 6_0 +quickemu --vm elemenrary-6_0.conf --display spice +``` + ## FreeBSD Guest `quickemu` supports FreeBSD production releases. FreeBSD support is maintained by ``. diff --git a/quickget b/quickget index 06751f9..729e284 100755 --- a/quickget +++ b/quickget @@ -14,6 +14,7 @@ function list_all() { FUNC="${OS}" fi case ${OS} in + elementary) DISPLAY_NAME="elementary OS";; freebsd) DISPLAY_NAME="FreeBSD";; linuxmint) DISPLAY_NAME="Linux Mint";; macos) DISPLAY_NAME="macOS";; @@ -39,8 +40,9 @@ function list_all() { } function os_support() { - echo fedora \ + echo elementary \ freebsd \ + fedora \ kubuntu \ linuxmint \ lubuntu \ @@ -56,6 +58,10 @@ function os_support() { xubuntu } +function releases_elementary() { + echo 6_0 +} + function releases_freebsd(){ echo 12_2 \ 13_0 @@ -395,7 +401,10 @@ function make_vm_config() { local GUEST="" IMAGE_FILE="${1}" ISO_FILE="${2}" - if [[ "${OS}" == "freebsd" ]]; then + if [[ "${OS}" == "elementary" ]]; then + GUEST="linux" + IMAGE_TYPE="iso" + elif [[ "${OS}" == "freebsd" ]]; then GUEST="freebsd" IMAGE_TYPE="iso" elif [[ "${OS}" == "fedora" ]]; then @@ -450,6 +459,24 @@ function start_vm_info() { echo } +function get_elementary() { + case ${RELEASE} in + 6_0) VERSION=${RELEASE//_/.};; + *) + echo "ERROR! elementary OS ${RELEASE} is not a supported release." + releases_elementary + exit 1 + ;; + esac + + ISO=elementaryos-6.0-stable.20211005.iso + URL="https://ams3.dl.elementary.io/download/MTYzNDU5MDA5NA==/${ISO}" + make_vm_dir + web_get ${URL} ${VM_PATH} + make_vm_config ${ISO} + start_vm_info +} + function get_freebsd() { # For future releases, use dvd1 iso files. local URL="" @@ -835,7 +862,9 @@ if [ -n "${2}" ]; then RELEASE="${2,,}" else echo "ERROR! You must specify an OS release name." - if [ "${OS}" == "freebsd" ]; then + if [ "${OS}" == "elementary" ]; then + releases_elementary + elif [ "${OS}" == "freebsd" ]; then releases_freebsd elif [ "${OS}" == "fedora" ]; then releases_fedora @@ -857,7 +886,9 @@ fi VM_PATH="${OS}-${RELEASE}" -if [ "${OS}" == "macos" ]; then +if [ "${OS}" == "elementary" ]; then + get_elementary +elif [ "${OS}" == "macos" ]; then get_macos elif [[ "${OS}" == "freebsd" ]]; then get_freebsd