Qvm-template error is giving no clues

I noticed that fedora-35 had shown up in the itl repository and was trying to install it with the new qvm-template command but kept getting errors. It worked for me a couple weeks before, but not today. I tried clearing cache and used qubes-dom0-update to try and install it but got the same thing, because it appears to just pass control back to qvm-template.

What is strange here is there is no error for the download problem itself but the check for the rpm file obviously fails due to the rpm file being an incomplete download and another error for removing the temp directory that never existed. It appears that as soon as the initial “0%” downloaded message appears the program exits and subsequently gets the error messages due to the incomplete file.

I downloaded the rpm manually to verify the server side file contents, and even installed it, so its not an invalid rpm file on the server.

Running under sudo made no difference and running qvm-template under a python trace also gave no clues either. I thought the issue must be on the sys-firewall proxy side but dmesg there leaves me no clues either. Nothing is obvious here.

qvm-template-gui pops up but never fills in any data and just hangs there trying to get data. Software updates still work flawlessly. Could it be that the directory was not created so the file had no place to go? Then why no error there?

Can I buy a clue? What else should I look at?

Here I just tried to download it since I already have it installed:
$ sudo qvm-template download fedora-35-minimal
Downloading ‘qubes-template-fedora-35-minimal-0:4.0.6-202205081759’…
qubes-template-fedora-35-minimal-0:4.0.6-202205081759: 0%| | 0.00/724M [00:00<?, ?B/s]Error canonicalizing file: not an RPM package
qubes-template-fedora-35-minimal-0:4.0.6-202205081759: 0%| | 0.00/724M [00:00<?, ?B/s]
ERROR: [Errno 2] No such file or directory: ‘./tmp76z5ialh/qubes-template-fedora-35-minimal-0:4.0.6-202205081759.rpm.UNTRUSTED’

What if you try to download any non-template package with qubes-dom0-update?
qvm-template works for me on Qubes 4.1 with latest current-testing updates.

Normal updates work fine from the Qube Manager, including dom0. qubes-dom0-update has nothing to update but it does reinstall just fine.

I tested your command and got the same error:

[user@dom0 ~]$ qvm-template search fedora
=== Name & Summary Matched: fedora ===
fedora-32 : Qubes template for fedora-32
fedora-32-minimal : Qubes template for fedora-32-minimal
fedora-32-xfce : Qubes template for fedora-32-xfce
fedora-33 : Qubes template for fedora-33
fedora-33-minimal : Qubes template for fedora-33-minimal
fedora-33-xfce : Qubes template for fedora-33-xfce
fedora-34 : Qubes template for fedora-34
fedora-34-minimal : Qubes template for fedora-34-minimal
fedora-34-xfce : Qubes template for fedora-34-xfce
fedora-35 : Qubes template for fedora-35
fedora-35-minimal : Qubes template for fedora-35-minimal
fedora-35-xfce : Qubes template for fedora-35-xfce
[user@dom0 ~]$ qvm-template repolist
qubes-templates-itl  Qubes Templates repository  enabled
[user@dom0 ~]$ qvm-template download fedora-35-minimal
Downloading 'qubes-template-fedora-35-minimal-0:4.0.6-202205081759'...
qubes-template-fedora-35-minimal-0:4.0.6-202205081759:   0%| | 0.00/724M [00:00<Error canonicalizing file: not an RPM package
qubes-template-fedora-35-minimal-0:4.0.6-202205081759:   0%| | 0.00/724M [00:00<
ERROR: [Errno 2] No such file or directory: './tmpxgklz0i4/qubes-template-fedora-35-minimal-0:4.0.6-202205081759.rpm.UNTRUSTED'

The fedora-35 templates aren’t yet available in the stable repository (#6969 not closed and no announce from adw). But in fact, I see the rpms in the templates-itl repository, as you tested there is a problem with these rpms.

So read the adw’s announce for fedora-35 in testing, and if you want to test :

[user@dom0 ~]$ qvm-template --enablerepo qubes-templates-itl-testing download fedora-35-minimal
Downloading 'qubes-template-fedora-35-minimal-0:4.0.6-202205081759'...
qubes-template-fedora-35-minimal-0:4.0.6-202205081759: 100%|▉| 724M/724M [01:05<
[user@dom0 ~]$ sha512sum qubes-template-fedora-35-minimal-0\:4.0.6-202205081759.rpm 
a663afd06e9750a9f5d3646e938c1bd36ed98f1c6c04e8f25e3e2d685e72a6cc480c83a40b9e125dcd80b7c2eabe96906e8a562ddad6271508dfaa1d03f5233d  qubes-template-fedora-35-minimal-0:4.0.6-202205081759.rpm

See also some qvm-template commands that I tested few months ago.

The error is concealed 404… Looks like mirrors.kernel.org haven’t picked up the new package yet.
But also, it should automatically choose a mirror that has the package already - I’m not sure why it didn’t…