pyinfra-dev / pyinfra-dev/pyinfra
Support retrieval of signing key in `apt.repo` operation (replace `apt.key`)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6k
- Forks
- 548
- Avg merge
- 7d 17h
- Merged PRs (30d)
- 13
Description
Describe the bug
The apt.key operation invokes the Debian apt-key command[1], but that command is deprecated (see e.g. the apt-key man page).
The man page above says apt-key will be removed from versions of Ubuntu >= 22.04. This isn't actually true – as I can confirm apt-key in fact is available on Ubuntu 22.04 – but it might be helpful to users to add a deprecation warning in the docstring for the operation, similar to what the equivalent Ansible command does:
[1]: here, and on the following lines:
To Reproduce
N.A.
Expected behavior
It would be helpful to users to add a deprecation warning in the documentation.
Comments
The recommended new approach is to download keys to somewhere like /usr/share/keyrings, and to use the signed-by option in /etc/apt/sources files (see e.g. "apt-key is deprecated", based on information from the Debian wiki). So it might be worth adding a link to pyinfra's GPG operation documentation.
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
Inspect the apt.key operation docstring in pyinfra/operations/apt.py around the referenced lines. Compare the deprecation wording with Ansible's apt_key documentation and the linked GPG operation documentation; done means users are warned about apt-key and directed to the recommended keyring and signed-by approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100