do-agent icon indicating copy to clipboard operation
do-agent copied to clipboard

Ubuntu 22.04: apt-key is deprecated warning

Open Quppa opened this issue 2 years ago • 1 comments

Describe the problem

Cross-posting from DigitalOcean Community.

On a fresh Ubuntu 22.04 droplet, running curl -sSL https://repos.insights.digitalocean.com/install.sh | sudo bash produces a warning about apt-key being deprecated:

curl -sSL https://repos.insights.digitalocean.com/install.sh | sudo bash
Cleaning up old sources...OK
Verifying machine compatibility...OK
Verifying compatibility with script...OK

Installing apt repository...
Installing gpg key...Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
W: https://repos.insights.digitalocean.com/apt/do-agent/dists/main/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

Likewise, on an Ubuntu 22.04 droplet with monitoring enabled, a warning appears when running apt update:

W: https://repos.insights.digitalocean.com/apt/do-agent/dists/main/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

The warning can be fixed manually by following these steps: https://askubuntu.com/questions/1403556/key-is-stored-in-legacy-trusted-gpg-keyring-after-ubuntu-22-04-update/1403964#1403964

Steps to reproduce

  1. Create an Ubuntu 22.04 (LTS) x64 droplet with monitoring enabled.
  2. Run apt update.

Expected behavior

No deprecation warnings.

System Information

Distribution and version: Ubuntu 22.04 x64 (Jammy)

do-agent information:

Paste the entire output

/opt/digitalocean/bin/do-agent --version:

do-agent (DigitalOcean Agent)

Version:     3.13.0
Revision:    72c8c9b
Build Date:  Tue Dec 21 21:45:45 UTC 2021
Go Version:  go1.17.5
Website:     https://github.com/digitalocean/do-agent

Copyright (c) 2022 DigitalOcean, Inc. All rights reserved.

This work is licensed under the terms of the Apache 2.0 license.
For a copy, see <https://www.apache.org/licenses/LICENSE-2.0.html>.

Ubuntu, Debian

apt-cache policy do-agent

do-agent:
  Installed: (none)
  Candidate: 3.13.0
  Version table:
     3.13.0 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.12.0 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.11.0 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.10.0 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.9.4 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.9.0 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.8.0 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.7.1 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.6.0 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.5.6 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.5.5 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.5.4 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.5.2 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.5.1 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.3.1 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.2.1 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     3.0.5 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     2.2.4 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     2.2.3 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     2.2.1 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     2.2.0 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     2.1.3 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     2.0.2 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     2.0.1 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     2.0.0 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages
     1.1.3 500
        500 https://repos.insights.digitalocean.com/apt/do-agent main/main amd64 Packages

Quppa avatar Jun 20 '22 04:06 Quppa

I noticed that https://repos-droplet.digitalocean.com/install.sh is different to https://repos.insights.digitalocean.com/install.sh referenced in this repo's README.md and doesn't use apt-key.

Quppa avatar Jun 20 '22 10:06 Quppa

It's a pity this is still not solved. And why two repositories for do-agent and droplet-agent? Where indeed the droplet-agent repository is signed correctly.

matthys70 avatar Nov 01 '22 09:11 matthys70

9.12 - still not fixed

iCheater avatar Dec 09 '22 13:12 iCheater

I have decided to remove all DigitalOcean's packages (do-agent and droplet-agent) due the fact it's maintained badly...

matthys70 avatar Dec 11 '22 15:12 matthys70

I'm not exactly clear on how this all works. Will #290 address existing droplets, or is there a manual fix that can be applied to existing systems using a few commands?

darylf avatar Dec 29 '22 22:12 darylf

Hey @darylf,

Our agent auto-updates on a daily basis. Once we draft a new release, the agents should use the new keyring.

prichrd avatar Jan 04 '23 20:01 prichrd

We have deployed #290 and rolled out a new agent version that should force the use of the keyring. I will close the issue; please let us know if you face any issues, and we will re-open it.

Thank you all for your patience and help.

prichrd avatar Jan 12 '23 14:01 prichrd

No deprecation warnings to be found with a new Ubuntu 22.04 droplet. Thanks to @notpeter for the fix.

Quppa avatar Jan 13 '23 12:01 Quppa