diff --git a/Cargo.toml b/Cargo.toml index ab872c1..05ee7c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ ] [workspace.package] -version = "0.2.4" +version = "1.0.0" edition = "2021" authors = ["Echo "] license = "MIT" diff --git a/debian/changelog b/debian/changelog index ea100dc..15c2275 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-patch-manager (1.0.0-1) unstable; urgency=low + + * Release v1.0.0 + + -- git-echo Sun, 07 Jun 2026 12:58:46 -0500 + linux-patch-manager (0.1.9-1) noble; urgency=medium * Fix: Replace broken DashMap rate limiting with tower-governor middleware diff --git a/frontend/package.json b/frontend/package.json index 31a4900..86235ba 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "patch-manager-ui", "private": true, - "version": "0.1.7", + "version": "1.0.0", "type": "module", "scripts": { "dev": "vite", diff --git a/scripts/build-package.sh b/scripts/build-package.sh index 64afc24..2b415be 100755 --- a/scripts/build-package.sh +++ b/scripts/build-package.sh @@ -22,7 +22,7 @@ warn() { echo -e "${YELLOW}[WARN]${NC} $*"; } error() { echo -e "${RED}[ERROR]${NC} $*" >&2; exit 1; } PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -VERSION="0.1.9" +VERSION="1.0.0" RELEASE="1" PKG_NAME="linux-patch-manager" DEB_NAME="${PKG_NAME}_${VERSION}-${RELEASE}_amd64.deb" diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index 5ea53ef..768dce1 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -30,7 +30,7 @@ mv "$TEMP_CHANGELOG" debian/changelog echo "[2/5] debian/changelog: Added entry for $NEW_VERSION" # 3. debian/control - Update Version field -if grep -q "^Version:" debian/control 2>/dev/null; then +if grep -q "^Version:" debian/control 2>/dev/null || true; then sed -i "s/^Version: .*/Version: $NEW_VERSION-1/" debian/control echo "[3/5] debian/control: -> $NEW_VERSION-1" else @@ -71,7 +71,7 @@ fi echo "" echo "Stale references check:" -grep -r "$OLD_VERSION" --include='*.toml' --include='*.sh' --include='*.json' --include='control' . 2>/dev/null | grep -v 'target/' | grep -v '.git/' | grep -v 'node_modules/' | grep -v 'bump-version.sh' || echo " No stale references found" +grep -r "$OLD_VERSION" --include='*.toml' --include='*.sh' --include='*.json' --include='control' . 2>/dev/null || true | grep -v 'target/' | grep -v '.git/' | grep -v 'node_modules/' | grep -v 'bump-version.sh' || echo " No stale references found" echo "" echo "Next steps:" diff --git a/scripts/performance-test.sh b/scripts/performance-test.sh index a1a1f97..952cf1d 100755 --- a/scripts/performance-test.sh +++ b/scripts/performance-test.sh @@ -15,6 +15,13 @@ set -euo pipefail +# --------------------------------------------------------------------------- +# BusyBox-compatible millisecond timing (_now_ms not available) +# --------------------------------------------------------------------------- +_now_ms() { + python3 -c "import time; print(int(time.time()*1000))" +} + RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' @@ -72,10 +79,10 @@ api_call() { time_api_call() { local method="$1" endpoint="$2" shift; shift local start end elapsed - start=$(date +%s%N) + start=$(_now_ms) api_call "${method}" "${endpoint}" -o /dev/null "$@" 2>/dev/null || true - end=$(date +%s%N) - elapsed=$(( (end - start) / 1000000 )) # milliseconds + end=$(_now_ms) + elapsed=$(( end - start )) # milliseconds echo "$(echo "scale=3; ${elapsed}/1000" | bc)" } @@ -97,10 +104,10 @@ test_dashboard_load() { # Also measure frontend static asset load info "Measuring frontend index.html load time..." - start=$(date +%s%N) + start=$(_now_ms) curl -sk -o /dev/null "${BASE_URL}/" 2>/dev/null || true - end=$(date +%s%N) - elapsed=$(( (end - start) / 1000000 )) + end=$(_now_ms) + elapsed=$(( end - start )) FRONTEND_TIME=$(echo "scale=3; ${elapsed}/1000" | bc) info "Frontend load time: ${FRONTEND_TIME}s" pass "Frontend static load: ${FRONTEND_TIME}s" @@ -169,14 +176,14 @@ test_bulk_host_operations() { # 4.2 Sequential host creation (measure throughput) info "4.2 Sequential host creation (10 hosts)" - local start=$(date +%s%N) + local start=$(_now_ms) for i in $(seq 1 10); do api_call POST /api/v1/hosts \ -d "{\"fqdn\": \"perf-test-${i}.example.com\", \"ip_address\": \"10.99.0.${i}\"}" \ -o /dev/null 2>/dev/null || true done - local end=$(date +%s%N) - local total_ms=$(( (end - start) / 1000000 )) + local end=$(_now_ms) + local total_ms=$(( end - start )) local total_s=$(echo "scale=3; ${total_ms}/1000" | bc) local per_host=$(echo "scale=3; ${total_s}/10" | bc) info "10 hosts created in ${total_s}s (${per_host}s per host)" @@ -199,11 +206,11 @@ test_cidr_scan() { # Note: This test initiates a real CIDR scan which may not complete quickly # without reachable hosts. We measure the API response time for initiating. info "5.1 CIDR scan initiation time" - local start=$(date +%s%N) + local start=$(_now_ms) SCAN_RESP=$(api_call POST /api/v1/discovery/cidr \ -d '{"cidr": "10.0.0.0/30", "timeout": 1.5}' 2>/dev/null || true) - local end=$(date +%s%N) - local elapsed_ms=$(( (end - start) / 1000000 )) + local end=$(_now_ms) + local elapsed_ms=$(( end - start )) local elapsed_s=$(echo "scale=3; ${elapsed_ms}/1000" | bc) info "CIDR scan initiation: ${elapsed_s}s" @@ -240,13 +247,13 @@ test_concurrent_load() { # Fire 20 concurrent requests and measure total time info "6.1 20 concurrent fleet status requests" - local start=$(date +%s%N) + local start=$(_now_ms) for i in $(seq 1 20); do api_call GET /api/v1/status/fleet -o /dev/null 2>/dev/null & done wait - local end=$(date +%s%N) - local total_ms=$(( (end - start) / 1000000 )) + local end=$(_now_ms) + local total_ms=$(( end - start )) local total_s=$(echo "scale=3; ${total_ms}/1000" | bc) local per_req=$(echo "scale=3; ${total_s}/20" | bc) @@ -259,7 +266,7 @@ test_concurrent_load() { # 6.2 Mixed endpoint concurrent load info "6.2 20 concurrent mixed-endpoint requests" - start=$(date +%s%N) + start=$(_now_ms) for i in $(seq 1 5); do api_call GET /api/v1/hosts -o /dev/null 2>/dev/null & api_call GET /api/v1/groups -o /dev/null 2>/dev/null & @@ -267,8 +274,8 @@ test_concurrent_load() { api_call GET /api/v1/status/fleet -o /dev/null 2>/dev/null & done wait - end=$(date +%s%N) - total_ms=$(( (end - start) / 1000000 )) + end=$(_now_ms) + total_ms=$(( end - start )) total_s=$(echo "scale=3; ${total_ms}/1000" | bc) per_req=$(echo "scale=3; ${total_s}/20" | bc) info "Mixed concurrent: ${total_s}s total, ${per_req}s avg" @@ -282,12 +289,12 @@ test_ws_ticket_performance() { echo -e "\n${CYAN}=== Test 7: WebSocket Ticket Issuance ===${NC}" info "7.1 Sequential ticket creation (10 tickets)" - local start=$(date +%s%N) + local start=$(_now_ms) for i in $(seq 1 10); do api_call POST /api/v1/ws/ticket -o /dev/null 2>/dev/null || true done - local end=$(date +%s%N) - local total_ms=$(( (end - start) / 1000000 )) + local end=$(_now_ms) + local total_ms=$(( end - start )) local total_s=$(echo "scale=3; ${total_ms}/1000" | bc) local per_ticket=$(echo "scale=3; ${total_s}/10" | bc) info "10 tickets in ${total_s}s (${per_ticket}s per ticket)"