From 47e537a33e5220ed4e8496bf0b68e4787e8db1a8 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Tue, 17 Dec 2024 18:37:28 +0300 Subject: [PATCH] initial commit --- .github/release-nest-v3 | 2 +- main.sh | 4 +- .../debian/changelog | 0 .../debian/control | 12 ++--- .../debian/copyright | 0 pika-live-booster-hooks/debian/install | 1 + .../debian/rules | 0 .../debian/source/format | 0 .../share/booster/hooks-early/01_pika_live.sh | 0 pika-refind-btrfs-hooks/debian/install | 2 - pika-refind-btrfs-hooks/debian/postinst | 5 -- .../kernel/postinst.d/pika-refind-btrfs-hooks | 5 -- .../usr/bin/gen-pika-refind-btrfs-stanza | 52 ------------------- 13 files changed, 7 insertions(+), 76 deletions(-) rename {pika-refind-btrfs-hooks => pika-live-booster-hooks}/debian/changelog (100%) rename {pika-refind-btrfs-hooks => pika-live-booster-hooks}/debian/control (52%) rename {pika-refind-btrfs-hooks => pika-live-booster-hooks}/debian/copyright (100%) create mode 100644 pika-live-booster-hooks/debian/install rename {pika-refind-btrfs-hooks => pika-live-booster-hooks}/debian/rules (100%) rename {pika-refind-btrfs-hooks => pika-live-booster-hooks}/debian/source/format (100%) rename {pika-refind-btrfs-hooks => pika-live-booster-hooks}/usr/share/booster/hooks-early/01_pika_live.sh (100%) mode change 100644 => 100755 delete mode 100644 pika-refind-btrfs-hooks/debian/install delete mode 100644 pika-refind-btrfs-hooks/debian/postinst delete mode 100644 pika-refind-btrfs-hooks/etc/kernel/postinst.d/pika-refind-btrfs-hooks delete mode 100755 pika-refind-btrfs-hooks/usr/bin/gen-pika-refind-btrfs-stanza diff --git a/.github/release-nest-v3 b/.github/release-nest-v3 index 62f9457..d00491f 100644 --- a/.github/release-nest-v3 +++ b/.github/release-nest-v3 @@ -1 +1 @@ -6 \ No newline at end of file +1 diff --git a/main.sh b/main.sh index 94ace00..6bc8690 100755 --- a/main.sh +++ b/main.sh @@ -9,10 +9,10 @@ echo "$PIKA_BUILD_ARCH" > pika-build-arch VERSION="1.0" # Clone Upstream -cd ./pika-refind-btrfs-hooks/ +cd ./pika-live-booster-hooks/ # Get build deps -LOGNAME=root dh_make --createorig -y -l -p pika-refind-btrfs-hooks_"$VERSION" || echo "dh-make: Ignoring Last Error" +LOGNAME=root dh_make --createorig -y -l -p pika-live-booster-hooks_"$VERSION" || echo "dh-make: Ignoring Last Error" apt-get build-dep ./ -y # Build package diff --git a/pika-refind-btrfs-hooks/debian/changelog b/pika-live-booster-hooks/debian/changelog similarity index 100% rename from pika-refind-btrfs-hooks/debian/changelog rename to pika-live-booster-hooks/debian/changelog diff --git a/pika-refind-btrfs-hooks/debian/control b/pika-live-booster-hooks/debian/control similarity index 52% rename from pika-refind-btrfs-hooks/debian/control rename to pika-live-booster-hooks/debian/control index 8314697..cee4cbd 100644 --- a/pika-refind-btrfs-hooks/debian/control +++ b/pika-live-booster-hooks/debian/control @@ -1,4 +1,4 @@ -Source: pika-refind-btrfs-hooks +Source: pika-live-booster-hooks Section: admin Priority: optional Maintainer: ferreo @@ -6,15 +6,9 @@ Standards-Version: 4.6.1 Build-Depends: debhelper-compat (= 13) Rules-Requires-Root: no -Package: pika-refind-btrfs-hooks +Package: pika-live-booster-hooks Architecture: linux-any Depends: ${misc:Depends}, - linux-base, - refind, - refind-btrfs, - snapper, booster, -Recommends: - apt-btrfs-snapper, -Description: refind-btrfs stanza generation hooks for PikaOS. +Description: Booster hooks for PikaOS LiveISO. diff --git a/pika-refind-btrfs-hooks/debian/copyright b/pika-live-booster-hooks/debian/copyright similarity index 100% rename from pika-refind-btrfs-hooks/debian/copyright rename to pika-live-booster-hooks/debian/copyright diff --git a/pika-live-booster-hooks/debian/install b/pika-live-booster-hooks/debian/install new file mode 100644 index 0000000..73752c9 --- /dev/null +++ b/pika-live-booster-hooks/debian/install @@ -0,0 +1 @@ +usr diff --git a/pika-refind-btrfs-hooks/debian/rules b/pika-live-booster-hooks/debian/rules similarity index 100% rename from pika-refind-btrfs-hooks/debian/rules rename to pika-live-booster-hooks/debian/rules diff --git a/pika-refind-btrfs-hooks/debian/source/format b/pika-live-booster-hooks/debian/source/format similarity index 100% rename from pika-refind-btrfs-hooks/debian/source/format rename to pika-live-booster-hooks/debian/source/format diff --git a/pika-refind-btrfs-hooks/usr/share/booster/hooks-early/01_pika_live.sh b/pika-live-booster-hooks/usr/share/booster/hooks-early/01_pika_live.sh old mode 100644 new mode 100755 similarity index 100% rename from pika-refind-btrfs-hooks/usr/share/booster/hooks-early/01_pika_live.sh rename to pika-live-booster-hooks/usr/share/booster/hooks-early/01_pika_live.sh diff --git a/pika-refind-btrfs-hooks/debian/install b/pika-refind-btrfs-hooks/debian/install deleted file mode 100644 index e15b649..0000000 --- a/pika-refind-btrfs-hooks/debian/install +++ /dev/null @@ -1,2 +0,0 @@ -etc -usr \ No newline at end of file diff --git a/pika-refind-btrfs-hooks/debian/postinst b/pika-refind-btrfs-hooks/debian/postinst deleted file mode 100644 index cf09c50..0000000 --- a/pika-refind-btrfs-hooks/debian/postinst +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/bash - -set -e - -gen-pika-refind-btrfs-stanza \ No newline at end of file diff --git a/pika-refind-btrfs-hooks/etc/kernel/postinst.d/pika-refind-btrfs-hooks b/pika-refind-btrfs-hooks/etc/kernel/postinst.d/pika-refind-btrfs-hooks deleted file mode 100644 index 628676a..0000000 --- a/pika-refind-btrfs-hooks/etc/kernel/postinst.d/pika-refind-btrfs-hooks +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/bash - -set -e - -gen-pika-refind-btrfs-stanza diff --git a/pika-refind-btrfs-hooks/usr/bin/gen-pika-refind-btrfs-stanza b/pika-refind-btrfs-hooks/usr/bin/gen-pika-refind-btrfs-stanza deleted file mode 100755 index c0c439f..0000000 --- a/pika-refind-btrfs-hooks/usr/bin/gen-pika-refind-btrfs-stanza +++ /dev/null @@ -1,52 +0,0 @@ -#! /bin/bash - -set -e - -export EFI_PATH=/boot/efi - -if [ "$EUID" -ne 0 ] - then echo "Please run as root" - exit -fi - -if [[ -f $EFI_PATH/EFI/refind/refind.conf ]] -then - export DO_STANDARD_REFIND_PATH=true -fi - -if [[ -f $EFI_PATH/EFI/BOOT/refind.conf ]] -then - export DO_BOOTX64_REFIND_PATH=true -fi - -REFIND_CMDLINE_OPTIONS="$(cat /boot/refind_linux.conf | cut -f4 -d"\"" | head -n1 | sed 's/---//g' | sed -E 's/root=[^ ]* //g')" -ROOT_PARTUUID="$(blkid -s PARTUUID -o value $(df -P -h -T / | awk 'END{print $1}'))" - -if [[ -z "$ROOT_PARTUUID" ]] -then - echo "Current Root partition type doesn't support PARTUUID" - exit 1 -fi - -create_entries() { - REFIND_PATH="$1" - grep -qxF 'include pika-refind-btrfs.conf' $EFI_PATH/$REFIND_PATH/refind.conf || echo 'include pika-refind-btrfs.conf' >> $EFI_PATH/$REFIND_PATH/refind.conf - rm -rfv $EFI_PATH/$REFIND_PATH/pika-refind-btrfs.conf || true - linux-version list | while read kernel_version - do - echo "Creating refind stanza for: $kernel_version" - echo -e "menuentry \"PikaOS Snapper Stanza - $kernel_version\" {\n icon /$REFIND_PATH/refind-dark/icons/os_pika.png\n volume \"PikaOS\"\n loader /vmlinuz-$kernel_version\n initrd /booster.img-$kernel_version\n options \"root=PARTUUID=$ROOT_PARTUUID $REFIND_CMDLINE_OPTIONS\"\n}\n" >> "$EFI_PATH/$REFIND_PATH/pika-refind-btrfs.conf" - done -} - -if [[ $DO_STANDARD_REFIND_PATH == true ]] -then - echo "Standard Refind Path Detected" - create_entries "EFI/refind" -fi - -if [[ $DO_BOOTX64_REFIND_PATH == true ]] -then - echo "Bootx64 Refind Path Detected" - create_entries "EFI/BOOT" -fi \ No newline at end of file