HolyBlackCat / quasi-msys2

Cross-compile C/C++ from Linux to Windows using MSYS2 packages
zlib License
94 stars 4 forks source link

Keyring error #14

Closed system64MC closed 2 months ago

system64MC commented 2 months ago

Hello. When I do the make install _gcc _gdb command, I have the following error :

Updating keyring... Unknown option 'show-progress' Makefile:335: *** Unable to download the keyring. Try again with--traceto debug. Arrêt. Makefile:937: *** Unable to executemake -r __database_nodeps __database_allow_aliases PKG@@mingw-w64-x86_64-gcc PKG@@mingw-w64-x86_64-gdb, exit code 2. Arrêt.

Is that normal? How can I fix it please? Here is my Linux version : Linux fedora 6.9.7-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 27 18:11:45 UTC 2024 x86_64 GNU/Linux

Thanks for your help.

HolyBlackCat commented 2 months ago

What does wget --version print? And which wget too.

As a temporary fix, you could edit the makefile and remove --show-progress from it, but I'm really curious why your wget doesn't support it.

system64MC commented 2 months ago

GNU Wget2 2.1.0 - multithreaded metalink/file/website downloader, at least for my system

system64MC commented 2 months ago

Tried by removing this flag, I have this now :

make install _gcc _gdb --trace
Shell command: test -e './msys2_pacmake_base_dir'
Exit code: 0
Shell command: test -e 'cache'
Exit code: 0
Shell command: test -e 'root'
Exit code: 0
Shell command: test -e 'index'
Exit code: 0
Shell command: test -e 'requested_packages.txt'
Exit code: 0
Shell command: make  -r __database_nodeps __database_allow_aliases PKG@@mingw-w64-x86_64-gcc PKG@@mingw-w64-x86_64-gdb
Updating keyring...
Found keys:
* Alexpux (AD351C50AE085775EB59333B5F92EFC1A47D45A1)
* Elieux (87771331B3F1FF5263856A6D974C8BE49078F532)
* lazka (5F944B027F7FE2091985AA2EFA11531AA0AA7F57)
Downloading package database...
gpg: Signature made Thu Jul 18 00:41:43 2024 CEST
gpg:                using RSA key 5F944B027F7FE2091985AA2EFA11531AA0AA7F57
gpg: Can't check signature: No public key
Makefile:338: *** Signature check failed!
File: database.db.unverified
Signature: database.db.sig
Try again with `--trace` to see GPG output. Arrêt.
Makefile:938: *** Unable to execute `make  -r __database_nodeps __database_allow_aliases PKG@@mingw-w64-x86_64-gcc PKG@@mingw-w64-x86_64-gdb`, exit code 2. Arrêt.
HolyBlackCat commented 2 months ago

I've updated the makefile to not pass --show-progress if not supported (wget2 spells this flag differently, apprarently; my distro still ships wget1).

Can you please download a new copy of the repo and try again? Without --trace this time. (Apparently --trace causes errors on its own, it's something I need to look into.)

I think the rest of the errors were caused by (my makefile not liking) --trace.

system64MC commented 2 months ago

Hi, sadly I still have a problem :

make install _gcc _gdb
Updating keyring...
Found keys:
* Alexpux (AD351C50AE085775EB59333B5F92EFC1A47D45A1)
* Elieux (87771331B3F1FF5263856A6D974C8BE49078F532)
* lazka (5F944B027F7FE2091985AA2EFA11531AA0AA7F57)
Downloading package database...
Makefile:340: *** Signature check failed!
File: database.db.unverified
Signature: database.db.sig
Try again with `--trace` to see GPG output. Arrêt.
Makefile:940: *** Unable to execute `make  -r __database_nodeps __database_allow_aliases PKG@@mingw-w64-ucrt-x86_64-gcc PKG@@mingw-w64-ucrt-x86_64-gdb`, exit code 2. Arrêt.
HolyBlackCat commented 2 months ago

@system64MC To confirm, you did make a new clone of the repo, right? You didn't just pull the changes into the existing copy? I just tried it on a fresh Fedora 40 image, and it works on my end.

If you can repro even in a new clone, can you please send the contents of the whole quasi-msys2 directory after running the command? Also, what version of Fedora are you on?

system64MC commented 2 months ago

quasi-msys2.zip Yes, I did make a new clone (I rm -rf the old directory and then I cloned again) Here is a ZIP with the directory.

HolyBlackCat commented 2 months ago

Hmmmm. What Fedora version are you on? Also can you please show make --version and gpg --version?

system64MC commented 2 months ago

I use Fedora 40

GNU Make 4.4.1 Construit pour x86_64-redhat-linux-gnu

gpg (GnuPG) 2.4.4 libgcrypt 1.10.3-unknown Home: /home/system64/.gnupg Algorithmes pris en charge : Clef publique : RSA, ELG, DSA, ECDH, ECDSA, EDDSA Chiffrement : IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Hachage : SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression : Non compressé, ZIP, ZLIB, BZIP2

HolyBlackCat commented 2 months ago

Okay, I managed to reproduce this. This happens when you have ~/.gnupg/common.conf with use-keyboxd in it. With that line in the config, GPG refuses to import the keyring and says "no public key".

GPG will sometimes create this config file with this line when directory ~/.gnupg doesn't exist. Though quasi-msys2 alone calling GPG doesn't cause it to generate the config (that's why I couldn't reproduce in a clean docker), but some manual use of GPG can cause it to generate it.

As a temporary fix, you can remove this line from the config. I'm trying to figure out how I can make it work even with this line.

HolyBlackCat commented 2 months ago

I think I've fixed it, please clone the latest version and try again.

system64MC commented 2 months ago

Happened without errors! Thanks!