From 417de99170be9f5e6b193b9279a5564798e39b29 Mon Sep 17 00:00:00 2001 From: Joseph Marrero Corchado Date: Wed, 6 Aug 2025 10:27:16 -0400 Subject: [PATCH] Backport https://github.com/ostreedev/ostree/pull/3493 Resolves: #RHEL-107853 --- ...y-Fix-path-to-aboot.cfg-in-BLS-files.patch | 35 +++++++++++++++++++ ostree.spec | 1 + 2 files changed, 36 insertions(+) create mode 100644 0001-deploy-Fix-path-to-aboot.cfg-in-BLS-files.patch diff --git a/0001-deploy-Fix-path-to-aboot.cfg-in-BLS-files.patch b/0001-deploy-Fix-path-to-aboot.cfg-in-BLS-files.patch new file mode 100644 index 0000000..97717f0 --- /dev/null +++ b/0001-deploy-Fix-path-to-aboot.cfg-in-BLS-files.patch @@ -0,0 +1,35 @@ +From 36995ef2b6dff343434016433a46242861549edd Mon Sep 17 00:00:00 2001 +From: Alexander Larsson +Date: Wed, 6 Aug 2025 12:16:34 +0200 +Subject: [PATCH] deploy: Fix path to aboot.cfg in BLS files + +The change in https://github.com/ostreedev/ostree/pull/3413/ was meant +to change when the abootcfg option is set in the BLS file. However, +it also changed the value of this key, using the wrong directory +(bootcsumdir instead of /usr/lib/ostree-boot). + +This means that during update, aboot-update gets the wrong path to the +config and cannot correctly write the aboot partition. + +Signed-off-by: Alexander Larsson +--- + src/libostree/ostree-sysroot-deploy.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c +index bee899a3..e8f3ece5 100644 +--- a/src/libostree/ostree-sysroot-deploy.c ++++ b/src/libostree/ostree-sysroot-deploy.c +@@ -2134,7 +2134,8 @@ install_deployment_kernel (OstreeSysroot *sysroot, int new_bootversion, + g_autofree char *aboot_relpath = g_strconcat ("/", bootcsumdir, "/", aboot_fn, NULL); + ostree_bootconfig_parser_set (bootconfig, "aboot", aboot_relpath); + +- g_autofree char *abootcfg_relpath = g_strconcat ("/", bootcsumdir, "/aboot.cfg", NULL); ++ g_autofree char *abootcfg_relpath ++ = g_strconcat ("/", deployment_dirpath, "/usr/lib/ostree-boot/aboot.cfg", NULL); + ostree_bootconfig_parser_set (bootconfig, "abootcfg", abootcfg_relpath); + } + +-- +2.50.1 + diff --git a/ostree.spec b/ostree.spec index 7ece999..64bd758 100644 --- a/ostree.spec +++ b/ostree.spec @@ -14,6 +14,7 @@ License: LGPL-2.0-or-later URL: https://ostree.readthedocs.io/en/latest/ Patch0: 0001-soft-reboot-also-handle-boot.patch +Patch1: 0001-deploy-Fix-path-to-aboot.cfg-in-BLS-files.patch # Conditional to ELN right now to reduce blast radius; xref # https://github.com/containers/composefs/pull/229#issuecomment-1838735764