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

Invalid signature for linux-surface repo #746

Open
han-so1omon opened this issue Feb 17, 2022 · 22 comments
Open

Invalid signature for linux-surface repo #746

han-so1omon opened this issue Feb 17, 2022 · 22 comments
Labels
A: packages Area: Packages and repositories

Comments

@han-so1omon
Copy link

han-so1omon commented Feb 17, 2022

Environment

Manjaro 21.2.0
Surface book 2
KDE Plasma 5.23.4
Kernel version 5.15.11-arch2-1-surface (64 bit)

Issue

When I try to update or install a package:

$ yay -S <package-name>
error: linux-surface: signature from "linux-surface" is invalid
error: database 'linux-surface' is not valid (invalid or corrupted database (PGP signature))
 -> error installing repo packages

Same issue on Manjaro 21.2.0 GNOME with pamac update. Additionally, I manually allowed the linux-surface repo to be used without error checking as below, and that failed. Now the Manjaro GNOME install does not boot up:

[linux-surface]
SigLevel = Never
Server = https://pkg.surfacelinux.com/arch/
@AllemanoEn
Copy link

any fix ?

@qzed
Copy link
Member

qzed commented Feb 21, 2023

I can't reproduce this on a fresh Arch container. Did you follow the steps on the wiki to add/trust our signing key?

@AllemanoEn
Copy link

AllemanoEn commented Feb 27, 2023

Yep, but I had to do this again with the good mirrors config.
Maybe the wiki should warn about setting up the good mirrors config ?

For me, this command fix all my issues :
sudo pacman-mirrors -g -c <your_country>
(to list all country use pacman-mirrors --country-list)

Then, resume the manipulations on the installation guide for arch.

@qzed
Copy link
Member

qzed commented Feb 27, 2023

I believe the pacman-mirrors is specific to Manjaro. Is it possible that this issue stems from Manjaro somehow? It would be helpful to know what went wrong and caused this.

@Haxatronic
Copy link

Yep, but I had to do this again with the good mirrors config. Maybe the wiki should warn about setting up the good mirrors config ?

For me, this command fix all my issues : sudo pacman-mirrors -g -c <your_country> (to list all country use pacman-mirrors --country-list)

Then, resume the manipulations on the installation guide for arch.

I am still very new to linux and I am fumbling in the dark here a little bit. How do you point the system to install from the mirror? Do I choose one of the links and then add it to the end of the pacman.conf file through gedit?

@AllemanoEn
Copy link

I believe the pacman-mirrors is specific to Manjaro. Is it possible that this issue stems from Manjaro somehow? It would be helpful to know what went wrong and caused this.

You're maybe right, I should re try it with a fresh manjaro install. I’ll keep you posted if i found something interesting

@AllemanoEn
Copy link

AllemanoEn commented Mar 2, 2023

Yep, but I had to do this again with the good mirrors config. Maybe the wiki should warn about setting up the good mirrors config ?
For me, this command fix all my issues : sudo pacman-mirrors -g -c <your_country> (to list all country use pacman-mirrors --country-list)
Then, resume the manipulations on the installation guide for arch.

I am still very new to linux and I am fumbling in the dark here a little bit. How do you point the system to install from the mirror? Do I choose one of the links and then add it to the end of the pacman.conf file through gedit?

The command I mention should do the job.
Try pacman-mirrors --status to check it out, the output should be like :

Local mirror status for stable branch
Mirror #1   OK  00:19   <country>  https://....
Mirror #2   OK  02:34   <country>  https://....

@qzed
Copy link
Member

qzed commented Apr 4, 2023

For the record, I can also not reproduce this in a new manjaro container (manjarolinux/base).

@qzed
Copy link
Member

qzed commented Apr 7, 2023

I now tried installing manjaro to a USB drive, but I wasn't able to reproduce the issue there either. Do you have any particular steps for reproducing/triggering this issue?

@AllemanoEn
Copy link

Unfortunately no... I will try to reproduce it too

@manuth
Copy link

manuth commented Apr 20, 2023

This error started to occur for me today.
Sadly, adding and signing the key once more didn't help.

I, too, have no particular steps to reproduce - I just ran sudo pacman -Syu as I'd always do to pull updates.

// Edit

I tried re-creating the gnupg key store by running this:

sudo rm -rf /etc/pacman.d/gnupg/
sudo pacman-key --init
sudo pacman-key --populate archlinux

After that, I ran the steps as described in https://github.com/linux-surface/linux-surface/wiki/Package-Repositories#arch-linux-repository

However, this didn't change the result.

@qzed
Copy link
Member

qzed commented Apr 20, 2023

Any chance that pacman -Syyu fixes this? This should re-download the package databases.

@manuth
Copy link

manuth commented Apr 20, 2023

Thank you so much for helping me out!
pacman -Syyu didn't do the trick for me. However, after looking up on how to remove locally stored databases, I could fix it by doing

sudo rm -rf /var/lib/pacman/sync;
sudo pacman -Syyu

@qzed
Copy link
Member

qzed commented Apr 20, 2023

So I think that would point to the database being corrupted somehow?

@manuth
Copy link

manuth commented Apr 20, 2023

I assume that's the case, yeah

@qzed
Copy link
Member

qzed commented Apr 22, 2023

If this happens again, maybe you can check if there's anything obvious wrong with the .db and .files files for linux-surface (e.g. like having a size of zero bytes).

Also this still only happens on Manjaro, right? So I'm assuming that somehow their pamac messes that up. AFAIK it uses libalpm (the Arch Linux pacman library), so I'm not entirely sure whether it's pamacs fault though... Anyways, if this doesn't happen on normal Arch and other Arch derivatives, it should be brought up with the pamac developers. Otherwise, it should probably be brought up with the pacman/libalpm developers.

@manuth
Copy link

manuth commented Apr 22, 2023

Not speaking for the others, ofc:
I switched over from Pop!OS to Arch

My Surface often hangs when trying to suspend, resume or power off - effectively forcing me to force shutdown my laptop.

So it might be likely that me hard resetting my laptop caused this issue to happen.

@qzed
Copy link
Member

qzed commented Apr 23, 2023

Ah, I think that could explain something like this, e.g. if it's updating/writing the file when it crashes.

@StollD
Copy link
Member

StollD commented Apr 23, 2023

Disabling any automatic checks for updates could mitigate this.

@qzed qzed added the A: packages Area: Packages and repositories label May 25, 2023
@urbenlegend
Copy link

urbenlegend commented May 25, 2023

Thank you so much for helping me out! pacman -Syyu didn't do the trick for me. However, after looking up on how to remove locally stored databases, I could fix it by doing

sudo rm -rf /var/lib/pacman/sync;
sudo pacman -Syyu

This did not work for me. Every time I run pacman it will cause Pamac to error out afterwards. If I delete the sync folder and don't run pacman, but instead run Pamac, it works. Something about the existence of linux-surface.db.sig causes Pamac to break.

Filed a bug with Pamac

@qzed
Copy link
Member

qzed commented May 26, 2023

@urbenlegend It would probably be a good idea to add a link on that bug report pointing back here.

@urbenlegend
Copy link

urbenlegend commented May 26, 2023

@qzed Added!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: packages Area: Packages and repositories
Projects
None yet
Development

No branches or pull requests

7 participants