From c43a78accfd0be365c64dcd8d110c45a02fbf625 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 29 Nov 2025 13:08:19 +0100 Subject: [PATCH] freebsd/netbsd: set and display full hostname --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4047a571f..689dc2817 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -310,6 +310,10 @@ jobs: set -euxo pipefail case "${{ matrix.os }}" in freebsd) + # Ensure a proper hostname/FQDN is set (VMs may not have one by default) + sudo -E /bin/sh -c 'grep -q "freebsd\.local" /etc/hosts || echo "127.0.0.1 freebsd.local freebsd" >> /etc/hosts' + sudo -E hostname freebsd.local + hostname export IGNORE_OSVERSION=yes sudo -E pkg update -f sudo -E pkg install -y xxhash liblz4 zstd pkgconf @@ -354,6 +358,10 @@ jobs: fi ;; netbsd) + # Ensure a proper hostname/FQDN is set (VMs may not have one by default) + sudo -E /bin/sh -c 'grep -q "netbsd\.local" /etc/hosts || echo "127.0.0.1 netbsd.local netbsd" >> /etc/hosts' + sudo -E hostname netbsd.local + hostname arch="$(uname -m)" sudo -E mkdir -p /usr/pkg/etc/pkgin echo "http://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/${arch}/10.1/All" | sudo tee /usr/pkg/etc/pkgin/repositories.conf > /dev/null