Compare commits
58 Commits
Author | SHA1 | Date |
---|---|---|
|
78b938facf | |
|
539b11bbf4 | |
|
4de41eb836 | |
|
4a11725b1e | |
|
508822fc90 | |
|
6d0a09e831 | |
|
8ebc01bd91 | |
|
ee531af4fb | |
|
a6367ccb78 | |
|
36082437e1 | |
|
808caa1e74 | |
|
bd178bb4c3 | |
|
f6b36c4ec5 | |
|
d912402e32 | |
|
58d7c41998 | |
|
7d7332a1fc | |
|
e4c2c5cf2b | |
|
91e06a64fd | |
|
9f90d46ea1 | |
|
6145f685aa | |
|
3d40baa0e4 | |
|
c6c75e6550 | |
|
0e6be87757 | |
|
517ba94203 | |
|
7ad2308fa3 | |
|
42d81b12bb | |
|
2129abf060 | |
|
0d61c0643e | |
|
89fa572c85 | |
|
45dd058774 | |
|
f25205f451 | |
|
6b51f740a4 | |
|
ed455b17a6 | |
|
727708b1ae | |
|
0c4e257048 | |
|
910d35f80c | |
|
616d10b594 | |
|
40f86c0af1 | |
|
15c0003442 | |
|
f01db134da | |
|
6d5b9231d2 | |
|
9dc70808c5 | |
|
daba59d46c | |
|
4ecf677a74 | |
|
3da9edc995 | |
|
b60ff761e7 | |
|
588e421040 | |
|
f87cc613ab | |
|
70b531c463 | |
|
ae94ac7c16 | |
|
eb0fd03137 | |
|
0c772d5619 | |
|
20b17cb129 | |
|
37190c7b3a | |
|
622ecfd4a4 | |
|
238ec98071 | |
|
eeee8266db | |
|
c2024d2490 |
|
@ -13,9 +13,9 @@ jobs:
|
|||
name: Flake Checker
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: DeterminateSystems/nix-installer-action@v16
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v8
|
||||
- uses: DeterminateSystems/flake-checker-action@v9
|
||||
- uses: DeterminateSystems/nix-installer-action@v19
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v9
|
||||
- uses: DeterminateSystems/flake-checker-action@v12
|
||||
|
|
|
@ -10,11 +10,11 @@ jobs:
|
|||
name: Flake Lock Updater
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: DeterminateSystems/nix-installer-action@v16
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v8
|
||||
- uses: DeterminateSystems/update-flake-lock@v24
|
||||
- uses: DeterminateSystems/nix-installer-action@v19
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v9
|
||||
- uses: DeterminateSystems/update-flake-lock@v27
|
||||
with:
|
||||
pr-title: "chore: update flake.lock"
|
||||
|
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
name: Validate pull request title
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: amannn/action-semantic-pull-request@v5
|
||||
- uses: amannn/action-semantic-pull-request@v6
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
name: Shellcheck
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Run ShellCheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
with:
|
||||
|
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
name: "Check versions ⚖️"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: "Compare App and Git versions 🟰"
|
||||
|
@ -37,7 +37,7 @@ jobs:
|
|||
name: "Draft Release 📥️"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Create release ${{ github.ref }} as a draft
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -49,7 +49,7 @@ jobs:
|
|||
name: "Build Release 👨🔧"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Build and Upload .deb
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -67,7 +67,7 @@ jobs:
|
|||
name: "Publish Release 📤️"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Publish release ${{ github.ref }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -85,7 +85,7 @@ jobs:
|
|||
id-token: "write"
|
||||
contents: "read"
|
||||
steps:
|
||||
- uses: "actions/checkout@v4"
|
||||
- uses: "actions/checkout@v5"
|
||||
with:
|
||||
ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}"
|
||||
- uses: "DeterminateSystems/nix-installer-action@main"
|
||||
|
@ -102,7 +102,7 @@ jobs:
|
|||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: "Checkout 🥡"
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: "Import gpg key 🔑"
|
||||
|
|
|
@ -29,7 +29,7 @@ jobs:
|
|||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: "Checkout 🥡"
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: "Build & Test .deb 🍥"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -51,11 +51,11 @@ jobs:
|
|||
contents: "read"
|
||||
steps:
|
||||
- name: "Checkout 🥡"
|
||||
uses: "actions/checkout@v4"
|
||||
uses: "actions/checkout@v5"
|
||||
- name: "Install Nix ❄️"
|
||||
uses: "DeterminateSystems/nix-installer-action@v16"
|
||||
uses: "DeterminateSystems/nix-installer-action@v19"
|
||||
- name: "Enable Magic Nix Cache 🪄"
|
||||
uses: "DeterminateSystems/magic-nix-cache-action@v8"
|
||||
uses: "DeterminateSystems/magic-nix-cache-action@v9"
|
||||
- name: "Build & Test .nix ❄️"
|
||||
run: |
|
||||
nix build .#quickemu
|
||||
|
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
name: "Run quickget tests 👟"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: "Install dependencies 📦️"
|
||||
run: |
|
||||
sudo apt-get -y update
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[submodule "build-docs"]
|
||||
path = build-docs
|
||||
url = git@github.com:philclifford/quickemu-docs.git
|
||||
url = https://github.com/philclifford/quickemu-docs.git
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
class Quickemu < Formula
|
||||
desc "Quickly create and run optimised Windows, macOS and Linux virtual machines"
|
||||
homepage "https://github.com/quickemu-project/quickemu"
|
||||
|
||||
livecheck do
|
||||
url :stable
|
||||
end
|
||||
|
||||
stable do
|
||||
latest_release = JSON.parse(Utils.safe_popen_read("curl", "-s", "https://api.github.com/repos/quickemu-project/quickemu/releases/latest"))
|
||||
version latest_release["tag_name"]
|
||||
url "https://api.github.com/repos/quickemu-project/quickemu/tarball/#{latest_release["tag_name"]}"
|
||||
end
|
||||
|
||||
head "https://github.com/quickemu-project/quickemu.git"
|
||||
license "MIT"
|
||||
|
||||
depends_on "bash"
|
||||
depends_on "cdrtools"
|
||||
depends_on "coreutils"
|
||||
depends_on "jq"
|
||||
depends_on "python3"
|
||||
depends_on "qemu"
|
||||
depends_on "samba"
|
||||
depends_on "socat"
|
||||
depends_on "swtpm"
|
||||
depends_on "usbutils"
|
||||
depends_on "zsync"
|
||||
|
||||
def install
|
||||
bin.install "quickemu"
|
||||
bin.install "quickget"
|
||||
end
|
||||
|
||||
test do
|
||||
# `test do` will create, run in and delete a temporary directory.
|
||||
#
|
||||
# This test will fail and we won't accept that! For Homebrew/homebrew-core
|
||||
# this will need to be a test that verifies the functionality of the
|
||||
# software. Run the test with `brew test quickemu`. Options passed
|
||||
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
|
||||
#
|
||||
# The installed folder is not in the path, so use the entire path to any
|
||||
# executables being tested: `system bin/"program", "do", "something"`.
|
||||
system "false"
|
||||
end
|
||||
end
|
|
@ -63,7 +63,7 @@ required to run the virtual machines.
|
|||
|
||||
## As featured on [Linux Matters](https://linuxmatters.sh) podcast!
|
||||
|
||||
The presenters of Linux Matters 🐧🎙️ are the creators of each of the principle Quickemu projects. We discussed Quickemu's 2024 reboot in [Episode 30 - Quickemu Rising From the Bashes](https://linuxmatters.sh/30). <!-- and in [Episode 32 - Quick, quicker, quickest](https://linuxmatters.sh/32) [Martin](https://github.com/flexiondotorg) unveils macOS host support for [**Quickemu**](https://github.com/quickemu-project/quickemu), [Mark](https://github.com/marxjohnson) explains the origins of the [**Quickgui**](https://github.com/quickemu-project/quickgui) desktop app and upcoming improvements, and [Alan](https://github.com/popey) debuts [**Quicktest**](https://github.com/quickemu-project/quicktest); a framework for automatically testing operating systems via Quickemu -->
|
||||
The presenters of Linux Matters 🐧🎙️ are the creators of each of the principal Quickemu projects. We discussed Quickemu's 2024 reboot in [Episode 30 - Quickemu Rising From the Bashes](https://linuxmatters.sh/30). <!-- and in [Episode 32 - Quick, quicker, quickest](https://linuxmatters.sh/32) [Martin](https://github.com/flexiondotorg) unveils macOS host support for [**Quickemu**](https://github.com/quickemu-project/quickemu), [Mark](https://github.com/marxjohnson) explains the origins of the [**Quickgui**](https://github.com/quickemu-project/quickgui) desktop app and upcoming improvements, and [Alan](https://github.com/popey) debuts [**Quicktest**](https://github.com/quickemu-project/quicktest); a framework for automatically testing operating systems via Quickemu -->
|
||||
|
||||
<div align="center">
|
||||
<a href="https://linuxmatters.sh" target="_blank"><img src="https://github.com/wimpysworld/nix-config/raw/main/.github/screenshots/linuxmatters.png" alt="Linux Matters Podcast"/></a>
|
||||
|
|
|
@ -22,6 +22,7 @@ Depends:
|
|||
procps,
|
||||
python3-minimal,
|
||||
qemu-system (>= 6.0),
|
||||
base-files (<< 13~) | qemu-system-modules-spice,
|
||||
socat,
|
||||
spice-client-gtk,
|
||||
swtpm,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Automatically generated by Pandoc 3.3
|
||||
.\" Automatically generated by Pandoc 3.6.1
|
||||
.\"
|
||||
.TH "QUICKEMU" "1" "August 2, 2024" "quickemu" "Quickemu User Manual"
|
||||
.TH "QUICKEMU" "1" "December 30, 2024" "quickemu" "Quickemu User Manual"
|
||||
.SH NAME
|
||||
quickemu \- A quick VM builder and manager
|
||||
.SH SYNOPSIS
|
||||
|
@ -691,6 +691,8 @@ wiki
|
|||
.IP \[bu] 2
|
||||
\f[CR]lmde\f[R] (Linux Mint Debian Edition)
|
||||
.IP \[bu] 2
|
||||
\f[CR]maboxlinux\f[R] (Mabox Linux)
|
||||
.IP \[bu] 2
|
||||
\f[CR]mageia\f[R] (Mageia)
|
||||
.IP \[bu] 2
|
||||
\f[CR]manjaro\f[R] (Manjaro)
|
||||
|
@ -725,6 +727,8 @@ wiki
|
|||
.IP \[bu] 2
|
||||
\f[CR]primtux\f[R] (PrimTux)
|
||||
.IP \[bu] 2
|
||||
\f[CR]proxmox\-ve\f[R] (Proxmox VE)
|
||||
.IP \[bu] 2
|
||||
\f[CR]pureos\f[R] (PureOS)
|
||||
.IP \[bu] 2
|
||||
\f[CR]reactos\f[R] (ReactOS)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
author: Martin Wimpress
|
||||
date: August 2, 2024
|
||||
date: December 30, 2024
|
||||
footer: quickemu
|
||||
header: Quickemu User Manual
|
||||
section: 1
|
||||
|
@ -473,6 +473,7 @@ Further information is available from the project
|
|||
- `linuxlite` (Linux Lite)
|
||||
- `linuxmint` (Linux Mint)
|
||||
- `lmde` (Linux Mint Debian Edition)
|
||||
- `maboxlinux` (Mabox Linux)
|
||||
- `mageia` (Mageia)
|
||||
- `manjaro` (Manjaro)
|
||||
- `mxlinux` (MX Linux)
|
||||
|
@ -490,6 +491,7 @@ Further information is available from the project
|
|||
- `popos` (Pop!\_OS)
|
||||
- `porteus` (Porteus)
|
||||
- `primtux` (PrimTux)
|
||||
- `proxmox-ve` (Proxmox VE)
|
||||
- `pureos` (PureOS)
|
||||
- `reactos` (ReactOS)
|
||||
- `rebornos` (RebornOS)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Automatically generated by Pandoc 3.3
|
||||
.\" Automatically generated by Pandoc 3.6.1
|
||||
.\"
|
||||
.TH "QUICKEMU_CONF" "5" "August 2, 2024" "quickemu_conf" "Quickemu Configuration Manual"
|
||||
.TH "QUICKEMU_CONF" "5" "December 30, 2024" "quickemu_conf" "Quickemu Configuration Manual"
|
||||
.SH NAME
|
||||
quickemu_conf \- Options and parameters in the quickemu <vm>.conf
|
||||
.SH DESCRIPTION
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
author: Martin Wimpress
|
||||
date: August 2, 2024
|
||||
date: December 30, 2024
|
||||
footer: quickemu_conf
|
||||
header: Quickemu Configuration Manual
|
||||
section: 5
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Automatically generated by Pandoc 3.3
|
||||
.\" Automatically generated by Pandoc 3.6.1
|
||||
.\"
|
||||
.TH "QUICKGET" "1" "August 2, 2024" "quickget" "Quickget User Manual"
|
||||
.TH "QUICKGET" "1" "December 30, 2024" "quickget" "Quickget User Manual"
|
||||
.SH NAME
|
||||
quickget \- download and prepare materials for building a quickemu VM
|
||||
.SH SYNOPSIS
|
||||
|
@ -252,6 +252,8 @@ wiki
|
|||
.IP \[bu] 2
|
||||
\f[CR]lmde\f[R] (Linux Mint Debian Edition)
|
||||
.IP \[bu] 2
|
||||
\f[CR]maboxlinux\f[R] (Mabox Linux)
|
||||
.IP \[bu] 2
|
||||
\f[CR]mageia\f[R] (Mageia)
|
||||
.IP \[bu] 2
|
||||
\f[CR]manjaro\f[R] (Manjaro)
|
||||
|
@ -286,6 +288,8 @@ wiki
|
|||
.IP \[bu] 2
|
||||
\f[CR]primtux\f[R] (PrimTux)
|
||||
.IP \[bu] 2
|
||||
\f[CR]proxmox\-ve\f[R] (Proxmox VE)
|
||||
.IP \[bu] 2
|
||||
\f[CR]pureos\f[R] (PureOS)
|
||||
.IP \[bu] 2
|
||||
\f[CR]reactos\f[R] (ReactOS)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
author: Martin Wimpress
|
||||
date: August 2, 2024
|
||||
date: December 30, 2024
|
||||
footer: quickget
|
||||
header: Quickget User Manual
|
||||
section: 1
|
||||
|
@ -203,6 +203,7 @@ Further information is available from the project
|
|||
- `linuxlite` (Linux Lite)
|
||||
- `linuxmint` (Linux Mint)
|
||||
- `lmde` (Linux Mint Debian Edition)
|
||||
- `maboxlinux` (Mabox Linux)
|
||||
- `mageia` (Mageia)
|
||||
- `manjaro` (Manjaro)
|
||||
- `mxlinux` (MX Linux)
|
||||
|
@ -220,6 +221,7 @@ Further information is available from the project
|
|||
- `popos` (Pop!\_OS)
|
||||
- `porteus` (Porteus)
|
||||
- `primtux` (PrimTux)
|
||||
- `proxmox-ve` (Proxmox VE)
|
||||
- `pureos` (PureOS)
|
||||
- `reactos` (ReactOS)
|
||||
- `rebornos` (RebornOS)
|
||||
|
|
10
flake.lock
10
flake.lock
|
@ -16,12 +16,12 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1735264675,
|
||||
"narHash": "sha256-MgdXpeX2GuJbtlBrH9EdsUeWl/yXEubyvxM1G+yO4Ak=",
|
||||
"rev": "d49da4c08359e3c39c4e27c74ac7ac9b70085966",
|
||||
"revCount": 712007,
|
||||
"lastModified": 1756217674,
|
||||
"narHash": "sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo=",
|
||||
"rev": "4e7667a90c167f7a81d906e5a75cba4ad8bee620",
|
||||
"revCount": 808864,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.712007%2Brev-d49da4c08359e3c39c4e27c74ac7ac9b70085966/01940ca0-b117-7d0e-b1ef-d579ee6d2f13/source.tar.gz"
|
||||
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808864%2Brev-4e7667a90c167f7a81d906e5a75cba4ad8bee620/0198eaa3-105a-74fa-a9b2-0a930acea8de/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
schemas = flake-schemas.schemas;
|
||||
|
||||
# Define overlays for each supported system
|
||||
overlays = forEachSupportedSystem ({pkgs, system, ...}: {
|
||||
overlays = {
|
||||
default = final: prev: {
|
||||
quickemu = final.callPackage ./package.nix { };
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
# Define packages for each supported system
|
||||
packages = forEachSupportedSystem ({pkgs, system, ...}: rec {
|
||||
|
|
39
quickemu
39
quickemu
|
@ -395,6 +395,16 @@ function configure_cpu() {
|
|||
fi
|
||||
fi
|
||||
|
||||
# SMM is also required for Linux guests when Secure Boot is enabled
|
||||
if [ "${secureboot}" == "on" ]; then
|
||||
if [ "${guest_os}" == "linux" ]; then
|
||||
# SMM is not available on QEMU for macOS via Homebrew
|
||||
if [ "${OS_KERNEL}" == "Linux" ]; then
|
||||
SMM="on"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
case ${guest_os} in
|
||||
batocera|freedos|haiku|solaris) MACHINE_TYPE="pc";;
|
||||
kolibrios|reactos)
|
||||
|
@ -414,7 +424,7 @@ function configure_cpu() {
|
|||
# A CPU with fma is required for Metal support
|
||||
# A CPU with invtsc is required for macOS to boot
|
||||
case ${macos_release} in
|
||||
ventura|sonoma)
|
||||
ventura|sonoma|sequoia)
|
||||
# A CPU with AVX2 support is required for >= macOS Ventura
|
||||
if check_cpu_flag sse4_2 && check_cpu_flag avx2; then
|
||||
if [ "${HOST_CPU_VENDOR}" != "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then
|
||||
|
@ -663,8 +673,8 @@ function configure_bios() {
|
|||
if [ -n "${EFI_CODE}" ] || [ ! -e "${EFI_CODE}" ]; then
|
||||
case ${secureboot} in
|
||||
on) # shellcheck disable=SC2054,SC2140
|
||||
ovmfs=("${SHARE_PATH}/OVMF/OVMF_CODE_4M.secboot.fd","${SHARE_PATH}/OVMF/OVMF_VARS_4M.fd" \
|
||||
"${SHARE_PATH}/edk2/ovmf/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2/ovmf/OVMF_VARS.fd" \
|
||||
ovmfs=("${SHARE_PATH}/OVMF/OVMF_CODE_4M.secboot.fd","${SHARE_PATH}/OVMF/OVMF_VARS_4M.ms.fd" \
|
||||
"${SHARE_PATH}/edk2/ovmf/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2/ovmf/OVMF_VARS.secboot.fd" \
|
||||
"${SHARE_PATH}/OVMF/x64/OVMF_CODE.secboot.fd","${SHARE_PATH}/OVMF/x64/OVMF_VARS.fd" \
|
||||
"${SHARE_PATH}/edk2-ovmf/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2-ovmf/OVMF_VARS.fd" \
|
||||
"${SHARE_PATH}/qemu/ovmf-x86_64-smm-ms-code.bin","${SHARE_PATH}/qemu/ovmf-x86_64-smm-ms-vars.bin" \
|
||||
|
@ -742,7 +752,7 @@ function configure_bios() {
|
|||
|
||||
function configure_os_quirks() {
|
||||
|
||||
if [ "${guest_os}" == "batocera" ] || [ "${guest_os}" == "freedos" ] || [ "${guest_os}" == "haiku" ] || [ "${guest_os}" == "kolibrios" ]; then
|
||||
if [ "${guest_os}" == "batocera" ] || [ "${guest_os}" == "haiku" ] || [ "${guest_os}" == "kolibrios" ]; then
|
||||
NET_DEVICE="rtl8139"
|
||||
fi
|
||||
|
||||
|
@ -753,7 +763,8 @@ function configure_os_quirks() {
|
|||
case ${guest_os} in
|
||||
windows-server) NET_DEVICE="e1000";;
|
||||
*bsd|linux*|windows) NET_DEVICE="virtio-net";;
|
||||
freedos) sound_card="sb16";;
|
||||
freedos) sound_card="sb16"
|
||||
NET_DEVICE="pcnet";;
|
||||
*solaris) usb_controller="xhci"
|
||||
sound_card="ac97";;
|
||||
reactos) NET_DEVICE="e1000"
|
||||
|
@ -766,7 +777,7 @@ function configure_os_quirks() {
|
|||
# * VirtIO Memory Balloning is supported since Big Sur (https://pmhahn.github.io/virtio-balloon/)
|
||||
# * VirtIO RNG is supported since Big Sur, but exposed to all guests by default.
|
||||
case ${macos_release} in
|
||||
big-sur|monterey|ventura|sonoma)
|
||||
big-sur|monterey|ventura|sonoma|sequoia)
|
||||
BALLOON="-device virtio-balloon"
|
||||
MAC_DISK_DEV="virtio-blk-pci"
|
||||
NET_DEVICE="virtio-net"
|
||||
|
@ -882,7 +893,12 @@ function configure_storage() {
|
|||
function configure_display() {
|
||||
# Determine which audio driver use between Pulseaudio or ALSA
|
||||
local AUDIO_DRIVER="pa"
|
||||
if ! command -v pacmd >/dev/null 2>&1 ; then
|
||||
if pidof pipewire >/dev/null 2>&1; then
|
||||
# QEMU's pipewire audio backend was added in version 8.1
|
||||
if [ "${QEMU_VER_SHORT}" -ge 81 ]; then
|
||||
AUDIO_DRIVER="pipewire"
|
||||
fi
|
||||
elif ! pidof pulseaudio >/dev/null 2>&1; then
|
||||
AUDIO_DRIVER="alsa"
|
||||
fi
|
||||
|
||||
|
@ -1182,6 +1198,8 @@ function vm_boot() {
|
|||
# Set the hostname of the VM
|
||||
NET="user,hostname=${VMNAME}"
|
||||
|
||||
echo "#!/usr/bin/env bash" > "${VMDIR}/${VMNAME}.sh"
|
||||
|
||||
configure_cpu
|
||||
configure_ram
|
||||
configure_bios
|
||||
|
@ -1194,8 +1212,6 @@ function vm_boot() {
|
|||
configure_usb
|
||||
configure_tpm
|
||||
|
||||
echo "#!/usr/bin/env bash" > "${VMDIR}/${VMNAME}.sh"
|
||||
|
||||
# Changing process name is not supported on macOS
|
||||
if [ "${OS_KERNEL}" == "Linux" ]; then
|
||||
# shellcheck disable=SC2054,SC2206,SC2140
|
||||
|
@ -1914,7 +1930,7 @@ VMPATH=""
|
|||
# shellcheck disable=SC2155
|
||||
readonly LAUNCHER=$(basename "${0}")
|
||||
readonly DISK_MIN_SIZE=$((197632 * 8))
|
||||
readonly VERSION="4.9.7"
|
||||
readonly VERSION="4.9.8"
|
||||
|
||||
# TODO: Make this run the native architecture binary
|
||||
ARCH_VM="x86_64"
|
||||
|
@ -1938,7 +1954,8 @@ if [ "${OS_KERNEL}" == "Darwin" ]; then
|
|||
fi
|
||||
|
||||
QEMU_VER_LONG=$(${QEMU_IMG} --version | head -n 1 | awk '{print $3}')
|
||||
QEMU_VER_SHORT=$(echo "${QEMU_VER_LONG//./}" | cut -c1-2)
|
||||
# strip patch version and remove dots. 6.0.0 => 60 / 10.0.0 => 100
|
||||
QEMU_VER_SHORT=$(echo "${QEMU_VER_LONG%.*}" | sed 's/\.//g')
|
||||
if [ "${QEMU_VER_SHORT}" -lt 60 ]; then
|
||||
echo "ERROR! QEMU 6.0.0 or newer is required, detected ${QEMU_VER_LONG}."
|
||||
exit 1
|
||||
|
|
186
quickget
186
quickget
|
@ -5,6 +5,9 @@
|
|||
# shellcheck disable=SC2317
|
||||
export LC_ALL=C
|
||||
|
||||
# Detect host OS for checksum tool compatibility
|
||||
HOST_OS=$(uname -s)
|
||||
|
||||
function cleanup() {
|
||||
if [ -n "$(jobs -p)" ]; then
|
||||
kill "$(jobs -p)" 2>/dev/null
|
||||
|
@ -78,6 +81,7 @@ function os_info() {
|
|||
opensuse) INFO="openSUSE|-|https://www.opensuse.org/|The makers choice for sysadmins, developers and desktop users.";;
|
||||
oraclelinux) INFO="Oracle Linux|-|https://www.oracle.com/linux/|Linux with everything required to deploy, optimize, and manage applications on-premises, in the cloud, and at the edge.";;
|
||||
parrotsec) INFO="Parrot Security|parrot:parrot|https://www.parrotsec.org/|Provides a huge arsenal of tools, utilities and libraries that IT and security professionals can use to test and assess the security of their assets in a reliable, compliant and reproducible way.";;
|
||||
pclinuxos) INFO="PCLinuxOS|-|https://www.pclinuxos.com/|PCLinuxOS is a free easy to use Linux-based Operating System for x86_64 desktops or laptops.";;
|
||||
peppermint) INFO="PeppermintOS|-|https://peppermintos.com/|Provides a user with the opportunity to build the system that best fits their needs. While at the same time providing a functioning OS with minimum hassle out of the box.";;
|
||||
popos) INFO="Pop!_OS|-|https://pop.system76.com/|Operating system for STEM and creative professionals who use their computer as a tool to discover and create.";;
|
||||
porteus) INFO="Porteus|-|http://www.porteus.org/|Complete linux operating system that is optimized to run from CD, USB flash drive, hard drive, or other bootable storage media.";;
|
||||
|
@ -97,7 +101,7 @@ function os_info() {
|
|||
spirallinux) INFO="SpiralLinux|-|https://spirallinux.github.io/|Selection of Linux spins built from Debian GNU/Linux, with a focus on simplicity and out-of-the-box usability across all the major desktop environments.";;
|
||||
tails) INFO="Tails|-|https://tails.net/|Portable operating system that protects against surveillance and censorship.";;
|
||||
tinycore) INFO="Tiny Core Linux|-|http://www.tinycorelinux.net/|Highly modular based system with community build extensions.";;
|
||||
trisquel) INFO="Trisquel-|https://trisquel.info/|Fully free operating system for home users, small enterprises and educational centers.";;
|
||||
trisquel) INFO="Trisquel|-|https://trisquel.info/|Fully free operating system for home users, small enterprises and educational centers.";;
|
||||
truenas-core) INFO="TrueNAS Core|-|https://www.truenas.com/truenas-core/|World’s most popular storage OS because it gives you the power to build your own professional-grade storage system to use in a variety of data-intensive applications without any software costs.";;
|
||||
truenas-scale) INFO="TrueNAS Scale|-|https://www.truenas.com/truenas-scale/|Open Source Hyperconverged Infrastructure (HCI) solution. In addition to powerful scale-out storage capabilities, SCALE adds Linux Containers and VMs (KVM) so apps run closer to data.";;
|
||||
tuxedo-os) INFO="Tuxedo OS|-|https://www.tuxedocomputers.com/en/|KDE Ubuntu LTS designed to go with their Linux hardware.";;
|
||||
|
@ -146,7 +150,7 @@ function error_specify_os() {
|
|||
}
|
||||
|
||||
function os_supported() {
|
||||
if [[ ! "$(os_support)" =~ ${OS} ]]; then
|
||||
if [[ ! " $(os_support) " =~ \ "${OS}"\ ]]; then
|
||||
echo -e "ERROR! ${OS} is not a supported OS.\n"
|
||||
os_support | fmt -w 80
|
||||
exit 1
|
||||
|
@ -185,7 +189,7 @@ function error_specify_release() {
|
|||
}
|
||||
|
||||
function error_not_supported_release() {
|
||||
if [[ ! "${RELEASES[*]}" =~ ${RELEASE} ]]; then
|
||||
if [[ ! " ${RELEASES[*]} " =~ \ "${RELEASE}"\ ]]; then
|
||||
echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release.\n"
|
||||
echo -n ' - Supported releases: '
|
||||
"releases_${OS}"
|
||||
|
@ -209,6 +213,17 @@ function error_not_supported_argument() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
function is_valid_language() {
|
||||
local I18N=""
|
||||
local PASSED_I18N="${1}"
|
||||
for I18N in "${I18NS[@]}"; do
|
||||
if [[ "${I18N}" == "${PASSED_I18N}" ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
function handle_missing() {
|
||||
# Handle odd missing Fedora combinations
|
||||
case "${OS}" in
|
||||
|
@ -460,6 +475,7 @@ function os_support() {
|
|||
opensuse \
|
||||
oraclelinux \
|
||||
parrotsec \
|
||||
pclinuxos \
|
||||
peppermint \
|
||||
popos \
|
||||
porteus \
|
||||
|
@ -545,9 +561,7 @@ function releases_archlinux() {
|
|||
|
||||
function releases_arcolinux() {
|
||||
#shellcheck disable=SC2046,SC2005
|
||||
# breaking change in v24.05
|
||||
# v24.05.1 is the first release with the new naming scheme and too complex to parse old and new so just show the new
|
||||
echo $(web_pipe "https://mirror.accum.se/mirror/arcolinux.info/iso/" | grep -o -E -e "v24.0[5-9].[[:digit:]]{2}" -e "v24.1[0-2].[[:digit:]]{2}" | sort -ru | head -n 5)
|
||||
echo $(web_pipe "https://ant.seedhost.eu/arcolinux/iso/" | grep -o -E -e "v[[:digit:]]{2}.[[:digit:]]{2}.[[:digit:]]{2}" | sort -ru | head -n 5)
|
||||
}
|
||||
|
||||
function editions_arcolinux() {
|
||||
|
@ -579,7 +593,7 @@ function releases_bazzite() {
|
|||
}
|
||||
|
||||
function editions_bazzite() {
|
||||
echo gnome kde
|
||||
echo gnome plasma deck-gnome deck-plasma
|
||||
}
|
||||
|
||||
function releases_biglinux() {
|
||||
|
@ -732,7 +746,7 @@ function editions_freebsd() {
|
|||
}
|
||||
|
||||
function releases_freedos() {
|
||||
echo 1.3 1.2
|
||||
echo 1.4 1.3 1.2
|
||||
}
|
||||
|
||||
function releases_garuda() {
|
||||
|
@ -802,7 +816,7 @@ function releases_linuxlite() {
|
|||
}
|
||||
|
||||
function releases_linuxmint() {
|
||||
echo 22 21.3 21.2 21.1 21 20.3 20.2
|
||||
echo 22.1 22 21.3 21.2 21.1 21 20.3 20.2
|
||||
}
|
||||
|
||||
function editions_linuxmint() {
|
||||
|
@ -822,7 +836,7 @@ function releases_maboxlinux() {
|
|||
}
|
||||
|
||||
function releases_macos() {
|
||||
echo mojave catalina big-sur monterey ventura sonoma
|
||||
echo mojave catalina big-sur monterey ventura sonoma sequoia
|
||||
}
|
||||
|
||||
function releases_mageia() {
|
||||
|
@ -843,7 +857,7 @@ function releases_manjaro() {
|
|||
|
||||
function releases_mxlinux() {
|
||||
# needs header, so not web_pipe:
|
||||
curl -Ils "https://sourceforge.net/projects/mx-linux/files/latest/download" | grep -i 'location:' | cut -d? -f1 | cut -d_ -f1 | cut -d- -f3
|
||||
curl --disable -Ils "https://sourceforge.net/projects/mx-linux/files/latest/download" | grep -i 'location:' | cut -d? -f1 | cut -d_ -f1 | cut -d- -f3
|
||||
}
|
||||
|
||||
function editions_mxlinux() {
|
||||
|
@ -865,13 +879,13 @@ function releases_nitrux() {
|
|||
}
|
||||
|
||||
function releases_nixos() {
|
||||
# Lists unstable plus the two most recent releases
|
||||
# Lists unstable plus the most recent release
|
||||
#shellcheck disable=SC2046
|
||||
echo unstable $(web_pipe "https://nix-channels.s3.amazonaws.com/?delimiter=/" | grep -o -E 'nixos-[[:digit:]]+\.[[:digit:]]+' | cut -d- -f2 | sort -nru | head -n +2)
|
||||
echo unstable $(web_pipe "https://nix-channels.s3.amazonaws.com/?delimiter=/" | grep -o -E 'nixos-[[:digit:]]+\.[[:digit:]]+' | cut -d- -f2 | sort -nru | head -n +1)
|
||||
}
|
||||
|
||||
function editions_nixos() {
|
||||
echo minimal plasma gnome
|
||||
echo minimal graphical
|
||||
}
|
||||
|
||||
function releases_nwg-shell() {
|
||||
|
@ -886,7 +900,9 @@ function releases_openbsd() {
|
|||
|
||||
function releases_openindiana() {
|
||||
#shellcheck disable=SC2046,SC2005
|
||||
echo $(web_pipe "https://dlc.openindiana.org/isos/hipster/" | grep link | cut -d'/' -f 1 | cut -d '"' -f4 | sort -r | tail -n +2 | head -n 5)
|
||||
#echo $(web_pipe "https://dlc.openindiana.org/isos/hipster/" | grep link | cut -d'/' -f 1 | cut -d '"' -f4 | sort -r | tail -n +2 | head -n 5)
|
||||
echo $(web_pipe "https://dlc.openindiana.org/isos/hipster/" | grep 'href="./2' | cut -d'/' -f 2 | sort -r | head -n 5)
|
||||
|
||||
}
|
||||
|
||||
function editions_openindiana() {
|
||||
|
@ -904,13 +920,22 @@ function releases_oraclelinux() {
|
|||
|
||||
function releases_parrotsec() {
|
||||
#shellcheck disable=SC2046,SC2005
|
||||
echo $(web_pipe "https://download.parrot.sh/parrot/iso/" | grep -o -E 'href="[[:digit:]]\.[[:digit:]]+' | sort -nr | head -n 3 | cut -d\" -f 2 )
|
||||
echo $(web_pipe "https://deb.parrot.sh/parrot/iso/" | grep -o -E 'href="([[:digit:]]+\.)+[[:digit:]]+/' | sort -nr | head -n 3 | cut -d\" -f 2 | cut -d'/' -f 1)
|
||||
}
|
||||
|
||||
function editions_parrotsec() {
|
||||
echo home htb security
|
||||
}
|
||||
|
||||
function releases_pclinuxos() {
|
||||
# shellcheck disable=SC2046
|
||||
echo $(web_pipe "https://ftp.fau.de/pclinuxos/pclinuxos/iso" | grep -oP 'pclinuxos64-\K[^\-]+-\K[0-9]+\.[0-9]+' | head -n 1)
|
||||
}
|
||||
|
||||
function editions_pclinuxos() {
|
||||
echo kde kde-darkstar mate xfce
|
||||
}
|
||||
|
||||
function releases_peppermint() {
|
||||
echo latest
|
||||
}
|
||||
|
@ -979,7 +1004,8 @@ function releases_siduction() {
|
|||
|
||||
function editions_siduction() {
|
||||
#shellcheck disable=SC2046,SC2005
|
||||
echo $(web_pipe "https://mirror.math.princeton.edu/pub/siduction/iso/Standing_on_the_Shoulders_of_Giants/" | grep folder | cut -d'"' -f8 | tr -d '/' | sort -u)
|
||||
NAME=$(web_pipe "https://mirror.math.princeton.edu/pub/siduction/iso/" | grep folder | cut -d'"' -f8 | tr -d '/')
|
||||
web_pipe "https://mirror.math.princeton.edu/pub/siduction/iso/${NAME}/" | grep folder | cut -d'"' -f8 | tr -d '/' | sort -u
|
||||
}
|
||||
|
||||
function releases_slackware() {
|
||||
|
@ -1011,7 +1037,7 @@ function releases_solus() {
|
|||
|
||||
function editions_solus() {
|
||||
#shellcheck disable=SC2046,SC2005
|
||||
echo $(web_pipe_json "https://downloads.getsol.us/isos/$(releases_solus | tail -n1)/" | jq -r '.[].name | sub("Solus-(?<e>.*)-Release-.*"; "\(.e)")' | sort -u)
|
||||
echo $(web_pipe_json "https://downloads.getsol.us/isos/$(IFS=' '; releases_solus | tail -n1)/" | jq -r '.[].name | select(endswith("iso")) | sub("Solus-(?<e>.*)-Release-.*"; "\(.e)")' | sort -u)
|
||||
}
|
||||
|
||||
function releases_sparkylinux() {
|
||||
|
@ -1169,6 +1195,17 @@ function check_hash() {
|
|||
*) echo "WARNING! Can't guess hash algorithm, not checking ${iso} hash."
|
||||
return;;
|
||||
esac
|
||||
|
||||
# Use GNU coreutils on macOS/Darwin (prefixed with 'g')
|
||||
if [ "${HOST_OS}" = "Darwin" ]; then
|
||||
case ${hash_algo} in
|
||||
md5sum) hash_algo=gmd5sum;;
|
||||
sha1sum) hash_algo=gsha1sum;;
|
||||
sha256sum) hash_algo=gsha256sum;;
|
||||
sha512sum) hash_algo=gsha512sum;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo -n "Checking ${iso} with ${hash_algo}... "
|
||||
if ! echo "${hash} ${iso}" | ${hash_algo} --check --status; then
|
||||
echo "ERROR!"
|
||||
|
@ -1181,12 +1218,12 @@ function check_hash() {
|
|||
|
||||
# Download a file from the web and pipe it to stdout
|
||||
function web_pipe() {
|
||||
curl --silent --location "${1}"
|
||||
curl --disable --silent --location "${1}"
|
||||
}
|
||||
|
||||
# Download a JSON file from the web and pipe it to stdout
|
||||
function web_pipe_json() {
|
||||
curl --silent --location --header "Accept: application/json" "${1}"
|
||||
curl --disable --silent --location --header "Accept: application/json" "${1}"
|
||||
}
|
||||
|
||||
# Download a file from the web
|
||||
|
@ -1237,9 +1274,10 @@ function web_get() {
|
|||
if [[ ${OS} != windows && ${OS} != macos && ${OS} != windows-server ]]; then
|
||||
echo "Downloading $(pretty_name "${OS}") ${RELEASE} ${EDITION}"
|
||||
echo "- URL: ${URL}"
|
||||
echo "- PATH: ${PWD}/${DIR}/${FILE}"
|
||||
fi
|
||||
|
||||
if ! curl --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" -- "${URL}"; then
|
||||
if ! curl --disable --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" -- "${URL}"; then
|
||||
echo "ERROR! Failed to download ${URL} with curl."
|
||||
rm -f "${DIR}/${FILE}"
|
||||
fi
|
||||
|
@ -1251,7 +1289,7 @@ function web_redirect() {
|
|||
local URL="${1}"
|
||||
# Check for URL redirections
|
||||
# Output to nonexistent directory so the download fails fast
|
||||
REDIRECT_URL=$(curl --silent --location --fail --write-out '%{url_effective}' --output /var/cache/${RANDOM}/${RANDOM} "${URL}" )
|
||||
REDIRECT_URL=$(curl --disable --silent --location --fail --write-out '%{url_effective}' --output /var/cache/${RANDOM}/${RANDOM} "${URL}" )
|
||||
if [ "${REDIRECT_URL}" != "${URL}" ]; then
|
||||
echo "${REDIRECT_URL}"
|
||||
else
|
||||
|
@ -1272,7 +1310,7 @@ function web_check() {
|
|||
shift
|
||||
fi
|
||||
done
|
||||
curl --silent --location --head --output /dev/null --fail --connect-timeout 30 --max-time 30 --retry 3 "${HEADERS[@]}" "${URL}"
|
||||
curl --disable --silent --location --head --output /dev/null --fail --connect-timeout 30 --max-time 30 --retry 3 "${HEADERS[@]}" "${URL}"
|
||||
}
|
||||
|
||||
function zsync_get() {
|
||||
|
@ -1590,7 +1628,7 @@ function get_archcraft() {
|
|||
function get_archlinux() {
|
||||
local HASH=""
|
||||
local ISO=""
|
||||
local URL="https://mirror.rackspace.com/archlinux"
|
||||
local URL="https://geo.mirror.pkgbuild.com/"
|
||||
ISO=$(web_pipe "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].iso_url')
|
||||
HASH=$(web_pipe "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].sha256_sum')
|
||||
echo "${URL}${ISO} ${HASH}"
|
||||
|
@ -1600,7 +1638,7 @@ function get_arcolinux() {
|
|||
local HASH=""
|
||||
local ISO=""
|
||||
local URL=""
|
||||
URL="https://mirror.accum.se/mirror/arcolinux.info/iso/${RELEASE}"
|
||||
URL="https://ant.seedhost.eu/arcolinux/iso/${RELEASE}"
|
||||
ISO="arco${EDITION}-${RELEASE}-x86_64.iso"
|
||||
HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1)
|
||||
echo "${URL}/${ISO} ${HASH}"
|
||||
|
@ -1636,8 +1674,10 @@ function get_bazzite() {
|
|||
local ISO=""
|
||||
local URL="https://download.bazzite.gg"
|
||||
case ${EDITION} in
|
||||
gnome) ISO="bazzite-gnome-stable.iso";;
|
||||
kde) ISO="bazzite-stable.iso";;
|
||||
gnome) ISO="bazzite-gnome-stable-amd64.iso";;
|
||||
plasma) ISO="bazzite-stable-amd64.iso";;
|
||||
deck-gnome) ISO="bazzite-deck-gnome-stable-amd64.iso";;
|
||||
deck-plasma) ISO="bazzite-deck-stable-amd64.iso";;
|
||||
esac
|
||||
HASH=$(web_pipe "${URL}/${ISO}-CHECKSUM" | cut -d' ' -f1)
|
||||
echo "${URL}/${ISO} ${HASH}"
|
||||
|
@ -1835,21 +1875,28 @@ function get_fedora() {
|
|||
local URL=""
|
||||
local VARIANT=""
|
||||
case ${EDITION} in
|
||||
Server|Kinoite|Onyx|Silverblue|Sericea|Workstation) VARIANT="${EDITION}";;
|
||||
Server|Kinoite|Onyx|Silverblue|Sericea|Workstation|KDE) VARIANT="${EDITION}";;
|
||||
*) VARIANT="Spins";;
|
||||
esac
|
||||
# Handle KDE as a proper edition from 42 but a spin prior to 42
|
||||
# Stripping eventual _Beta suffix from the RELEASE variable in the check
|
||||
if [[ "${VARIANT}" == "KDE" && "${RELEASE/_Beta/}" -lt 42 ]]; then
|
||||
VARIANT="Spins"
|
||||
fi
|
||||
# The naming of 41 Beta with a space is problematic so we replaced it with an underscore
|
||||
# but we need to convert it back to a space for the URL search in the JSON
|
||||
#shellcheck disable=SC2086
|
||||
# if RELEASE contains an underscore, replace it with a space
|
||||
if [[ "${RELEASE}" == *"_"* ]]; then
|
||||
if [[ "${RELEASE}" == *"_"* ]]; then
|
||||
RELEASE="${RELEASE/_/ }"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
JSON=$(web_pipe "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'" and (.link | endswith(".iso")))')
|
||||
# Fedora may promote variants from Spins to Editions, in which case we want to accept either "Spins" or the specific edition name to preserve backwards compatibility
|
||||
# For example, Fedora 42 KDE is now an edition, while previous releases are spins
|
||||
JSON=$(web_pipe "https://getfedora.org/releases.json" | jq '.[] | select((.variant=="'"${VARIANT}"'" or .variant=="'"${EDITION}"'") and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'" and (.link | endswith(".iso")))')
|
||||
URL=$(echo "${JSON}" | jq -r '.link' | head -n1)
|
||||
HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1)
|
||||
echo "${URL} ${HASH}"
|
||||
|
@ -1866,11 +1913,17 @@ function get_freebsd() {
|
|||
function get_freedos() {
|
||||
local HASH=""
|
||||
local ISO=""
|
||||
local URL="https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/${RELEASE}/official"
|
||||
local BASE_URL="https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/${RELEASE}"
|
||||
local URL=""
|
||||
case ${RELEASE} in
|
||||
1.2) ISO="FD12CD.iso"
|
||||
1.2) URL="${BASE_URL}/official"
|
||||
ISO="FD12CD.iso"
|
||||
HASH=$(web_pipe "${URL}/FD12.sha" | grep "${ISO}" | cut -d' ' -f1);;
|
||||
1.3) ISO="FD13-LiveCD.zip"
|
||||
1.3) URL="${BASE_URL}/official"
|
||||
ISO="FD13-LiveCD.zip"
|
||||
HASH=$(web_pipe "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut -d' ' -f1);;
|
||||
1.4) URL="${BASE_URL}"
|
||||
ISO="FD14-LiveCD.zip"
|
||||
HASH=$(web_pipe "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut -d' ' -f1);;
|
||||
esac
|
||||
echo "${URL}/${ISO} ${HASH}"
|
||||
|
@ -2062,6 +2115,8 @@ function get_macos() {
|
|||
ventura|13)
|
||||
BOARD_ID="Mac-BE088AF8C5EB4FA2";;
|
||||
sonoma|14)
|
||||
BOARD_ID="Mac-827FAC58A8FDFA22";;
|
||||
sequoia|15)
|
||||
BOARD_ID="Mac-53FDB3D8DB8CA971";;
|
||||
*) echo "ERROR! Unknown release: ${RELEASE}"
|
||||
releases_macos
|
||||
|
@ -2075,10 +2130,10 @@ function get_macos() {
|
|||
CHUNKCHECK="$(command -v chunkcheck)"
|
||||
fi
|
||||
|
||||
appleSession=$(curl -v -H "Host: osrecovery.apple.com" \
|
||||
appleSession=$(curl --disable -v -H "Host: osrecovery.apple.com" \
|
||||
-H "Connection: close" \
|
||||
-A "InternetRecovery/1.0" https://osrecovery.apple.com/ 2>&1 | tr ';' '\n' | awk -F'session=|;' '{print $2}' | grep 1)
|
||||
info=$(curl -s -X POST -H "Host: osrecovery.apple.com" \
|
||||
info=$(curl --disable -s -X POST -H "Host: osrecovery.apple.com" \
|
||||
-H "Connection: close" \
|
||||
-A "InternetRecovery/1.0" \
|
||||
-b "session=\"${appleSession}\"" \
|
||||
|
@ -2213,16 +2268,6 @@ function get_nitrux() {
|
|||
|
||||
function get_nixos() {
|
||||
local HASH=""
|
||||
# Adapt the plasma edition according to the NixOS release
|
||||
case "${EDITION}" in
|
||||
plasma)
|
||||
if [ "${RELEASE}" == "23.11" ]; then
|
||||
EDITION+="5"
|
||||
else
|
||||
EDITION+="6"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
local ISO="latest-nixos-${EDITION}-x86_64-linux.iso"
|
||||
local URL="https://channels.nixos.org/nixos-${RELEASE}"
|
||||
HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1)
|
||||
|
@ -2303,6 +2348,21 @@ function get_parrotsec() {
|
|||
echo "${URL}/${ISO} ${HASH}"
|
||||
}
|
||||
|
||||
function get_pclinuxos() {
|
||||
case ${EDITION} in
|
||||
mate) RELEASE="${RELEASE//./-}";;
|
||||
# in case an edition is added that uses the mate style and sorts higher
|
||||
kde|kde-darkstar) RELEASE="${RELEASE//-/.}";;
|
||||
xfce) RELEASE="${RELEASE//-/.}";;
|
||||
*) ;;
|
||||
esac
|
||||
# shellcheck disable=SC2155
|
||||
local HASH="$(web_pipe "${URL}/pclinuxos64-${EDITION}-${RELEASE}.md5sum" | head -c 32)"
|
||||
local ISO="pclinuxos64-${EDITION}-${RELEASE}.iso"
|
||||
local URL="https://ftp.fau.de/pclinuxos/pclinuxos/iso"
|
||||
echo "${URL}/${ISO} ${HASH}"
|
||||
}
|
||||
|
||||
function get_peppermint() {
|
||||
local HASH=""
|
||||
local ISO=""
|
||||
|
@ -2415,10 +2475,14 @@ function get_siduction() {
|
|||
local HASH=""
|
||||
local DATE=""
|
||||
local ISO=""
|
||||
local URL="https://mirrors.dotsrc.org/siduction/iso/Standing_on_the_Shoulders_of_Giants/${EDITION}"
|
||||
local NAME=""
|
||||
local URL=""
|
||||
NAME=$(web_pipe "https://mirror.math.princeton.edu/pub/siduction/iso/" | grep folder | cut -d'"' -f8 | tr -d '/')
|
||||
URL="https://mirrors.dotsrc.org/siduction/iso/${NAME}/${EDITION}"
|
||||
DATE=$(web_pipe "${URL}"| grep .iso.md5 | cut -d'-' -f6 | cut -d'.' -f1)
|
||||
HASH=$(web_pipe "${URL}/${ISO}.md5" | cut -d' ' -f1)
|
||||
ISO="siduction-2023.1.1-Standing_on_the_Shoulders_of_Giants-${EDITION}-amd64-${DATE}.iso"
|
||||
VERSION=$(web_pipe "${URL}"| grep .iso.md5 | cut -d'-' -f2)
|
||||
ISO="siduction-${VERSION}-${NAME}-${EDITION}-amd64-${DATE}.iso"
|
||||
echo "${URL}/${ISO} ${HASH}"
|
||||
}
|
||||
|
||||
|
@ -2575,11 +2639,11 @@ function get_ubuntu-server() {
|
|||
esac
|
||||
|
||||
if web_check "${URL}/SHA256SUMS"; then
|
||||
DATA=$(web_pipe "${URL}/SHA256SUMS" | grep "${NAME}" | grep amd64 | grep iso)
|
||||
DATA=$(web_pipe "${URL}/SHA256SUMS" | grep "${NAME}" | grep amd64 | grep iso | tail -n 1 )
|
||||
ISO=$(cut -d'*' -f2 <<<"${DATA}")
|
||||
HASH=$(cut -d' ' -f1 <<<"${DATA}")
|
||||
else
|
||||
DATA=$(web_pipe "${URL}/MD5SUMS" | grep "${NAME}" | grep amd64 | grep iso)
|
||||
DATA=$(web_pipe "${URL}/MD5SUMS" | grep "${NAME}" | grep amd64 | grep iso | tail -n 1 )
|
||||
ISO=$(cut -d' ' -f3 <<<"${DATA}")
|
||||
HASH=$(cut -d' ' -f1 <<<"${DATA}")
|
||||
fi
|
||||
|
@ -2619,11 +2683,11 @@ function get_ubuntu() {
|
|||
URL="https://cdimage.ubuntu.com/${OS}/releases/${RELEASE}/release"
|
||||
fi
|
||||
if web_check "${URL}/SHA256SUMS"; then
|
||||
DATA=$(web_pipe "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac")
|
||||
DATA=$(web_pipe "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac" | tail -n 1 )
|
||||
ISO=$(cut -d'*' -f2 <<<"${DATA}" | sed '1q;d')
|
||||
HASH=$(cut -d' ' -f1 <<<"${DATA}" | sed '1q;d')
|
||||
else
|
||||
DATA=$(web_pipe "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac")
|
||||
DATA=$(web_pipe "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac" | tail -n 1 )
|
||||
ISO=$(cut -d'*' -f2 <<<"${DATA}")
|
||||
HASH=$(cut -d' ' -f1 <<<"${DATA}")
|
||||
fi
|
||||
|
@ -2979,7 +3043,7 @@ web_get https://www.spice-space.org/download/windows/vdagent/vdagent-win-0.10.0/
|
|||
web_get https://www.spice-space.org/download/windows/usbdk/UsbDk_1.0.22_x64.msi "${VM_PATH}/unattended"
|
||||
|
||||
echo "Making unattended.iso"
|
||||
mkisofs -quiet -l -o "${VM_PATH}/unattended.iso" "${VM_PATH}/unattended/"
|
||||
mkisofs -quiet -J -o "${VM_PATH}/unattended.iso" "${VM_PATH}/unattended/"
|
||||
}
|
||||
|
||||
function handle_curl_error() {
|
||||
|
@ -3065,7 +3129,7 @@ function download_windows_server() {
|
|||
local url="https://www.microsoft.com/en-us/evalcenter/download-$windows_version"
|
||||
|
||||
echo " - Parsing download page: ${url}"
|
||||
iso_download_page_html="$(curl --silent --location --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url")" || {
|
||||
iso_download_page_html="$(curl --disable --silent --location --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url")" || {
|
||||
handle_curl_error $?
|
||||
return $?
|
||||
}
|
||||
|
@ -3138,7 +3202,7 @@ function download_windows_server() {
|
|||
# Follow redirect so proceeding log message is useful
|
||||
# This is a request we make this Fido doesn't
|
||||
# We don't need to set "--max-filesize" here because this is a HEAD request and the output is to /dev/null anyway
|
||||
iso_download_link="$(curl --silent --location --output /dev/null --silent --write-out "%{url_effective}" --head --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_download_link")" || {
|
||||
iso_download_link="$(curl --disable --silent --location --output /dev/null --silent --write-out "%{url_effective}" --head --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_download_link")" || {
|
||||
# This should only happen if the Microsoft servers are down
|
||||
handle_curl_error $?
|
||||
return $?
|
||||
|
@ -3187,7 +3251,7 @@ function download_windows_workstation() {
|
|||
# Also, keeping a "$WindowsVersions" array like Fido does would be way too much of a maintenance burden
|
||||
# Remove "Accept" header that curl sends by default
|
||||
echo " - Parsing download page: ${url}"
|
||||
iso_download_page_html="$(curl --silent --user-agent "$user_agent" --header "Accept:" --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url")" || {
|
||||
iso_download_page_html="$(curl --disable --silent --user-agent "$user_agent" --header "Accept:" --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url")" || {
|
||||
handle_curl_error $?
|
||||
return $?
|
||||
}
|
||||
|
@ -3201,7 +3265,7 @@ function download_windows_workstation() {
|
|||
echo " - Permit Session ID: $session_id"
|
||||
# Permit Session ID
|
||||
# "org_id" is always the same value
|
||||
curl --silent --output /dev/null --user-agent "$user_agent" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "https://vlscppe.microsoft.com/tags?org_id=y6jn8c31&session_id=$session_id" || {
|
||||
curl --disable --silent --output /dev/null --user-agent "$user_agent" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "https://vlscppe.microsoft.com/tags?org_id=y6jn8c31&session_id=$session_id" || {
|
||||
# This should only happen if there's been some change to how this API works
|
||||
handle_curl_error $?
|
||||
return $?
|
||||
|
@ -3211,19 +3275,19 @@ function download_windows_workstation() {
|
|||
|
||||
echo -n " - Getting language SKU ID: "
|
||||
# Get language -> skuID association table
|
||||
language_skuid_table_json="$(curl -s --fail --max-filesize 100K --proto =https --tlsv1.2 --http1.1 "https://www.microsoft.com/software-download-connector/api/getskuinformationbyproductedition?profile=${profile}&ProductEditionId=${product_edition_id}&SKU=undefined&friendlyFileName=undefined&Locale=en-US&sessionID=${session_id}")" || {
|
||||
language_skuid_table_json="$(curl --disable -s --fail --max-filesize 100K --proto =https --tlsv1.2 --http1.1 "https://www.microsoft.com/software-download-connector/api/getskuinformationbyproductedition?profile=${profile}&ProductEditionId=${product_edition_id}&SKU=undefined&friendlyFileName=undefined&Locale=en-US&sessionID=${session_id}")" || {
|
||||
handle_curl_error $?
|
||||
return $?
|
||||
}
|
||||
|
||||
sku_id="$(echo "${language_skuid_table_json}" | jq -r '.Skus[] | select(.LocalizedLanguage=="'"${I18N}"'").Id')"
|
||||
sku_id="$(echo "${language_skuid_table_json}" | jq -r '.Skus[] | select(.LocalizedLanguage=="'"${I18N}"'" or .Language=="'"${I18N}"'").Id')"
|
||||
echo "$sku_id"
|
||||
|
||||
echo " - Getting ISO download link..."
|
||||
# Get ISO download link
|
||||
# If any request is going to be blocked by Microsoft it's always this last one (the previous requests always seem to succeed)
|
||||
# --referer: Required by Microsoft servers to allow request
|
||||
iso_download_link_json="$(curl -s --fail --referer "$url" "https://www.microsoft.com/software-download-connector/api/GetProductDownloadLinksBySku?profile=${profile}&productEditionId=undefined&SKU=${sku_id}&friendlyFileName=undefined&Locale=en-US&sessionID=${session_id}")"
|
||||
iso_download_link_json="$(curl --disable -s --fail --referer "$url" "https://www.microsoft.com/software-download-connector/api/GetProductDownloadLinksBySku?profile=${profile}&productEditionId=undefined&SKU=${sku_id}&friendlyFileName=undefined&Locale=en-US&sessionID=${session_id}")"
|
||||
|
||||
local failed=0
|
||||
|
||||
|
@ -3586,7 +3650,7 @@ if [ -n "${2}" ]; then
|
|||
EDITIONS=("$(editions_"${OS}")")
|
||||
if [ -n "${3}" ]; then
|
||||
EDITION="${3}"
|
||||
if [[ ! "${EDITIONS[*]}" = *"${EDITION}"* ]]; then
|
||||
if [[ ! " ${EDITIONS[*]} " =~ \ "${EDITION}"\ ]]; then
|
||||
echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n"
|
||||
echo -n ' - Supported editions: '
|
||||
for EDITION in "${EDITIONS[@]}"; do
|
||||
|
@ -3622,7 +3686,7 @@ if [ -n "${2}" ]; then
|
|||
"languages_${OS}"
|
||||
if [ -n "${3}" ]; then
|
||||
I18N="${3}"
|
||||
if [[ ! "${I18NS[*]}" = *"${I18N}"* ]]; then
|
||||
if ! is_valid_language "${I18N}"; then
|
||||
error_not_supported_lang
|
||||
fi
|
||||
VM_PATH="$(echo "${OS}-${RELEASE}-${I18N// /-}" | tr -d '()')"
|
||||
|
|
Loading…
Reference in New Issue