diff --git a/CHANGELOG.md b/CHANGELOG.md index b2be22c..2010557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,20 @@ The format is based on [Keep a Changelog][keepachangelog] and adheres to [Semant ### Deprecated ### Fixed +## [0.67.1] - 2025-11-11 + +### Added +\n +### Changed +- Improved disk space check logic to correctly check the parent directory if the specified path does not exist. + +### Deprecated + +### Removed + +### Fixed +- Fixed an issue in the installation script where the extracted CLI binary might be named 'dbn' instead of 'network-cli', ensuring successful installation regardless of the extracted filename. + ## [0.67.0] - 2025-11-11 ### Added diff --git a/Makefile b/Makefile index 1177de6..8faf0fc 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ test-e2e: .PHONY: build clean test run-node run-node2 run-node3 run-example deps tidy fmt vet lint clear-ports install-hooks kill -VERSION := 0.67.0 +VERSION := 0.67.1 COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown) DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ) LDFLAGS := -X 'main.version=$(VERSION)' -X 'main.commit=$(COMMIT)' -X 'main.date=$(DATE)' diff --git a/pkg/environments/production/checks.go b/pkg/environments/production/checks.go index 3ed64ae..d15b916 100644 --- a/pkg/environments/production/checks.go +++ b/pkg/environments/production/checks.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "os/exec" + "path/filepath" "runtime" "strconv" "strings" @@ -226,8 +227,18 @@ func NewResourceChecker() *ResourceChecker { // CheckDiskSpace validates sufficient disk space (minimum 10GB free) func (rc *ResourceChecker) CheckDiskSpace(path string) error { + checkPath := path + + // If the path doesn't exist, check the parent directory instead + for checkPath != "/" { + if _, err := os.Stat(checkPath); err == nil { + break + } + checkPath = filepath.Dir(checkPath) + } + var stat syscall.Statfs_t - if err := syscall.Statfs(path, &stat); err != nil { + if err := syscall.Statfs(checkPath, &stat); err != nil { return fmt.Errorf("failed to check disk space: %w", err) } diff --git a/scripts/install-debros-network.sh b/scripts/install-debros-network.sh index e519417..ae88a07 100755 --- a/scripts/install-debros-network.sh +++ b/scripts/install-debros-network.sh @@ -144,18 +144,23 @@ download_and_install_cli() { # Extract to /tmp tar -xzf /tmp/dbn.tar.gz -C /tmp/ - # Check if binary exists after extraction (it's named network-cli in the archive) - if [ ! -f /tmp/network-cli ]; then - error "Failed to extract network-cli binary" + # Check for extracted binary (could be named network-cli or dbn) + EXTRACTED_BINARY="" + if [ -f /tmp/network-cli ]; then + EXTRACTED_BINARY="/tmp/network-cli" + elif [ -f /tmp/dbn ]; then + EXTRACTED_BINARY="/tmp/dbn" + else + error "Failed to extract binary (neither network-cli nor dbn found)" ls -la /tmp/ | grep -E "(network|cli|dbn)" exit 1 fi - chmod +x /tmp/network-cli + chmod +x "$EXTRACTED_BINARY" log "Installing dbn to $INSTALL_DIR..." - # Rename network-cli to dbn during installation - mv /tmp/network-cli "$INSTALL_DIR/dbn" + # Always rename to dbn during installation + mv "$EXTRACTED_BINARY" "$INSTALL_DIR/dbn" # Sanity check: verify the installed binary is functional and reports correct version if ! "$INSTALL_DIR/dbn" version &>/dev/null; then