[BUG] pkgrepo.managed doesn't create keyrings folder when aptkey: false
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
A simple state like this:
Setup Fluent Bit repo:
pkgrepo.managed:
- humanname: Fluent Bit Repo
- name: deb [signed-by=/etc/apt/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/{{ grains['osfullname']|lower }}/{{ grains['oscodename']|lower }} {{ grains['oscodename']|lower }} main
- file: /etc/apt/sources.list.d/fluentbit.list
- key_url: https://packages.fluentbit.io/fluentbit.key
- aptkey: False
succeed with this message:
----------
ID: Setup Fluent Bit repo
Function: pkgrepo.managed
Name: deb [signed-by=/etc/apt/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/ubuntu/focal focal main
Result: True
Comment: Configured package repo 'deb [signed-by=/etc/apt/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/ubuntu/focal focal main'
Started: 18:06:11.660926
Duration: 6497.876 ms
Changes:
----------
repo:
deb [signed-by=/etc/apt/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/ubuntu/focal focal main
But the folder /etc/apt/keyrings doesn't exists.
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Please be as specific as possible and give set-up details.
- on-prem machine
- VMware
- VM running on a cloud service, please be explicit and add details
- container (Kubernetes, Docker, containerd, etc. please specify)
- or a combination, please be explicit
- jails if it is FreeBSD
- classic packaging
- onedir packaging
- used bootstrap to install
Steps to Reproduce the behavior
(Include debug logs if possible and relevant)
Expected behavior
Either create the folder /etc/apt/keyrings if not exists, or fail the step.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3005.1
Dependency Versions:
cffi: 1.14.6
cherrypy: unknown
dateutil: 2.8.2
docker-py: 5.0.3
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.0
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: Not Installed
Python: 3.9.14 (main, Oct 3 2022, 21:19:16)
python-gnupg: 0.4.8
PyYAML: 5.4.1
PyZMQ: 23.2.0
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: ubuntu 20.04 focal
locale: ascii
machine: x86_64
release: 5.4.0-104-generic
system: Linux
version: Ubuntu 20.04 focal
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the pkgrepo.managed entry point and reproduce the state on Ubuntu 20.04 with aptkey set to false and the signed-by keyring path shown in the report. Trace how the repository is configured and verify that the completed behavior either creates /etc/apt/keyrings or reports a failure when that directory is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python, ubuntu
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100