From 24e7d0065930bd6e44067956f0c46b6e53359cb3 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 26 Oct 2023 11:07:31 +0100 Subject: [PATCH] Add patch from upstream to avoid build-time test failure on s390x --- ...loader-zipl-No-op-if-run-as-non-root.patch | 29 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 30 insertions(+) create mode 100644 debian/patches/bootloader-zipl-No-op-if-run-as-non-root.patch diff --git a/debian/patches/bootloader-zipl-No-op-if-run-as-non-root.patch b/debian/patches/bootloader-zipl-No-op-if-run-as-non-root.patch new file mode 100644 index 00000000..d2dd9357 --- /dev/null +++ b/debian/patches/bootloader-zipl-No-op-if-run-as-non-root.patch @@ -0,0 +1,29 @@ +From: Colin Walters +Date: Tue, 24 Oct 2023 10:40:51 -0400 +Subject: bootloader/zipl: No-op if run as non-root + +Not the most elegant fix but should get the job done. + +Bug: https://github.com/ostreedev/ostree/issues/3084 +Origin: upstream, 2023.8, commit:75c7e51a8bedb5edeadb9f54e84ccfff2adcc755 +--- + src/libostree/ostree-bootloader-zipl.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/libostree/ostree-bootloader-zipl.c b/src/libostree/ostree-bootloader-zipl.c +index c0a2a14..4579a89 100644 +--- a/src/libostree/ostree-bootloader-zipl.c ++++ b/src/libostree/ostree-bootloader-zipl.c +@@ -381,6 +381,12 @@ _ostree_bootloader_zipl_post_bls_sync (OstreeBootloader *bootloader, int bootver + { + OstreeBootloaderZipl *self = OSTREE_BOOTLOADER_ZIPL (bootloader); + ++ // This can happen in a unit testing environment; at some point what we want to do here ++ // is move all of the zipl logic to a systemd unit instead that's keyed of ++ // ostree-finalize-staged.service. ++ if (getuid () != 0) ++ return TRUE; ++ + /* Note that unlike the grub2-mkconfig backend, we make no attempt to + * chroot(). + */ diff --git a/debian/patches/series b/debian/patches/series index d9efcb28..89e6d8fd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ +bootloader-zipl-No-op-if-run-as-non-root.patch debian/Skip-test-pull-repeated-during-CI.patch debian/test-sysroot-Skip-on-s390x-by-default.patch -- 2.30.2