-
Notifications
You must be signed in to change notification settings - Fork 24.1k
Make apt_repository use HTTPS for PPA repository keys #83775
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
base: devel
Are you sure you want to change the base?
Make apt_repository use HTTPS for PPA repository keys #83775
Conversation
|
Snippet from the commit linked: In the main repo I see https://salsa.debian.org/pkgutopia-team/software-properties/-/commit/a3731eb8d161a305e4e48413504a984687f620cf. It looks like This could be a breaking change. I'd be in favor of changing the default but making it configurable for backwards compatibility. Since apt-key (excluding apt-key del) is deprecated too, the module should manage the keyring with gpg instead. |
|
Thank-you for the feedback. I've made a start on this, but I'll have to pick this up next week now |
cc5b08b to
e6a0b71
Compare
|
The test The test |
|
Hey @s-hertel thanks for the suggestions. I've re-ordered things now so that this tries using GPG first and falls back to apt-key. I found that gpg didn't work for me as it was, so I've changed some things to get this working. Among other things, I've changed the ordering of the As apt-key is deprecated, and so is |
|
@andyfoston Good catch, I missed that --keyserver is deprecated in gpg. I tested it with 2.4.0, and it worked and didn't emit a deprecation warning, but it looks like it was deprecated in favor of configuring the keyserver with dirmngr in gnupg >= 2.1.9. I can't find when it is supposed to be removed though...
gnupg 2.1.10 adds support for configuring multiple keyservers. gnupg 2.3.2 changes the default keyserver from What do you think about checking the gpg version, and passing The backwards incompatibility for old content that relies on the http keyserver still seems like an issue (for both PRs), but I'm not sure about adding a module option that's only applicable for old versions of gpg to provide a way to restore the insecure behavior, so I'm curious what others think about that. Maybe it just needs to be pointed out as a potential breaking change in the porting guide. The change in this PR to reorder the APT_KEY_DIRS also seems like a backward incompatible change. I found this to be a helpful explanation about the apt-key deprecation https://askubuntu.com/questions/1286545/what-commands-exactly-should-replace-the-deprecated-apt-key/1307181#1307181, and in light of that, I think preferring /etc/apt/trusted.gpg.d is a step in the wrong direction. |
SUMMARY
Make
apt_repositoryuse HTTPS instead of HTTP when receiving keys from Ubuntu PPA repositories.This more closely aligns with Debian's/Ubuntu's
apt-add-repositoryCLI tool, and helps ensureapt_repositoryPPA installations can be used by organisations that block outbound unsecured HTTP traffic.ISSUE TYPE
ADDITIONAL INFORMATION
Debian's software-properties/ HTTPS usage commit (I'm not able to find the main repo for software-properties)