Compare commits

...

63 Commits

Author SHA1 Message Date
Lorenzo Villani 934ffacdd3 refactor(windows): don't install usbdk 2025-10-17 22:59:22 +01:00
Lorenzo Villani 3bb13330cc fix(windows): load viogpudo after Windows PE pass 2025-10-17 22:33:29 +01:00
Lorenzo Villani 6a34e59f7b fix(windows): remove E:\amd64\w10 from driver search paths
The E:\amd64\w10 directory contains vioscsi and viostor drivers, but
these are already included via E:\vioscsi\w10\amd64 and
E:\viostor\w10\amd64. This duplication causes issues with Windows 11
24H2 and later.
2025-10-17 22:33:29 +01:00
Jeremy Fleischman 68e1eb5382 fix: don't crash if public dir does not exist
On my machine, I do not have a `~/Public` directory, which causes
quickqemu to spit out a warning and then crash:

```console
$ quickemu --vm vm.conf
 - WARNING! Public directory: '/home/jeremy/Public' doesn't exist!
Quickemu 4.9.7 using /nix/store/nk59c14nwf79bafmrsnnhndmpnrlplrv-qemu-10.1.0/bin/qemu-system-x86_64 v10.1.0
...
 - 9P:       On guest: sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=104857600  ~/Public
...
 - Process:  ERROR! Failed to start /nix/store/va3md6gv82fqf7pxbfxd0cd5gfnmnz9f-vm.conf as va3md6gv82fqf7pxbfxd0cd5gfnmnz9f-vm

qemu-system-x86_64: -netdev user,hostname=va3md6gv82fqf7pxbfxd0cd5gfnmnz9f-vm,hostfwd=tcp::22220-:22,smb=/home/jeremy/Public,id=nic: Error accessing shared directory '/home/jeremy/Public': No such file or directory
```

Here's my `vm.conf`. Note how I'm not asking for a public dir:

