Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion prepare_source
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
git_src -b debian/257.8-1_deb13u1 https://salsa.debian.org/systemd-team/systemd.git
apt-get install -y --no-install-recommends curl ca-certificates

curl -sSLf https://snapshot.debian.org/archive/debian/20260503T150742Z/pool/main/s/systemd/systemd_257.13.orig.tar.gz \
| gunzip \
| tee "$dir/orig.tar" \
| tar --extract --strip-components 1 --directory "$dir/src"

mkdir "$dir/src/debian"

curl -sSLf https://snapshot.debian.org/archive/debian/20260503T150742Z/pool/main/s/systemd/systemd_257.13-1~deb13u1.debian.tar.xz \
| xz -d \
| tar --extract --strip-components 1 --directory "$dir/src/debian"

import_upstream_patches
apply_patches
version_suffix=gl0~bp1877
39 changes: 15 additions & 24 deletions upstream_patches/reboot_on_err.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
commit ad045d78d5d8bfe1dce9113309b3f5de3673200f
Author: nkraetzschmar <9020053+nkraetzschmar@users.noreply.github.com>
Date: Tue Nov 12 23:40:24 2024 +0100

boot: add reboot-on-error config option

Enabling this option will cause the system to reboot in case the selected
entry fails to load.

diff --git a/man/loader.conf.xml b/man/loader.conf.xml
index 068aa3b54a..0110b60ef3 100644
index 8b7034e775..0c52f47af5 100644
--- a/man/loader.conf.xml
+++ b/man/loader.conf.xml
@@ -399,6 +399,14 @@ sbvarsign --attr "${attr}" --key KEK.key --cert KEK.pem --output db.auth db db.e

@@ -424,6 +424,14 @@ sbvarsign --attr "${attr}" --key KEK.key --cert KEK.pem --output db.auth db db.e
<xi:include href="version-info.xml" xpointer="v251"/></listitem>
</varlistentry>
+
Expand All @@ -25,49 +16,49 @@ index 068aa3b54a..0110b60ef3 100644
+ </varlistentry>
</variablelist>
</refsect1>

diff --git a/src/boot/boot.c b/src/boot/boot.c
index ecbb4e0509..25e2b5df34 100644
index 21aa00b356..b8d808302b 100644
--- a/src/boot/boot.c
+++ b/src/boot/boot.c
@@ -91,6 +91,7 @@ typedef struct {
@@ -97,6 +97,7 @@ typedef struct {
bool auto_poweroff;
bool auto_reboot;
bool reboot_for_bitlocker;
+ bool reboot_on_err;
secure_boot_enroll secure_boot_enroll;
bool force_menu;
bool use_saved_entry;
@@ -532,6 +533,7 @@ static void print_status(Config *config, char16_t *loaded_image_path) {
@@ -538,6 +539,7 @@ static void print_status(Config *config, char16_t *loaded_image_path) {
printf(" auto-reboot: %ls\n", yes_no(config->auto_reboot));
printf(" beep: %ls\n", yes_no(config->beep));
printf(" reboot-for-bitlocker: %ls\n", yes_no(config->reboot_for_bitlocker));
+ printf(" reboot-on-error: %ls\n", yes_no(config->reboot_on_err));

switch (config->secure_boot_enroll) {
case ENROLL_OFF:
@@ -1258,6 +1260,10 @@ static void config_defaults_load_from_file(Config *config, char *content) {
@@ -1276,6 +1278,10 @@ static void config_defaults_load_from_file(Config *config, char *content) {
log_error("Error parsing 'reboot-for-bitlocker' config option, ignoring: %s",
value);

+ } else if (streq8(key, "reboot-on-error")) {
+ if (!parse_boolean(value, &config->reboot_on_err))
+ log_error("Error parsing 'reboot-on-error' config option, ignoring: %s", value);
+
} else if (streq8(key, "secure-boot-enroll")) {
if (streq8(value, "manual"))
config->secure_boot_enroll = ENROLL_MANUAL;
@@ -1287,6 +1293,7 @@ static void config_defaults_load_from_file(Config *config, char *content) {
@@ -1305,6 +1311,7 @@ static void config_defaults_load_from_file(Config *config, char *content) {
}
config->console_mode = u;
}
+
}
}

@@ -2782,8 +2789,13 @@ static EFI_STATUS run(EFI_HANDLE image) {
@@ -2969,8 +2976,13 @@ static EFI_STATUS run(EFI_HANDLE image) {
(void) process_random_seed(root_dir);

err = image_start(image, entry);
- if (err != EFI_SUCCESS)
- return err;
Expand All @@ -78,6 +69,6 @@ index ecbb4e0509..25e2b5df34 100644
+ else
+ return err;
+ }

menu = true;
config.timeout_sec = 0;
Loading