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

Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details #3006

Closed
arun-mani-j opened this issue Feb 27, 2022 · 11 comments

Comments

@arun-mani-j
Copy link

Tried my best to make sure it's not a duplicate, but if yes, I'm sorry.

  • Distribution (version): Debian GNU/Linux bookworm/sid
  • Desktop environment: GNOME
  • Installing method: PPA

I installed the icon pack using the commands mentioned in Debian and derivatives.

During sudo apt update, I get this warning.

W: http://ppa.launchpad.net/papirus/papirus/ubuntu/dists/focal/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

My version of apt is 2.4.0, so you can view the deprecation section in unstable man pages (as of writing this issue).

Since I'm on testing edition and also since it is only warning, we have a lot of time to upgrade the existing installation setup.

Thank you 😄

@ItsKruistz
Copy link

ItsKruistz commented Feb 27, 2022

you can just use the installation script instead
(wget -qO- https://git.io/papirus-icon-theme-install | sh)

@arun-mani-j
Copy link
Author

@nguyensang28

  1. I'm not installing the icon set now. I already installed it in late 2020s and this warning started appearing after apt's update to 2.4.0. So I guess, the installation instructions for PPA should be updated and existing users' installations via PPA can be upgraded if possible without them having to do a reinstall. :)
  2. I checked the script you mentioned. It appears to be doing direct install by downloading the latest icon release. I personally prefer apt (i.e. PPA here) as they are integrated well into the existing package manager. Hence, I can update every package via it without the need to manually keep checking for updates for individual packages.
    (Github's Watch exists, I agree, but package manager are more comfortable than subscribe-update mechanism). Is there any plan to deprecate the PPA in future by the maintainers?

@varlesh
Copy link
Contributor

varlesh commented Feb 28, 2022

On new apt version keys located on /etc/apt/trusted.gpg.d directory. For solve this need add key with new method:

sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/papirus.gpg --keyserver keyserver.ubuntu.com --recv E58A9D36647CAE7F
sudo chmod 644 /etc/apt/trusted.gpg.d/papirus.gpg

@arun-mani-j
Copy link
Author

Hii @varlesh
Thanks for the update.
I tried the new instructions to remove the warning.

The first step was to locate the old key and remove it.
Using apt-key list and searching for any key that is located in /etc/apt/trusted.gpg and then removing that corresponding key as

sudo apt-key del 647CAE7F

This worked fine.
Next I removed the old sources.list file by sudo rm /etc/apt/sources.list.d/papirus-ppa.list. Then I ran sudo apt update. So far all good.

I copy pasted the new instructions but it gave the following error.

$ sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/papirus.gpg --keyserver keyserver.ubuntu.com --recv E58A9D36647CAE7F
gpg: keyring '/etc/apt/trusted.gpg.d/papirus.gpg' created
gpg: failed to create temporary file '/root/.gnupg/.#lk0x000055f4448cc780.vaiozone.4301': No such file or directory
gpg: connecting dirmngr at '/root/.gnupg/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

(The commands before this command ran fine, I have dirmngr installed too, even restarted system).

I think this issue is because of the use of sudo for gpg which makes it locate keys from /root instead of /home/username.
I tried searching other repos for how they are using gpg to import keys, I checked zsh-completions repo. Here they are downloading the key, piping it to gpg and then adding it to /etc/apt/trusted.gpg.d.

I thought of doing same, I searched for 0xE58A9D36647CAE7F in keyserver.ubuntu.com and got this. I clicked the link in key and copied the GPG Public Key.

Then I did

$ cat key.txt | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/papirus.gpg > /dev/null
$ sudo chmod 644 /etc/apt/trusted.gpg.d/papirus.gpg # I don't know if it is needed (other repos don't use it)
# But I still did it because the papirus.gpg file in trusted.gpg.d didn't have rw-r-r 

This imported the key!
I ran sudo apt update and everything worked fine.

Finally, I don't know if the issue is a thing that happened because of some quirks in my system, but this is how I solved. May be if future readers face the same problem, they can solve using this.

Thanks again 😄 !

@varlesh
Copy link
Contributor

varlesh commented Mar 2, 2022

@J-Arun-Mani Please check this command on your OS (after sudo rm /etc/apt/trusted.gpg.d/papirus.gpg), it's get key fine?:
curl -fsSL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xe58a9d36647cae7f' | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/papirus.gpg > /dev/null

@varlesh
Copy link
Contributor

varlesh commented Mar 2, 2022

@dsgsdg3 Похоже какие-то проблемы с конфигом gpg или dirmnr по-дефолту в skel или где-либо еще. Вверху альтернативный способ получения ключа, протестируйте плиз.

@arun-mani-j
Copy link
Author

@varlesh yes, it works fine.

To summarize, this is exactly what I did to ensure:

$ # Removal
$ sudo rm /etc/apt/trusted.gpg.d/papirus.gpg
$ sudo rm /etc/apt/sources.list.d/papirus-ppa.list 
$ sudo apt update 
$ # Install
$  sudo sh -c "echo 'deb http://ppa.launchpad.net/papirus/papirus/ubuntu focal main' > /etc/apt/sources.list.d/papirus-ppa.list"
$ curl -fsSL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xe58a9d36647cae7f' | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/papirus.gpg > /dev/null
$ # Checking
$ sudo apt update
...
Hit:3 http://ppa.launchpad.net/papirus/papirus/ubuntu focal InRelease
...

So yea, this works fine ✌️

@LahimaGuru
Copy link

Hi, I think I'm having kind of the same error, but i've tried lot of things and still cant make it wotk, after Docker installation I went to "apt'get update" giving me this problem:

W: https://download.docker.com/linux/debian/dists/buster/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

I started with Kali Linux a month ago and I'm still nobb...if anyone could help me will be very thankful.

@arun-mani-j
Copy link
Author

@LahimaGuru
Hi there.
This repo is for Papirus icons and so you should check out Docker user groups on how to fix the warning. Because the steps involved will vary by a lot of degree.

With that,

  1. Install using the repository uses the new method which shouldn't give you the warning. You should ask Docker devs for the updating guide.
  2. If you are a beginner, please skip Kali and use a general purpose OS like Debian, Fedora, Ubuntu or Linux Mint.
    Cheers.

@ghost
Copy link

ghost commented Mar 11, 2022 via email

@maxengel
Copy link

maxengel commented Oct 10, 2022

@varlesh: I've found that on a fresh install of Linux Mint 21, if I follow the instructions for (Ubuntu and Derivatives)[https://github.com/PapirusDevelopmentTeam/papirus-icon-theme#ubuntu-and-derivatives} I still get the error: W: http://ppa.launchpad.net/papirus/papirus/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants