Skip to content

Commit

Permalink
Merge pull request commontorizon#41 from rborn-tx/TOR-3392
Browse files Browse the repository at this point in the history
ostree: make OTA updates possible when composefs is employed
  • Loading branch information
jsrc27 authored Mar 14, 2024
2 parents 953aacb + b52a3ce commit da64292
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 3f8dba21c5913b09e36f76215e77b7d6e7816453 Mon Sep 17 00:00:00 2001
From: Rogerio Guerra Borin <[email protected]>
Date: Tue, 12 Mar 2024 17:02:58 -0300
Subject: [PATCH] deploy: Ensure boot directory is open before accessing it

This fixes a bug in the (early) deployment pruning function which before
tried to access the boot directory without opening it first.

Upstream-Status: Accepted

Signed-off-by: Rogerio Guerra Borin <[email protected]>
---
src/libostree/ostree-sysroot-deploy.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index df1254df..0af76f86 100644
--- a/src/libostree/ostree-sysroot-deploy.c
+++ b/src/libostree/ostree-sysroot-deploy.c
@@ -2624,6 +2624,9 @@ auto_early_prune_old_deployments (OstreeSysroot *self, GPtrArray *new_deployment
if (self->booted_deployment == NULL)
return TRUE;

+ if (!_ostree_sysroot_ensure_boot_fd (self, error))
+ return FALSE;
+
{
struct stat stbuf;
if (!glnx_fstatat (self->boot_fd, ".", &stbuf, 0, error))
--
2.25.1

3 changes: 3 additions & 0 deletions recipes-extended/ostree/ostree-prepare-root.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ transient = ${PREP_ROOT_ETC_TRANSIENT}

[composefs]
enabled = ${PREP_ROOT_CFS_ENABLED}

[sysroot]
readonly = false
EOF
}
1 change: 1 addition & 0 deletions recipes-extended/ostree/ostree_2024.4.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ SRC_URI:append = " \
file://0001-update-default-grub-cfg-header.patch \
file://0002-Add-support-for-the-fdtfile-variable-in-uEnv.txt.patch \
file://0003-ostree-fetcher-curl-set-max-parallel-connections.patch \
file://0001-deploy-Ensure-boot-directory-is-open-before-accessin.patch \
file://0001-mount-Allow-building-when-macro-MOUNT_ATTR_IDMAP-is-.patch \
file://0002-mount-Allow-building-when-macro-LOOP_CONFIGURE-is-no.patch \
"
Expand Down

0 comments on commit da64292

Please sign in to comment.