aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat
l---------images/alpine/3.20/functions1+0 −1
l---------images/alpine/3.21/functions1+0 −1
l---------images/alpine/3.22/functions1+0 −1
l---------images/alpine/3.23/functions1+0 −1
l---------images/alpine/3.24/functions1+0 −1
l---------images/alpine/edge/functions1+0 −1
-rwxr-xr-ximages/alpine/edge/genimg1+0 −1
-rw-r--r--images/alpine/functions26+2 −24
-rwxr-xr-ximages/alpine/genimg10+2 −8
-rwxr-xr-ximages/control132+13 −119
l---------images/debian/bookworm/functions1+0 −1
l---------images/debian/forky/functions1+0 −1
-rw-r--r--images/debian/functions40+3 −37
-rwxr-xr-ximages/debian/genimg10+2 −8
l---------images/debian/sid/functions1+0 −1
l---------images/debian/trixie/functions1+0 −1
l---------images/fedora/42/functions1+0 −1
l---------images/fedora/43/functions1+0 −1
l---------images/fedora/44/functions1+0 −1
-rw-r--r--images/fedora/functions14+2 −12
-rwxr-xr-ximages/fedora/genimg10+2 −8
l---------images/freebsd/14.x/functions1+0 −1
l---------images/freebsd/15.x/functions1+0 −1
-rw-r--r--images/freebsd/current/functions43+0 −43
-rwxr-xr-ximages/freebsd/genimg10+2 −8
-rwxr-xr-ximages/freebsd/genpkgimg10+2 −8
-rw-r--r--images/ubuntu/functions40+9 −31
-rwxr-xr-ximages/ubuntu/genimg10+2 −8
l---------images/ubuntu/jammy/functions1+0 −1
l---------images/ubuntu/noble/functions1+0 −1
l---------images/ubuntu/resolute/functions1+0 −1
31 files changed, 41 insertions, 333 deletions
diff --git a/images/alpine/3.20/functions b/images/alpine/3.20/functions
deleted file mode 120000
--- a/images/alpine/3.20/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/alpine/3.21/functions b/images/alpine/3.21/functions
deleted file mode 120000
--- a/images/alpine/3.21/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/alpine/3.22/functions b/images/alpine/3.22/functions
deleted file mode 120000
--- a/images/alpine/3.22/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/alpine/3.23/functions b/images/alpine/3.23/functions
deleted file mode 120000
--- a/images/alpine/3.23/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/alpine/3.24/functions b/images/alpine/3.24/functions
deleted file mode 120000
--- a/images/alpine/3.24/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/alpine/edge/functions b/images/alpine/edge/functions
deleted file mode 120000
--- a/images/alpine/edge/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/alpine/edge/genimg b/images/alpine/edge/genimg
index ebc1701..44cd6c3 100755
--- a/images/alpine/edge/genimg
+++ b/images/alpine/edge/genimg
@@ -3,5 +3,4 @@
# SPDX-License-Identifier: AGPL-3.0-only
export release=edge
-export linux=linux-lts
exec ../genimg
diff --git a/images/alpine/functions b/images/alpine/functions
index 340f0fa..db6504c 100644
--- a/images/alpine/functions
+++ b/images/alpine/functions
@@ -1,5 +1,6 @@
#!/bin/sh
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: AGPL-3.0-only
poweroff_cmd="sudo poweroff"
@@ -21,29 +22,6 @@ install() {
guest_ssh -p $port build@localhost sudo apk add "$@"
}
-add_repository() {
- port=$1
- name=$2
- src=$3
- repo=$(echo $src | cut -d' ' -f1)
- key=$(echo $src | cut -d' ' -f2)
- keyname=$(echo $src | cut -d' ' -f3)
- guest_ssh -p $port build@localhost \
- "curl -s '$key' | sudo tee /etc/apk/keys/'$keyname'"
- if [ "${name#@}" = "${name}" ]
- then
- printf '%s\n' "$repo" \
- | guest_ssh -p $port build@localhost \
- "cat - /etc/apk/repositories | sudo tee /etc/apk/repositories.new"
- else
- printf '%s %s\n' "$name" "$repo" \
- | guest_ssh -p $port build@localhost \
- "cat - /etc/apk/repositories | sudo tee /etc/apk/repositories.new"
- fi
- guest_ssh -p $port build@localhost \
- "sudo mv /etc/apk/repositories.new /etc/apk/repositories"
-}
-
sanity_check() {
echo "Booting..."
cmd_boot x86_64 8022 qemu &
diff --git a/images/alpine/genimg b/images/alpine/genimg
index 689ce7e..2ac659b 100755
--- a/images/alpine/genimg
+++ b/images/alpine/genimg
@@ -1,5 +1,6 @@
#!/bin/sh -eux
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: AGPL-3.0-only
echo "$release" >/dev/null # fail on -u if release unset
@@ -176,11 +177,4 @@ pkg_version() {
run_root apk add $linux=$(pkg_version $linux)
-cat >/mnt/home/build/.gitconfig <<EOF
-[user]
- name = builds.sr.ht
- email = builds@sr.ht
-EOF
-chown build:build /mnt/home/build/.gitconfig
-
sync
diff --git a/images/control b/images/control
index c549fe8..31fe811 100755
--- a/images/control
+++ b/images/control
@@ -1,21 +1,16 @@
#!/bin/sh -eu
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: AGPL-3.0-only
self=$(readlink -f $0)
self=$(dirname "$self")
-if [ -f /etc/image-control.conf ]
-then
- . /etc/image-control.conf
-fi
-
base=$1
cmd=$2
shift 2
-if [ ! -d $self/$base ]
-then
+if [ ! -d $self/$base ]; then
printf "Image '%s' does not exist\n" "$base" >&2
exit 1
fi
@@ -50,27 +45,7 @@ cpu_opts() {
esac
}
-_docker_boot() {
- docker run -d \
- -v "$self/$base":/base:ro \
- --mount type=tmpfs,destination=/var/tmp \
- --device /dev/kvm \
- --cpus=2 \
- -p 127.0.0.1:$port:$port \
- --rm \
- --name "builds_job_${BUILD_JOB_ID:-unknown_$(date +"%s")}" \
- qemu /bin/${qemu:-qemu-system-$arch} \
- -m ${MEMORY:-4096} \
- -smp cpus=2 \
- -net nic,model=virtio -net user,hostfwd=tcp::$port-:$guestport \
- -display none \
- -device virtio-rng-pci \
- -device virtio-balloon \
- -drive file="$wd/$arch/root.img.qcow2",media=disk,snapshot=on,${driveopts:-if=virtio} \
- "$@" > /tmp/docker-$port.id
-}
-
-_qemu_boot() {
+_boot() {
${qemu:-qemu-system-$arch} \
-pidfile /tmp/qemu-$port.id \
-m ${MEMORY:-4096} \
@@ -83,89 +58,21 @@ _qemu_boot() {
"$@" &
}
-_qemu_chroot_boot() {
- qemu-chroot \
- -p /tmp/qemu-$port.id \
- -b "$self/$base":/base \
- -b /var/tmp:/var/tmp \
- /bin/${qemu:-qemu-system-$arch} \
- -m ${MEMORY:-4096} \
- -smp cpus=2 \
- -net nic,model=virtio -net user,hostfwd=tcp:127.0.0.1:$port-:$guestport \
- -display none \
- -device virtio-rng-pci \
- -device virtio-balloon \
- -drive file="$wd/$arch/root.img.qcow2",media=disk,snapshot=on,${driveopts:-if=virtio} \
- "$@" &
-}
-
-_qemu_kvm_boot() {
- qemu-kvm \
- -pidfile /tmp/qemu-$port.id \
- -m ${MEMORY:-4096} \
- -smp cpus=2 \
- -net nic,model=virtio -net user,hostfwd=tcp:127.0.0.1:$port-:$guestport \
- -display none \
- -device virtio-rng-pci \
- -device virtio-balloon \
- -drive file="$wd/$arch/root.img.qcow2",media=disk,snapshot=on,${driveopts:-if=virtio} \
- "$@" &
-}
-
-_boot() {
- if [ "$means" = "docker" ]
- then
- _docker_boot "$@"
- elif [ "$means" = "qemu" ]
- then
- _qemu_boot "$@"
- elif [ "$means" = "qemu-chroot" ]
- then
- _qemu_chroot_boot "$@"
- elif [ "$means" = "qemu-kvm" ]
- then
- _qemu_kvm_boot "$@"
- fi
-}
-
cmd_boot() {
arch=$1
shift
- if [ "$arch" = "default" ]
- then
+ if [ "$arch" = "default" ]; then
arch="$default_arch"
fi
- if [ ! -e "$self/$base/$arch/root.img.qcow2" ]
- then
+
+ if [ ! -e "$self/$base/$arch/root.img.qcow2" ]; then
printf "Image '%s' is not available for arch '%s'\n" "$base" "$arch" >&2
exit 1
fi
port=$1
- if [ "$#" -gt 1 ]
- then
- means=$2
- else
- means="${default_means:-docker}"
- fi
-
- if [ "$means" = "docker" ]
- then
- wd="/base"
- elif [ "$means" = "qemu" ]
- then
- wd="$self/$base"
- elif [ "$means" = "qemu-chroot" ]
- then
- wd="/base"
- elif [ "$means" = "qemu-kvm" ]
- then
- wd="$self/$base"
- else
- printf "Unknown boot mode '%s'\n" "$means" >&2
- exit 1
- fi
+ wd="$self/$base"
boot
}
@@ -193,14 +100,6 @@ cmd_cleanup() {
# Power off
if [ "$#" -eq 1 ]
then
- if [ -e /tmp/docker-$port.id ]
- then
- cid=$(cat /tmp/docker-$port.id)
- guest_ssh -p $port build@localhost $poweroff_cmd || true
- sleep 2
- docker kill $cid && sleep 2 || true
- rm /tmp/docker-$port.id
- fi
if [ -e /tmp/qemu-$port.id ]
then
cid=$(cat /tmp/qemu-$port.id)
@@ -212,14 +111,15 @@ cmd_cleanup() {
fi
}
-if ! [ -e "$self/$base/functions" ]
-then
+if [ -f "$self/$base/functions" ]; then
+ . "$self/$base/functions"
+elif [ -f "$self/$(dirname "$base")/functions" ]; then
+ . "$self/$(dirname "$base")/functions"
+else
printf "Missing base image functions '%s'\n" "$base" >&2
exit 1
fi
-. $self/$base/functions
-
case "$cmd" in
boot)
cmd_boot "$@"
@@ -230,12 +130,6 @@ case "$cmd" in
sanity-check)
sanity_check "$@"
;;
- install)
- install "$@"
- ;;
- add-repo)
- add_repository "$@"
- ;;
ssh)
port=$1
shift
diff --git a/images/debian/bookworm/functions b/images/debian/bookworm/functions
deleted file mode 120000
--- a/images/debian/bookworm/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/debian/forky/functions b/images/debian/forky/functions
deleted file mode 120000
--- a/images/debian/forky/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/debian/functions b/images/debian/functions
index e812b0a..64470ce 100644
--- a/images/debian/functions
+++ b/images/debian/functions
@@ -1,5 +1,6 @@
-#!/usr/bin/env bash
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+#!/bin/sh
+# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: AGPL-3.0-only
poweroff_cmd="sudo systemctl poweroff"
@@ -47,41 +48,6 @@ install() {
apt-get install -y "$@"
}
-add_repository() {
- port=$1
- name=$2
- src=$3
- repo=$(echo $src | cut -d' ' -f1)
- distro=$(echo $src | cut -d' ' -f2)
- cmpnt=$(echo $src | cut -d' ' -f3)
- key=$(echo $src | cut -d' ' -f4)
- signed_by=""
- if [ "$key" != "" ]
- then
- # Import the GPG key into a user trustdb
- guest_ssh -p $port build@localhost sudo \
- gpg \
- --keyserver hkp://keyserver.ubuntu.com:80 \
- --recv-keys $key
-
- guest_ssh -p $port build@localhost sudo \
- mkdir -pm 0755 /etc/apt/keyrings
-
- # Export the GPG key to Apt's key directory
- guest_ssh -p $port build@localhost sudo \
- gpg \
- --output /etc/apt/keyrings/$name.gpg \
- --export $key
-
- signed_by="[signed-by=/etc/apt/keyrings/$name.gpg]"
- fi
- printf 'deb %s %s %s %s\n' "$signed_by" "$repo" "$distro" "$cmpnt" \
- | guest_ssh -p $port build@localhost sudo tee -a /etc/apt/sources.list.d/$name.list
- printf 'deb-src %s %s %s %s\n' "$signed_by" "$repo" "$distro" "$cmpnt" \
- | guest_ssh -p $port build@localhost sudo tee -a /etc/apt/sources.list.d/$name.list
- guest_ssh -p "$port" build@localhost sudo apt-get update
-}
-
sanity_check() {
arch=$1
shift
diff --git a/images/debian/genimg b/images/debian/genimg
index 9e1677b..297a26d 100755
--- a/images/debian/genimg
+++ b/images/debian/genimg
@@ -1,5 +1,6 @@
#!/bin/sh -eux
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: AGPL-3.0-only
echo "$release" >/dev/null # fail on -u if release unset
@@ -147,13 +148,6 @@ cat >>/mnt/etc/fstab <<EOF
/dev/vda3 / ext4 rw,relatime,data=ordered 0 0
EOF
-cat >/mnt/home/build/.gitconfig <<EOF
-[user]
- name = builds.sr.ht
- email = builds@sr.ht
-EOF
-run_root chown build:build /home/build/.gitconfig
-
# Boot setup
case "$arch" in
amd64)
diff --git a/images/debian/sid/functions b/images/debian/sid/functions
deleted file mode 120000
--- a/images/debian/sid/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/debian/trixie/functions b/images/debian/trixie/functions
deleted file mode 120000
--- a/images/debian/trixie/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/fedora/42/functions b/images/fedora/42/functions
deleted file mode 120000
--- a/images/fedora/42/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/fedora/43/functions b/images/fedora/43/functions
deleted file mode 120000
--- a/images/fedora/43/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/fedora/44/functions b/images/fedora/44/functions
deleted file mode 120000
--- a/images/fedora/44/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/fedora/functions b/images/fedora/functions
index f71df31..d222a33 100644
--- a/images/fedora/functions
+++ b/images/fedora/functions
@@ -1,5 +1,6 @@
#!/bin/sh
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: AGPL-3.0-only
poweroff_cmd="sudo systemctl poweroff"
@@ -20,17 +21,6 @@ install() {
guest_ssh -p $port build@localhost sudo dnf -y install "$@"
}
-add_repository() {
- port=$1
- name=$2
- url=$3
- guest_ssh -p $port build@localhost sudo dnf config-manager \
- addrepo --from-repofile="$url"
- guest_ssh -p $port build@localhost sudo dnf config-manager \
- setopt "$name.enabled"=1
- guest_ssh -p $port build@localhost sudo dnf makecache
-}
-
sanity_check() {
echo "Booting..."
cmd_boot x86_64 8022 qemu &
diff --git a/images/fedora/genimg b/images/fedora/genimg
index ff62e6c..7983380 100755
--- a/images/fedora/genimg
+++ b/images/fedora/genimg
@@ -1,5 +1,6 @@
#!/bin/sh -eux
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: AGPL-3.0-only
# Network Block Device used to interact with the QCOW2 image.
@@ -147,11 +148,4 @@ UUID=$swap_uuid swap swap defaults 0 0
UUID=$root_uuid / ext4 rw,relatime,data=ordered 0 0
EOF
-cat >/mnt/home/build/.gitconfig <<EOF
-[user]
- name = builds.sr.ht
- email = builds@sr.ht
-EOF
-chown build:build /mnt/home/build/.gitconfig
-
sync
diff --git a/images/freebsd/14.x/functions b/images/freebsd/14.x/functions
deleted file mode 120000
--- a/images/freebsd/14.x/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/freebsd/15.x/functions b/images/freebsd/15.x/functions
deleted file mode 120000
--- a/images/freebsd/15.x/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/freebsd/current/functions b/images/freebsd/current/functions
deleted file mode 100644
--- a/images/freebsd/current/functions
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
-# SPDX-License-Identifier: AGPL-3.0-only
-
-poweroff_cmd="sudo poweroff"
-default_arch=amd64
-
-boot() {
- if [ "$arch" != "amd64" ]
- then
- echo "Unsupported architecture $arch" >&2
- exit 1
- fi
- qemu=qemu-system-x86_64
- _boot $(cpu_opts x86_64)
-}
-
-install() {
- port=$1
- shift 1
- guest_ssh -p $port build@localhost \
- "sudo pkg update && sudo pkg upgrade -y && sudo pkg install -y $@"
-}
-
-sanity_check() {
- echo "Booting..."
- cmd_boot amd64 8022 qemu &
- trap 'cmd_cleanup 8022' EXIT
- _wait_boot 8022
- sleep 20
- echo "Testing sudo..."
- guest_ssh -p 8022 build@localhost sudo ls -a
- echo "Testing networking..."
- guest_ssh -p 8022 build@localhost curl http://builds.sr.ht
- echo "Testing pkg..."
- guest_ssh -p 8022 build@localhost sudo pkg update
- guest_ssh -p 8022 build@localhost sudo pkg upgrade -y
- guest_ssh -p 8022 build@localhost sudo pkg install -y htop
- echo "Testing git..."
- guest_ssh -p 8022 build@localhost git --version
- echo "Everything works!"
- guest_ssh -p 8022 build@localhost sudo poweroff || true
-}
diff --git a/images/freebsd/genimg b/images/freebsd/genimg
index 6e86c53..c5219ea 100755
--- a/images/freebsd/genimg
+++ b/images/freebsd/genimg
@@ -1,5 +1,6 @@
#!/bin/sh -eux
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: AGPL-3.0-only
echo "$release" >/dev/null # fail on -u if unset
@@ -96,13 +97,6 @@ pw -R /mnt groupadd sudo
pw -R /mnt useradd -n build -u 1000 -s /usr/local/bin/bash -m -w none -G sudo
echo "%sudo ALL=(ALL) NOPASSWD: ALL" >>/mnt/usr/local/etc/sudoers
-cat >/mnt/home/build/.gitconfig <<EOF
-[user]
- name = builds.sr.ht
- email = builds@sr.ht
-EOF
-chown build:build /mnt/home/build/.gitconfig
-
cleanup
trap : EXIT
diff --git a/images/freebsd/genpkgimg b/images/freebsd/genpkgimg
index b9236f4..b9f2ba7 100755
--- a/images/freebsd/genpkgimg
+++ b/images/freebsd/genpkgimg
@@ -1,5 +1,6 @@
#!/bin/sh -eux
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: AGPL-3.0-only
echo "$release" >/dev/null # fail on -u if unset
@@ -81,13 +82,6 @@ pw -R disk groupadd sudo
pw -R disk useradd -n build -u 1000 -s /usr/local/bin/bash -m -w none -G sudo
echo "%sudo ALL=(ALL) NOPASSWD: ALL" >>disk/usr/local/etc/sudoers
-cat >disk/home/build/.gitconfig <<EOF
-[user]
- name = builds.sr.ht
- email = builds@sr.ht
-EOF
-chown 1000:1000 disk/home/build/.gitconfig
-
makefs -s 5g -B little -o label=rootfs -o version=2 -o softupdates=1 disk.img disk
mkdir -p "$arch"
mkimg -s gpt \
diff --git a/images/ubuntu/functions b/images/ubuntu/functions
index eddf6a1..26e6f54 100644
--- a/images/ubuntu/functions
+++ b/images/ubuntu/functions
@@ -1,5 +1,6 @@
-#!/usr/bin/env bash
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+#!/bin/sh
+# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: AGPL-3.0-only
poweroff_cmd="sudo systemctl poweroff"
@@ -36,51 +37,28 @@ install() {
apt-get install -y -q "$@"
}
-add_repository() {
- port=$1
- name=$2
- src=$3
- repo=$(echo $src | cut -d' ' -f1)
- distro=$(echo $src | cut -d' ' -f2)
- cmpnt=$(echo $src | cut -d' ' -f3)
- key=$(echo $src | cut -d' ' -f4)
- if [ "$key" != "" ]
- then
- # Import the GPG key into a user trustdb
- guest_ssh -p $port build@localhost sudo \
- gpg \
- --keyserver hkp://keyserver.ubuntu.com:80 \
- --recv-keys $key
-
- # Export the GPG key to Apt's key directory
- guest_ssh -p $port build@localhost sudo \
- gpg \
- --output /etc/apt/trusted.gpg.d/$key.gpg \
- --export $key
- fi
- printf 'deb %s %s %s\n' "$repo" "$distro" "$cmpnt" \
- | guest_ssh -p $port build@localhost sudo tee -a /etc/apt/sources.list
- printf 'deb-src %s %s %s\n' "$repo" "$distro" "$cmpnt" \
- | guest_ssh -p $port build@localhost sudo tee -a /etc/apt/sources.list
- guest_ssh -p "$port" build@localhost sudo apt-get update
-}
-
sanity_check() {
echo "Booting..."
cmd_boot amd64 8022 qemu &
trap 'cmd_cleanup 8022' EXIT
_wait_boot 8022
+
echo "Testing sudo..."
guest_ssh -p 8022 build@localhost sudo ls -a
+
echo "Testing apt..."
guest_ssh -p 8022 build@localhost sudo apt-get update
install 8022 curl
+
echo "Testing networking..."
guest_ssh -p 8022 build@localhost curl https://builds.sr.ht
+
echo "Testing git..."
guest_ssh -p 8022 build@localhost git --version
+
echo "Testing mercurial..."
guest_ssh -p 8022 build@localhost hg --version
+
echo "Everything works!"
guest_ssh -p 8022 build@localhost sudo systemctl poweroff || true
}
diff --git a/images/ubuntu/genimg b/images/ubuntu/genimg
index 235b318..bb42bf1 100755
--- a/images/ubuntu/genimg
+++ b/images/ubuntu/genimg
@@ -1,5 +1,6 @@
#!/bin/sh -eux
-# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2017-2026 Drew DeVault
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: AGPL-3.0-only
echo "$release" >/dev/null # fail on -u if release unset
@@ -168,13 +169,6 @@ cat >>/mnt/etc/fstab <<EOF
/dev/vda3 / ext4 rw,relatime,data=ordered 0 0
EOF
-cat >/mnt/home/build/.gitconfig <<EOF
-[user]
- name = builds.sr.ht
- email = builds@sr.ht
-EOF
-chown build:build /mnt/home/build/.gitconfig
-
if [ "$arch" != "amd64" ]
then
cp /mnt/boot/vmlinuz $arch/vmlinuz
diff --git a/images/ubuntu/jammy/functions b/images/ubuntu/jammy/functions
deleted file mode 120000
--- a/images/ubuntu/jammy/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/ubuntu/noble/functions b/images/ubuntu/noble/functions
deleted file mode 120000
--- a/images/ubuntu/noble/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file
diff --git a/images/ubuntu/resolute/functions b/images/ubuntu/resolute/functions
deleted file mode 120000
--- a/images/ubuntu/resolute/functions
+++ /dev/null
@@ -1 +0,0 @@
-../functions
\ No newline at end of file