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
Handle various architecture formats in aptpkg module #60986
Conversation
@Ch3LL With respect to testing this with the The specific failures are still related to the
These are the actual rendered states which are failing (to provide the content to the respective file): ...
deb multimedia-stable:
pkgrepo.managed:
- name: deb [arch=amd64 ] http://www.deb-multimedia.org stable main
- file: /etc/apt/sources.list.d/multimedia-stable-binary.list
- keyid: 5C808C2B65558117
- keyserver: keyserver.ubuntu.com
- clean_file: true
- refresh: False
- refresh_db: False
- onchanges_in:
- module: apt.refresh_db
...
deb heroku:
pkgrepo.managed:
- name: deb [arch=amd64 ] https://cli-assets.heroku.com/apt ./
- file: /etc/apt/sources.list.d/heroku-binary.list
- key_url: https://cli-assets.heroku.com/apt/release.key
- clean_file: true
- refresh: False
- refresh_db: False
- onchanges_in:
- module: apt.refresh_db |
@myii thanks for testing, I appreciate it. I just pushed up a fix, can you test again? |
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.
@Ch3LL Tried this out on top of the 3004rc1
Tiamat packages. Almost there now, just a minor issue.
https://gitlab.com/myii/apt-formula/-/pipelines/381257149
× File /etc/apt/sources.list.d/multimedia-stable-binary.list content is expected to match /deb \[arch=amd64\] http:\/\/www.deb-multimedia.org stable main/
expected "deb [arch=amd64] http://www.deb-multimedia.org stable main\n" to match /deb \[arch=amd64\] http:\/\/www.deb-multimedia.org stable main/
Diff:
@@ -1 +1 @@
-/deb \[arch=amd64\] http:\/\/www.deb-multimedia.org stable main/
+deb [arch=amd64] http://www.deb-multimedia.org stable main
- There are two spaces after
[arch=amd64]
instead of the one space expected.
Used the fix I've suggested inline (below).
https://gitlab.com/myii/apt-formula/-/pipelines/383147404
- All except Debian 11 are now passing.
- Failing with
An error was encountered while installing package(s): apt-get: /opt/saltstack/salt/run/libstdc++.so.6: version 'GLIBCXX_3.4.26' not found (required by /usr/lib/x86_64-linux-gnu/libapt-pkg.so.6.0)
, which is unrelated to this PR.
- Failing with
@Ch3LL For a wider test, I've used the Tiamat pre-salted images for our weekly testing (that's usually done against the https://gitlab.com/myii/grafana-formula/-/jobs/1653421022 ID: grafana-package-install-pkg-installed
Function: pkg.installed
Name: grafana
Result: False
Comment: An error was encountered while installing package(s): W: GPG error: https://repo.saltproject.io/salt-dev/py3/debian/10/amd64 stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E08A149DE57BFBE
E: The repository 'https://repo.saltproject.io/salt-dev/py3/debian/10/amd64 stable InRelease' is not signed. It looks like |
@bryceml can you look into the missing key issues ^ |
@myii can you re-review/test? Looks like the tests are passing now too :) |
@bryceml has explained the situation to me in Slack. This is an issue with |
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.
Looks good - couple of questions but I don't think they're blockers
going forward, salt-archive-keyring.gpg should be used (binary format), since that is what debian says to do. |
30f0827
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.
🚀
@myii I made a couple more changes. Would you be willing to test this out one more time? I'll merge for now, but ping me on this PR, if you find any issues. |
@Ch3LL I've re-run the tests based on https://raw.githubusercontent.com/saltstack/salt/freeze/salt/modules/aptpkg.py.
|
thank you so much! |
What does this PR do?
Handles all repo formats in the aptpkg module
What issues does this PR fix or reference?
Fixes: #60971
Previous Behavior
The architecture repo format
[arch=amd64 ]
was not parsed correctly.New Behavior
[arch=amd64 ]
is parsed correctlyMerge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.