-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[aptpkg] Add deb822 repository format support #67748
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
Conversation
af0a486
to
a38a383
Compare
a38a383
to
f11ac72
Compare
HAS_DEB822 = False | ||
|
||
if HAS_APT: | ||
try: | ||
from aptsources.sourceslist import Deb822SourceEntry, _deb822 | ||
|
||
HAS_DEB822 = True | ||
except ImportError: | ||
pass | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem with this approach. relenv doesn't have aptsources. which is why HAS_APT was removed in 3007.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relenv doesn't have aptsources
Correct, which I'd think is a bug with the packaging of Salt on Debian-based systems.
Does 3007 (and newer) rely only on the custom classes in aptpkg
that it redefines instead of importing from the python3-apt system library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relenv doesn't have aptsources
Correct, which I'd think is a bug with the packaging of Salt on Debian-based systems.
Or it isn't. python-apt is not easily integrated. it isn't in pypi. it isn't meant for consumption outside of the package. and since relenv isn't just a venv. it isn't something to just allow "system python".
the other issue is some people like building their own packages. and if they do it in a different manner and try installing python-apt from say a github repo. there are a number of them any of which could be compromised.
Does 3007 (and newer) rely only on the custom classes in
aptpkg
that it redefines instead of importing from the python3-apt system library?
those classes were moved to a utils module, and rewtitten but yes.
and this is because aptpkg was completely broken. it worked in two different manners depending on if python-apt was installed or not. some things worked only if it wasn't there and others worked only if it was. it was a mess.
that all being said. if relenv gets python-apt go for it. split the functionality again. I was just raising my concern. I am no longer a maintainer in salt and have 0 stake in its functionality.
Folks, I'm closing this PR in favor of #67956, which implements feedback from @whytewolf Please direct your reviews to that PR. |
What does this PR do?
In this PR, we are:
What issues does this PR fix or reference?
Fixes #66928, #67334, #67760
Forward port from: openSUSE/salt#692
Previous Behavior
Deb822 repositories are not recognized.
New Behavior
Users can use debian repositories in either the DEB822 or the old one-line format.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices, including the
PR Guidelines.
See GitHub's page on GPG signing for more information about signing commits with GPG.