Skip to content

Commit 1906e17

Browse files
Enable building systemd-ukify and systemd-boot on ARM64 (microsoft#14449)
This PR updates systemd to build systemd-ukify and systemd-boot for both ARM64 architecture as well as the original x86_64 architecture It also includes pyflakes to resolve ukify test error during package testing. Signed-off-by: Sean Dougherty <[email protected]> Co-authored-by: Chris Co <[email protected]>
1 parent ea9026a commit 1906e17

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

SPECS-SIGNED/systemd-boot-signed/systemd-boot-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Version: 255
1414
# determine the build information from local checkout
1515
Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/')
1616
%endif
17-
Release: 21%{?dist}
17+
Release: 22%{?dist}
1818
License: LGPL-2.1-or-later AND MIT AND GPL-2.0-or-later
1919
Vendor: Microsoft Corporation
2020
Distribution: Azure Linux
@@ -93,6 +93,9 @@ popd
9393
/boot/efi/EFI/BOOT/grubx64.efi
9494

9595
%changelog
96+
* Wed Aug 06 2025 Sean Dougherty <[email protected]> - 255-22
97+
- Bump release to match systemd spec
98+
9699
* Mon Apr 14 2025 Pawel Winogrodzki <[email protected]> - 255-21
97100
- Updating SRPM name to systemd-boot-signed-%%{buildarch}.
98101

SPECS/systemd/systemd.spec

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Version: 255
5050
# determine the build information from local checkout
5151
Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/')
5252
%endif
53-
Release: 21%{?dist}
53+
Release: 22%{?dist}
5454

5555
# FIXME - hardcode to 'stable' for now as that's what we have in our blobstore
5656
%global stable 1
@@ -144,7 +144,7 @@ Patch0900: do-not-test-openssl-sm3.patch
144144
Patch0901: networkd-default-use-domains.patch
145145
Patch0902: CVE-2023-7008.patch
146146

147-
%ifarch %{ix86} x86_64
147+
%ifarch %{ix86} x86_64 aarch64
148148
%global want_bootloader 1
149149
%endif
150150

@@ -239,6 +239,9 @@ BuildRequires: python3dist(zstd)
239239
%if 0%{?want_bootloader}
240240
BuildRequires: python3dist(pyelftools)
241241
%endif
242+
%if 0%{?with_check}
243+
BuildRequires: python3dist(pyflakes)
244+
%endif
242245
# gzip and lzma are provided by the stdlib
243246
BuildRequires: firewalld-filesystem
244247
BuildRequires: libseccomp-devel
@@ -894,7 +897,11 @@ python3 %{SOURCE2} %buildroot %{!?want_bootloader:--no-bootloader}
894897

895898
%if 0%{?want_bootloader}
896899
mkdir -p %{buildroot}/boot/efi/EFI/BOOT
900+
%ifarch x86_64
897901
cp %{buildroot}/usr/lib/systemd/boot/efi/systemd-bootx64.efi %{buildroot}/boot/efi/EFI/BOOT/grubx64.efi
902+
%elifarch aarch64
903+
cp %{buildroot}/usr/lib/systemd/boot/efi/systemd-bootaa64.efi %{buildroot}/boot/efi/EFI/BOOT/grubaa64.efi
904+
%endif
898905
%endif
899906

900907
%check
@@ -1181,7 +1188,11 @@ fi
11811188
%if 0%{?want_bootloader}
11821189
%files ukify -f .file-list-ukify
11831190
%files boot -f .file-list-boot
1191+
%ifarch x86_64
11841192
/boot/efi/EFI/BOOT/grubx64.efi
1193+
%elifarch aarch64
1194+
/boot/efi/EFI/BOOT/grubaa64.efi
1195+
%endif
11851196
%endif
11861197

11871198
%files container -f .file-list-container
@@ -1217,6 +1228,10 @@ rm -f %{name}.lang
12171228
# %autochangelog. So we need to continue manually maintaining the
12181229
# changelog here.
12191230
%changelog
1231+
* Tue Aug 05 2025 Chris Co <[email protected]> - 255-22
1232+
- enable building ukify and sd-boot on arm64
1233+
- enable pyflakes buildrequires which is needed for ukify testing
1234+
12201235
* Mon Apr 14 2025 Pawel Winogrodzki <[email protected]> - 255-21
12211236
- Bumping 'Release' tag to match the 'signed' version of the spec.
12221237

0 commit comments

Comments
 (0)