Tensorflow-opt-cuda signature error

Try this:

export URL="https://notabug.org/megavolt/random-scripts/raw/master/fix-gpg-pacman.sh"
bash <(curl -s "$URL") --ask

See: [HowTo] Work around gpg verification issue on left behind systems

didn’t work, same error, all 3 different modes …

yo so its actually because his signature is outdated… Here, Arch Linux - python-tensorflow-opt-cuda 2.15.0-4 (x86_64) If you look at signature date its 12/1/2023 which was 11 days ago…

Yo, no it’s actually not.

That was my only idea of what it might have been, what is the actual problem then?

pacman/Package signing - ArchWiki should work.

That’s the date the package was signed by the maintainer. His signing key is fine.

I tried the entire, 4.1 section of troubleshooting invalid signature errors and I keep getting the same error. I could just disable signature checking but I think that choice will bite back eventually.
Seperately
I tried

sudo pacman-key --refresh Sven

and got

gpg: error retrieving 'sh@lutzhaase.com' via WKD: No data
gpg: error reading key: No data
gpg: key 39E4B877E62EB915: "Sven-Hendrik Haase <sh@lutzhaase.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
pub   rsa4096 2011-09-10 [SC]
      8FC15A064950A99DD1BD14DD39E4B877E62EB915
uid           [marginal] Sven-Hendrik Haase <sh@lutzhaase.com>
uid           [  full  ] Sven-Hendrik Haase <svenstaro@archlinux.org>
uid           [marginal] Sven-Hendrik Haase <svenstaro@gmail.com>
sub   rsa4096 2022-07-10 [A]
sub   rsa4096 2011-09-10 [E]

The issue is not with the signature, but that the mirrors only serve a corrupted, partial file.

du -sh /var/cache/pacman/pkg/tensorflow-opt-cuda-2.15.0-4-x86_64.pkg.tar.zst
161M    /var/cache/pacman/pkg/tensorflow-opt-cuda-2.15.0-4-x86_64.pkg.tar.zst

But it should be 747.9 MB.

Several mirrors seem to serve me this broken file, I’ve ended up downloading it from the Arch “Download From Mirror” and installing it with sudo pacman --sync.

This causes the signature error, the signature key itself is trusted (works for python-tensorflow-opt-cuda):

pacman-key --verify /var/cache/pacman/pkg/python-tensorflow-opt-cuda-2.15.0-4-x86_64.pkg.tar.zst.sig
==> Checking /var/cache/pacman/pkg/python-tensorflow-opt-cuda-2.15.0-4-x86_64.pkg.tar.zst.sig... (detached)
gpg: Signature made Fri 01 Dec 2023 12:54:06 AM PST
gpg:                using RSA key 8FC15A064950A99DD1BD14DD39E4B877E62EB915
gpg: Note: trustdb not writable
gpg: Good signature from "Sven-Hendrik Haase <sh@lutzhaase.com>" [marginal]
gpg:                 aka "Sven-Hendrik Haase <svenstaro@gmail.com>" [marginal]
gpg:                 aka "Sven-Hendrik Haase <svenstaro@archlinux.org>" [full]

pacman-key --verify /var/cache/pacman/pkg/tensorflow-opt-cuda-2.15.0-4-x86_64.pkg.tar.zst.sig
==> Checking /var/cache/pacman/pkg/tensorflow-opt-cuda-2.15.0-4-x86_64.pkg.tar.zst.sig... (detached)
gpg: Signature made Fri 01 Dec 2023 12:53:50 AM PST
gpg:                using RSA key 8FC15A064950A99DD1BD14DD39E4B877E62EB915
gpg: Note: trustdb not writable
gpg: BAD signature from "Sven-Hendrik Haase <sh@lutzhaase.com>" [marginal]
==> ERROR: The signature identified by /var/cache/pacman/pkg/tensorflow-opt-cuda-2.15.0-4-x86_64.pkg.tar.zst.sig could not be verified.
2 Likes

Thank you! I did the same and now I have it all installed.

Just for reference:

Arch Linux

