Skip to content

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

# 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.

@TheMeier
Copy link
Contributor

@spicyprogramming is this still relevant, or was it fixed in some other commit in the meantime?

@anthonysomerset
Copy link
Contributor

FYI in Debian 13 this module basically breaks without using apt::keyring instead of apt::key so this PR is also required to support Debian Trixie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants