Skip to content

Commit 6cf59da

Browse files
Add bootengine 0.0.38 to core repo in azure linux (#15587)
Co-authored-by: Sandeep Karambelkar <sandeep.karambelkar@gmail.com> Co-authored-by: Sandeep Karambelkar <skarambelkar@microsoft.com>
1 parent fc46ebe commit 6cf59da

File tree

7 files changed

+170
-1
lines changed

7 files changed

+170
-1
lines changed

LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSES-AND-NOTICES/SPECS/data/licenses.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3171,6 +3171,7 @@
31713171
"license": "Same as the source project.",
31723172
"specs": [
31733173
"azure-vm-utils",
3174+
"bootengine",
31743175
"python-nocaselist"
31753176
]
31763177
},
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From aa3edfbf9fa3bfe59d945901a2a55d637e677bd9 Mon Sep 17 00:00:00 2001
2+
From: SumitJenaHCL <v-sumitjena@microsoft.com>
3+
Date: Thu, 29 Jan 2026 13:40:55 +0530
4+
Subject: [PATCH] modify tests
5+
Update 10usr-generator tests to include rescue=nologreplay mount option.
6+
This change aligns the test mount unit definitions with current expected mount options by appending rescue=nologreplay alongside ro.
7+
The update ensures the tests correctly reflect the behavior used during rescue scenarios and prevents unnecessary journal replay during usr mounting.
8+
9+
---
10+
dracut/10usr-generator/testsuite.sh | 4 ++--
11+
1 file changed, 2 insertions(+), 2 deletions(-)
12+
13+
diff --git a/dracut/10usr-generator/testsuite.sh b/dracut/10usr-generator/testsuite.sh
14+
index b2b0c7c..d22e50b 100755
15+
--- a/dracut/10usr-generator/testsuite.sh
16+
+++ b/dracut/10usr-generator/testsuite.sh
17+
@@ -50,7 +50,7 @@ After=remount-sysroot.service
18+
What=/foo
19+
Where=/sysroot/usr
20+
Type=auto
21+
-Options=ro
22+
+Options=ro,rescue=nologreplay
23+
EOF
24+
return $?
25+
}
26+
@@ -70,7 +70,7 @@ After=remount-sysroot.service
27+
What=/two
28+
Where=/sysroot/usr
29+
Type=auto
30+
-Options=ro
31+
+Options=ro,rescue=nologreplay
32+
EOF
33+
return $?
34+
}
35+
--
36+
2.45.4
37+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
From 8cd08045b19026fc357c25140a8325f3c07edab0 Mon Sep 17 00:00:00 2001
2+
From: Lanze Liu <lanzeliu@microsoft.com>
3+
Date: Tue, 3 Mar 2026 05:03:08 +0000
4+
Subject: [PATCH] ignition-quench: delete UKI firstboot addon after Ignition
5+
6+
In UKI (systemd-boot) mode there is no GRUB to conditionally inject
7+
first-boot kernel cmdline args. Instead, a firstboot.addon.efi is
8+
placed on the ESP at build time. systemd-boot auto-discovers it and
9+
appends its cmdline (flatcar.first_boot=detected) to the main UKI's
10+
cmdline.
11+
12+
After Ignition completes, ignition-quench.service must remove this
13+
addon in addition to the legacy /boot/flatcar/first_boot marker file,
14+
so that subsequent boots do not re-trigger Ignition.
15+
16+
The addon path is fixed: /boot/EFI/Linux/acl.efi.extra.d/firstboot.addon.efi
17+
---
18+
dracut/30ignition/ignition-quench.service | 8 +++++---
19+
1 file changed, 5 insertions(+), 3 deletions(-)
20+
21+
diff --git a/dracut/30ignition/ignition-quench.service b/dracut/30ignition/ignition-quench.service
22+
index 6460917..f56f2a3 100644
23+
--- a/dracut/30ignition/ignition-quench.service
24+
+++ b/dracut/30ignition/ignition-quench.service
25+
@@ -14,6 +14,8 @@ After=sysroot-boot.service
26+
27+
[Service]
28+
Type=oneshot
29+
-# We will only run if GRUB detected this file. Fail if we are unable to
30+
-# remove it, rather than risking rerunning Ignition at next boot.
31+
-ExecStart=/bin/sh -c 'if [ ! -e /sysroot/boot/flatcar/first_boot ] && [ ! -e /sysroot/boot/coreos/first_boot ]; then echo "error: /sysroot/boot/(flatcar|coreos)/first_boot not found"; exit 1; else rm -f /sysroot/boot/flatcar/first_boot /sysroot/boot/coreos/first_boot; fi'
32+
+# We will only run if GRUB detected the first_boot marker file or if a UKI
33+
+# firstboot addon exists. Fail if we cannot find either, rather than risking
34+
+# rerunning Ignition at next boot. In UKI mode, also remove the firstboot
35+
+# addon so systemd-boot stops appending first-boot cmdline args.
36+
+ExecStart=/bin/sh -c 'if [ ! -e /sysroot/boot/flatcar/first_boot ] && [ ! -e /sysroot/boot/coreos/first_boot ] && [ ! -e /sysroot/boot/EFI/Linux/acl.efi.extra.d/firstboot.addon.efi ]; then echo "error: no first-boot marker or addon found"; exit 1; else rm -f /sysroot/boot/flatcar/first_boot /sysroot/boot/coreos/first_boot /sysroot/boot/EFI/Linux/acl.efi.extra.d/firstboot.addon.efi; fi'
37+
--
38+
2.45.4
39+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Signatures": {
3+
"bootengine-0.0.38.tar.gz": "24e9aa5b503771b155b9b112df2bc210a5c172da91b5c18436a64b80e796e03d"
4+
}
5+
}

