From 26d78059db847333d44255d57876913c0b540d45 Mon Sep 17 00:00:00 2001 From: "Ruan E. Formigoni" Date: Wed, 13 Nov 2024 15:59:39 -0300 Subject: [PATCH] Fix issues of fuse-overlayfs with a rollback version --- deploy/flatimage.sh | 2 +- src/boot/config/config.hpp | 4 ++-- src/boot/filesystems.hpp | 2 +- src/boot/parser.hpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy/flatimage.sh b/deploy/flatimage.sh index aadb276..49cc85c 100755 --- a/deploy/flatimage.sh +++ b/deploy/flatimage.sh @@ -36,7 +36,7 @@ function _fetch_static() wget -O ./bin/proot "https://github.com/ruanformigoni/proot-static-musl/releases/download/bf747c8/proot-x86_64" # Fetch overlayfs - wget -O ./bin/overlayfs "https://github.com/ruanformigoni/fuse-overlayfs-static-musl/releases/download/1861741/fuse-overlayfs-x86_64" + wget -O ./bin/overlayfs "https://github.com/ruanformigoni/fuse-overlayfs-static-musl/releases/download/6da6352/fuse-overlayfs-x86_64" # Fetch ciopfs wget -O ./bin/ciopfs "https://github.com/ruanformigoni/ciopfs-static-musl/releases/download/39d5d5a/ciopfs-x86_64" diff --git a/src/boot/config/config.hpp b/src/boot/config/config.hpp index 1c07b4d..2af827b 100644 --- a/src/boot/config/config.hpp +++ b/src/boot/config/config.hpp @@ -54,7 +54,7 @@ struct FlatimageConfig bool is_root; bool is_readonly; bool is_debug; - bool is_fuse_overlayfs; + bool is_bwrap_overlayfs; uint64_t offset_reserved; Offset offset_permissions; @@ -108,7 +108,7 @@ inline FlatimageConfig config() config.is_root = ns_env::exists("FIM_ROOT", "1"); config.is_readonly = ns_env::exists("FIM_RO", "1"); config.is_debug = ns_env::exists("FIM_DEBUG", "1"); - config.is_fuse_overlayfs = ns_env::exists("FIM_FUSE_OVERLAYFS", "1"); + config.is_bwrap_overlayfs = ns_env::exists("FIM_BWRAP_OVERLAYFS", "1"); // Paths in /tmp config.offset_reserved = std::stoll(ns_env::get_or_throw("FIM_OFFSET")); diff --git a/src/boot/filesystems.hpp b/src/boot/filesystems.hpp index bbf4c0b..29b3754 100644 --- a/src/boot/filesystems.hpp +++ b/src/boot/filesystems.hpp @@ -64,7 +64,7 @@ inline Filesystems::Filesystems(ns_config::FlatimageConfig const& config) ns_log::debug()("ciopfs is enabled"); } // if // Use fuse-overlayfs - if ( config.is_fuse_overlayfs ) + if ( not config.is_bwrap_overlayfs ) { // Mount overlayfs mount_overlayfs(config.path_dir_mount_layers diff --git a/src/boot/parser.hpp b/src/boot/parser.hpp index c197576..f90e35a 100644 --- a/src/boot/parser.hpp +++ b/src/boot/parser.hpp @@ -317,7 +317,7 @@ inline int parse_cmds(ns_config::FlatimageConfig config, int argc, char** argv) ereturn_if(not bits_permissions, bits_permissions.error()); // Create bwrap instance - std::optional bwrap_overlay = ( not config.is_fuse_overlayfs )? + std::optional bwrap_overlay = ( config.is_bwrap_overlayfs )? std::make_optional(ns_bwrap::Overlay { .vec_path_dir_layer = ns_config::get_mounted_layers(config.path_dir_mount_layers)