From d1d77a3e4867d547ee4b9a0793d9c374e06990bc Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 30 Jul 2024 12:22:02 +0200 Subject: [PATCH 1/3] ubusquash --- live/menu/static.sh | 3 +++ live/source/boot.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/live/menu/static.sh b/live/menu/static.sh index c008b4d..dc1cd5f 100644 --- a/live/menu/static.sh +++ b/live/menu/static.sh @@ -9,5 +9,8 @@ menu_split menuentry 'bash / latest / tui' --id 'lt' { debsquash '/w/boot/bash/latest/tui' } menuentry 'bash / latest / gui' --id 'lg' { debsquash '/w/boot/bash/latest/gui' } menu_split +menuentry 'ubuntu / stable' { ubusquash '/w/boot/ubuntu/stable' } +menuentry 'ubuntu / latest' { ubusquash '/w/boot/ubuntu/latest' } +menu_split menuentry 'alma / stable' { almsquash '/w/boot/alma/stable' } menuentry 'alma / latest' { almsquash '/w/boot/alma/latest' } diff --git a/live/source/boot.sh b/live/source/boot.sh index db1e8cf..f2b8faa 100644 --- a/live/source/boot.sh +++ b/live/source/boot.sh @@ -84,3 +84,45 @@ live-media-uuid="${data_uuid}" \ echo "${initrd_path}" initrd "${initrd_path}" } +function ubusquash { + lmp="${1}" + sfs="filesystem.squashfs" + # + if [ "${check_squashfs}" == 'enforce' ] ; then + chk="(${data})${lmp}/${sfs}" + echo 'verify_detached' + echo "${chk}" + if ! verify_detached "${chk}" "${chk}.sig" ; then + grub_pause + return 1 + fi + fi + if [ -f "(${data})${lmp}/vmlinuz" ] ; then + linux_path="(${data})${lmp}/vmlinuz" + initrd_path="(${data})${lmp}/initrd.img" + else + linux_path="(squash)/vmlinuz" + initrd_path="(squash)/initrd.img" + loopback "squash" "${lmp}/${sfs}" + fi + # + echo + echo 'linux' + echo "${linux_path}" + toram='toram' + if [ "${live_from}" == 'ram' ] ; then + toram="${toram}=${sfs}" + fi + linux \ +"${linux_path}" \ +boot="live" \ +elevator="deadline" \ +live-media-path="${lmp}" \ +live-media-uuid="${data_uuid}" \ +"${toram}" + # + echo + echo 'initrd' + echo "${initrd_path}" + initrd "${initrd_path}" +} From d3373dd6fa2715e28bb09e23aefa5283f7aaa3d7 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 27 Apr 2025 19:23:33 +0200 Subject: [PATCH 2/3] build.py --- build.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 build.py diff --git a/build.py b/build.py new file mode 100755 index 0000000..2c8bd99 --- /dev/null +++ b/build.py @@ -0,0 +1,11 @@ +#! /usr/bin/env python3 +"""Dummy build.""" + +from pathlib import Path + +from rwx.fs import make_directory, write + +if __name__ == "__main__": + out = Path(__file__).parent / "out" / "web" + make_directory(out) + write(out / "index.html", "lsgm.rwx.work") From 1f38fc20f7ee5a4b259721198b7d1775959a5f72 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 27 Apr 2025 19:31:02 +0200 Subject: [PATCH 3/3] workflow --- .forgejo/workflows/main.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .forgejo/workflows/main.yaml diff --git a/.forgejo/workflows/main.yaml b/.forgejo/workflows/main.yaml new file mode 100644 index 0000000..2c873d2 --- /dev/null +++ b/.forgejo/workflows/main.yaml @@ -0,0 +1,17 @@ +on: [push] +jobs: + job: + container: + image: ${{vars.DOCKER}}debian:bookworm + steps: + - name: spcd + env: + SPCD: ${{vars.SPCD}} + SPCD_SSH_HOSTS: ${{vars.SPCD_SSH_HOSTS}} + SPCD_SSH_KEY: ${{secrets.SPCD_SSH_KEY}} + SPCD_TXT_LOCALE: ${{vars.SPCD_TXT_LOCALE}} + run: ${{vars.SPCD}} + + - run: spcd-build-project + - run: spcd-browse-workspace + - run: spcd-synchronize