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

repo.pp: use apt::keyring on distros where using keys stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg) is deprecated #975

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

spicyprogramming
Copy link
Contributor

Pull Request (PR) description

Newer apt based distros have deprecated apt keys stored in /etc/apt/trusted.gpg: installing zabbix agent with this module will result in the following warning:

root@ubuntu:~# apt update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease    
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease      
Hit:4 http://apt.puppet.com jammy InRelease                         
Hit:5 http://repo.zabbix.com/zabbix/6.0/ubuntu jammy InRelease
Hit:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
51 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: http://repo.zabbix.com/zabbix/6.0/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.
root@ubuntu:~# 
root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04 LTS
Release:	22.04
Codename:	jammy
root@ubuntu:~# 

AFAIK this started happening in Debian >= 12 and Ubuntu >= 22.04

Using apt::keyring instead of apt::key seems to silence the warning.

This Pull Request (PR) fixes the following issues

@@ -1,6 +1,7 @@
# frozen_string_literal: true

require 'spec_helper'
Package = Puppet::Util::Package
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line looks rather odd and I doubt that it's required

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That kind of hackish addition was just to keep the code under a reasonable number of characters per line but i guess after the changes to make the linter happy that ship has sailed anyway.

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

Successfully merging this pull request may close these issues.

2 participants