```
iso="/nix/store/q3j8357dz3kmyjv84wfj4pyn20b65h9l-nixos-minimal-25.11pre-git-x86_64-linux.iso/iso/nixos-minimal-25.11pre-git-x86_64-linux.iso"
```
2025-10-17 21:51:45 +01:00
Alex Haydock aaf00ca76a
fix: Support 4M qcow2 images (#1749)
* Initial changes to support qcow2 firmware
2025-10-17 21:42:24 +01:00
github-actions[bot] 78b938facf
flake.lock: Update (#1681)
Flake lock file updates:

• Updated input 'nixpkgs':
    'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.803882%2Brev-fd487183437963a59ba763c0cc4f27e3447dd6dd/019767cd-a737-7649-ab6d-467a58ba9f92/source.tar.gz?narHash=sha256-mHv/yeUbmL91/TvV95p%2BmBVahm9mdQMJoqaTVTALaFw%3D' (2025-06-12)
  → 'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808864%2Brev-4e7667a90c167f7a81d906e5a75cba4ad8bee620/0198eaa3-105a-74fa-a9b2-0a930acea8de/source.tar.gz?narHash=sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo%3D' (2025-08-26)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-04 02:22:23 +01:00
dependabot[bot] 539b11bbf4 chore(deps): bump amannn/action-semantic-pull-request from 5 to 6
Bumps [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) from 5 to 6.
- [Release notes](https://github.com/amannn/action-semantic-pull-request/releases)
- [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amannn/action-semantic-pull-request/compare/v5...v6)

---
updated-dependencies:
- dependency-name: amannn/action-semantic-pull-request
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 01:20:11 +00:00
Dott. Leonardo Migliorelli 4de41eb836
feat: Homebrew Install for macos Sequoia (#1693)
* added homebrew formulae
* Made the base formulae dynamic on latest release, included the head option to download master
2025-09-02 15:30:01 +01:00
Phil Clifford 4a11725b1e fix: change iso fs for unattended iso
fixes #1621
2025-08-28 12:01:57 +01:00
dependabot[bot] 508822fc90 chore(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-19 00:12:27 +01:00
dependabot[bot] 6d0a09e831 chore(deps): bump DeterminateSystems/flake-checker-action from 10 to 12
Bumps [DeterminateSystems/flake-checker-action](https://github.com/determinatesystems/flake-checker-action) from 10 to 12.
- [Release notes](https://github.com/determinatesystems/flake-checker-action/releases)
- [Commits](https://github.com/determinatesystems/flake-checker-action/compare/v10...v12)

---
updated-dependencies:
- dependency-name: DeterminateSystems/flake-checker-action
  dependency-version: '12'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-19 00:12:22 +01:00
dependabot[bot] 8ebc01bd91 chore(deps): bump DeterminateSystems/update-flake-lock from 25 to 27
Bumps [DeterminateSystems/update-flake-lock](https://github.com/determinatesystems/update-flake-lock) from 25 to 27.
- [Release notes](https://github.com/determinatesystems/update-flake-lock/releases)
- [Commits](https://github.com/determinatesystems/update-flake-lock/compare/v25...v27)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-version: '27'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-19 00:12:15 +01:00
dependabot[bot] ee531af4fb chore(deps): bump DeterminateSystems/nix-installer-action from 17 to 19
Bumps [DeterminateSystems/nix-installer-action](https://github.com/determinatesystems/nix-installer-action) from 17 to 19.
- [Release notes](https://github.com/determinatesystems/nix-installer-action/releases)
- [Commits](https://github.com/determinatesystems/nix-installer-action/compare/v17...v19)

---
updated-dependencies:
- dependency-name: DeterminateSystems/nix-installer-action
  dependency-version: '19'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-19 00:12:05 +01:00
Lorenzo a6367ccb78
fix: Arch Linux Mirror (#1709)
Use official Arch Linux HTTPS server over potentially out of date mirror
2025-08-17 18:02:42 +01:00
Phil Clifford 36082437e1 fix(ubuntu): just get the latest iso as the previous has been removed
They have left references to the  24.04.2 iso in the SHA256SUMS file but removed the iso.
We need to filter out the latest until they tidy up.
2025-08-17 18:00:14 +01:00
Daniel Napora 808caa1e74 fix(Trisquel): Add missing field separator (|) 2025-08-17 16:58:48 +00:00
Liam bd178bb4c3 chore: Document Fedora edition/variant change 2025-07-31 15:09:56 +01:00
Liam f6b36c4ec5 fix: Accept edition as fedora variant 2025-07-31 15:09:56 +01:00
Alan Pope d912402e32 fix(macos) Add support for gnu hash algo 2025-07-29 18:16:31 +00:00
Phil Clifford 58d7c41998 fix: add dependency on new qemu-system-modules-spice for noble onwards 2025-07-29 18:00:47 +00:00
mag37 7d7332a1fc
fix: quickget - Handle Fedora KDE 42 (and up) as edition and not as spin. (#1697) 2025-07-21 19:28:36 +01:00
Kenichi Kamiya e4c2c5cf2b fix(nixos): support only latest 25.05
Previously, edition fallback logic allowed downloading the correct
"graphical" ISO for 25.05 even when specifying "plasma6" or "gnome".
However, the VM_PATH and directory name still used the original edition
(e.g., nixos-25.05-plasma6). Fixing this would require more complicated
changes to the code.

NixOS 24.11 will reach EOL on 2025-06-30, about two weeks from now.
2025-07-07 12:27:34 +01:00
Kenichi Kamiya 91e06a64fd fix(nixos): update editions
- Drop legacy 23.11 support; now only 24.11 or later is allowed
- Fallback to "graphical" edition except 24.11
- Do not display "graphical" edition to users;
  it is not supported in 24.11
2025-07-07 12:27:34 +01:00
TheMuso 9f90d46ea1
feat: Add support for FreeDOS 1.4 (#1678) 2025-06-18 02:45:25 +01:00
dependabot[bot] 6145f685aa chore(deps): bump DeterminateSystems/flake-checker-action from 9 to 10
Bumps [DeterminateSystems/flake-checker-action](https://github.com/determinatesystems/flake-checker-action) from 9 to 10.
- [Release notes](https://github.com/determinatesystems/flake-checker-action/releases)
- [Commits](https://github.com/determinatesystems/flake-checker-action/compare/v9...v10)

---
updated-dependencies:
- dependency-name: DeterminateSystems/flake-checker-action
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-15 13:07:44 +01:00
github-actions[bot] 3d40baa0e4 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.802491%2Brev-7c43f080a7f28b2774f3b3f43234ca11661bf334/01970886-40c4-7b8c-a32f-bb580ba9bcb1/source.tar.gz?narHash=sha256-rqc2RKYTxP3tbjA%2BPB3VMRQNnjesrT0pEofXQTrMsS8%3D' (2025-05-25)
  → 'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.803882%2Brev-fd487183437963a59ba763c0cc4f27e3447dd6dd/019767cd-a737-7649-ab6d-467a58ba9f92/source.tar.gz?narHash=sha256-mHv/yeUbmL91/TvV95p%2BmBVahm9mdQMJoqaTVTALaFw%3D' (2025-06-12)
2025-06-15 13:07:23 +01:00
github-actions[bot] c6c75e6550 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.717837%2Brev-a39ed32a651fdee6842ec930761e31d1f242cb94/0196c53c-7a4e-7500-910f-55c1ddbd2de5/source.tar.gz?narHash=sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5%2BSHJkS5ID/Jo%3D' (2025-05-11)
  → 'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.802491%2Brev-7c43f080a7f28b2774f3b3f43234ca11661bf334/01970886-40c4-7b8c-a32f-bb580ba9bcb1/source.tar.gz?narHash=sha256-rqc2RKYTxP3tbjA%2BPB3VMRQNnjesrT0pEofXQTrMsS8%3D' (2025-05-25)
2025-05-29 11:05:23 +01:00
Liam 0e6be87757 fix(solus): update editions function to find correct editions 2025-05-26 19:22:51 +00:00
Phil Clifford 517ba94203 fix: adapt openindiana release search to updated website 2025-05-25 02:32:19 +00:00
github-actions[bot] 7ad2308fa3 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.717484%2Brev-26245db0cb552047418cfcef9a25da91b222d6c7/01967ace-4a07-717a-a72f-cc60008c3b59/source.tar.gz?narHash=sha256-1rqa/XPSJqJg21BKWjzJZC7yU0l/YTVtjRi0RJmipus%3D' (2025-04-27)
  → 'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.717837%2Brev-a39ed32a651fdee6842ec930761e31d1f242cb94/0196c53c-7a4e-7500-910f-55c1ddbd2de5/source.tar.gz?narHash=sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5%2BSHJkS5ID/Jo%3D' (2025-05-11)
2025-05-22 11:21:57 +01:00
dependabot[bot] 42d81b12bb chore(deps): bump DeterminateSystems/update-flake-lock from 24 to 25
Bumps [DeterminateSystems/update-flake-lock](https://github.com/determinatesystems/update-flake-lock) from 24 to 25.
- [Release notes](https://github.com/determinatesystems/update-flake-lock/releases)
- [Commits](https://github.com/determinatesystems/update-flake-lock/compare/v24...v25)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-version: '25'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-22 11:21:39 +01:00
Lorenzo 2129abf060 Fixed parrotsec urls 2025-05-11 14:24:49 +01:00
github-actions[bot] 0d61c0643e flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.716947%2Brev-26d499fc9f1d567283d5d56fcf367edd815dba1d/01962e50-af41-7ff9-8765-ebb3d39458ba/source.tar.gz?narHash=sha256-FHlSkNqFmPxPJvy%2B6fNLaNeWnF1lZSgqVCl/eWaJRc4%3D' (2025-04-12)
  → 'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.717484%2Brev-26245db0cb552047418cfcef9a25da91b222d6c7/01967ace-4a07-717a-a72f-cc60008c3b59/source.tar.gz?narHash=sha256-1rqa/XPSJqJg21BKWjzJZC7yU0l/YTVtjRi0RJmipus%3D' (2025-04-27)
2025-05-11 14:24:03 +01:00
Steffen Vogel 89fa572c85 fix(nix): Do not use per-system overlays in Flake 2025-05-11 14:23:23 +01:00
dependabot[bot] 45dd058774 chore(deps): bump DeterminateSystems/nix-installer-action from 16 to 17
Bumps [DeterminateSystems/nix-installer-action](https://github.com/determinatesystems/nix-installer-action) from 16 to 17.
- [Release notes](https://github.com/determinatesystems/nix-installer-action/releases)
- [Commits](https://github.com/determinatesystems/nix-installer-action/compare/v16...v17)

---
updated-dependencies:
- dependency-name: DeterminateSystems/nix-installer-action
  dependency-version: '17'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-11 14:22:28 +01:00
spameier f25205f451 fix(quickemu): correctly handle version 10.0.0 of QEMU 2025-05-01 19:17:29 +00:00
Liam 6b51f740a4 feat: Add Bazzite Deck; fix: Correct bazzite filenames 2025-04-17 17:49:05 +00:00
github-actions[bot] ed455b17a6 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.714925%2Brev-f44bd8ca21e026135061a0a57dcf3d0775b67a49/01954925-64dc-774f-8cc1-a596fc29244f/source.tar.gz?narHash=sha256-t%2BVaahjQAWyA%2BCtn2idyo1yxRIYpaDxMgHkgCNiMJa4%3D' (2025-02-26)
  → 'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.716947%2Brev-26d499fc9f1d567283d5d56fcf367edd815dba1d/01962e50-af41-7ff9-8765-ebb3d39458ba/source.tar.gz?narHash=sha256-FHlSkNqFmPxPJvy%2B6fNLaNeWnF1lZSgqVCl/eWaJRc4%3D' (2025-04-12)
2025-04-15 13:21:51 +01:00
Phil Clifford 727708b1ae
fix: handle pclinuxos inconsistent naming (#1629)
* fix: handle inconsistent filenaming

They name releases with a dash for mate and a dot for the others.  No bets on when they notice this and make it consistent.  In case they somehow get a dashed name first swap the dotty ones too.
2025-04-15 13:18:07 +01:00
user20198 0c4e257048
feat: Add PCLinuxOS to quickget (#1610)
* Add PCLinuxOS to quickget


---------

Co-authored-by: Phil Clifford <philclifford@users.noreply.github.com>
2025-04-12 23:07:25 +01:00
TheMuso 910d35f80c
fix: Use the pcnet ethernet device for FreeDOS (#1587)
FreeDOS does ship the Crynwr packet driver package, which does contain an
RTL8139 driver. However, you have to install the package after installing
FreeDOS, even if you performed a full install. It also seems to lock up for
me when attempting to load it.

The PCNet packet driver on the other hand, is installed with a full FreeDOS
install, is open source, and does work, at least for me.
2025-04-12 22:30:39 +01:00
Anatoli Babenia 616d10b594
feat(quickget): Show download path (#1516)
* feat(quickget): Show full download path


---------

Co-authored-by: Phil Clifford <philclifford@users.noreply.github.com>
2025-04-12 21:50:08 +01:00
Phil Clifford 40f86c0af1 chore: move arco to author-requested release source 2025-04-12 20:43:28 +00:00
Alex Haydock 15c0003442 fix: Select OVMF_VARS file with preloaded MS Platform Keys (Debian/Ubuntu hosts) 2025-04-12 21:42:47 +01:00
Alex Haydock f01db134da fix: Select OVMF_VARS file with preloaded MS Platform Keys (Fedora/RHEL-family hosts) 2025-04-12 21:42:47 +01:00
Alex Haydock 6d5b9231d2 fix: Enable SMM for Linux guests on Linux hosts when Secure Boot is enabled 2025-04-12 21:42:47 +01:00
Liam 9dc70808c5 fix: Better match parrotsec releases 2025-04-12 20:29:09 +00:00
dependabot[bot] daba59d46c chore(deps): bump DeterminateSystems/magic-nix-cache-action from 8 to 9
Bumps [DeterminateSystems/magic-nix-cache-action](https://github.com/determinatesystems/magic-nix-cache-action) from 8 to 9.
- [Release notes](https://github.com/determinatesystems/magic-nix-cache-action/releases)
- [Commits](https://github.com/determinatesystems/magic-nix-cache-action/compare/v8...v9)

---
updated-dependencies:
- dependency-name: DeterminateSystems/magic-nix-cache-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 01:48:53 +00:00
github-actions[bot] 4ecf677a74 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.712007%2Brev-d49da4c08359e3c39c4e27c74ac7ac9b70085966/01940ca0-b117-7d0e-b1ef-d579ee6d2f13/source.tar.gz?narHash=sha256-MgdXpeX2GuJbtlBrH9EdsUeWl/yXEubyvxM1G%2ByO4Ak%3D' (2024-12-27)
  → 'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.714925%2Brev-f44bd8ca21e026135061a0a57dcf3d0775b67a49/01954925-64dc-774f-8cc1-a596fc29244f/source.tar.gz?narHash=sha256-t%2BVaahjQAWyA%2BCtn2idyo1yxRIYpaDxMgHkgCNiMJa4%3D' (2025-02-26)
2025-03-07 01:48:32 +00:00
Phil Clifford 3da9edc995
fix: correctly match editions (#1585)
Closes #1583
2025-02-09 16:53:45 -08:00
Phil Clifford b60ff761e7
fix: move creation of script before functions that may update it (#1577) 2025-02-01 14:11:53 -08:00
nxxxse 588e421040
chore: use https for git submodules to use CA PKI instead of SSH TOFU (#1553)
Defaulting to HTTPS for submodule is more user-friendly.
2025-02-01 14:45:33 +00:00
Liam f87cc613ab
fix: Correctly throw errors when an invalid option is passed (#1560)
* fix: Correctly throw errors when a parameter is not fully matched
2025-02-01 14:39:48 +00:00
Liam 70b531c463
fix: Allow non-v24 arcolinux releases (#1575) 2025-02-01 14:37:21 +00:00
Gustavo Velásquez ae94ac7c16
docs: Fix typo in README.md (#1568) 2025-01-29 10:56:28 +00:00
Liam eb0fd03137
fix: Disregard curl configuration (#1571) 2025-01-29 10:54:23 +00:00
Alex Haydock 0c772d5619
fix: Check for PipeWire as well as PulseAudio before falling back to ALSA (#1565)
* fix: Check for PipeWire as well as PulseAudio before falling back to ALSA

* fix: Use PipeWire backend if available, and where QEMU version is >8.1

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>

---------

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
2025-01-20 11:59:00 -08:00
hyperpuncher 20b17cb129
feat: Linux Mint 22.1 support (#1563) 2025-01-18 15:12:21 -08:00
debuggerx01 37190c7b3a
fix(macos): Correct version user receives from quickget; add sequoia (#1550)
* fix(macos): quickget macos sonoma download sequoia BaseSystem.dmg

* feat: Add macOS Sequoia

---------

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
2025-01-15 11:36:50 -06:00
zenobit 622ecfd4a4
fix(siduction): Update to Shine_on+ (#1549) 2025-01-05 03:11:39 +00:00
debuggerx01 238ec98071
fix(windows): Fix the download of the Chinese Windows ISO. (#1540)
* Fix the download of the Chinese Windows ISO.
2024-12-30 21:54:14 +00:00
Phil Clifford eeee8266db
chore: regenerate docs to align with current release (#1544) 2024-12-30 15:45:18 -06:00
Martin Wimpress c2024d2490
chore: bump version to 4.9.8 2024-12-30 13:18:23 +00:00
21 changed files with 288 additions and 133 deletions

View File

@ -13,9 +13,9 @@ jobs:
name: Flake Checker name: Flake Checker
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@v16 - uses: DeterminateSystems/nix-installer-action@v19
- uses: DeterminateSystems/magic-nix-cache-action@v8 - uses: DeterminateSystems/magic-nix-cache-action@v9
- uses: DeterminateSystems/flake-checker-action@v9 - uses: DeterminateSystems/flake-checker-action@v12

View File

@ -10,11 +10,11 @@ jobs:
name: Flake Lock Updater name: Flake Lock Updater
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@v16 - uses: DeterminateSystems/nix-installer-action@v19
- uses: DeterminateSystems/magic-nix-cache-action@v8 - uses: DeterminateSystems/magic-nix-cache-action@v9
- uses: DeterminateSystems/update-flake-lock@v24 - uses: DeterminateSystems/update-flake-lock@v27
with: with:
pr-title: "chore: update flake.lock" pr-title: "chore: update flake.lock"

View File

@ -15,7 +15,7 @@ jobs:
name: Validate pull request title name: Validate pull request title
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: amannn/action-semantic-pull-request@v5 - uses: amannn/action-semantic-pull-request@v6
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:

View File

@ -10,7 +10,7 @@ jobs:
name: Shellcheck name: Shellcheck
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Run ShellCheck - name: Run ShellCheck
uses: ludeeus/action-shellcheck@master uses: ludeeus/action-shellcheck@master
with: with:

View File

@ -16,7 +16,7 @@ jobs:
name: "Check versions ⚖️" name: "Check versions ⚖️"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
fetch-depth: 0 fetch-depth: 0
- name: "Compare App and Git versions 🟰" - name: "Compare App and Git versions 🟰"
@ -37,7 +37,7 @@ jobs:
name: "Draft Release 📥️" name: "Draft Release 📥️"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Create release ${{ github.ref }} as a draft - name: Create release ${{ github.ref }} as a draft
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -49,7 +49,7 @@ jobs:
name: "Build Release 👨‍🔧" name: "Build Release 👨‍🔧"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Build and Upload .deb - name: Build and Upload .deb
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -67,7 +67,7 @@ jobs:
name: "Publish Release 📤️" name: "Publish Release 📤️"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Publish release ${{ github.ref }} - name: Publish release ${{ github.ref }}
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -85,7 +85,7 @@ jobs:
id-token: "write" id-token: "write"
contents: "read" contents: "read"
steps: steps:
- uses: "actions/checkout@v4" - uses: "actions/checkout@v5"
with: with:
ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}" ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}"
- uses: "DeterminateSystems/nix-installer-action@main" - uses: "DeterminateSystems/nix-installer-action@main"
@ -102,7 +102,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: "Checkout 🥡" - name: "Checkout 🥡"
uses: actions/checkout@v4 uses: actions/checkout@v5
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Import gpg key 🔑" - name: "Import gpg key 🔑"

View File

@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: "Checkout 🥡" - name: "Checkout 🥡"
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: "Build & Test .deb 🍥" - name: "Build & Test .deb 🍥"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -51,11 +51,11 @@ jobs:
contents: "read" contents: "read"
steps: steps:
- name: "Checkout 🥡" - name: "Checkout 🥡"
uses: "actions/checkout@v4" uses: "actions/checkout@v5"
- name: "Install Nix ❄️" - name: "Install Nix ❄️"
uses: "DeterminateSystems/nix-installer-action@v16" uses: "DeterminateSystems/nix-installer-action@v19"
- name: "Enable Magic Nix Cache 🪄" - name: "Enable Magic Nix Cache 🪄"
uses: "DeterminateSystems/magic-nix-cache-action@v8" uses: "DeterminateSystems/magic-nix-cache-action@v9"
- name: "Build & Test .nix ❄️" - name: "Build & Test .nix ❄️"
run: | run: |
nix build .#quickemu nix build .#quickemu

View File

@ -18,7 +18,7 @@ jobs:
name: "Run quickget tests 👟" name: "Run quickget tests 👟"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: "Install dependencies 📦️" - name: "Install dependencies 📦️"
run: | run: |
sudo apt-get -y update sudo apt-get -y update

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "build-docs"] [submodule "build-docs"]
path = build-docs path = build-docs
url = git@github.com:philclifford/quickemu-docs.git url = https://github.com/philclifford/quickemu-docs.git

47
Formula/quickemu.rb Normal file
View File

@ -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

View File

@ -63,7 +63,7 @@ required to run the virtual machines.
## As featured on [Linux Matters](https://linuxmatters.sh) podcast! ## 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"> <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> <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>

1
debian/control vendored
View File

@ -22,6 +22,7 @@ Depends:
procps, procps,
python3-minimal, python3-minimal,
qemu-system (>= 6.0), qemu-system (>= 6.0),
base-files (<< 13~) | qemu-system-modules-spice,
socat, socat,
spice-client-gtk, spice-client-gtk,
swtpm, swtpm,

View File

@ -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 .SH NAME
quickemu \- A quick VM builder and manager quickemu \- A quick VM builder and manager
.SH SYNOPSIS .SH SYNOPSIS
@ -691,6 +691,8 @@ wiki
.IP \[bu] 2 .IP \[bu] 2
\f[CR]lmde\f[R] (Linux Mint Debian Edition) \f[CR]lmde\f[R] (Linux Mint Debian Edition)
.IP \[bu] 2 .IP \[bu] 2
\f[CR]maboxlinux\f[R] (Mabox Linux)
.IP \[bu] 2
\f[CR]mageia\f[R] (Mageia) \f[CR]mageia\f[R] (Mageia)
.IP \[bu] 2 .IP \[bu] 2
\f[CR]manjaro\f[R] (Manjaro) \f[CR]manjaro\f[R] (Manjaro)
@ -725,6 +727,8 @@ wiki
.IP \[bu] 2 .IP \[bu] 2
\f[CR]primtux\f[R] (PrimTux) \f[CR]primtux\f[R] (PrimTux)
.IP \[bu] 2 .IP \[bu] 2
\f[CR]proxmox\-ve\f[R] (Proxmox VE)
.IP \[bu] 2
\f[CR]pureos\f[R] (PureOS) \f[CR]pureos\f[R] (PureOS)
.IP \[bu] 2 .IP \[bu] 2
\f[CR]reactos\f[R] (ReactOS) \f[CR]reactos\f[R] (ReactOS)

View File

@ -1,6 +1,6 @@
--- ---
author: Martin Wimpress author: Martin Wimpress
date: August 2, 2024 date: December 30, 2024
footer: quickemu footer: quickemu
header: Quickemu User Manual header: Quickemu User Manual
section: 1 section: 1
@ -473,6 +473,7 @@ Further information is available from the project
- `linuxlite` (Linux Lite) - `linuxlite` (Linux Lite)
- `linuxmint` (Linux Mint) - `linuxmint` (Linux Mint)
- `lmde` (Linux Mint Debian Edition) - `lmde` (Linux Mint Debian Edition)
- `maboxlinux` (Mabox Linux)
- `mageia` (Mageia) - `mageia` (Mageia)
- `manjaro` (Manjaro) - `manjaro` (Manjaro)
- `mxlinux` (MX Linux) - `mxlinux` (MX Linux)
@ -490,6 +491,7 @@ Further information is available from the project
- `popos` (Pop!\_OS) - `popos` (Pop!\_OS)
- `porteus` (Porteus) - `porteus` (Porteus)
- `primtux` (PrimTux) - `primtux` (PrimTux)
- `proxmox-ve` (Proxmox VE)
- `pureos` (PureOS) - `pureos` (PureOS)
- `reactos` (ReactOS) - `reactos` (ReactOS)
- `rebornos` (RebornOS) - `rebornos` (RebornOS)

View File

@ -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 .SH NAME
quickemu_conf \- Options and parameters in the quickemu <vm>.conf quickemu_conf \- Options and parameters in the quickemu <vm>.conf
.SH DESCRIPTION .SH DESCRIPTION

View File

@ -1,6 +1,6 @@
--- ---
author: Martin Wimpress author: Martin Wimpress
date: August 2, 2024 date: December 30, 2024
footer: quickemu_conf footer: quickemu_conf
header: Quickemu Configuration Manual header: Quickemu Configuration Manual
section: 5 section: 5

View File

@ -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 .SH NAME
quickget \- download and prepare materials for building a quickemu VM quickget \- download and prepare materials for building a quickemu VM
.SH SYNOPSIS .SH SYNOPSIS
@ -252,6 +252,8 @@ wiki
.IP \[bu] 2 .IP \[bu] 2
\f[CR]lmde\f[R] (Linux Mint Debian Edition) \f[CR]lmde\f[R] (Linux Mint Debian Edition)
.IP \[bu] 2 .IP \[bu] 2
\f[CR]maboxlinux\f[R] (Mabox Linux)
.IP \[bu] 2
\f[CR]mageia\f[R] (Mageia) \f[CR]mageia\f[R] (Mageia)
.IP \[bu] 2 .IP \[bu] 2
\f[CR]manjaro\f[R] (Manjaro) \f[CR]manjaro\f[R] (Manjaro)
@ -286,6 +288,8 @@ wiki
.IP \[bu] 2 .IP \[bu] 2
\f[CR]primtux\f[R] (PrimTux) \f[CR]primtux\f[R] (PrimTux)
.IP \[bu] 2 .IP \[bu] 2
\f[CR]proxmox\-ve\f[R] (Proxmox VE)
.IP \[bu] 2
\f[CR]pureos\f[R] (PureOS) \f[CR]pureos\f[R] (PureOS)
.IP \[bu] 2 .IP \[bu] 2
\f[CR]reactos\f[R] (ReactOS) \f[CR]reactos\f[R] (ReactOS)

View File

@ -1,6 +1,6 @@
--- ---
author: Martin Wimpress author: Martin Wimpress
date: August 2, 2024 date: December 30, 2024
footer: quickget footer: quickget
header: Quickget User Manual header: Quickget User Manual
section: 1 section: 1
@ -203,6 +203,7 @@ Further information is available from the project
- `linuxlite` (Linux Lite) - `linuxlite` (Linux Lite)
- `linuxmint` (Linux Mint) - `linuxmint` (Linux Mint)
- `lmde` (Linux Mint Debian Edition) - `lmde` (Linux Mint Debian Edition)
- `maboxlinux` (Mabox Linux)
- `mageia` (Mageia) - `mageia` (Mageia)
- `manjaro` (Manjaro) - `manjaro` (Manjaro)
- `mxlinux` (MX Linux) - `mxlinux` (MX Linux)
@ -220,6 +221,7 @@ Further information is available from the project
- `popos` (Pop!\_OS) - `popos` (Pop!\_OS)
- `porteus` (Porteus) - `porteus` (Porteus)
- `primtux` (PrimTux) - `primtux` (PrimTux)
- `proxmox-ve` (Proxmox VE)
- `pureos` (PureOS) - `pureos` (PureOS)
- `reactos` (ReactOS) - `reactos` (ReactOS)
- `rebornos` (RebornOS) - `rebornos` (RebornOS)

View File

@ -16,12 +16,12 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1735264675, "lastModified": 1756217674,
"narHash": "sha256-MgdXpeX2GuJbtlBrH9EdsUeWl/yXEubyvxM1G+yO4Ak=", "narHash": "sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo=",
"rev": "d49da4c08359e3c39c4e27c74ac7ac9b70085966", "rev": "4e7667a90c167f7a81d906e5a75cba4ad8bee620",
"revCount": 712007, "revCount": 808864,
"type": "tarball", "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": { "original": {
"type": "tarball", "type": "tarball",

View File

@ -22,11 +22,11 @@
schemas = flake-schemas.schemas; schemas = flake-schemas.schemas;
# Define overlays for each supported system # Define overlays for each supported system
overlays = forEachSupportedSystem ({pkgs, system, ...}: { overlays = {
default = final: prev: { default = final: prev: {
quickemu = final.callPackage ./package.nix { }; quickemu = final.callPackage ./package.nix { };
}; };
}); };
# Define packages for each supported system # Define packages for each supported system
packages = forEachSupportedSystem ({pkgs, system, ...}: rec { packages = forEachSupportedSystem ({pkgs, system, ...}: rec {

View File

@ -395,6 +395,16 @@ function configure_cpu() {
fi fi
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 case ${guest_os} in
batocera|freedos|haiku|solaris) MACHINE_TYPE="pc";; batocera|freedos|haiku|solaris) MACHINE_TYPE="pc";;
kolibrios|reactos) kolibrios|reactos)
@ -414,7 +424,7 @@ function configure_cpu() {
# A CPU with fma is required for Metal support # A CPU with fma is required for Metal support
# A CPU with invtsc is required for macOS to boot # A CPU with invtsc is required for macOS to boot
case ${macos_release} in case ${macos_release} in
ventura|sonoma) ventura|sonoma|sequoia)
# A CPU with AVX2 support is required for >= macOS Ventura # A CPU with AVX2 support is required for >= macOS Ventura
if check_cpu_flag sse4_2 && check_cpu_flag avx2; then if check_cpu_flag sse4_2 && check_cpu_flag avx2; then
if [ "${HOST_CPU_VENDOR}" != "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then if [ "${HOST_CPU_VENDOR}" != "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then
@ -604,6 +614,12 @@ function configure_ram() {
fi fi
} }
function is_firmware_qcow2() {
# Check for the magic bytes that indicate the firmware is in qcow2 format,
# otherwise default to assuming firmware files are in raw format
[ "$(head -c 4 "$1")" = "QFI"$'\xfb' ] && echo "true" || echo "false"
}
function configure_bios() { function configure_bios() {
# Always Boot macOS using EFI # Always Boot macOS using EFI
if [ "${guest_os}" == "macos" ]; then if [ "${guest_os}" == "macos" ]; then
@ -663,14 +679,15 @@ function configure_bios() {
if [ -n "${EFI_CODE}" ] || [ ! -e "${EFI_CODE}" ]; then if [ -n "${EFI_CODE}" ] || [ ! -e "${EFI_CODE}" ]; then
case ${secureboot} in case ${secureboot} in
on) # shellcheck disable=SC2054,SC2140 on) # shellcheck disable=SC2054,SC2140
ovmfs=("${SHARE_PATH}/OVMF/OVMF_CODE_4M.secboot.fd","${SHARE_PATH}/OVMF/OVMF_VARS_4M.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.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}/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}/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" \ "${SHARE_PATH}/qemu/ovmf-x86_64-smm-ms-code.bin","${SHARE_PATH}/qemu/ovmf-x86_64-smm-ms-vars.bin" \
"${SHARE_PATH}/qemu/edk2-x86_64-secure-code.fd","${SHARE_PATH}/qemu/edk2-x86_64-code.fd" \ "${SHARE_PATH}/qemu/edk2-x86_64-secure-code.fd","${SHARE_PATH}/qemu/edk2-x86_64-code.fd" \
"${SHARE_PATH}/edk2-ovmf/x64/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2-ovmf/x64/OVMF_VARS.fd" \ "${SHARE_PATH}/edk2-ovmf/x64/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2-ovmf/x64/OVMF_VARS.fd" \
"${SHARE_PATH}/edk2/x64/OVMF_CODE.secboot.4m.fd","${SHARE_PATH}/edk2/x64/OVMF_VARS.4m.fd" "${SHARE_PATH}/edk2/x64/OVMF_CODE.secboot.4m.fd","${SHARE_PATH}/edk2/x64/OVMF_VARS.4m.fd" \
"${SHARE_PATH}/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","${SHARE_PATH}/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2"
);; );;
*) # shellcheck disable=SC2054,SC2140 *) # shellcheck disable=SC2054,SC2140
ovmfs=("${SHARE_PATH}/OVMF/OVMF_CODE_4M.fd","${SHARE_PATH}/OVMF/OVMF_VARS_4M.fd" \ ovmfs=("${SHARE_PATH}/OVMF/OVMF_CODE_4M.fd","${SHARE_PATH}/OVMF/OVMF_VARS_4M.fd" \
@ -681,7 +698,8 @@ function configure_bios() {
"${SHARE_PATH}/qemu/ovmf-x86_64-4m-code.bin","${SHARE_PATH}/qemu/ovmf-x86_64-4m-vars.bin" \ "${SHARE_PATH}/qemu/ovmf-x86_64-4m-code.bin","${SHARE_PATH}/qemu/ovmf-x86_64-4m-vars.bin" \
"${SHARE_PATH}/qemu/edk2-x86_64-code.fd","${SHARE_PATH}/qemu/edk2-x86_64-code.fd" \ "${SHARE_PATH}/qemu/edk2-x86_64-code.fd","${SHARE_PATH}/qemu/edk2-x86_64-code.fd" \
"${SHARE_PATH}/edk2-ovmf/x64/OVMF_CODE.fd","${SHARE_PATH}/edk2-ovmf/x64/OVMF_VARS.fd" \ "${SHARE_PATH}/edk2-ovmf/x64/OVMF_CODE.fd","${SHARE_PATH}/edk2-ovmf/x64/OVMF_VARS.fd" \
"${SHARE_PATH}/edk2/x64/OVMF_CODE.4m.fd","${SHARE_PATH}/edk2/x64/OVMF_VARS.4m.fd" "${SHARE_PATH}/edk2/x64/OVMF_CODE.4m.fd","${SHARE_PATH}/edk2/x64/OVMF_VARS.4m.fd" \
"${SHARE_PATH}/edk2/ovmf/OVMF_CODE_4M.qcow2","${SHARE_PATH}/edk2/ovmf/OVMF_VARS_4M.qcow2"
);; );;
esac esac
# Attempt each EFI_CODE file one by one, selecting the corresponding code and vars # Attempt each EFI_CODE file one by one, selecting the corresponding code and vars
@ -712,6 +730,14 @@ function configure_bios() {
echo " - EFI: ERROR! EFI_EXTRA_VARS file ${EFI_EXTRA_VARS} does not exist." echo " - EFI: ERROR! EFI_EXTRA_VARS file ${EFI_EXTRA_VARS} does not exist."
exit 1 exit 1
fi fi
# Write destination vars file with correct extension
# based on source format of the EFI_EXTRA_VARS file
QCOW2VARS=$(is_firmware_qcow2 "${EFI_EXTRA_VARS}")
if [ "${QCOW2VARS}" = "true" ]; then
EFI_VARS="${VMDIR}/OVMF_VARS.qcow2"
else
EFI_VARS="${VMDIR}/OVMF_VARS.fd"
fi
efi_vars "${EFI_EXTRA_VARS}" "${EFI_VARS}" efi_vars "${EFI_EXTRA_VARS}" "${EFI_VARS}"
fi fi
@ -730,7 +756,7 @@ function configure_bios() {
EFI_CODE=$(realpath "${EFI_CODE}") EFI_CODE=$(realpath "${EFI_CODE}")
echo "${EFI_CODE}" echo "${EFI_CODE}"
fi fi
BOOT_STATUS="EFI (${guest_os^}), OVMF (${EFI_CODE}), SecureBoot (${secureboot})." BOOT_STATUS="EFI (${guest_os^}), OVMF (${EFI_CODE}), EFI Vars (${EFI_VARS}), SecureBoot (${secureboot})."
else else
BOOT_STATUS="Legacy BIOS (${guest_os^})" BOOT_STATUS="Legacy BIOS (${guest_os^})"
boot="legacy" boot="legacy"
@ -742,7 +768,7 @@ function configure_bios() {
function configure_os_quirks() { 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" NET_DEVICE="rtl8139"
fi fi
@ -753,7 +779,8 @@ function configure_os_quirks() {
case ${guest_os} in case ${guest_os} in
windows-server) NET_DEVICE="e1000";; windows-server) NET_DEVICE="e1000";;
*bsd|linux*|windows) NET_DEVICE="virtio-net";; *bsd|linux*|windows) NET_DEVICE="virtio-net";;
freedos) sound_card="sb16";; freedos) sound_card="sb16"
NET_DEVICE="pcnet";;
*solaris) usb_controller="xhci" *solaris) usb_controller="xhci"
sound_card="ac97";; sound_card="ac97";;
reactos) NET_DEVICE="e1000" reactos) NET_DEVICE="e1000"
@ -766,7 +793,7 @@ function configure_os_quirks() {
# * VirtIO Memory Balloning is supported since Big Sur (https://pmhahn.github.io/virtio-balloon/) # * 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. # * VirtIO RNG is supported since Big Sur, but exposed to all guests by default.
case ${macos_release} in case ${macos_release} in
big-sur|monterey|ventura|sonoma) big-sur|monterey|ventura|sonoma|sequoia)
BALLOON="-device virtio-balloon" BALLOON="-device virtio-balloon"
MAC_DISK_DEV="virtio-blk-pci" MAC_DISK_DEV="virtio-blk-pci"
NET_DEVICE="virtio-net" NET_DEVICE="virtio-net"
@ -882,7 +909,12 @@ function configure_storage() {
function configure_display() { function configure_display() {
# Determine which audio driver use between Pulseaudio or ALSA # Determine which audio driver use between Pulseaudio or ALSA
local AUDIO_DRIVER="pa" 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" AUDIO_DRIVER="alsa"
fi fi
@ -1182,6 +1214,8 @@ function vm_boot() {
# Set the hostname of the VM # Set the hostname of the VM
NET="user,hostname=${VMNAME}" NET="user,hostname=${VMNAME}"
echo "#!/usr/bin/env bash" > "${VMDIR}/${VMNAME}.sh"
configure_cpu configure_cpu
configure_ram configure_ram
configure_bios configure_bios
@ -1194,8 +1228,6 @@ function vm_boot() {
configure_usb configure_usb
configure_tpm configure_tpm
echo "#!/usr/bin/env bash" > "${VMDIR}/${VMNAME}.sh"
# Changing process name is not supported on macOS # Changing process name is not supported on macOS
if [ "${OS_KERNEL}" == "Linux" ]; then if [ "${OS_KERNEL}" == "Linux" ]; then
# shellcheck disable=SC2054,SC2206,SC2140 # shellcheck disable=SC2054,SC2206,SC2140
@ -1359,10 +1391,14 @@ function vm_boot() {
# Add the disks # Add the disks
# - https://turlucode.com/qemu-disk-io-performance-comparison-native-or-threads-windows-10-version/ # - https://turlucode.com/qemu-disk-io-performance-comparison-native-or-threads-windows-10-version/
if [[ "${boot}" == *"efi"* ]]; then if [[ "${boot}" == *"efi"* ]]; then
QCOW2CODE=$(is_firmware_qcow2 "${EFI_CODE}")
QCOW2VARS=$(is_firmware_qcow2 "${EFI_VARS}")
if [ "${QCOW2CODE}" = "true" ]; then EFI_CODE_FORMAT="qcow2"; else EFI_CODE_FORMAT="raw"; fi
if [ "${QCOW2VARS}" = "true" ]; then EFI_VARS_FORMAT="qcow2"; else EFI_VARS_FORMAT="raw"; fi
# shellcheck disable=SC2054 # shellcheck disable=SC2054
args+=(-global driver=cfi.pflash01,property=secure,value=on args+=(-global driver=cfi.pflash01,property=secure,value=on
-drive if=pflash,format=raw,unit=0,file="${EFI_CODE}",readonly=on -drive if=pflash,format="${EFI_CODE_FORMAT}",unit=0,file="${EFI_CODE}",readonly=on
-drive if=pflash,format=raw,unit=1,file="${EFI_VARS}") -drive if=pflash,format="${EFI_VARS_FORMAT}",unit=1,file="${EFI_VARS}")
fi fi
if [ -n "${iso}" ] && [ "${guest_os}" == "freedos" ]; then if [ -n "${iso}" ] && [ "${guest_os}" == "freedos" ]; then
@ -1787,6 +1823,7 @@ function fileshare_param_check() {
if [ ! -d "${PUBLIC}" ]; then if [ ! -d "${PUBLIC}" ]; then
echo " - WARNING! Public directory: '${PUBLIC}' doesn't exist!" echo " - WARNING! Public directory: '${PUBLIC}' doesn't exist!"
PUBLIC=""
else else
PUBLIC_TAG="Public-${USER,,}" PUBLIC_TAG="Public-${USER,,}"
PUBLIC_PERMS=$(${STAT} -c "%A" "${PUBLIC}") PUBLIC_PERMS=$(${STAT} -c "%A" "${PUBLIC}")
@ -1914,7 +1951,7 @@ VMPATH=""
# shellcheck disable=SC2155 # shellcheck disable=SC2155
readonly LAUNCHER=$(basename "${0}") readonly LAUNCHER=$(basename "${0}")
readonly DISK_MIN_SIZE=$((197632 * 8)) readonly DISK_MIN_SIZE=$((197632 * 8))
readonly VERSION="4.9.7" readonly VERSION="4.9.8"
# TODO: Make this run the native architecture binary # TODO: Make this run the native architecture binary
ARCH_VM="x86_64" ARCH_VM="x86_64"
@ -1938,7 +1975,8 @@ if [ "${OS_KERNEL}" == "Darwin" ]; then
fi fi
QEMU_VER_LONG=$(${QEMU_IMG} --version | head -n 1 | awk '{print $3}') 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 if [ "${QEMU_VER_SHORT}" -lt 60 ]; then
echo "ERROR! QEMU 6.0.0 or newer is required, detected ${QEMU_VER_LONG}." echo "ERROR! QEMU 6.0.0 or newer is required, detected ${QEMU_VER_LONG}."
exit 1 exit 1

211
quickget
View File

@ -5,6 +5,9 @@
# shellcheck disable=SC2317 # shellcheck disable=SC2317
export LC_ALL=C export LC_ALL=C
# Detect host OS for checksum tool compatibility
HOST_OS=$(uname -s)
function cleanup() { function cleanup() {
if [ -n "$(jobs -p)" ]; then if [ -n "$(jobs -p)" ]; then
kill "$(jobs -p)" 2>/dev/null 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.";; 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.";; 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.";; 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.";; 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.";; 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.";; 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.";; 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.";; 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.";; 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/|Worlds 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-core) INFO="TrueNAS Core|-|https://www.truenas.com/truenas-core/|Worlds 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.";; 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.";; 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() { function os_supported() {
if [[ ! "$(os_support)" =~ ${OS} ]]; then if [[ ! " $(os_support) " =~ \ "${OS}"\ ]]; then
echo -e "ERROR! ${OS} is not a supported OS.\n" echo -e "ERROR! ${OS} is not a supported OS.\n"
os_support | fmt -w 80 os_support | fmt -w 80
exit 1 exit 1
@ -185,7 +189,7 @@ function error_specify_release() {
} }
function error_not_supported_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 -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release.\n"
echo -n ' - Supported releases: ' echo -n ' - Supported releases: '
"releases_${OS}" "releases_${OS}"
@ -209,6 +213,17 @@ function error_not_supported_argument() {
exit 1 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() { function handle_missing() {
# Handle odd missing Fedora combinations # Handle odd missing Fedora combinations
case "${OS}" in case "${OS}" in
@ -460,6 +475,7 @@ function os_support() {
opensuse \ opensuse \
oraclelinux \ oraclelinux \
parrotsec \ parrotsec \
pclinuxos \
peppermint \ peppermint \
popos \ popos \
porteus \ porteus \
@ -545,9 +561,7 @@ function releases_archlinux() {
function releases_arcolinux() { function releases_arcolinux() {
#shellcheck disable=SC2046,SC2005 #shellcheck disable=SC2046,SC2005
# breaking change in v24.05 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)
# 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)
} }
function editions_arcolinux() { function editions_arcolinux() {
@ -579,7 +593,7 @@ function releases_bazzite() {
} }
function editions_bazzite() { function editions_bazzite() {
echo gnome kde echo gnome plasma deck-gnome deck-plasma
} }
function releases_biglinux() { function releases_biglinux() {
@ -732,7 +746,7 @@ function editions_freebsd() {
} }
function releases_freedos() { function releases_freedos() {
echo 1.3 1.2 echo 1.4 1.3 1.2
} }
function releases_garuda() { function releases_garuda() {
@ -802,7 +816,7 @@ function releases_linuxlite() {
} }
function releases_linuxmint() { 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() { function editions_linuxmint() {
@ -822,7 +836,7 @@ function releases_maboxlinux() {
} }
function releases_macos() { function releases_macos() {
echo mojave catalina big-sur monterey ventura sonoma echo mojave catalina big-sur monterey ventura sonoma sequoia
} }
function releases_mageia() { function releases_mageia() {
@ -843,7 +857,7 @@ function releases_manjaro() {
function releases_mxlinux() { function releases_mxlinux() {
# needs header, so not web_pipe: # 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() { function editions_mxlinux() {
@ -865,13 +879,13 @@ function releases_nitrux() {
} }
function releases_nixos() { function releases_nixos() {
# Lists unstable plus the two most recent releases # Lists unstable plus the most recent release
#shellcheck disable=SC2046 #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() { function editions_nixos() {
echo minimal plasma gnome echo minimal graphical
} }
function releases_nwg-shell() { function releases_nwg-shell() {
@ -886,7 +900,9 @@ function releases_openbsd() {
function releases_openindiana() { function releases_openindiana() {
#shellcheck disable=SC2046,SC2005 #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() { function editions_openindiana() {
@ -904,13 +920,22 @@ function releases_oraclelinux() {
function releases_parrotsec() { function releases_parrotsec() {
#shellcheck disable=SC2046,SC2005 #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() { function editions_parrotsec() {
echo home htb security 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() { function releases_peppermint() {
echo latest echo latest
} }
@ -979,7 +1004,8 @@ function releases_siduction() {
function editions_siduction() { function editions_siduction() {
#shellcheck disable=SC2046,SC2005 #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() { function releases_slackware() {
@ -1011,7 +1037,7 @@ function releases_solus() {
function editions_solus() { function editions_solus() {
#shellcheck disable=SC2046,SC2005 #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() { function releases_sparkylinux() {
@ -1169,6 +1195,17 @@ function check_hash() {
*) echo "WARNING! Can't guess hash algorithm, not checking ${iso} hash." *) echo "WARNING! Can't guess hash algorithm, not checking ${iso} hash."
return;; return;;
esac 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}... " echo -n "Checking ${iso} with ${hash_algo}... "
if ! echo "${hash} ${iso}" | ${hash_algo} --check --status; then if ! echo "${hash} ${iso}" | ${hash_algo} --check --status; then
echo "ERROR!" echo "ERROR!"
@ -1181,12 +1218,12 @@ function check_hash() {
# Download a file from the web and pipe it to stdout # Download a file from the web and pipe it to stdout
function web_pipe() { function web_pipe() {
curl --silent --location "${1}" curl --disable --silent --location "${1}"
} }
# Download a JSON file from the web and pipe it to stdout # Download a JSON file from the web and pipe it to stdout
function web_pipe_json() { 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 # Download a file from the web
@ -1237,9 +1274,10 @@ function web_get() {
if [[ ${OS} != windows && ${OS} != macos && ${OS} != windows-server ]]; then if [[ ${OS} != windows && ${OS} != macos && ${OS} != windows-server ]]; then
echo "Downloading $(pretty_name "${OS}") ${RELEASE} ${EDITION}" echo "Downloading $(pretty_name "${OS}") ${RELEASE} ${EDITION}"
echo "- URL: ${URL}" echo "- URL: ${URL}"
echo "- PATH: ${PWD}/${DIR}/${FILE}"
fi 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." echo "ERROR! Failed to download ${URL} with curl."
rm -f "${DIR}/${FILE}" rm -f "${DIR}/${FILE}"
fi fi
@ -1251,7 +1289,7 @@ function web_redirect() {
local URL="${1}" local URL="${1}"
# Check for URL redirections # Check for URL redirections
# Output to nonexistent directory so the download fails fast # 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 if [ "${REDIRECT_URL}" != "${URL}" ]; then
echo "${REDIRECT_URL}" echo "${REDIRECT_URL}"
else else
@ -1272,7 +1310,7 @@ function web_check() {
shift shift
fi fi
done 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() { function zsync_get() {
@ -1590,7 +1628,7 @@ function get_archcraft() {
function get_archlinux() { function get_archlinux() {
local HASH="" local HASH=""
local ISO="" 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') 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') HASH=$(web_pipe "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].sha256_sum')
echo "${URL}${ISO} ${HASH}" echo "${URL}${ISO} ${HASH}"
@ -1600,7 +1638,7 @@ function get_arcolinux() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="" 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" ISO="arco${EDITION}-${RELEASE}-x86_64.iso"
HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
@ -1636,8 +1674,10 @@ function get_bazzite() {
local ISO="" local ISO=""
local URL="https://download.bazzite.gg" local URL="https://download.bazzite.gg"
case ${EDITION} in case ${EDITION} in
gnome) ISO="bazzite-gnome-stable.iso";; gnome) ISO="bazzite-gnome-stable-amd64.iso";;
kde) ISO="bazzite-stable.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 esac
HASH=$(web_pipe "${URL}/${ISO}-CHECKSUM" | cut -d' ' -f1) HASH=$(web_pipe "${URL}/${ISO}-CHECKSUM" | cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
@ -1835,9 +1875,14 @@ function get_fedora() {
local URL="" local URL=""
local VARIANT="" local VARIANT=""
case ${EDITION} in case ${EDITION} in
Server|Kinoite|Onyx|Silverblue|Sericea|Workstation) VARIANT="${EDITION}";; Server|Kinoite|Onyx|Silverblue|Sericea|Workstation|KDE) VARIANT="${EDITION}";;
*) VARIANT="Spins";; *) VARIANT="Spins";;
esac 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 # 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 # but we need to convert it back to a space for the URL search in the JSON
#shellcheck disable=SC2086 #shellcheck disable=SC2086
@ -1849,7 +1894,9 @@ function get_fedora() {
# shellcheck disable=SC2086 # 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) URL=$(echo "${JSON}" | jq -r '.link' | head -n1)
HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1) HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1)
echo "${URL} ${HASH}" echo "${URL} ${HASH}"
@ -1866,11 +1913,17 @@ function get_freebsd() {
function get_freedos() { function get_freedos() {
local HASH="" local HASH=""
local ISO="" 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 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);; 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);; HASH=$(web_pipe "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut -d' ' -f1);;
esac esac
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
@ -2062,6 +2115,8 @@ function get_macos() {
ventura|13) ventura|13)
BOARD_ID="Mac-BE088AF8C5EB4FA2";; BOARD_ID="Mac-BE088AF8C5EB4FA2";;
sonoma|14) sonoma|14)
BOARD_ID="Mac-827FAC58A8FDFA22";;
sequoia|15)
BOARD_ID="Mac-53FDB3D8DB8CA971";; BOARD_ID="Mac-53FDB3D8DB8CA971";;
*) echo "ERROR! Unknown release: ${RELEASE}" *) echo "ERROR! Unknown release: ${RELEASE}"
releases_macos releases_macos
@ -2075,10 +2130,10 @@ function get_macos() {
CHUNKCHECK="$(command -v chunkcheck)" CHUNKCHECK="$(command -v chunkcheck)"
fi fi
appleSession=$(curl -v -H "Host: osrecovery.apple.com" \ appleSession=$(curl --disable -v -H "Host: osrecovery.apple.com" \
-H "Connection: close" \ -H "Connection: close" \
-A "InternetRecovery/1.0" https://osrecovery.apple.com/ 2>&1 | tr ';' '\n' | awk -F'session=|;' '{print $2}' | grep 1) -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" \ -H "Connection: close" \
-A "InternetRecovery/1.0" \ -A "InternetRecovery/1.0" \
-b "session=\"${appleSession}\"" \ -b "session=\"${appleSession}\"" \
@ -2213,16 +2268,6 @@ function get_nitrux() {
function get_nixos() { function get_nixos() {
local HASH="" 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 ISO="latest-nixos-${EDITION}-x86_64-linux.iso"
local URL="https://channels.nixos.org/nixos-${RELEASE}" local URL="https://channels.nixos.org/nixos-${RELEASE}"
HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1)
@ -2303,6 +2348,21 @@ function get_parrotsec() {
echo "${URL}/${ISO} ${HASH}" 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() { function get_peppermint() {
local HASH="" local HASH=""
local ISO="" local ISO=""
@ -2415,10 +2475,14 @@ function get_siduction() {
local HASH="" local HASH=""
local DATE="" local DATE=""
local ISO="" 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) DATE=$(web_pipe "${URL}"| grep .iso.md5 | cut -d'-' -f6 | cut -d'.' -f1)
HASH=$(web_pipe "${URL}/${ISO}.md5" | 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}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2575,11 +2639,11 @@ function get_ubuntu-server() {
esac esac
if web_check "${URL}/SHA256SUMS"; then 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}") ISO=$(cut -d'*' -f2 <<<"${DATA}")
HASH=$(cut -d' ' -f1 <<<"${DATA}") HASH=$(cut -d' ' -f1 <<<"${DATA}")
else 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}") ISO=$(cut -d' ' -f3 <<<"${DATA}")
HASH=$(cut -d' ' -f1 <<<"${DATA}") HASH=$(cut -d' ' -f1 <<<"${DATA}")
fi fi
@ -2619,11 +2683,11 @@ function get_ubuntu() {
URL="https://cdimage.ubuntu.com/${OS}/releases/${RELEASE}/release" URL="https://cdimage.ubuntu.com/${OS}/releases/${RELEASE}/release"
fi fi
if web_check "${URL}/SHA256SUMS"; then 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') ISO=$(cut -d'*' -f2 <<<"${DATA}" | sed '1q;d')
HASH=$(cut -d' ' -f1 <<<"${DATA}" | sed '1q;d') HASH=$(cut -d' ' -f1 <<<"${DATA}" | sed '1q;d')
else 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}") ISO=$(cut -d'*' -f2 <<<"${DATA}")
HASH=$(cut -d' ' -f1 <<<"${DATA}") HASH=$(cut -d' ' -f1 <<<"${DATA}")
fi fi
@ -2878,21 +2942,15 @@ function unattended_windows() {
<Path>E:\qxldod\w10\amd64</Path> <Path>E:\qxldod\w10\amd64</Path>
</PathAndCredentials> </PathAndCredentials>
<PathAndCredentials wcm:action="add" wcm:keyValue="7"> <PathAndCredentials wcm:action="add" wcm:keyValue="7">
<Path>E:\amd64\w10</Path>
</PathAndCredentials>
<PathAndCredentials wcm:action="add" wcm:keyValue="8">
<Path>E:\viogpudo\w10\amd64</Path>
</PathAndCredentials>
<PathAndCredentials wcm:action="add" wcm:keyValue="9">
<Path>E:\viorng\w10\amd64</Path> <Path>E:\viorng\w10\amd64</Path>
</PathAndCredentials> </PathAndCredentials>
<PathAndCredentials wcm:action="add" wcm:keyValue="10"> <PathAndCredentials wcm:action="add" wcm:keyValue="8">
<Path>E:\NetKVM\w10\amd64</Path> <Path>E:\NetKVM\w10\amd64</Path>
</PathAndCredentials> </PathAndCredentials>
<PathAndCredentials wcm:action="add" wcm:keyValue="11"> <PathAndCredentials wcm:action="add" wcm:keyValue="9">
<Path>E:\viofs\w10\amd64</Path> <Path>E:\viofs\w10\amd64</Path>
</PathAndCredentials> </PathAndCredentials>
<PathAndCredentials wcm:action="add" wcm:keyValue="12"> <PathAndCredentials wcm:action="add" wcm:keyValue="10">
<Path>E:\Balloon\w10\amd64</Path> <Path>E:\Balloon\w10\amd64</Path>
</PathAndCredentials> </PathAndCredentials>
</DriverPaths> </DriverPaths>
@ -2951,20 +3009,20 @@ function unattended_windows() {
<Description>Install spice-webdavd file sharing agent</Description> <Description>Install spice-webdavd file sharing agent</Description>
<Order>2</Order> <Order>2</Order>
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec /i F:\UsbDk_1.0.22_x64.msi /quiet /passive /qn</CommandLine>
<Description>Install usbdk USB sharing agent</Description>
<Order>3</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<CommandLine>msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn</CommandLine> <CommandLine>msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn</CommandLine>
<Description>Install spice-vdagent SPICE agent</Description> <Description>Install spice-vdagent SPICE agent</Description>
<Order>4</Order> <Order>3</Order>
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<CommandLine>Cmd /c POWERCFG -H OFF</CommandLine> <CommandLine>Cmd /c POWERCFG -H OFF</CommandLine>
<Description>Disable Hibernation</Description> <Description>Disable Hibernation</Description>
<Order>5</Order> <Order>4</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>pnputil /add-driver E:\viogpudo\w10\amd64\viogpudo.inf /install</CommandLine>
<Description>Install viogpudo driver</Description>
<Order>6</Order>
</SynchronousCommand> </SynchronousCommand>
</FirstLogonCommands> </FirstLogonCommands>
</component> </component>
@ -2976,10 +3034,9 @@ EOF
echo "Downloading Spice drivers..." echo "Downloading Spice drivers..."
web_get https://www.spice-space.org/download/windows/spice-webdavd/spice-webdavd-x64-latest.msi "${VM_PATH}/unattended" web_get https://www.spice-space.org/download/windows/spice-webdavd/spice-webdavd-x64-latest.msi "${VM_PATH}/unattended"
web_get https://www.spice-space.org/download/windows/vdagent/vdagent-win-0.10.0/spice-vdagent-x64-0.10.0.msi "${VM_PATH}/unattended" web_get https://www.spice-space.org/download/windows/vdagent/vdagent-win-0.10.0/spice-vdagent-x64-0.10.0.msi "${VM_PATH}/unattended"
web_get https://www.spice-space.org/download/windows/usbdk/UsbDk_1.0.22_x64.msi "${VM_PATH}/unattended"
echo "Making unattended.iso" 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() { function handle_curl_error() {
@ -3065,7 +3122,7 @@ function download_windows_server() {
local url="https://www.microsoft.com/en-us/evalcenter/download-$windows_version" local url="https://www.microsoft.com/en-us/evalcenter/download-$windows_version"
echo " - Parsing download page: ${url}" 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 $? handle_curl_error $?
return $? return $?
} }
@ -3138,7 +3195,7 @@ function download_windows_server() {
# Follow redirect so proceeding log message is useful # Follow redirect so proceeding log message is useful
# This is a request we make this Fido doesn't # 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 # 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 # This should only happen if the Microsoft servers are down
handle_curl_error $? handle_curl_error $?
return $? return $?
@ -3187,7 +3244,7 @@ function download_windows_workstation() {
# Also, keeping a "$WindowsVersions" array like Fido does would be way too much of a maintenance burden # 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 # Remove "Accept" header that curl sends by default
echo " - Parsing download page: ${url}" 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 $? handle_curl_error $?
return $? return $?
} }
@ -3201,7 +3258,7 @@ function download_windows_workstation() {
echo " - Permit Session ID: $session_id" echo " - Permit Session ID: $session_id"
# Permit Session ID # Permit Session ID
# "org_id" is always the same value # "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 # This should only happen if there's been some change to how this API works
handle_curl_error $? handle_curl_error $?
return $? return $?
@ -3211,19 +3268,19 @@ function download_windows_workstation() {
echo -n " - Getting language SKU ID: " echo -n " - Getting language SKU ID: "
# Get language -> skuID association table # 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 $? handle_curl_error $?
return $? 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 "$sku_id"
echo " - Getting ISO download link..." echo " - Getting ISO download link..."
# Get 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) # 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 # --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 local failed=0
@ -3586,7 +3643,7 @@ if [ -n "${2}" ]; then
EDITIONS=("$(editions_"${OS}")") EDITIONS=("$(editions_"${OS}")")
if [ -n "${3}" ]; then if [ -n "${3}" ]; then
EDITION="${3}" EDITION="${3}"
if [[ ! "${EDITIONS[*]}" = *"${EDITION}"* ]]; then if [[ ! " ${EDITIONS[*]} " =~ \ "${EDITION}"\ ]]; then
echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n" echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n"
echo -n ' - Supported editions: ' echo -n ' - Supported editions: '
for EDITION in "${EDITIONS[@]}"; do for EDITION in "${EDITIONS[@]}"; do
@ -3622,7 +3679,7 @@ if [ -n "${2}" ]; then
"languages_${OS}" "languages_${OS}"
if [ -n "${3}" ]; then if [ -n "${3}" ]; then
I18N="${3}" I18N="${3}"
if [[ ! "${I18NS[*]}" = *"${I18N}"* ]]; then if ! is_valid_language "${I18N}"; then
error_not_supported_lang error_not_supported_lang
fi fi
VM_PATH="$(echo "${OS}-${RELEASE}-${I18N// /-}" | tr -d '()')" VM_PATH="$(echo "${OS}-${RELEASE}-${I18N// /-}" | tr -d '()')"