aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat
-rw-r--r--.dockerignore9+0 −9
-rw-r--r--.github/workflows/build.yml15+3 −12
-rw-r--r--.github/workflows/legal.yml1+0 −1
-rw-r--r--.gitignore2+1 −1
-rw-r--r--.mailmap3+0 −3
-rw-r--r--Cargo.toml2+1 −1
-rwxr-xr-ximages/alpine/genimg14+7 −7
-rwxr-xr-ximages/debian/genimg18+7 −11
-rwxr-xr-ximages/fedora/genimg9+1 −8
-rwxr-xr-ximages/ubuntu/genimg15+4 −11
-rw-r--r--mise.lock41+1 −40
-rw-r--r--mise.toml8+5 −3
12 files changed, 30 insertions, 107 deletions
diff --git a/.dockerignore b/.dockerignore
deleted file mode 100644
--- a/.dockerignore
+++ /dev/null
@@ -1,9 +0,0 @@
-# SPDX-FileCopyrightText: 2026 Nikolay Govorov
-# SPDX-License-Identifier: Apache-2.0
-
-.git
-.github
-.recluse-state
-dist
-target
-*.lcov
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index be7c3ff..c908213 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -6,20 +6,14 @@ name: Build
on:
push:
branches: [main]
- tags: ["v*"]
pull_request:
branches: [main]
permissions:
contents: read
-concurrency:
- group: hule-build-${{ github.ref }}
- cancel-in-progress: true
-
env:
CARGO_TERM_COLOR: always
- RELEASE_TAG: nightly
jobs:
lint:
@@ -34,16 +28,13 @@ jobs:
experimental: true
install: false
- name: Install dependencies
- run: mise bootstrap --locked --yes --update
+ run: mise bootstrap --locked --yes
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
- - name: formatting
+ - name: Check formatting
run: cargo fmt --all --check
- - name: shellcheck
- run: shellcheck images/*/genimg
-
- - name: clippy
+ - name: Run Clippy
run: cargo clippy --workspace --all-targets --all-features --release --locked -- -D warnings
build:
diff --git a/.github/workflows/legal.yml b/.github/workflows/legal.yml
index b5a2fad..2886f52 100644
--- a/.github/workflows/legal.yml
+++ b/.github/workflows/legal.yml
@@ -6,7 +6,6 @@ name: Legal
on:
push:
branches: [main]
- tags: ["v*"]
pull_request:
branches: [main]
diff --git a/.gitignore b/.gitignore
index ea96d7d..ba46a2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,8 @@
# SPDX-FileCopyrightText: 2026 Nikolay Govorov
# SPDX-License-Identifier: Apache-2.0
-/dist
/target
+/dist
mise.local.toml
mise.*.local.toml
diff --git a/.mailmap b/.mailmap
index d364a7b..d8e0402 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,6 +1,3 @@
-# SPDX-FileCopyrightText: 2026 Nikolay Govorov
-# SPDX-License-Identifier: Apache-2.0
-#
# Add new entries in alphabetical order
Nikolay Govorov <me@govorov.online>
diff --git a/Cargo.toml b/Cargo.toml
index 825ad03..6c27a41 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ edition = "2024"
version = "0.1.0"
license = "Apache-2.0"
authors = ["Nikolay Govorov <me@govorov.online>"]
-repository = "https://git.dimidiumlabs.io/hule"
+repository = "https://github.com/dimidiumlabs/hule"
[workspace.dependencies]
# local dependencies
diff --git a/images/alpine/genimg b/images/alpine/genimg
index f5446ce..6d34e3e 100755
--- a/images/alpine/genimg
+++ b/images/alpine/genimg
@@ -56,7 +56,7 @@ qemu-img create -f qcow2 -o compat=1.1 "$out"/root.hmi "${size_gib}G"
modprobe nbd max_part=16
qemu-nbd --connect=/dev/nbd0 "$out"/root.hmi
for i in $(seq 1 5); do
- sleep "0.$i"
+ sleep 0.$i
partprobe /dev/nbd0 && break
done
trap cleanup EXIT
@@ -82,13 +82,13 @@ swapon /dev/nbd0p2
# TODO: Remove bash
apk add -U \
- -X "http://dl-cdn.alpinelinux.org/alpine/$release/main/" \
- -X "http://dl-cdn.alpinelinux.org/alpine/$release/community/" \
+ -X http://dl-cdn.alpinelinux.org/alpine/$release/main/ \
+ -X http://dl-cdn.alpinelinux.org/alpine/$release/community/ \
--allow-untrusted \
--arch="$apk_arch" \
--root=/mnt \
--initdb \
- acct alpine-base alpine-conf alpine-sdk linux-firmware-none "$linux" \
+ acct alpine-base alpine-conf alpine-sdk linux-firmware-none $linux \
git mercurial openssh sudo syslinux tzdata gnupg haveged bash curl \
doas qemu-guest-agent
@@ -200,11 +200,11 @@ cat >/mnt/etc/docker/daemon.json <<EOF
EOF
pkg_version() {
- name=$(run_root apk list "$1" | grep installed | cut -d' ' -f1)
- echo "${name##"$1"-}"
+ name=$(run_root apk list $1 | grep installed | cut -d' ' -f1)
+ echo ${name##$1-}
}
-run_root apk add "$linux=$(pkg_version "$linux")"
+run_root apk add $linux=$(pkg_version $linux)
sync
diff --git a/images/debian/genimg b/images/debian/genimg
index 2dedba5..c710088 100755
--- a/images/debian/genimg
+++ b/images/debian/genimg
@@ -21,16 +21,19 @@ case $arch in
amd64)
darch=amd64
iface=ens3
+ qarch=x86_64
kpkg=linux-image-amd64
;;
arm64)
darch=arm64
iface=enp0s1
+ qarch=aarch64
kpkg=linux-image-arm64
;;
ppc64le)
darch=ppc64el
iface=enp0s0
+ qarch=ppc64le
kpkg=linux-image-powerpc64le
;;
*)
@@ -64,7 +67,7 @@ qemu-img create -f qcow2 -o compat=1.1 "$out/root.hmi" "${size_gib}G"
modprobe nbd max_part=16
qemu-nbd --connect=/dev/nbd0 "$out/root.hmi"
for i in $(seq 1 5); do
- sleep "0.$i"
+ sleep 0.$i
partprobe /dev/nbd0 && break
done
trap cleanup EXIT
@@ -88,9 +91,9 @@ mkdir /mnt/boot
mount /dev/nbd0p1 /mnt/boot
if [ "$arch" = "amd64" ]; then
- debootstrap --include=gnupg2 --arch="$darch" "$release" /mnt
+ debootstrap --include=gnupg2 --arch=$darch $release /mnt
else
- ./qemu-debootstrap --include=gnupg2 --arch="$darch" "$release" /mnt
+ ./qemu-debootstrap --include=gnupg2 --arch=$darch $release /mnt
fi
mount --bind /dev /mnt/dev
@@ -156,14 +159,7 @@ EOF
run_root update-initramfs -u
-kernel_path=
-for candidate in /mnt/boot/vmlinuz-*; do
- [ -e "$candidate" ] || continue
- kernel_path=$candidate
- break
-done
-[ -n "$kernel_path" ]
-linuxver=${kernel_path##*/vmlinuz-}
+linuxver=$(ls /mnt/boot | grep vmlinuz | cut -d- -f2-)
# Reference partitions by PARTUUID so boot survives whatever the VMM names the
# disk. cmdline is canonical: identical for every boot protocol (extlinux append
diff --git a/images/fedora/genimg b/images/fedora/genimg
index 8215ec5..eff48da 100755
--- a/images/fedora/genimg
+++ b/images/fedora/genimg
@@ -150,14 +150,7 @@ run_root dnf clean all
cat >/mnt/etc/dracut.conf.d/virtio-blk.conf <<EOF
add_drivers="virtio-blk"
EOF
-kernel_path=
-for candidate in /mnt/boot/vmlinuz-*."$fedora_arch"; do
- [ -e "$candidate" ] || continue
- kernel_path=$candidate
- break
-done
-[ -n "$kernel_path" ]
-kernel_version=${kernel_path##*/vmlinuz-}
+kernel_version=$(ls /mnt/boot | grep "vmlinuz.*.$fedora_arch" | cut -d- -f2-)
run_root dracut --force --kver "$kernel_version"
run_root grub2-install --target=i386-pc $NBD_DEVICE
diff --git a/images/ubuntu/genimg b/images/ubuntu/genimg
index 1980803..ec4b26c 100755
--- a/images/ubuntu/genimg
+++ b/images/ubuntu/genimg
@@ -81,7 +81,7 @@ export DEBIAN_FRONTEND=noninteractive
debootstrap \
--include=gnupg,ubuntu-keyring \
- --arch="$arch" "$release" \
+ --arch=$arch $release \
/mnt http://archive.ubuntu.com/ubuntu/
mount --bind /dev /mnt/dev
@@ -111,9 +111,9 @@ echo 'nameserver 1.1.1.1' >>/mnt/etc/resolv.conf
net_mode=static
net_address=10.0.2.15/24
net_gateway=10.0.2.2
-cat >"/mnt/etc/systemd/network/25-$iface.network" <<EOF
+cat >/mnt/etc/systemd/network/25-ens3.network <<EOF
[Match]
-Name=$iface
+Name=ens3
[Network]
Address=$net_address
@@ -172,14 +172,7 @@ EOF
run_root update-initramfs -u
-kernel_path=
-for candidate in /mnt/boot/vmlinuz-[0-9]*; do
- [ -e "$candidate" ] || continue
- kernel_path=$candidate
- break
-done
-[ -n "$kernel_path" ]
-linuxver=${kernel_path##*/vmlinuz-}
+linuxver=$(ls /mnt/boot | grep 'vmlinuz-[0-9].*' | cut -d- -f2-)
# Reference partitions by PARTUUID so boot works regardless of how the VMM names
# the disk (vda/sda/nvme...). cmdline is canonical: identical for every boot
diff --git a/mise.lock b/mise.lock
index 2fbf86b..b2218ec 100644
--- a/mise.lock
+++ b/mise.lock
@@ -5,44 +5,5 @@ version = "1.97.1"
backend = "core:rust"
[tools.rust.options]
-components = "clippy,llvm-tools-preview,rustfmt"
+components = "clippy,rustfmt"
profile = "minimal"
-
-[[tools.shellcheck]]
-version = "0.11.0"
-backend = "aqua:koalaman/shellcheck"
-
-[tools.shellcheck."platforms.linux-arm64"]
-checksum = "sha256:12b331c1d2db6b9eb13cfca64306b1b157a86eb69db83023e261eaa7e7c14588"
-url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellcheck-v0.11.0.linux.aarch64.tar.xz"
-url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056934"
-
-[tools.shellcheck."platforms.linux-arm64-musl"]
-checksum = "sha256:12b331c1d2db6b9eb13cfca64306b1b157a86eb69db83023e261eaa7e7c14588"
-url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellcheck-v0.11.0.linux.aarch64.tar.xz"
-url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056934"
-
-[tools.shellcheck."platforms.linux-x64"]
-checksum = "sha256:8c3be12b05d5c177a04c29e3c78ce89ac86f1595681cab149b65b97c4e227198"
-url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellcheck-v0.11.0.linux.x86_64.tar.xz"
-url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056942"
-
-[tools.shellcheck."platforms.linux-x64-musl"]
-checksum = "sha256:8c3be12b05d5c177a04c29e3c78ce89ac86f1595681cab149b65b97c4e227198"
-url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellcheck-v0.11.0.linux.x86_64.tar.xz"
-url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056942"
-
-[tools.shellcheck."platforms.macos-arm64"]
-checksum = "sha256:56affdd8de5527894dca6dc3d7e0a99a873b0f004d7aabc30ae407d3f48b0a79"
-url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellcheck-v0.11.0.darwin.aarch64.tar.xz"
-url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056932"
-
-[tools.shellcheck."platforms.macos-x64"]
-checksum = "sha256:3c89db4edcab7cf1c27bff178882e0f6f27f7afdf54e859fa041fca10febe4c6"
-url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellcheck-v0.11.0.darwin.x86_64.tar.xz"
-url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056930"
-
-[tools.shellcheck."platforms.windows-x64"]
-checksum = "sha256:8a4e35ab0b331c85d73567b12f2a444df187f483e5079ceffa6bda1faa2e740e"
-url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellcheck-v0.11.0.zip"
-url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056944"
diff --git a/mise.toml b/mise.toml
index 9d541da..52628fd 100644
--- a/mise.toml
+++ b/mise.toml
@@ -7,11 +7,13 @@ min_version = "2026.7.5"
experimental = true
[tools]
-rust = { version = "1.97.1", profile = "minimal", components = [ "clippy", "llvm-tools-preview", "rustfmt" ] }
-shellcheck = "0.11.0"
+rust = { version = "1.97.1", profile = "minimal", components = [
+ "clippy",
+ "rustfmt",
+] }
[task_config]
dir = "{{cwd}}"
includes = [
- "git::https://git.dimidiumlabs.io/platform.git//tasks?ref=e5ca3be4349af3d1da2dde9d1165d52fb014a371",
+ "git::https://github.com/dimidiumlabs/platform.git//tasks?ref=e5ca3be4349af3d1da2dde9d1165d52fb014a371",
]