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

Error signature during a BlackArch update. #4018

Closed
kheIdar opened this issue Dec 2, 2023 · 25 comments
Closed

Error signature during a BlackArch update. #4018

kheIdar opened this issue Dec 2, 2023 · 25 comments
Labels
offtopic::support People asking for support

Comments

@kheIdar
Copy link

kheIdar commented Dec 2, 2023

I encountered an error during a BlackArch update, and I can't find the solution:

sudo pacman -Syu
error: blackarch: signature from 'Levon 'noptrix' Kayan (BlackArch Developer) [email protected]' is unknown trust
:: Synchronizing package databases...
core is up to date
extra is up to date
multilib is up to date
blackarch 4.0 MiB 1228 KiB/s 00:03 [####################################] 100%
error: blackarch: signature from 'Levon 'noptrix' Kayan (BlackArch Developer) [email protected]' is unknown trust
error: failed to synchronize all databases (invalid or corrupted database

If someone can help me, thank you.

@kheIdar kheIdar changed the title Error during a BlackArch update. Error signature during a BlackArch update. Dec 3, 2023
@noraj noraj added offtopic::support People asking for support and removed type::discussion labels Dec 3, 2023
@noraj
Copy link
Contributor

noraj commented Dec 3, 2023

@kheIdar
Copy link
Author

kheIdar commented Dec 3, 2023

I already tried, but it didn't solve my problem.

@Schimi6
Copy link

Schimi6 commented Dec 3, 2023

same problem since yesterday, a few days ago i did the same installation and everything goes ok.
i tryed: https://blackarch.org/faq.html
sudo rm -rf /etc/pacman.d/gnupg/
# pacman-key --init pacman-key --populate
checking timedatectl. its ok, cache cleared,
tryed install it from git,following all them instructions, using a mirror. Any ideas?

@noraj
Copy link
Contributor

noraj commented Dec 3, 2023

sudo pacman -S blackarch-keyring && sudopacman -Syu?

Also check the previous 20 similar issues: https://github.com/BlackArch/blackarch/issues?q=is%3Aissue+error%3A+blackarch%3A+signature+from+%27Levon+%27noptrix%27+Kayan+%28BlackArch+Developer%29

@Schimi6
Copy link

Schimi6 commented Dec 3, 2023

sudo pacman -S blackarch-keyring && sudopacman -Syu?

Also check the previous 20 similar issues: https://github.com/BlackArch/blackarch/issues?q=is%3Aissue+error%3A+blackarch%3A+signature+from+%27Levon+%27noptrix%27+Kayan+%28BlackArch+Developer%29

i think i fixed it going in pacman.conf and putting SigLevel = Required DatabaseOptional TrustAll. im at start of my way so im a bit ignorant, that dont gonna make it a future problem? thanks alot for the answers, i was here for like 15 hours testing everything i could find around, almost getting more mad than i m

@kheIdar
Copy link
Author

kheIdar commented Dec 3, 2023

thx Schimi6, i fixed with your comment

@noraj
Copy link
Contributor

noraj commented Dec 3, 2023

https://wiki.archlinux.org/title/Pacman/Package_signing#Configuring_pacman

TrustAll just disable any signature verification, that's dangerous and not the proper solution.

@noraj
Copy link
Contributor

noraj commented Dec 3, 2023

you sure it's not a dead mirror like #3939 (comment)

@kheIdar
Copy link
Author

kheIdar commented Dec 3, 2023

I imagine that this is not the best solution, but I haven't found a better one yet. Yes, I have tried mirrors, but no results.

@jopcode
Copy link

jopcode commented Dec 4, 2023

same problem here, after system upgrade pacman is broken, i try many solution but nothing work only @Schimi6 solution for now. any ideas?

@isidoridev
Copy link

Temporary fix if you really want to update (possibly has problems) is to skip blackarch packages by commenting inside the pacman.conf:

#[blackarch]
#Include = /etc/pacman.d/blackarch-mirrorlist

Hopefully a proper solution is found.

@BIGBEASTISHANK
Copy link

i tried changing mirrors and removing blackarch.db.sig file still no improvement, still getting same error

@TazMania-Git
Copy link

Same problem over here. Alredy ask in Reddit if someone can help.

@0xBroth
Copy link

0xBroth commented Dec 6, 2023

So I've found a pseudo fix for myself. (No pun intended lol) I've used a combination of the FAQ from the Blackarch website, 3939, and an attempted local key sign.

sudo pacman-key --recv-keys F9A6E68A711354D84A9B91637533BAFE69A25079 && sudo pacman-key --lsign-key F9A6E68A711354D84A9B91637533BAFE69A25079

The above takes the signature associated with the "noptrix" key and locally signs it. I know in some cases this might not work, but I was able to get it to work after I ran the FAQ and played around with the mirrors.

This however is a band aid fix because I find every time I restart the machine the key has to be re-signed.

I get this out put when running the following command before running the key sign:

gpg --homedir /etc/pacman.d/gnupg --list-keys | grep nop
gpg: WARNING: unsafe ownership on homedir '/etc/pacman.d/gnupg'
gpg: Note: trustdb not writable
uid           [  full  ] Levon 'noptrix' Kayan (BlackArch Master) <[email protected]>
uid           [ unknown] Levon 'noptrix' Kayan (BlackArch Developer) <[email protected]>

After the key sign:

gpg --homedir /etc/pacman.d/gnupg --list-keys | grep nop
gpg: WARNING: unsafe ownership on homedir '/etc/pacman.d/gnupg'
gpg: Note: trustdb not writable
uid           [  full  ] Levon 'noptrix' Kayan (BlackArch Master) <[email protected]>
uid           [  full  ] Levon 'noptrix' Kayan (BlackArch Developer) <[email protected]>

The developer key seems to be giving me the issue, and won't seem to stick. I'm still a noob at this so I'm not sure if this will help anyone. ¯_(ツ)_/¯

@BIGBEASTISHANK
Copy link

So I've found a pseudo fix for myself. (No pun intended lol) I've used a combination of the FAQ from the Blackarch website, 3939, and an attempted local key sign.

sudo pacman-key --recv-keys F9A6E68A711354D84A9B91637533BAFE69A25079 && sudo pacman-key --lsign-key F9A6E68A711354D84A9B91637533BAFE69A25079

The above takes the signature associated with the "noptrix" key and locally signs it. I know in some cases this might not work, but I was able to get it to work after I ran the FAQ and played around with the mirrors.

This however is a band aid fix because I find every time I restart the machine the key has to be re-signed.

I get this out put when running the following command before running the key sign:

gpg --homedir /etc/pacman.d/gnupg --list-keys | grep nop
gpg: WARNING: unsafe ownership on homedir '/etc/pacman.d/gnupg'
gpg: Note: trustdb not writable
uid           [  full  ] Levon 'noptrix' Kayan (BlackArch Master) <[email protected]>
uid           [ unknown] Levon 'noptrix' Kayan (BlackArch Developer) <[email protected]>

After the key sign:

gpg --homedir /etc/pacman.d/gnupg --list-keys | grep nop
gpg: WARNING: unsafe ownership on homedir '/etc/pacman.d/gnupg'
gpg: Note: trustdb not writable
uid           [  full  ] Levon 'noptrix' Kayan (BlackArch Master) <[email protected]>
uid           [  full  ] Levon 'noptrix' Kayan (BlackArch Developer) <[email protected]>

The developer key seems to be giving me the issue, and won't seem to stick. I'm still a noob at this so I'm not sure if this will help anyone. ¯_(ツ)_/¯

ok

@TazMania-Git
Copy link

Thanks @0xBroth, works for me!

@anunna
Copy link
Member

anunna commented Dec 7, 2023

Easiest thing to do right now until there is a fix, is to downgrade to gnupg 2.2.41-2 since the issues are with 2.4.

pacman -U https://archive.archlinux.org/packages/g/gnupg/gnupg-2.2.41-2-x86_64.pkg.tar.zst
rm -rf /etc/pacman.d/gnupg
pacman-key --init
pacman-key --populate archlinux blackarch
pacman-key --update --keyserver keyserver.ubuntu.com

When running system updates, use the --ignore flag to exclude gnupg or ignore gnupg in your pacman.conf file.

Example 1

Temporarily ignore the package during system update.

pacman -Syu --ignore gnupg

Example 2

Permanently ignoring the package.

sed -i '/IgnorePkg/ s/^#//; /IgnorePkg/ s/$/ gnupg/' /etc/pacman.conf

@D3vil0p3r
Copy link
Contributor

If the issue is related to gnupg version, why the only broken signing key is only the noptrix one while the other AL keys are working as expected?

@lilian-lilifox
Copy link

If the issue is related to gnupg version, why the only broken signing key is only the noptrix one while the other AL keys are working as expected? @D3vil0p3r

Thanks to @anunna

When using 'gnupg=2.4.3-2',it outputs (Notice that third-party key signatures using the SHA1 algorithm are rejected):

sudo pacman-key --populate archlinux blackarch
==> Appending keys from archlinux.gpg...
==> Appending keys from blackarch.gpg...
==> Locally signing trusted keys in keyring...
  -> Locally signed 9 keys.
==> Importing owner trust values...
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: inserting ownertrust of 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
==> Disabling revoked keys in keyring...
  -> Disabled 44 keys.
==> Updating trust database...
gpg: Note: third-party key signatures using the SHA1 algorithm are rejected
gpg: (use option "--allow-weak-key-signatures" to override)
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   9  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:   9  signed:  97  trust: 0-, 0q, 0n, 9m, 0f, 0u
gpg: depth: 2  valid:  72  signed:  21  trust: 72-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2024-01-21

And when using gnupg=2.2.41-2, it outputs:

sudo pacman-key --populate archlinux blackarch
==> Appending keys from archlinux.gpg...
==> Appending keys from blackarch.gpg...
==> Locally signing trusted keys in keyring...
  -> Locally signed 9 keys.
==> Importing owner trust values...
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: inserting ownertrust of 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
==> Disabling revoked keys in keyring...
  -> Disabled 44 keys.
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   9  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:   9  signed: 100  trust: 0-, 0q, 0n, 9m, 0f, 0u
gpg: depth: 2  valid:  75  signed:  28  trust: 75-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2024-01-21

It works well! And then you can pacman -Syu as before.
So I think its the reason noptrix's key uses the algorithm that gnupg does not accept anymore in recent update.

And a small tip:

You need do this in pacman.conf first before downgrade:

#[blackarch]
#Include = /etc/pacman.d/blackarch-mirrorlist

then run downgrade and add it to IgnorePkg:

$ downgrade 'gnupg=2.2.41-2'

And follow this issue. Hopefully it'll be fixed soon.

@D3vil0p3r
Copy link
Contributor

D3vil0p3r commented Dec 10, 2023

I can reproduce the same. Thank you @lilian-lilifox . Apart the workaround, the problem remains for new BlackArch system installation and for BA docker container generation. I hope this issue will be fixed soon.

@anunna
Copy link
Member

anunna commented Dec 10, 2023

Thanks for this @lilian-lilifox I've let noptrix know and see if we can get his key updated in the keyring.

I do however, for interest, have other issues on my system with 2.4.3 where I am unable to generate new gpg keys and some packages are unable to install via AUR. Mostly packages that install keys, etc., which may also be victim to weak keys but that's a different conversation.

@jakejasey
Copy link

I to am having this issue. Has there been any updates on this yet?

@dualfade
Copy link
Contributor

A new strap.sh was released today. You may want to look into this.
https://blackarch.org/downloads.html#install-repo

@Schimi6
Copy link

Schimi6 commented Dec 14, 2023

A new strap.sh was released today. You may want to look into this. https://blackarch.org/downloads.html#install-repo

this fixed everything, good news for all of us!

@nixfreak
Copy link

nixfreak commented Dec 15, 2023

New strap.sh works on a pre-installed machine.

Instructions to fix gpg issue

    curl -O https://blackarch.org/strap.sh
   chmod +x strap.sh 
   ./strap.sh 
   sudo ./strap.sh 
   sudo pacman -Syu

@anunna anunna closed this as completed Dec 16, 2023
@BlackArch BlackArch locked and limited conversation to collaborators Dec 16, 2023
@ikstream ikstream pinned this issue Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
offtopic::support People asking for support
Projects
None yet
Development

No branches or pull requests