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

[RHELC-708] Check if shim-x64 package is present in the system #572

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

r0x0d
Copy link
Member

@r0x0d r0x0d commented Aug 15, 2022

In PR #553 we removed a condition from the shim-x64 special case workaround
where it was only supposed to handle UEFI systems, and now we are handling BIOS
as well. The problem is that in the BIOS systems, this package may not be
installed at all.

This commit introduces a quick check to validate if the package is present on
the system before trying to backup it's protection file under
/etc/yum/protected.d.

Signed-off-by: Rodolfo Olivieri [email protected]

@r0x0d r0x0d requested a review from bocekm August 15, 2022 14:28
@r0x0d r0x0d self-assigned this Aug 15, 2022
@codecov
Copy link

codecov bot commented Aug 15, 2022

Codecov Report

Merging #572 (785ecf3) into main (4add545) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #572      +/-   ##
==========================================
+ Coverage   91.49%   91.50%   +0.01%     
==========================================
  Files          18       18              
  Lines        2715     2719       +4     
  Branches      489      490       +1     
==========================================
+ Hits         2484     2488       +4     
  Misses        172      172              
  Partials       59       59              
Impacted Files Coverage Δ
convert2rhel/special_cases.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@danmyway
Copy link
Member

Do we want to have a sanity check for this one @r0x0d, @bocekm ?

@r0x0d
Copy link
Member Author

r0x0d commented Aug 16, 2022

A sanity check in this case would mean (not) having the shim-x64 package installed prior to the conversion, right? Well, I think that since we run the tests on BIOS only for now, I would say that it could be good thing to have.

This problem occurs because on BIOS, the package might not be installed at all, and this was a leftover mistake from my previous PR that I did not handle that properly...

@danmyway
Copy link
Member

danmyway commented Aug 17, 2022

That is exactly what I had in mind.
I will take care of that.

abadger
abadger previously approved these changes Aug 30, 2022
Copy link
Member

@abadger abadger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. The main change is just adding a single condition to perform the action only when the shim-x64 package is installed.

+1

In PR#553 we removed a condition from the shim-x64 special case workaround
where it was only supposed to handle UEFI systems, and now we are handling BIOS
as well. The problem is that in the BIOS systems, this package may not be
installed at all.

This commit introduces a quick check to validate if the package is present on
the system before trying to backup it's protection file under
`/etc/yum/protected.d`.

Signed-off-by: Rodolfo Olivieri <[email protected]>
@bocekm bocekm merged commit 162f9bc into oamg:main Sep 2, 2022
@r0x0d r0x0d deleted the fix-shim-x64-workaround branch September 2, 2022 18:31
@Venefilyn
Copy link
Member

@r0x0d @bocekm did we have a Jira issue for this?

@bocekm
Copy link
Member

bocekm commented Sep 7, 2022

@SpyTec, it's a follow up to https://issues.redhat.com/browse/RHELC-708 and its fix #553. After we merged it I spotted the implementation is incomplete and I mentioned it here: #553 (comment).

Technically, there's no issue to this follow up bug fix. Even though I think it can be considered as part of the https://issues.redhat.com/browse/RHELC-708. But feel free to create a separate issue for this.

@Venefilyn Venefilyn changed the title Check if shim-x64 package is present in the system [RHELC-708] Check if shim-x64 package is present in the system Sep 7, 2022
@Venefilyn Venefilyn mentioned this pull request Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants