From 2b842fcd47ac24b9da7f192f64b78f83e8fc45af Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 23 Feb 2026 06:02:17 -0600 Subject: scrub personal info and make distribution targets configurable Remove personal email addresses, hardcoded paths, and infrastructure references to prepare for open-source release. Distribution targets in build-release are now configurable via environment variables, and archsetup inclusion is opt-in. --- build.sh | 4 ++-- custom/archangel | 2 +- custom/zfsrollback | 2 +- custom/zfssnapshot | 2 +- scripts/build-release | 58 ++++++++++++++++++++++++++++---------------------- scripts/sanity-test.sh | 8 +++---- 6 files changed, 41 insertions(+), 35 deletions(-) diff --git a/build.sh b/build.sh index 8bb7893..5991828 100755 --- a/build.sh +++ b/build.sh @@ -423,7 +423,7 @@ if grep -q "file_permissions=" "$PROFILE_DIR/profiledef.sh"; then fi # Copy archsetup into airootfs (exclude large/unnecessary directories) -ARCHSETUP_DIR="${ARCHSETUP_DIR:-$HOME/code/archsetup}" +ARCHSETUP_DIR="${ARCHSETUP_DIR:-}" if [[ -d "$ARCHSETUP_DIR" ]]; then info "Copying archsetup into ISO..." mkdir -p "$PROFILE_DIR/airootfs/code" @@ -476,7 +476,7 @@ if [[ -f "$ISO_FILE" ]]; then echo "" info "After booting:" echo " - ZFS is pre-loaded (no setup needed)" - echo " - SSH is enabled (root password: $LIVE_ROOT_PASSWORD)" + echo " - SSH is enabled (see LIVE_ROOT_PASSWORD in build.sh)" echo " - Run 'archangel' to start installation" echo "" info "SSH access (from host):" diff --git a/custom/archangel b/custom/archangel index 4bb19d9..4150198 100755 --- a/custom/archangel +++ b/custom/archangel @@ -1,6 +1,6 @@ #!/usr/bin/env bash # archangel - Arch Linux Installer with Snapshot-Based Recovery -# Craig Jennings +# Craig Jennings (github.com/cjennings) # # Installs Arch Linux on ZFS or Btrfs root with snapshot support. # Choose your filesystem: ZFS (native encryption) or Btrfs (GRUB snapshots). diff --git a/custom/zfsrollback b/custom/zfsrollback index 90be5d2..a99a4d3 100755 --- a/custom/zfsrollback +++ b/custom/zfsrollback @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Craig Jennings +# Craig Jennings (github.com/cjennings) # Roll back ZFS datasets to a selected snapshot using fzf. set -euo pipefail diff --git a/custom/zfssnapshot b/custom/zfssnapshot index 98f8315..90331c3 100755 --- a/custom/zfssnapshot +++ b/custom/zfssnapshot @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Craig Jennings +# Craig Jennings (github.com/cjennings) # Create a ZFS snapshot across all datasets with a dated, descriptive name. set -euo pipefail diff --git a/scripts/build-release b/scripts/build-release index 035c4fe..2fbf004 100755 --- a/scripts/build-release +++ b/scripts/build-release @@ -7,10 +7,10 @@ # ./scripts/build-release --skip-build # Skip build, just distribute existing ISO # ./scripts/build-release --skip-test # Skip all testing # -# Distribution targets: -# - ~/downloads/isos/ -# - ~/code/archsetup/inbox/ (notification for test VM rebuild) -# - truenas.local:/mnt/vault/isos (if reachable) +# Distribution targets (configurable via environment variables): +# - $LOCAL_ISO_DIR (default: ~/archangel-isos) +# - $ARCHSETUP_INBOX (notification for test VM rebuild, if set) +# - $DIST_REMOTE_HOST:$DIST_REMOTE_PATH (if set and reachable) set -e @@ -26,11 +26,11 @@ else REAL_HOME="$HOME" fi -# Distribution targets -TRUENAS_HOST="truenas.local" -TRUENAS_PATH="/mnt/vault/isos" -LOCAL_ISO_DIR="$REAL_HOME/downloads/isos" -ARCHSETUP_INBOX="$REAL_HOME/code/archsetup/inbox" +# Distribution targets (override via environment variables) +DIST_REMOTE_HOST="${DIST_REMOTE_HOST:-}" +DIST_REMOTE_PATH="${DIST_REMOTE_PATH:-/mnt/isos}" +LOCAL_ISO_DIR="${LOCAL_ISO_DIR:-$REAL_HOME/archangel-isos}" +ARCHSETUP_INBOX="${ARCHSETUP_INBOX:-}" # Colors RED='\033[0;31m' @@ -67,7 +67,7 @@ while [[ $# -gt 0 ]]; do done # Distribution status tracking -TRUENAS_SUCCESS=false +DIST_REMOTE_SUCCESS=false LOCAL_SUCCESS=false # Check root for build @@ -120,17 +120,23 @@ full_test() { info "All installation tests passed!" } -# Distribute to TrueNAS -distribute_truenas() { - step "Distributing to TrueNAS" +# Distribute to remote host via SCP +distribute_remote() { + step "Distributing to Remote Host" + + # Skip if no host configured + if [[ -z "$DIST_REMOTE_HOST" ]]; then + info "DIST_REMOTE_HOST not set, skipping" + return 0 + fi # Check if reachable - if ! ping -c 1 -W 2 "$TRUENAS_HOST" &>/dev/null; then - warn "TrueNAS ($TRUENAS_HOST) not reachable, skipping" + if ! ping -c 1 -W 2 "$DIST_REMOTE_HOST" &>/dev/null; then + warn "Remote host ($DIST_REMOTE_HOST) not reachable, skipping" return 0 fi - info "TrueNAS is reachable" + info "Remote host is reachable" # Run SCP as the real user (not root) to use their SSH keys local scp_cmd="scp" @@ -138,12 +144,12 @@ distribute_truenas() { scp_cmd="sudo -u $SUDO_USER scp" fi - info "Copying to $TRUENAS_HOST:$TRUENAS_PATH/" - if $scp_cmd "$ISO_FILE" "$REAL_USER@$TRUENAS_HOST:$TRUENAS_PATH/"; then - info "Done: $TRUENAS_HOST:$TRUENAS_PATH/$ISO_NAME" - TRUENAS_SUCCESS=true + info "Copying to $DIST_REMOTE_HOST:$DIST_REMOTE_PATH/" + if $scp_cmd "$ISO_FILE" "$REAL_USER@$DIST_REMOTE_HOST:$DIST_REMOTE_PATH/"; then + info "Done: $DIST_REMOTE_HOST:$DIST_REMOTE_PATH/$ISO_NAME" + DIST_REMOTE_SUCCESS=true else - warn "Failed to copy to TrueNAS (SSH key issue?), skipping" + warn "Failed to copy to remote host (SSH key issue?), skipping" return 0 fi } @@ -159,10 +165,10 @@ distribute_local() { LOCAL_SUCCESS=true # Notify archsetup project that a new ISO is available - if [[ -d "$ARCHSETUP_INBOX" ]]; then + if [[ -n "$ARCHSETUP_INBOX" && -d "$ARCHSETUP_INBOX" ]]; then cat > "$ARCHSETUP_INBOX/rebuild-test-vm.txt" << EOF New archangel ISO available: $ISO_NAME -Location: ~/downloads/isos/ +Location: $LOCAL_ISO_DIR/ Rebuild the base test VM from this ISO to pick up the new kernel. EOF info "Notified archsetup inbox" @@ -176,8 +182,8 @@ show_summary() { echo "" echo "Distributed to:" $LOCAL_SUCCESS && echo " - $LOCAL_ISO_DIR/" - $TRUENAS_SUCCESS && echo " - $TRUENAS_HOST:$TRUENAS_PATH/" - $TRUENAS_SUCCESS || echo " - TrueNAS ($TRUENAS_HOST) not reachable, skipped" + $DIST_REMOTE_SUCCESS && echo " - $DIST_REMOTE_HOST:$DIST_REMOTE_PATH/" + $DIST_REMOTE_SUCCESS || [[ -z "$DIST_REMOTE_HOST" ]] || echo " - Remote ($DIST_REMOTE_HOST) not reachable, skipped" } # Main @@ -200,7 +206,7 @@ main() { fi distribute_local - distribute_truenas + distribute_remote show_summary } diff --git a/scripts/sanity-test.sh b/scripts/sanity-test.sh index 1973ee6..b0aa0d7 100755 --- a/scripts/sanity-test.sh +++ b/scripts/sanity-test.sh @@ -289,10 +289,10 @@ run_sanity_tests() { "uname -r" \ "lts" - # Test 10: archsetup directory present - run_test "archsetup directory present" \ - "test -d /code/archsetup && echo 'exists'" \ - "exists" + # Test 10: archsetup directory present (optional - only if ARCHSETUP_DIR was set during build) + run_test "archsetup directory (optional)" \ + "test -d /code/archsetup && echo 'present' || echo 'not included'" \ + "" # Test 11: Btrfs tools installed (dual filesystem support) run_test "Btrfs tools installed" \ -- cgit v1.2.3