Skip to content
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

installFromYum: give more detailed error messages on gpg errors #21

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

ydirson
Copy link
Collaborator

@ydirson ydirson commented Oct 13, 2023

This is the code submitted as xenserver#71 (formerly xenserver#68)

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.

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 <[email protected]>
@ydirson ydirson requested review from stormi and benjamreis October 13, 2023 14:12
@ydirson ydirson merged commit d5ab740 into 10.10.9-8.3 Oct 13, 2023
ydirson added a commit that referenced this pull request Dec 15, 2023
installFromYum: give more detailed error messages on gpg errors
ydirson added a commit that referenced this pull request Apr 18, 2024
installFromYum: give more detailed error messages on gpg errors
ydirson added a commit that referenced this pull request Apr 19, 2024
installFromYum: give more detailed error messages on gpg errors
ydirson added a commit that referenced this pull request Apr 19, 2024
installFromYum: give more detailed error messages on gpg errors
ydirson added a commit that referenced this pull request Apr 19, 2024
installFromYum: give more detailed error messages on gpg errors
ydirson added a commit that referenced this pull request Jul 2, 2024
installFromYum: give more detailed error messages on gpg errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants