Skip to content

Commit

Permalink
Fix issues of fuse-overlayfs with a rollback version
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanformigoni committed Nov 13, 2024
1 parent 8a4f498 commit 26d7805
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deploy/flatimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/boot/config/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"));
Expand Down
2 changes: 1 addition & 1 deletion src/boot/filesystems.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/boot/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ns_bwrap::Overlay> bwrap_overlay = ( not config.is_fuse_overlayfs )?
std::optional<ns_bwrap::Overlay> 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)
Expand Down

0 comments on commit 26d7805

Please sign in to comment.