Skip to content

Add obsoletes and provides to fix errors in shim-unsigned upgrade to shim#11245

Merged
christopherco merged 2 commits into3.0-devfrom
chrco/shim-obsoletes
Dec 2, 2024
Merged

Add obsoletes and provides to fix errors in shim-unsigned upgrade to shim#11245
christopherco merged 2 commits into3.0-devfrom
chrco/shim-obsoletes

Conversation

@christopherco
Copy link
Copy Markdown
Collaborator

@christopherco christopherco commented Nov 27, 2024

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

Prior ARM64 images and installations historically used "shim-unsigned" v15.4 in order to boot without Secure Boot enforcing.
To ensure a seamless upgrade experience from the older unsigned shim to this new signed shim, include additional RPM dependency logic (Obsoletes on "shim-unsigned" so older installations with "shim-unsigned" installed will upgrade cleanly from the unsigned shim v15.4 to this new signed version of the shim v15.8+

Unlike dnf, our current tdnf does not gracefully handle Obsoletes properly.
When the user runs "tdnf install shim-unsigned". The proper
behavior with Obsoletes only in place is for this transaction to
complete with nothing to do, which is what dnf does. However tdnf still
attempts to perform the transaction, which yields undesired results.

As a workaround to tdnf's lack of correct support of Obsoletes, add an
additional Provides to the shim package to have it "provide" for
shim-unsigned as well.

This workaround can be removed when tdnf is updated with proper RPM
Obsoletes behavior.

Signed-off-by: Chris Co chrco@microsoft.com

Does this affect the toolchain?

NO

Associated issues
Test Methodology

Prior ARM64 images and installations historically used "shim-unsigned" v15.4
in order to boot without Secure Boot enforcing.
To ensure a seamless upgrade experience from the older unsigned shim to
this new signed shim, include additional RPM dependency logic so older
installations will upgrade cleanly from the unsigned shim v15.4 to this new
signed version of the shim v15.8+

Signed-off-by: Chris Co <chrco@microsoft.com>
@christopherco christopherco changed the title Add obsoletes to fix shim-unsigned upgrade to shim errors Add obsoletes to fix errors in shim-unsigned upgrade to shim Nov 27, 2024
@christopherco christopherco marked this pull request as ready for review November 28, 2024 07:01
@christopherco christopherco requested a review from a team as a code owner November 28, 2024 07:01
Unlike dnf, our current tdnf does not gracefully handle Obsoletes properly.
When the user runs "tdnf install shim-unsigned". The proper
behavior with Obsoletes only in place is for this transaction to
complete with nothing to do, which is what dnf does. However tdnf still
attempts to perform the transaction, which yields undesired results.

As a workaround to tdnf's lack of correct support of Obsoletes, add an
additional Provides to the shim package to have it "provide" for
shim-unsigned as well.

This workaround can be removed when tdnf is updated with proper RPM
Obsoletes behavior.

Signed-off-by: Chris Co <chrco@microsoft.com>
@christopherco christopherco changed the title Add obsoletes to fix errors in shim-unsigned upgrade to shim Add obsoletes and provides to fix errors in shim-unsigned upgrade to shim Dec 2, 2024
@christopherco
Copy link
Copy Markdown
Collaborator Author

christopherco commented Dec 2, 2024

Updated Buddy Build:

shim and shim-unsigned upgrade tests pass

@christopherco christopherco merged commit f49c769 into 3.0-dev Dec 2, 2024
@christopherco christopherco deleted the chrco/shim-obsoletes branch December 2, 2024 23:42
arc9693 pushed a commit that referenced this pull request Dec 12, 2024
…shim (#11245)

Prior ARM64 images and installations historically used "shim-unsigned" v15.4 in order to boot without Secure Boot enforcing.
To ensure a seamless upgrade experience from the older unsigned shim to this new signed shim, include additional RPM dependency logic (Obsoletes on "shim-unsigned" so older installations with "shim-unsigned" installed will upgrade cleanly from the unsigned shim v15.4 to this new signed version of the shim v15.8+

Unlike dnf, our current tdnf does not gracefully handle Obsoletes properly.
When the user runs "tdnf install shim-unsigned". The proper
behavior with Obsoletes only in place is for this transaction to
complete with nothing to do, which is what dnf does. However tdnf still
attempts to perform the transaction, which yields undesired results.

As a workaround to tdnf's lack of correct support of Obsoletes, add an
additional Provides to the shim package to have it "provide" for
shim-unsigned as well.

This workaround can be removed when tdnf is updated with proper RPM
Obsoletes behavior.

Signed-off-by: Chris Co <chrco@microsoft.com>
durgajagadeesh pushed a commit to durgajagadeesh/azurelinux_djpalli that referenced this pull request Dec 31, 2024
…shim (microsoft#11245)

Prior ARM64 images and installations historically used "shim-unsigned" v15.4 in order to boot without Secure Boot enforcing.
To ensure a seamless upgrade experience from the older unsigned shim to this new signed shim, include additional RPM dependency logic (Obsoletes on "shim-unsigned" so older installations with "shim-unsigned" installed will upgrade cleanly from the unsigned shim v15.4 to this new signed version of the shim v15.8+

Unlike dnf, our current tdnf does not gracefully handle Obsoletes properly.
When the user runs "tdnf install shim-unsigned". The proper
behavior with Obsoletes only in place is for this transaction to
complete with nothing to do, which is what dnf does. However tdnf still
attempts to perform the transaction, which yields undesired results.

As a workaround to tdnf's lack of correct support of Obsoletes, add an
additional Provides to the shim package to have it "provide" for
shim-unsigned as well.

This workaround can be removed when tdnf is updated with proper RPM
Obsoletes behavior.

Signed-off-by: Chris Co <chrco@microsoft.com>
SumitJenaHCL pushed a commit to SumitJenaHCL/azurelinux that referenced this pull request Feb 24, 2025
…shim (microsoft#11245)

Prior ARM64 images and installations historically used "shim-unsigned" v15.4 in order to boot without Secure Boot enforcing.
To ensure a seamless upgrade experience from the older unsigned shim to this new signed shim, include additional RPM dependency logic (Obsoletes on "shim-unsigned" so older installations with "shim-unsigned" installed will upgrade cleanly from the unsigned shim v15.4 to this new signed version of the shim v15.8+

Unlike dnf, our current tdnf does not gracefully handle Obsoletes properly.
When the user runs "tdnf install shim-unsigned". The proper
behavior with Obsoletes only in place is for this transaction to
complete with nothing to do, which is what dnf does. However tdnf still
attempts to perform the transaction, which yields undesired results.

As a workaround to tdnf's lack of correct support of Obsoletes, add an
additional Provides to the shim package to have it "provide" for
shim-unsigned as well.

This workaround can be removed when tdnf is updated with proper RPM
Obsoletes behavior.

Signed-off-by: Chris Co <chrco@microsoft.com>
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.

3 participants