voxpupuli / puppet-zypprepo

Puppet description of a zypper repository
Apache License 2.0
10 stars 22 forks source link

request support for: zypper's --gpg-auto-import-keys switch #10

Open hesco opened 9 years ago

hesco commented 9 years ago

I'm using the rtyler-jenkins module which is using this zipper module and bombing out as described here:

==> jenkins: Error: Execution of '/usr/bin/zypper --quiet install --auto-agree-with-licenses --no-confirm --name jenkins' returned 104: New repository or package signing key received:
==> jenkins: Key ID: 9B7D32F2D50582E6
==> jenkins: Key Name: Kohsuke Kawaguchi <kohsuke.kawaguchi@sun.com>
==> jenkins: Key Fingerprint: 150FDE3F7787E7D11EF4E12A9B7D32F2D50582E6
==> jenkins: Key Created: Mon Jun 22 17:26:56 2009
==> jenkins: Key Expires: (does not expire)
==> jenkins: Repository: Jenkins
==> jenkins:
==> jenkins: Do you want to reject the key, trust temporarily, or trust always? [r/t/a/? shows all options] (r): r
==> jenkins: Error building the cache:
==> jenkins: [|] Valid metadata not found at specified URL(s)
==> jenkins: Warning: Disabling repository 'Jenkins' because of the above error.

The zypper man page reports:

--gpg-auto-import-keys
              If  new  repository  signing key is found, do not ask what to do; trust and import it automatically. This option causes that the
              new key is imported also in non-interactive mode, where it would otherwise got rejected.

I would suggest a parameterized switch to enable this behavior.

-- Hugh Esco

hesco commented 9 years ago

On further investigation, the --gpg-auto-import-keys switch does not apply to the zypper install but instead to the zypper addrepo command. Have not yet figured out how to impact that though. As a work-around I am adding the inaccessible packages to our internal repo, for which our keys are already in place.