SPECS/bootengine/bootengine.spec

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
%define commit_hash daf43bf9c1ca45bf1a43566c3a6f96ec0cb44a36
2+
3+
Name: bootengine
4+
Version: 0.0.38
5+
Release: 1%{?dist}
6+
Summary: Flatcar bootengine dracut modules and helper utilities
7+
8+
License: BSD-2-Clause
9+
Vendor: Microsoft Corporation
10+
Distribution: Azure Linux
11+
URL: https://github.com/flatcar/bootengine
12+
Source0: https://github.com/flatcar/bootengine/archive/%{commit_hash}.tar.gz#/%{name}-%{version}.tar.gz
13+
Patch0: 0001-modify-tests.patch
14+
Patch1: 0002-delete-UKI-firstboot-addon-after-Ignition.patch
15+
BuildArch: noarch
16+
BuildRequires: dracut
17+
Requires: util-linux
18+
19+
# Keep this local so the spec works even if a global dracut macro isn't defined.
20+
%global dracutlibdir %{_prefix}/lib/dracut
21+
22+
%description
23+
Flatcar bootengine content intended for initramfs usage via dracut modules.
24+
This package installs the bootengine dracut module directory (modules.d)
25+
and any included helper utilities/scripts from the Flatcar bootengine source.
26+
27+
%prep
28+
%autosetup -p1 -n %{name}-%{commit_hash}
29+
30+
%build
31+
# no build step (content is scripts/modules)
32+
33+
%install
34+
rm -rf %{buildroot}
35+
36+
# Install dracut modules
37+
# Adjust "dracut/modules.d/*" if upstream uses a different directory.
38+
if [ -d dracut ]; then
39+
install -d -p %{buildroot}%{dracutlibdir}/modules.d
40+
cp -a dracut/* %{buildroot}%{dracutlibdir}/modules.d/
41+
fi
42+
43+
# Optional: install any helper script if present (adjust names as needed)
44+
# Common pattern: provide a helper in %{_sbindir} or %{_bindir}
45+
if [ -f update-bootengine ]; then
46+
install -d -p %{buildroot}%{_sbindir}
47+
install -p -m 0755 update-bootengine %{buildroot}%{_sbindir}/update-bootengine
48+
fi
49+
50+
chmod +x \
51+
%{buildroot}%{dracutlibdir}/modules.d/10*-generator/*-generator \
52+
%{buildroot}%{dracutlibdir}/modules.d/10diskless-generator/diskless-btrfs \
53+
%{buildroot}%{dracutlibdir}/modules.d/10networkd-dependency-generator/*-generator \
54+
%{buildroot}%{dracutlibdir}/modules.d/03flatcar-network/parse-ip-for-networkd.sh \
55+
%{buildroot}%{dracutlibdir}/modules.d/30disk-uuid/disk-uuid.sh \
56+
%{buildroot}%{dracutlibdir}/modules.d/30ignition/ignition-generator \
57+
%{buildroot}%{dracutlibdir}/modules.d/30ignition/ignition-setup.sh \
58+
%{buildroot}%{dracutlibdir}/modules.d/30ignition/ignition-setup-pre.sh \
59+
%{buildroot}%{dracutlibdir}/modules.d/30ignition/ignition-kargs-helper \
60+
%{buildroot}%{dracutlibdir}/modules.d/30ignition/retry-umount.sh \
61+
%{buildroot}%{dracutlibdir}/modules.d/99setup-root/initrd-setup-root \
62+
%{buildroot}%{dracutlibdir}/modules.d/99setup-root/initrd-setup-root-after-ignition \
63+
%{buildroot}%{dracutlibdir}/modules.d/99setup-root/gpg-agent-wrapper
64+
65+
%check
66+
./test
67+
68+
%files
69+
%license LICENSE
70+
%doc README.md
71+
%{dracutlibdir}/modules.d/*
72+
%{_sbindir}/update-bootengine
73+
74+
%changelog
75+
* Tue Jan 27 2026 Sumit Jena <v-sumitjena@microsoft.com> - 0.0.38-1
76+
- Initial Azure Linux import from the source project (license: same as "License" tag).
77+
- License verified.

cgmanifest.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,16 @@
12321232
}
12331233
}
12341234
},
1235+
{
1236+
"component": {
1237+
"type": "other",
1238+
"other": {
1239+
"name": "bootengine",
1240+
"version": "0.0.38",
1241+
"downloadUrl": "https://github.com/flatcar/bootengine/archive/daf43bf9c1ca45bf1a43566c3a6f96ec0cb44a36.tar.gz"
1242+
}
1243+
}
1244+
},
12351245
{
12361246
"component": {
12371247
"type": "other",

0 commit comments

Comments
 (0)