Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Arch Linux to Quickget #146

Merged
merged 5 commits into from
Oct 29, 2021
Merged

Conversation

daPhipz
Copy link
Member

@daPhipz daPhipz commented Oct 21, 2021

This PR adds the ability to download the latest Arch ISO with quickget.
I mostly followed the comments at the beginning of the quickget file, this made this process much easier. Thanks or that!

quickget Outdated
Comment on lines 587 to 594
validate_release "releases_archlinux"
web_get "https://mirror.rackspace.com/archlinux/iso/latest/sha1sums.txt" "${VM_PATH}"
HASH=$(head -1 "${VM_PATH}/sha1sums.txt" | cut -d' ' -f1)
ISO=$(head -1 "${VM_PATH}/sha1sums.txt" | cut -d' ' -f3)
URL="https://mirror.rackspace.com/archlinux/iso/latest/${ISO}"
web_get "${URL}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the Arch ISO has its release date in the file name, there is no static URL to fetch the latest ISO from.
That's why I get the checksum file first (which has a static URL) and get the ISO filename from it. Then, download the ISO, check it, and create the config file 🎉

@daPhipz
Copy link
Member Author

daPhipz commented Oct 22, 2021

One potential issue/inconvenience that just came to my mind:

Because the ISO filename changes with every release, running quickget archlinux latest currently doesn't care about old ISOs and only downloads the new one alongside the old one - cluttering up the user's system.

One solution would be to rename the ISO file to archlinux-latest.iso or similar when downloading it. This would overwrite old versions and prevent unnecessary junk files.
But then, the user wouldn't be able to easily check which version they downloaded...

What do you think?

@daPhipz
Copy link
Member Author

daPhipz commented Oct 22, 2021

There is also this suggestion from Reddit on how to get the latest ISO.

@flexiondotorg
Copy link
Member

Using the API as suggested on Reddit is sensible 👍

@daPhipz
Copy link
Member Author

daPhipz commented Oct 28, 2021

I'll test it now, but I think this PR is ready to merge. Why do I always push before testing the code? 😂

@daPhipz
Copy link
Member Author

daPhipz commented Oct 28, 2021

Yep, works as expected! Ready to merge from my side 🎉

quickget Outdated Show resolved Hide resolved
@flexiondotorg flexiondotorg merged commit fb832b2 into quickemu-project:master Oct 29, 2021
@daPhipz daPhipz deleted the add-arch branch October 29, 2021 14:56
deraffe pushed a commit to deraffe/quickemu that referenced this pull request Apr 11, 2023
* quickget: Add Arch Linux

* Update README to include Arch Linux

* Use JSON API to determine SHA1 hash and Arch ISO name

* Use wget instead of curl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants