|
| 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. |
0 commit comments