Skip to content

Enable building systemd-ukify and systemd-boot on ARM64 #14449

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

Open
wants to merge 4 commits into
base: 3.0-dev
Choose a base branch
from

Conversation

SeanDougherty
Copy link
Contributor

@SeanDougherty SeanDougherty commented Aug 6, 2025

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

This PR updates systemd to build systemd-ukify and systemd-boot for both ARM64 architecture as well as the original x86_64 architecture. Additionally, systemd-boot-signed is updated to enable building on aarch64.

Signed-off-by: Sean Dougherty [email protected]

Does this affect the toolchain?

NO

Associated issues
Test Methodology

@SeanDougherty SeanDougherty requested a review from a team as a code owner August 6, 2025 20:39
@microsoft-github-policy-service microsoft-github-policy-service bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Aug 6, 2025
@SeanDougherty SeanDougherty changed the title Add ARM64 systemd-ukify and systemd-boot Enable building systemd-ukify and systemd-boot on ARM64 Aug 6, 2025
SeanDougherty added a commit to microsoft/azure-linux-image-tools that referenced this pull request Aug 7, 2025
<!-- Description: Please provide a summary of the changes and the
motivation behind them. -->
Adding fix for arm64 UKI support. This adds dynamic setting of the stub
filepaths based on architecture.

systemd-ukify and systemd-boot will be added to azurelinux arm64 with
this PR: microsoft/azurelinux#14449


---

### **Checklist**
- [ ] Tests added/updated
- [ ] Documentation updated (if needed)
- [ ] Code conforms to style guidelines

---------

Co-authored-by: Chris Gunn <[email protected]>
@christopherco christopherco requested a review from trungams August 7, 2025 02:16
Copy link
Contributor

@christopherco christopherco left a comment

Choose a reason for hiding this comment

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

Consider dropping the changes in systemd-boot-signed and just bumping the release number on the spec for the time being.
Then once you've hooked up the infra side to produce the signed systemd-bootaa64.efi binary, you can make this update to systemd-boot-signed so we start getting officially signed systemd-bootaa64.efi artifacts.

cp %{buildroot}/usr/lib/systemd/boot/efi/systemd-bootx64.efi %{buildroot}/boot/efi/EFI/BOOT/grubx64.efi
%elifarch aarch64
cp %{buildroot}/usr/lib/systemd/boot/efi/systemd-bootaa64.efi %{buildroot}/boot/efi/EFI/BOOT/grubaa64.efi
Copy link
Contributor

Choose a reason for hiding this comment

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

The copy step for source1 into systemd-bootaa64.efi on aarch64 is missing, thus making this step copy the unsigned version of systemd-bootaa64.efi from the original RPM (source0), instead of the signed version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Taking note for when we come back to systemd-boot-signed with these changes. Thank you Chris!

@SeanDougherty
Copy link
Contributor Author

Consider dropping the changes in systemd-boot-signed and just bumping the release number on the spec for the time being. Then once you've hooked up the infra side to produce the signed systemd-bootaa64.efi binary, you can make this update to systemd-boot-signed so we start getting officially signed systemd-bootaa64.efi artifacts.

Dropped changes as per recommendation. Release has been bumped to align with systemd.spec

@CBL-Mariner-Bot
Copy link
Collaborator

CBL-Mariner-Bot commented Aug 8, 2025

🚨 PR Check Failed - Critical Issues Found

Found 1 critical/error issue(s) that must be fixed.

🔍 Critical Issues Detected:

  1. Missing Patch File (ERROR)

🤖 AI Analysis Summary:

Brief Analysis:
The changes bump the release numbers for both systemd-boot-signed and systemd packages and add ARM64 support in systemd.spec while referencing a new CVE patch (CVE-2023-7008).

Critical Issues Found:
CVE-2023-7008.patch is referenced but its presence in the package directory isn’t confirmed.

Recommended Actions:
• Verify that CVE-2023-7008.patch (and any other referenced CVE patches) is included in the repository.
• Add a changelog entry for the CVE fix in systemd.spec to document the security remediation.
• Double-check that patch application directives (e.g., %autosetup, %patch) properly apply all patches.


📋 For detailed analysis and recommendations, check the Azure DevOps pipeline logs.

@SeanDougherty
Copy link
Contributor Author

SeanDougherty commented Aug 8, 2025

🚨 PR Check Failed - Critical Issues Found

Found 1 critical/error issue(s) that must be fixed.

🔍 Critical Issues Detected:

  1. Missing Patch File (ERROR)

🤖 AI Analysis Summary:

Brief Analysis: These changes update the release number and add ARM64 support while retaining pre‐existing patch definitions—including a CVE patch (CVE-2023-7008).

Critical Issues Found: • No explicit application of patch directives is visible for the CVE patch; ensure it’s applied correctly. • The changelog does not mention the CVE fix corresponding to CVE-2023-7008.

Recommended Actions: • Verify that CVE-2023-7008.patch (and other declared patches) is present in the package directory and that it is applied via %patch or %autopatch in the %prep section. • Update the changelog with a clear entry for the CVE fix. • Confirm that ARM64 changes use the same patch management best practices as the x86_64 code.

📋 For detailed analysis and recommendations, check the Azure DevOps pipeline logs.

This appears to be a false alarm. '26494.patch' is present in /SPEC/systemd/ , however, this referencing of patch0001 using the github url is new to me.

How does this play with RPM?

This has been in the spec since 255, so I'm curious if this issue is benign.

EDIT: Further review shows that this Patch path format follow similarly to our Source#: fields. Only the final portion of the path is used by rpmbuild. This is not a typical format for Patch files in Azure Linux, but it is not incorrect. We can confirm this is a false alarm from CBLMariner-Bot.

Seperately, CBLMariner-Bot also raised concerns over a missing CVE-2023-7008 patch. This is also a false alarm, the patch was contributed 7 months ago and still exists and is being applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0-dev PRs Destined for AzureLinux 3.0 Packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants