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

[BUG] cannot find a way to set pkgrepo.managed aptkey to False #76

Open
MEschenbacher opened this issue May 5, 2024 · 0 comments
Open
Labels

Comments

@MEschenbacher
Copy link

Your setup

Formula commit hash / release tag

I'm using the most recent master bea590b

Versions reports (master & minion)

Salt Version:
          Salt: 3002.6
 
Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.11.3
       libgit2: 1.1.0
      M2Crypto: 0.37.1
          Mako: Not Installed
       msgpack: 1.0.0
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: 3.9.7
        pygit2: 1.4.0
        Python: 3.9.2 (default, Feb 28 2021, 17:03:44)
  python-gnupg: 0.4.6
        PyYAML: 5.3.1
         PyZMQ: 20.0.0
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: debian 11 bullseye
        locale: utf-8
       machine: x86_64
       release: 5.10.0-22-amd64
        system: Linux
       version: Debian GNU/Linux 11 bullseye

master and minion is the same machine.

Pillar / config used

apt:
  remove_sources_list: true
  repositories:
    salt:
      distro: bullseye
      url: https://repo.saltproject.io/salt/py3/debian/11/amd64/3007
      key_url: https://repo.saltproject.io/salt/py3/debian/11/amd64/SALT-PROJECT-GPG-PUBKEY-2023.gpg
      opts:
        signed-by: /etc/apt/keyrings/SALT-PROJECT-GPG-PUBKEY-2023.gpg

Bug details

Describe the bug

This role does not seem to know the aptkey false from pkgrepo.managed and does not download the key into /etc/apt/keyrings. apt-key itself is deprecated. Looking through the source cannot seem to find the option to set - aptkey: False in this role.

Steps to reproduce the bug

Use above pillar. See that it errors on the salt repo:

local:
----------
          ID: deb salt
    Function: pkgrepo.managed
        Name: deb [ signed-by=/etc/apt/keyrings/SALT-PROJECT-GPG-PUBKEY-2023.gpg ] https://repo.saltproject.io/salt/py3/debian/11/amd64/3007 bullseye main
      Result: True
     Comment: Configured package repo 'deb [ signed-by=/etc/apt/keyrings/SALT-PROJECT-GPG-PUBKEY-2023.gpg ] https://repo.saltproject.io/salt/py3/debian/11/amd64/3007 bullseye main'
     Started: 19:23:01.724969
    Duration: 813.624 ms
     Changes:   
              ----------
              repo:
                  deb [ signed-by=/etc/apt/keyrings/SALT-PROJECT-GPG-PUBKEY-2023.gpg ] https://repo.saltproject.io/salt/py3/debian/11/amd64/3007 bullseye main
----------
          ID: apt.refresh_db
    Function: module.run
        Name: pkg.refresh_db
      Result: False
     Comment: Module function pkg.refresh_db threw an exception. Exception: W: GPG error: https://repo.saltproject.io/salt/py3/debian/11/amd64/3007 bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 64CBBC8173D76B3F
              E: The repository 'https://repo.saltproject.io/salt/py3/debian/11/amd64/3007 bullseye InRelease' is not signed.
     Started: 19:23:02.541283
    Duration: 4257.558 ms
     Changes:   

Summary for local
--------------
Succeeded: 130 (changed=1)
Failed:      1
--------------
Total states run:     131
Total run time:     6.392 s

Expected behaviour

I'd like to use aptkey: False.

Attempts to fix the bug

Look through the documentation (pillar) and source code.

Additional context

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

No branches or pull requests

1 participant