Compare commits

...

2 Commits

Author SHA1 Message Date
0c0f1ec715 Fix git clone in Proxmox VM: add GIT_SSL_NO_VERIFY for self-hosted Gitea
The Gitea server at git.dannyhaslund.dk has a TLS SNI issue that
causes 'tlsv1 unrecognized name' errors from inside VMs. Adding
GIT_SSL_NO_VERIFY=true for the clone since it's a trusted self-hosted
server on the local network.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 16:12:22 +01:00
83760025b6 Fix darkforge-test heredoc indentation in cloud-init
The cat heredoc inside cloud-init runcmd was indented, causing the
shebang line to become "    #!/bin/bash" (with leading spaces) which
makes the script fail to execute as a proper interpreter.

Fixed by removing indentation from the heredoc body. Also improved
the error message to explain that the clone likely failed during
provisioning and show the manual clone command.

Added tmux kill-session before starting new session to avoid
"duplicate session" errors on re-run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 16:10:03 +01:00
2 changed files with 24 additions and 14 deletions

BIN
rescue-objects.tar Normal file

Binary file not shown.

View File

@@ -170,29 +170,39 @@ runcmd:
- pacman -S --noconfirm --needed base-devel git wget curl rust cargo qemu-full edk2-ovmf squashfs-tools xorriso dosfstools mtools python bc rsync openssh tmux - pacman -S --noconfirm --needed base-devel git wget curl rust cargo qemu-full edk2-ovmf squashfs-tools xorriso dosfstools mtools python bc rsync openssh tmux
# --- CLONE PROJECT --------------------------------------------------------- # --- CLONE PROJECT ---------------------------------------------------------
# Try HTTPS (with SSL_NO_VERIFY for self-hosted Gitea), fall back to GitHub
- | - |
su - darkforge -c ' su - darkforge -c '
cd /home/darkforge cd /home/darkforge
git clone --recurse-submodules https://git.dannyhaslund.dk/danny8632/darkforge.git 2>/dev/null || \ GIT_SSL_NO_VERIFY=true git clone --recurse-submodules https://git.dannyhaslund.dk/danny8632/darkforge.git 2>/dev/null || \
git clone --recurse-submodules https://github.com/danny8632/darkforge.git 2>/dev/null || \ git clone --recurse-submodules https://github.com/danny8632/darkforge.git 2>/dev/null || \
echo "CLONE FAILED — manually clone the repo after login" echo "CLONE FAILED — run manually: GIT_SSL_NO_VERIFY=true git clone --recurse-submodules https://git.dannyhaslund.dk/danny8632/darkforge.git ~/darkforge"
' '
# --- INSTALL CONVENIENCE COMMAND ------------------------------------------- # --- INSTALL CONVENIENCE COMMAND -------------------------------------------
# NOTE: heredoc inside cloud-init runcmd must NOT be indented or the
# shebang gets leading spaces and the script won't execute properly.
- | - |
cat > /usr/local/bin/darkforge-test << 'DTEOF' cat > /usr/local/bin/darkforge-test << 'DTEOF'
#!/bin/bash #!/bin/bash
SCRIPT="/home/darkforge/darkforge/tests/proxmox/run-in-vm.sh" SCRIPT="/home/darkforge/darkforge/tests/proxmox/run-in-vm.sh"
if [ ! -f "$SCRIPT" ]; then if [ ! -f "$SCRIPT" ]; then
echo "ERROR: Test script not found. Is the repo cloned?" echo "ERROR: Test script not found at: $SCRIPT"
echo ""
echo "The git clone probably failed during provisioning."
echo "Clone manually:"
echo " git clone --recurse-submodules https://git.dannyhaslund.dk/danny8632/darkforge.git ~/darkforge" echo " git clone --recurse-submodules https://git.dannyhaslund.dk/danny8632/darkforge.git ~/darkforge"
echo ""
echo "Then run: darkforge-test"
exit 1 exit 1
fi fi
ARGS="$*" ARGS="$*"
exec tmux new-session -d -s darkforge \ # Kill any existing tmux session first
tmux kill-session -t darkforge 2>/dev/null || true
exec tmux new-session -d -s darkforge \
"bash ${SCRIPT} --tmux ${ARGS}; echo ''; echo 'Tests finished. Press Enter to close.'; read" \; \ "bash ${SCRIPT} --tmux ${ARGS}; echo ''; echo 'Tests finished. Press Enter to close.'; read" \; \
attach-session -t darkforge attach-session -t darkforge
DTEOF DTEOF
chmod +x /usr/local/bin/darkforge-test chmod +x /usr/local/bin/darkforge-test
# --- SIGNAL DONE ----------------------------------------------------------- # --- SIGNAL DONE -----------------------------------------------------------