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

key id's longer than 8 characters are always downloaded/retreived from key servers/sources #100

Closed
wants to merge 1 commit into from

Conversation

eodabas
Copy link

@eodabas eodabas commented Dec 12, 2012

some repos (like percona apt repo) have key id's longer than 8 characters and if given key id is longer than 8 characters, it won't be matched on "apt-key list | grep KEY" and marked unlisted which will force puppet to download/retreive it on each run.

  apt::source {
    "percona":
      location          => "http://repo.percona.com/apt",
      release           => $::lsbdistcodename,
      repos             => "main",
      include_src       => false,
      key               => "1C4CBDCDCD2EFD2A",
      key_server        => "keys.gnupg.net",
  }

@@ -48,7 +49,7 @@
exec { $digest:
command => $digest_command,
path => '/bin:/usr/bin',
unless => "/usr/bin/apt-key list | /bin/grep '${upkey}'",
unless => "/usr/bin/apt-key list | /bin/grep '${upkeytrimmed}'",
logoutput => 'on_failure',
before => Anchor["apt::key ${upkey} present"],
Copy link

Choose a reason for hiding this comment

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

You missed updating line 54 with the new variable.

Copy link
Author

Choose a reason for hiding this comment

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

actually, i didn't. i thought leaving variable as it is entered on all places, but changing only the line that matches the key is better. the Anchor type you specified on that line is defined with variable ${upkey} on line 40.

@benben
Copy link

benben commented Jun 17, 2013

👍

hey @eodabas, do you mind completing your PR, so we can increase the chance to get it merged soon? 😺

@eodabas
Copy link
Author

eodabas commented Jun 20, 2013

hi @benben, sorry but i don't understand what to complete exactly :/

hunner added a commit that referenced this pull request Jul 1, 2013
trim keys to 8 chars for matching with apt-key list (fix for #100)
@hunner
Copy link

hunner commented Jul 1, 2013

Hi! I merged #133 with this fix because it also updated line 70. Thanks for the original code!

@hunner hunner closed this Jul 1, 2013
@eodabas
Copy link
Author

eodabas commented Jul 2, 2013

thumbs up!

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.

4 participants