From 7019ac4aced38bd12f58e8dae636a90e06dbbdd3 Mon Sep 17 00:00:00 2001 From: Bouke Sybren Haarsma Date: Thu, 8 Aug 2024 23:09:33 +0200 Subject: [PATCH] use frzr-git --- PKGBUILD/frzr-git/99-frzr-kernel-install.hook | 41 ++++++++++++++ PKGBUILD/frzr-git/Makefile | 6 +++ PKGBUILD/frzr-git/PKGBUILD | 54 +++++++++++++++++++ build-iso.sh | 8 ++- chimeraos/packages.x86_64 | 2 +- 5 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 PKGBUILD/frzr-git/99-frzr-kernel-install.hook create mode 100644 PKGBUILD/frzr-git/Makefile create mode 100644 PKGBUILD/frzr-git/PKGBUILD diff --git a/PKGBUILD/frzr-git/99-frzr-kernel-install.hook b/PKGBUILD/frzr-git/99-frzr-kernel-install.hook new file mode 100644 index 0000000..f10f1be --- /dev/null +++ b/PKGBUILD/frzr-git/99-frzr-kernel-install.hook @@ -0,0 +1,41 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/initcpio/* +Target = usr/lib/firmware/* +Target = usr/src/*/dkms.conf + +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Target = usr/lib/modules/*/vmlinuz + +[Trigger] +Type = Package +Operation = Install +Operation = Upgrade +Target = mkinitcpio +Target = mkinitcpio-git + +[Trigger] +Type = Package +Operation = Install +Operation = Upgrade +Target = dracut +Target = dracut-git + +[Trigger] +Type = Package +Operation = Install +Operation = Upgrade +Target = frzr +Target = frzr-git + +[Action] +Description = Updating frzr bootloader entries... +When = PostTransaction +Exec = /usr/bin/frzr bootloader +NeedsTargets \ No newline at end of file diff --git a/PKGBUILD/frzr-git/Makefile b/PKGBUILD/frzr-git/Makefile new file mode 100644 index 0000000..7d2f3c0 --- /dev/null +++ b/PKGBUILD/frzr-git/Makefile @@ -0,0 +1,6 @@ +build: clean + makepkg + makepkg --printsrcinfo > .SRCINFO + +clean: + rm -rf *.tar.* *.pkg.* src pkg diff --git a/PKGBUILD/frzr-git/PKGBUILD b/PKGBUILD/frzr-git/PKGBUILD new file mode 100644 index 0000000..c10fed5 --- /dev/null +++ b/PKGBUILD/frzr-git/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Alesh Slovak + +pkgname=frzr-git +pkgver=r236.33192f9 +pkgrel=1 +pkgdesc="A deployment and update system for read-only btrfs subvolume based operating systems" +arch=('any') +url="https://github.com/boukehaarsma23/frzr" +license=('MIT') +depends=('btrfs-progs' 'parted' 'libnewt' 'dosfstools' 'jq' 'util-linux' 'skopeo') +optdepends=( + 'dracut: generate initramfs for kernels installed via frzr kernel command' +) +source=(frzr::'git+https://github.com/boukehaarsma23/frzr.git' + '99-frzr-kernel-install.hook') +md5sums=('SKIP' + '6bc04b77f135f2bf7d07c2f8c0ffaca0') +sha256sums=('SKIP' + '0dc3772b4c9a96ad33993be1245f23af32ee765ad6fca4e2310a8683ada5cbcc') + +pkgver() { + cd "${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" +} + + +package() { + mkdir -p "$pkgdir/usr/bin" + mkdir -p "$pkgdir/usr/lib/frzr" + mkdir -p "$pkgdir/usr/lib/systemd/system" + mkdir -p "$pkgdir/usr/share/libalpm/hooks" + install -m 755 "$srcdir/frzr/frzr" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/__frzr" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/frzr-deploy" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/__frzr-deploy" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/frzr-unlock" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/__frzr-unlock" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/frzr-bootloader" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/__frzr-bootloader" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/frzr-version" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/__frzr-version" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/frzr-bootstrap" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/__frzr-bootstrap" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/__frzr-envars" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/frzr-source" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/frzr-extras" "$pkgdir/usr/bin" + install -m 755 "$srcdir/frzr/frzr-release" "$pkgdir/usr/bin" + #install -m 644 "$srcdir/frzr-$pkgver/mkinitcpio.conf" "$pkgdir/usr/lib/frzr" + install -m 644 "$srcdir/frzr/frzr-autoupdate.service" "$pkgdir/usr/lib/systemd/system" + install -m 644 "$srcdir/frzr/frzr-autoupdate.timer" "$pkgdir/usr/lib/systemd/system" + install -m 644 "$srcdir/99-frzr-kernel-install.hook" "$pkgdir/usr/share/libalpm/hooks" + + echo 'g frzr 379 - -' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" +} diff --git a/build-iso.sh b/build-iso.sh index 683de88..c22bcd1 100755 --- a/build-iso.sh +++ b/build-iso.sh @@ -22,7 +22,6 @@ mkdir -p "${temp_dir}" # add AUR packages to the build AUR_PACKAGES="\ - frzr \ rtl88x2bu-dkms-git \ rtw89-dkms-git \ r8152-dkms \ @@ -51,6 +50,13 @@ pushd /home/${BUILD_USER} "${PIKAUR_RUN[@]}" popd +PIKAUR_CMD="PKGDEST=/tmp/temp_repo pikaur --noconfirm -P PKGBUILD/frzr-git/PKGBUILD" +PIKAUR_RUN=(bash -c "${PIKAUR_CMD}") +if [ -n "${BUILD_USER}" ]; then + PIKAUR_RUN=(su "${BUILD_USER}" -c "${PIKAUR_CMD}") +fi +"${PIKAUR_RUN[@]}" + # copy all built packages to the repo cp /tmp/temp_repo/* ${LOCAL_REPO} diff --git a/chimeraos/packages.x86_64 b/chimeraos/packages.x86_64 index feb09bc..a896248 100644 --- a/chimeraos/packages.x86_64 +++ b/chimeraos/packages.x86_64 @@ -12,7 +12,7 @@ dhcpcd diffutils dosfstools efibootmgr -frzr +frzr-git git gamescope intel-ucode