diff --git a/katsu/modules/base/base-disk-aarch64.yaml b/katsu/modules/base/base-disk-aarch64.yaml index 2af4720a..56997cdc 100644 --- a/katsu/modules/base/base-disk-aarch64.yaml +++ b/katsu/modules/base/base-disk-aarch64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - base.yaml diff --git a/katsu/modules/base/base-disk-x86_64.yaml b/katsu/modules/base/base-disk-x86_64.yaml index 32bfdb98..0890348e 100644 --- a/katsu/modules/base/base-disk-x86_64.yaml +++ b/katsu/modules/base/base-disk-x86_64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - base.yaml diff --git a/katsu/modules/base/base-disk.yaml b/katsu/modules/base/base-disk.yaml index d94fba55..f5c526a3 100644 --- a/katsu/modules/base/base-disk.yaml +++ b/katsu/modules/base/base-disk.yaml @@ -1,3 +1,8 @@ +scripts: + post: + - id: initial-setup + name: Enable Initial Setup + file: initial-setup.sh dnf: releasever: 40 options: @@ -8,6 +13,7 @@ dnf: - fedora-release* - generic-release* packages: + - initial-setup-gui - filesystem - setup - lvm2 diff --git a/katsu/modules/base/base.yaml b/katsu/modules/base/base.yaml index af5a9b0b..b03a9c0b 100644 --- a/katsu/modules/base/base.yaml +++ b/katsu/modules/base/base.yaml @@ -9,6 +9,9 @@ scripts: - id: buildstamp name: Generate buildstamp file: buildstamp.sh + - id: initial-setup + name: Enable Initial Setup + file: initial-setup.sh dnf: releasever: 40 diff --git a/katsu/modules/base/cleanup.sh b/katsu/modules/base/cleanup.sh index 4bf77c39..63b9c72b 100644 --- a/katsu/modules/base/cleanup.sh +++ b/katsu/modules/base/cleanup.sh @@ -35,6 +35,3 @@ rm -f /etc/machine-id touch /etc/machine-id rm -f /var/lib/rpm/__db* -# Set up initial setup, might be redundant idk -systemctl enable initial-setup -touch /var/lib/gdm/run-initial-setup || true diff --git a/katsu/modules/base/initial-setup.sh b/katsu/modules/base/initial-setup.sh new file mode 100644 index 00000000..68e777ce --- /dev/null +++ b/katsu/modules/base/initial-setup.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# Set up initial setup, might be redundant idk +systemctl enable initial-setup +touch /var/lib/gdm/run-initial-setup || true + + +# Set default target to graphical +systemctl set-default graphical.target \ No newline at end of file diff --git a/katsu/modules/flagship/base-disk-aarch64.yaml b/katsu/modules/flagship/base-disk-aarch64.yaml index 636a8256..7eeab30b 100644 --- a/katsu/modules/flagship/base-disk-aarch64.yaml +++ b/katsu/modules/flagship/base-disk-aarch64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 (Flagship Edition) -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - ../base/base.yaml diff --git a/katsu/modules/flagship/base-disk-x86_64.yaml b/katsu/modules/flagship/base-disk-x86_64.yaml index d0285bba..45c405ba 100644 --- a/katsu/modules/flagship/base-disk-x86_64.yaml +++ b/katsu/modules/flagship/base-disk-x86_64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 (Flagship Edition) -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - ../base/base.yaml diff --git a/katsu/modules/gnome/base-disk-aarch64.yaml b/katsu/modules/gnome/base-disk-aarch64.yaml index 37043b80..6db949fb 100644 --- a/katsu/modules/gnome/base-disk-aarch64.yaml +++ b/katsu/modules/gnome/base-disk-aarch64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 (GNOME Edition) -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - ../base/base.yaml diff --git a/katsu/modules/gnome/base-disk-x86_64.yaml b/katsu/modules/gnome/base-disk-x86_64.yaml index 6e533bd8..45eea9eb 100644 --- a/katsu/modules/gnome/base-disk-x86_64.yaml +++ b/katsu/modules/gnome/base-disk-x86_64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 (GNOME Edition) -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - ../base/base.yaml diff --git a/katsu/modules/kde/base-disk-aarch64.yaml b/katsu/modules/kde/base-disk-aarch64.yaml index 1247582a..32722087 100644 --- a/katsu/modules/kde/base-disk-aarch64.yaml +++ b/katsu/modules/kde/base-disk-aarch64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 (KDE Edition) -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - ../base/base.yaml @@ -39,4 +39,4 @@ disk: dnf: releasever: 40 - arch: aarch64 + arch: aarch64 \ No newline at end of file diff --git a/katsu/modules/kde/base-disk-x86_64.yaml b/katsu/modules/kde/base-disk-x86_64.yaml index 2ba1a718..6f6ed3c0 100644 --- a/katsu/modules/kde/base-disk-x86_64.yaml +++ b/katsu/modules/kde/base-disk-x86_64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 (KDE Edition) -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - ../base/base.yaml diff --git a/katsu/modules/pantheon/base-disk-aarch64.yaml b/katsu/modules/pantheon/base-disk-aarch64.yaml index 9b63ef8e..4583abd0 100644 --- a/katsu/modules/pantheon/base-disk-aarch64.yaml +++ b/katsu/modules/pantheon/base-disk-aarch64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 (Pantheon Edition) -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - ../base/base.yaml diff --git a/katsu/modules/pantheon/base-disk-x86_64.yaml b/katsu/modules/pantheon/base-disk-x86_64.yaml index 357113c6..beae662a 100644 --- a/katsu/modules/pantheon/base-disk-x86_64.yaml +++ b/katsu/modules/pantheon/base-disk-x86_64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 (Pantheon Edition) -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - ../base/base.yaml diff --git a/katsu/modules/xfce/base-disk-aarch64.yaml b/katsu/modules/xfce/base-disk-aarch64.yaml index 4b927a34..603ad457 100644 --- a/katsu/modules/xfce/base-disk-aarch64.yaml +++ b/katsu/modules/xfce/base-disk-aarch64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 (Xfce Edition) -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - ../base/base.yaml diff --git a/katsu/modules/xfce/base-disk-x86_64.yaml b/katsu/modules/xfce/base-disk-x86_64.yaml index 056bee21..d048b237 100644 --- a/katsu/modules/xfce/base-disk-x86_64.yaml +++ b/katsu/modules/xfce/base-disk-x86_64.yaml @@ -1,12 +1,12 @@ builder: dnf distro: Ultramarine Linux 40 (Xfce Edition) -users: - - username: ultramarine - # plaintext password: ultramarine - password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" - groups: - - wheel +# users: +# - username: ultramarine +# # plaintext password: ultramarine +# password: "$y$j9T$6/DebcxXazPrtBYnNXtEM.$yaUJHww5Mo1L8xNJ9IDJ.bvKOrIJxAG9PGQKWioBMx3" +# groups: +# - wheel import: - ../base/base.yaml diff --git a/test.fish b/test.fish new file mode 100755 index 00000000..37ddf12e --- /dev/null +++ b/test.fish @@ -0,0 +1,81 @@ +#!/usr/bin/env fish + +set fish_trace 1 + +# This script is used to aid in testing Katsu builds. It will help you quickly set up a VM test environment so +# you can manually test builds. This script shouldn't be used in prod and is meant +# for development only. + + +# Variables for test environment +set KATSU_BIN "katsu" + +# Directory for test data +set TEST_HOME (pwd)/.test + +# katsu-work +set KATSU_WORK (pwd)/katsu-work + +# Get testing mode from second argument +# Can be `qemu` or `wipe` +function get_mode + if test (count $argv) -eq 0 + echo "qemu-disk" + else + echo $argv[1] + end +end + +set -x SCRIPT_MODE (get_mode $argv) + +function find_iso + set iso_path (find $KATSU_WORK -name "*.iso" | head -n 1) + if test -z $iso_path + echo "No ISO found in $KATSU_WORK" + exit 1 + end + echo $iso_path +end + +function _qemu_arg_1 + if test $SCRIPT_MODE = "qemu-disk" + echo "-drive" + else + echo "-cdrom" + end +end +set KATSU_IMG_PATH "$KATSU_WORK/image/katsu.img" +function _qemu_arg_2 + if test $SCRIPT_MODE = "qemu-disk" + echo "file=$KATSU_IMG_PATH,format=raw,if=virtio" + else + echo (find_iso) + end +end + +# Quickly get the absolute path of a file +function abs_path + echo (realpath $argv) +end + + +# Create a test directory +mkdir -p $TEST_HOME + + + +sudo chown $USER $KATSU_IMG_PATH + +qemu-kvm -display gtk \ + -machine type=q35,accel=kvm \ + -cpu host \ + -smp 4 \ + -m 4G \ + -enable-kvm \ + -device virtio-net,netdev=vmnic -netdev user,id=vmnic \ + -bios /usr/share/OVMF/OVMF_CODE.fd \ + (_qemu_arg_1) (_qemu_arg_2) + + + +