diff --git a/scripts/lib/components.sh b/scripts/lib/components.sh index 19b93f6..c93a38c 100644 --- a/scripts/lib/components.sh +++ b/scripts/lib/components.sh @@ -52,8 +52,8 @@ function components_parse_sources_conf() { # Component 3: rfs (pre-built release) component_count=$((component_count + 1)) log_info "Processing component ${component_count}: rfs (release)" - components_download_release "rfs" "https://github.com/threefoldtech/rfs/releases/download/v2.0.6/rfs" "v2.0.6" "$components_dir" "" - components_build_component "rfs" "install_rfs" "$components_dir" + components_download_git "rfs" "https://github.com/threefoldtech/rfs" "development" "$components_dir" + components_build_component "rfs" "build_rfs" "$components_dir" # Component 4: corex component_count=$((component_count + 1)) @@ -327,9 +327,10 @@ function build_rfs() { log_error "Cargo.toml not found in: ${current_dir}" return 1 fi - + # remove rust-toolchain.toml, as not needed with latest release + safe_execute rm rust-toolchain.toml # Build with musl target - safe_execute cargo build --release --target "$RUST_TARGET" + safe_execute cargo build --release --target "$RUST_TARGET" --features build-binary # Find and install binary local binary_path="target/${RUST_TARGET}/release/rfs" @@ -441,7 +442,7 @@ function components_verify_installation() { # List of expected built binaries and their locations in components directory local expected_binaries=( "zinit/target/x86_64-unknown-linux-musl/release/zinit" - "rfs/rfs" + "rfs/target/x86_64-unknown-linux-musl/release/rfs" "mycelium/myceliumd/target/x86_64-unknown-linux-musl/release/mycelium" "corex/corex" ) @@ -497,4 +498,4 @@ export -f components_build_component components_setup_rust_env export -f build_zinit build_rfs build_mycelium install_corex export -f components_verify_installation components_cleanup # Export functions for install_rfs -export -f install_rfs \ No newline at end of file +export -f install_rfs diff --git a/scripts/lib/initramfs.sh b/scripts/lib/initramfs.sh index 6bfc199..19ddf55 100644 --- a/scripts/lib/initramfs.sh +++ b/scripts/lib/initramfs.sh @@ -125,7 +125,7 @@ function initramfs_copy_components() { fi # Copy rfs to /usr/bin - local rfs_binary="${components_dir}/rfs/rfs" + local rfs_binary="${components_dir}/rfs/target/x86_64-unknown-linux-musl/release/rfs" if [[ -f "$rfs_binary" ]]; then safe_mkdir "${initramfs_dir}/usr/bin" safe_execute cp "$rfs_binary" "${initramfs_dir}/usr/bin/rfs" @@ -974,4 +974,4 @@ function initramfs_copy_resolved_modules() { export -f initramfs_setup_zinit initramfs_setup_modules initramfs_resolve_module_dependencies export -f initramfs_install_init_script initramfs_copy_components initramfs_create_module_scripts export -f initramfs_strip_and_upx initramfs_finalize_customization initramfs_create_cpio -export -f initramfs_validate initramfs_test_archive initramfs_copy_resolved_modules \ No newline at end of file +export -f initramfs_validate initramfs_test_archive initramfs_copy_resolved_modules