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

apt creates malformed sources.list.d entry #1062

Open
clambertus opened this issue Sep 16, 2022 · 1 comment
Open

apt creates malformed sources.list.d entry #1062

clambertus opened this issue Sep 16, 2022 · 1 comment

Comments

@clambertus
Copy link

clambertus commented Sep 16, 2022

Describe the Bug

puppetlabs-apt creates a malformed sources entry when an apt::source contains a location parameter that includes a [signed-by] string:

deb [ ] [signed-by=/usr/share/keyrings/datadog-archive-keyring.gpg] https://apt.datadoghq.com/ stable 7

Expected Behavior

When an apt::source location parameter contains a [string] entry, puppetlabs-apt should not prepend [ ]

Steps to Reproduce

Create an apt::source{} block with a location parameter containing a [string] such as [signed-by=/usr/share/keyrings/datadog-archive-keyring.gpg]. This can be seen 'in the wild' by attempting to install the datadog agent with https://github.com/DataDog/puppet-datadog-agent

Environment

  • Version - puppetlabs-apt 9.0.0
  • Platform - Ubuntu 22.04

Additional Context

The specific apt::source call from datadog is:

$location = "[signed-by=${apt_usr_share_keyring}] https://apt.datadoghq.com/"

apt::source { 'datadog':
  comment  => 'Datadog Agent Repository',
  location => $location,
  release  => $release,
  repos    => $repos,
}
@clambertus
Copy link
Author

It appears this is due to using an old version of stdlib (5.0.0) as updating to 8.4.0 fixed this problem. However, the metadata.json shows a stdlib version requirement of:

"dependencies": [
    {
      "name": "puppetlabs/stdlib",
      "version_requirement": ">= 4.16.0 < 9.0.0"
    }
  ],

Perhaps the version_requirement needs updating?

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

No branches or pull requests

2 participants