How to download the iso in a script

Ask questions about Arch Linux ARM. Please search before making a new topic.

How to download the iso in a script

Postby VolkerWeissmann » Thu Sep 24, 2020 6:20 pm

Hello,
I want to do something extremly simple:

Download an ArchLinuxARM iso in a script.

I'm literally multiple hours in the gpg documentation and I can't do it.
How are you normally supposed to download it? Please don't tell me that "wget http://os.archlinuxarm.org/os/ArchLinux ... est.tar.gz" ist the recommended way, it uses http not https (why?).


UPDATE:

The following works. But I'm sure it is not the official recommended way, because it is so overly complicated. I'm still searching for the "recommended" way to do it.

(xonsh code):
$this->bbcode_second_pass_code('', '
$RAISE_SUBPROC_ERROR = True
def downloadAndVerfiyKeyID(keyID, signature, payload):
paypath = $HOME+"/Downloads/DownVerfiy/"+payload.split("/")[-1]
sigpath = $HOME+"/Downloads/DownVerfiy/"+signature.split("/")[-1]
if not os.path.exists($HOME+"/Downloads/DownVerfiy"):
os.mkdir($HOME+"/Downloads/DownVerfiy")
if not os.path.exists(paypath):
wget @(payload) -O @(paypath)
if not os.path.exists(sigpath):
wget @(signature) -O @(sigpath)
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys @(keyID)
gpg --trusted-key @(keyID[-16:]) --verify @(sigpath) @(paypath)
gpg --batch --yes --delete-key @(keyID)
downloadAndVerfiyKeyID("68B3537F39A313B3E574D06777193F152BDBE6A6",
"http://de5.mirror.archlinuxarm.org/os/ArchLinuxARM-rpi-4-latest.tar.gz.sig",
"http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-4-latest.tar.gz")')
VolkerWeissmann
 
Posts: 1
Joined: Thu Sep 24, 2020 5:58 pm

Re: How to download the iso in a script

Postby joekamprad » Tue Nov 03, 2020 11:17 am

joekamprad
 
Posts: 3
Joined: Fri Aug 28, 2020 11:53 am

Re: How to download the iso in a script

Postby graysky » Tue Nov 03, 2020 11:34 am

Yes, you simply run the wget line pointing to the non-ssl url. You should of course be verifying the signature of the tarball you download or at a minimum be verifying the checksum.
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to User Questions

Who is online

Users browsing this forum: No registered users and 11 guests

cron