$ pacman -Si tensorflow-opt-cuda
Name            : tensorflow-opt-cuda
Version         : 2.15.0-4
Download Size   : 747.86 MiB
Installed Size  : 2926.89 MiB
Packager        : Sven-Hendrik Haase <svenstaro@archlinux.org>
Build Date      : Wed 29 Nov 2023 08:24:34 PM PST

Manjaro

$ pacman -Si tensorflow-opt-cuda
Name            : tensorflow-opt-cuda
Version         : 2.15.0-4
Download Size   : 160.43 MiB
Installed Size  : 2926.89 MiB
Packager        : Sven-Hendrik Haase <svenstaro@archlinux.org>
Build Date      : Wed 29 Nov 2023 08:24:34 PM PST
1 Like

Nice catch.

That’s a beautiful proof that the signatures are important!

1 Like

same issue for me but with cuda package, also did the arch “download from mirror” as a workaround.

what actually causes the file to be corrupted like this?

Just to be clear, the pacman --sync is creating the error or it is part of your installation process ? From my understanding installing without sync after would leave the package not managed for updates, right ?

No, it’s broken package on mirrors.

My soultion was simply to downlaod from Arch mirror, and installing it with

Same link as above, but ill repeat it.

https://archlinux.org/packages/extra/x86_64/python-tensorflow-opt-cuda/

“sudo pacman -U tensorflow-opt-cuda-2.15.0-6-x86_64.pkg.tar.zst”

tensorflow-opt-cuda is normally a large package. If the signature fails it can mean two things: either the signature is autodated or the package is really corrupt. Here we have the later. The possible issue might be that @Yochanan changed to sync from a CDN service rather a normal rsync managed mirror. CDN nodes sometimes tend to cache broken files when a sync is happening and they cache that in the moment. For mirror management always a real server should be used. I’ve changed that now in our server management tool and will check if I might need to manually get that package from an Arch server or rsync is now so smart to correct it. Packages


Most likely the package update of testing branch might fix it.

1 Like

The issue in stable branch should be fixed. @loumierex can you confirm?

ls tensorflow* -lasih
2759548 135M 135M Dec  1 15:59 tensorflow-2.15.0-4-x86_64.pkg.tar.zst
2759549 4.0K  566 Dec  1 15:59 tensorflow-2.15.0-4-x86_64.pkg.tar.zst.sig
2808008 135M 135M Dec 21 21:39 tensorflow-2.15.0-6-x86_64.pkg.tar.zst
2808009 4.0K  566 Dec 21 21:39 tensorflow-2.15.0-6-x86_64.pkg.tar.zst.sig
2759570 745M 745M Dec  1 15:59 tensorflow-cuda-2.15.0-4-x86_64.pkg.tar.zst
2759571 4.0K  566 Dec  1 15:59 tensorflow-cuda-2.15.0-4-x86_64.pkg.tar.zst.sig
2808010 745M 745M Dec 21 21:39 tensorflow-cuda-2.15.0-6-x86_64.pkg.tar.zst
2808011 4.0K  566 Dec 21 21:39 tensorflow-cuda-2.15.0-6-x86_64.pkg.tar.zst.sig
2759580 137M 137M Dec  1 15:59 tensorflow-opt-2.15.0-4-x86_64.pkg.tar.zst
2759581 4.0K  566 Dec  1 15:59 tensorflow-opt-2.15.0-4-x86_64.pkg.tar.zst.sig
2808012 137M 137M Dec 21 21:39 tensorflow-opt-2.15.0-6-x86_64.pkg.tar.zst
2808013 4.0K  566 Dec 21 21:39 tensorflow-opt-2.15.0-6-x86_64.pkg.tar.zst.sig
2759582 748M 748M Dec  1 13:42 tensorflow-opt-cuda-2.15.0-4-x86_64.pkg.tar.zst
2761167 4.0K  566 Dec  1 16:30 tensorflow-opt-cuda-2.15.0-4-x86_64.pkg.tar.zst.sig
2808014 747M 747M Dec 21 21:39 tensorflow-opt-cuda-2.15.0-6-x86_64.pkg.tar.zst
2808015 4.0K  566 Dec 21 21:40 tensorflow-opt-cuda-2.15.0-6-x86_64.pkg.tar.zst.sig

Yup it is working again, thanks