From 1828c45414748ede81c6b7a23ae23f22de2dd5c5 Mon Sep 17 00:00:00 2001 From: Micha Glave Date: Fri, 13 Dec 2024 11:10:59 +0100 Subject: [PATCH] new ebuild sys-boot/zfsbootmenu-2.3.0 copied from https://data.gpo.zugaina.org/guru/sys-boot/zfsbootmenu --- sys-boot/zfsbootmenu/Manifest | 1 + .../files/zfsbootmenu-branding.patch | 20 +++++++++ .../files/zfsbootmenu-stub-location.patch | 13 ++++++ sys-boot/zfsbootmenu/zfsbootmenu-2.3.0.ebuild | 44 +++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 sys-boot/zfsbootmenu/Manifest create mode 100644 sys-boot/zfsbootmenu/files/zfsbootmenu-branding.patch create mode 100644 sys-boot/zfsbootmenu/files/zfsbootmenu-stub-location.patch create mode 100644 sys-boot/zfsbootmenu/zfsbootmenu-2.3.0.ebuild diff --git a/sys-boot/zfsbootmenu/Manifest b/sys-boot/zfsbootmenu/Manifest new file mode 100644 index 0000000..6738b65 --- /dev/null +++ b/sys-boot/zfsbootmenu/Manifest @@ -0,0 +1 @@ +DIST zfsbootmenu-2.3.0.tar.gz 1891010 BLAKE2B 2e84204994008c85ba0ad7231fe442bd02cbb45d57b3dfd707b86d1484b155dc8309958cd66d90336897e9841596aa74d6ffa4a969bca0e65679806ac8233e94 SHA512 9b8e2d5ea258a32cd09a9382faaa21beea54f2ed825fa747f10ffe0b9f191c257b023019ec76dc882e649e8ea6fcd8e310632bba6c783228c594e3d0fee2c9c8 diff --git a/sys-boot/zfsbootmenu/files/zfsbootmenu-branding.patch b/sys-boot/zfsbootmenu/files/zfsbootmenu-branding.patch new file mode 100644 index 0000000..95e2e13 --- /dev/null +++ b/sys-boot/zfsbootmenu/files/zfsbootmenu-branding.patch @@ -0,0 +1,20 @@ +--- a/etc/zfsbootmenu/config.yaml ++++ b/etc/zfsbootmenu/config.yaml +@@ -3,14 +3,15 @@ Global: + BootMountPoint: /boot/efi + DracutConfDir: /etc/zfsbootmenu/dracut.conf.d + Components: +- ImageDir: /boot/efi/EFI/void ++ ImageDir: /boot/efi/EFI/gentoo + Versions: 3 + Enabled: true + syslinux: + Config: /boot/syslinux/syslinux.cfg + Enabled: false + EFI: +- ImageDir: /boot/efi/EFI/void ++ ImageDir: /boot/efi/EFI/gentoo ++ Stub: /usr/lib/systemd/boot/efi/linuxx64.elf.stub + Versions: false + Enabled: false + Kernel: diff --git a/sys-boot/zfsbootmenu/files/zfsbootmenu-stub-location.patch b/sys-boot/zfsbootmenu/files/zfsbootmenu-stub-location.patch new file mode 100644 index 0000000..d3daec1 --- /dev/null +++ b/sys-boot/zfsbootmenu/files/zfsbootmenu-stub-location.patch @@ -0,0 +1,13 @@ +diff --git a/etc/zfsbootmenu/config.yaml b/etc/zfsbootmenu/config.yaml +index e8b196c..38b2812 100644 +--- a/etc/zfsbootmenu/config.yaml ++++ b/etc/zfsbootmenu/config.yaml +@@ -14,6 +14,7 @@ Components: + Enabled: false + EFI: + ImageDir: /boot/efi/EFI/zbm ++ Stub: /usr/lib/systemd/boot/efi/linuxx64.elf.stub + Versions: false + Enabled: false + Kernel: + diff --git a/sys-boot/zfsbootmenu/zfsbootmenu-2.3.0.ebuild b/sys-boot/zfsbootmenu/zfsbootmenu-2.3.0.ebuild new file mode 100644 index 0000000..655734a --- /dev/null +++ b/sys-boot/zfsbootmenu/zfsbootmenu-2.3.0.ebuild @@ -0,0 +1,44 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="ZFS bootloader for root-on-ZFS systems" +HOMEPAGE="https://zfsbootmenu.org" +SRC_URI="https://github.com/zbm-dev/zfsbootmenu/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +PATCHES=( + "${FILESDIR}"/${PN}-stub-location.patch +) + +RDEPEND=" +app-shells/fzf +dev-lang/perl +dev-perl/boolean +dev-perl/Config-IniFiles +dev-perl/Sort-Versions +dev-perl/YAML-PP +sys-apps/kexec-tools +sys-block/mbuffer +sys-fs/zfs +sys-kernel/dracut +" + +src_compile() { + # There's a makefile in the source repo but it's only for install. There's + # nothing to compile since zfsbootmenu is all scripts. + true +} + +src_install() { + emake DESTDIR="${D}" install +} + +pkg_postinst () { + elog "Please consult upstream doumentation to install the bootloader + https://github.com/zbm-dev/zfsbootmenu" +}