installFromYum: give more detailed error messages on gpg errors - #334
Open
ydirson wants to merge 1 commit into
Open
installFromYum: give more detailed error messages on gpg errors#334ydirson wants to merge 1 commit into
ydirson wants to merge 1 commit into
Conversation
Covers:
1. repo_gpgcheck:
a. wrong system clock putting gpg key creation in the future, causing a
yum crash (nothing special happens if the date of the signature is in
the future ¯\_(ツ)_/¯)
b. other yum crashes due to uncaught gpg exceptions (if any)
c. lack of repomd signature (while repo_gpgcheck is in force)
d. signature done by other key than the one in ISO ("repomd.xml signature
could not be verified" ¯\_(ツ)_/¯)
2. gpgcheck:
a. RPM signed with unknown key
b. unsigned RPM referenced by unsigned repomd (no-repo-gpgcheck)
c. RPM re-signed with unknown key, unsigned repomd (no-repo-gpgcheck)
d. RPM overwritten with another RPM signed with known key (diagnosed
through hash but, same diag as 2.c)
e. delsigned/resigned/etc RPM, unchanged repomd (same diag as 2.c/d)
Does not cover notably:
- unsigned RPM referenced by (re)signed repomd
In some cases Yum does not give an error, but dies because of an
uncaught exception, which makes this check quite brittle, but in the
worst case if messages change, we still fallback to the original
"Error installing packages" message.
Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
freddy77
requested review from
GeraldEV,
KevinLCtx,
alexbrett,
bernhardkaindl,
freddy77 and
rosslagerwall
June 26, 2026 08:39
freddy77
approved these changes
Jun 26, 2026
GeraldEV
approved these changes
Jun 26, 2026
| logger.log("Yum killed by signal %d" % -rv) | ||
| raise ErrorInstallingPackage("Error installing packages") | ||
| if gpg_error_message is None: | ||
| gpg_error_message = "Error installing packages" |
Contributor
There was a problem hiding this comment.
Nitpick: You could just set gpg_error_message to this value on line 833 and remove lines 867 & 878 (then if any matches occur it would just replace it with a more detailed error message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the xs8 version of #71 currently shipping in XCP-ng 8.3, which will be forward-ported to v9 next
Covers:
Does not cover notably:
In some cases Yum does not give an error, but dies because of an uncaught exception, which makes this check quite brittle, but in the worst case if messages change, we still fallback to the original "Error installing packages" message.