Create and Improve tutorial for gpg files after Ubuntu upgrade

Hello Friends

Through the following valuable tutorial:

Is mentioned about the /etc/apt/sources.list.d directory. In this domain exists the following current tutorial:

In the sources.list file and sources.list.d directory section, in the first figure appears the trusted.gpg file and trusted.gpg.d directory

Pls, consider to improve about the following (my current case):

Consider when you have Ubuntu Desktop 20.04 LTS upgrated to 22.04 LTS. Therefore:

  • how to upgrade the trusted.gpg file?
  • how to upgrade the files within the trusted.gpg.d directory? I am assuming there are more gpg files.

Consider same question - if is the case - if these gpg files exist within the /etc/apt/sources.list.d directory too. Itis/theyare currently out of date.

Just in case, it is not covered at Using GPG to Encrypt and Decrypt Files on Linux [Hands-on for Beginners].

Note if my memory does not fail me, these gpg files were applied for an alternate installation process. I think it happened for Docker and MySQL through their .deb files. But I have the situation about the OS upgrade.

Thanks for your understanding.

I don’t see why you would want to upgrade files in trusted.gpg.d directory.

You have upgraded the OS. If there were any external repositories added, their GPG signature doesn’t change for the new version automatically (unless they have a different repository for the new version which is signed by another GPG signature).

1 Like

Let me do the sudo apt update && sudo apt upgrade commands to copy & paste the warning message … something about keys appeared, and of course is related with the /etc/apt/sources.list.d directory

Hello @abhishek

The situation is as follows, when the sudo apt update command is executed arises (fixed in multiple lines):

W: http://repo.mysql.com/apt/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. 

How to fix that? The mentioned section is not valuable for guidance about step by step.

Therefore this kind of problem and solution (requested) would be very valuable for the mentioned tutorial/post

Remember it happens because Ubuntu was upgraded from 20.04 to 22.04.

Thanks for your understanding.

Ah that! Okay… so you don’t have to do anything specific for GPG keys after each Ubuntu version upgrade. That statement is true.

This warning you see if because of the changes being bring in the newer Ubuntu and Debian versions. The apt-key command is being deprecated and there is new guideline on how to handle the keys.

The onus for this issue should lie on the developer’s side to provide correct steps to end users.

This is still a warning and you may choose to ignore it for the moment or you can try making some changes on your own.

I have written two posts on it (they are quite similar to each other):

Please go through them.

1 Like

Thanks for the reply.

I will read your provided links, but consider that is critical that after to fix this situation mysql must be keep it updated in this 22.04 as was accomplished on 20.04 … I mean sudo apt update and sudo apt upgrade must update MySQL

Thanks for your support.

1 Like