-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packaging: add a systemd unit to run every boot
This enables bootloader updates automatically on boot. Note that the service is intentionally not enabled by default, it should be up to the distribution to add a systemd preset if auto-update for the bootloader is desired. Right now RAID setups are not supported but see [1] for an example in coreos. [1] coreos/fedora-coreos-config#3042
- Loading branch information
1 parent
6fcc010
commit 3903dde
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=Update Bootloader on boot | ||
Documentation=https://github.com/coreos/bootupd | ||
ConditionPathExists=/dev/disk/by-label/EFI-SYSTEM | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/bootupctl update | ||
RemainAfterExit=yes | ||
MountFlags=slave | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ BuildRequires: cargo | |
BuildRequires: git | ||
BuildRequires: openssl-devel | ||
BuildRequires: systemd-devel | ||
BuildRequires: systemd-rpm-macros | ||
|
||
%description | ||
%{summary} | ||
|
@@ -31,6 +32,7 @@ BuildRequires: systemd-devel | |
%{_bindir}/bootupctl | ||
%{_libexecdir}/bootupd | ||
%{_prefix}/lib/bootupd/grub2-static/ | ||
%{_unitdir}/bootupctl-update.service | ||
|
||
%prep | ||
%autosetup -n %{crate}-%{version} -p1 -Sgit | ||
|
@@ -50,7 +52,8 @@ cargo build --release | |
%install | ||
%make_install INSTALL="install -p -c" | ||
make install-grub-static DESTDIR=%{?buildroot} INSTALL="%{__install} -p" | ||
make install-systemd-unit DESTDIR=%{?buildroot} INSTALL="%{__install} -p" | ||
|
||
%changelog | ||
* Tue Oct 18 2022 Colin Walters <[email protected]> - 0.2.8-3 | ||
- Dummy changelog | ||
- Dummy changelog |