summaryrefslogtreecommitdiff
path: root/sys-boot
diff options
context:
space:
mode:
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/Manifest.gzbin5895 -> 5892 bytes
-rw-r--r--sys-boot/refind/Manifest2
-rw-r--r--sys-boot/refind/files/refind-0.14.2-fix-btrfs-on-musl.patch26
-rw-r--r--sys-boot/refind/refind-0.14.2-r3.ebuild169
4 files changed, 197 insertions, 0 deletions
diff --git a/sys-boot/Manifest.gz b/sys-boot/Manifest.gz
index eb82cf81dd90..19c652b41437 100644
--- a/sys-boot/Manifest.gz
+++ b/sys-boot/Manifest.gz
Binary files differ
diff --git a/sys-boot/refind/Manifest b/sys-boot/refind/Manifest
index fdc449af70be..6a3cf0b049a0 100644
--- a/sys-boot/refind/Manifest
+++ b/sys-boot/refind/Manifest
@@ -1,4 +1,5 @@
AUX refind-0.14.0.2-clang.patch 1346 BLAKE2B 09221bd26f2add12831faba093e3704174be4e1ebe42eac4d55d4e2d8181798ecfa8bf4eb17e1cc68e90096896e1ea5cc56f7b86bd391e5839788ac7e1934f40 SHA512 b04d721667500a17d35702454d4f0597a6fb8a89734533598aed31d3c69edbfec0ceb3a1a1f9a510c499ff74d95ed9a4e56d86979d65cc671f4a7f49df733a68
+AUX refind-0.14.2-fix-btrfs-on-musl.patch 808 BLAKE2B 8da7118ae0acf38f2e396e7e04c88d1190e0f5181d36c665e570d0d3334474426343fb450c5acc7fc88d6884ad9559455cab206cef04292f0d89cbc317adaa70 SHA512 3d7a1da959329f9dfb02cff0ae5195a2d1b7bbbac05f09f6efd49bc10e0557f56dbfd413c5dbcb9f70645b151f7e4e19240b340f49d8eb5824c0c3970cdf007b
AUX refind-0.14.2-fix-freestanding-on-musl.patch 2097 BLAKE2B 6b4ec3c0dcbbf2af71e2f2721d51bb5a2b1e910b0e8995c1a862c096a90b0272baa7b86d58b2d9574d67acad7ca12d163acbe7425a4d97737a09327438eb002b SHA512 0bb95449be605e2daee40f2b9fa3ee6fb6dcac54dc8392bf8ce43dc23c123a171672910628efe074c2d73f4dfa2925bad6e6a4bbc3cbb9138bee312860c4428d
AUX refind-0.14.2-fix-gnu-efi-3.0.18.patch 3055 BLAKE2B 716b96eb846267a0916d531d04da07ddd594eba7b2b09b924d09bd602772f4830610b10f3a8331437021ad74e6686688d4ed975c55a1705ffd1b19347fa2280d SHA512 ebbdb81767f3fcb0deba791d8b3cb29c7e246c101679e8e1c23d38805db69c7eaafd674a7d74450a4ca5f8873218791968949de44405cd41d3375a9806622445
AUX refind-sbat-gentoo-0.14.0.2.csv 246 BLAKE2B 8a16eb928f587aaaa680098c660de4e0930a6cc3b5719eb5085f843933c7e3863e8ff0517a596574ffff7bc2d8a2f89f1fa3606c7c618e9ff303edac5f0f5673 SHA512 b8e1a49ed408c6e57f4c8c5a012857b6a5024463eeba33070665dcf95f310cf30d62e2767409ad19d3a41b6ab346804bc7f5d34b92d2dd35aa44406df016bb91
@@ -7,4 +8,5 @@ DIST refind-src-0.14.0.2.tar.gz 4648958 BLAKE2B 02019ddb872ce44d2a2119902edebd63
DIST refind-src-0.14.2.tar.gz 4628173 BLAKE2B 987acb29d4d81c01db245cd8e1c9761072e34cf3dfaa3e4fa77e549ee2c1dc4c3f8cbd9218f42e4eb77478df3453095dba8b36324c289c6a10b81f1ecb202743 SHA512 76a52ed422ab3d431e6530fae4d13a51e8ed100568d4290207aaee87a84700b077bb79c4f4917027f5286de422954e1872fca288252ec756072d6c075b102e1e
EBUILD refind-0.14.0.2-r1.ebuild 4199 BLAKE2B c9a33311b52c77032c3dbdbcb97a012345e5620071e1bb43766580699e3e680fdc0d627c379873a6ebdfd28ba3d6fd783c0916090dbd35890004881ea7b4a538 SHA512 51bf8fbd6973446c3ac4a307b9e0b0df55bd41f3f62cd5bd663a5d5c3d6db701bba439b82e1f539c62e851a598a01e369c196ccbe6a1f9c3bee6d833938855b8
EBUILD refind-0.14.2-r2.ebuild 4650 BLAKE2B 50ebb913a9e5bbc0662a6d119ba90205b6d5c79cfc796f703994c8f2c8eff70662168da2439d575ac1cb51c8653ad64cfbcd3e321f772c46d5471e0e800f7998 SHA512 f605d24b805611e67d572d45e6ff5dc40982a9f320abfa9d076837f7a12cd3a8511a6dd9c0a7c357ae4a6a6bd41cb75cb9f767146a85fb08058beb11d0fe9908
+EBUILD refind-0.14.2-r3.ebuild 4696 BLAKE2B f1fd491acb1c683df79c119daeee114f8aec6f477634add73208ca095331ead26735a4a074c5edc81a2be0b4ec1bdb41140deb45c14ee3f13f19a16d2cbde64f SHA512 fd0c3869b1874a2757143e7da95a1b000de808002a2265be1e53748b3d87f505d0801b3e6b6b2daca9dfbd94783669fd5fe195f5e7a9a0930ff7707c6fd7e461
MISC metadata.xml 3809 BLAKE2B a2cf074c3c572fff3bdb1679b505cf3a9de4489acacdbc2b015fed91e7f37157fa7e3124438ad8af0788cc90f464b217c4fe05294c2c69ef637648cc68825885 SHA512 4b289982bbfda2697dd13b4c1fc020842a0fa06672e5d7f4b48cd39ef4348b1a17989686c55c96d220f682c8c95a340901fb3968d051aef8c8e5cf944bbcb4e4
diff --git a/sys-boot/refind/files/refind-0.14.2-fix-btrfs-on-musl.patch b/sys-boot/refind/files/refind-0.14.2-fix-btrfs-on-musl.patch
new file mode 100644
index 000000000000..a1cd0a55ecbb
--- /dev/null
+++ b/sys-boot/refind/files/refind-0.14.2-fix-btrfs-on-musl.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/828953
+
+From 88faaa7d7a9581d670cb581df933442cc75933b3 Mon Sep 17 00:00:00 2001
+From: "David C. Manuelda" <StormByte@gmail.com>
+Date: Thu, 14 Nov 2024 17:05:03 +0100
+Subject: [PATCH] Added a missing header to make musl compile
+
+---
+ filesystems/zstd/zstd_internal.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/filesystems/zstd/zstd_internal.h b/filesystems/zstd/zstd_internal.h
+index f90ac42..4918300 100644
+--- a/filesystems/zstd/zstd_internal.h
++++ b/filesystems/zstd/zstd_internal.h
+@@ -20,6 +20,7 @@
+ /*-*******************************************************
+ * Compiler specifics
+ *********************************************************/
++#include <linux/stddef.h>
+ #define FORCE_INLINE static __always_inline
+ #define FORCE_NOINLINE static /*noinline*/
+
+--
+2.47.0
+
diff --git a/sys-boot/refind/refind-0.14.2-r3.ebuild b/sys-boot/refind/refind-0.14.2-r3.ebuild
new file mode 100644
index 000000000000..ee7c4a3ed0ca
--- /dev/null
+++ b/sys-boot/refind/refind-0.14.2-r3.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit optfeature secureboot toolchain-funcs
+
+DESCRIPTION="The UEFI Boot Manager by Rod Smith"
+HOMEPAGE="https://www.rodsbooks.com/refind/"
+SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PV}/${PN}-src-${PV}.tar.gz"
+
+LICENSE="BSD CC-BY-SA-3.0 CC-BY-SA-4.0 FDL-1.3 GPL-2+ GPL-3+ LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs"
+IUSE="${FS_USE} doc"
+
+DEPEND="sys-boot/gnu-efi"
+
+# for ld.bfd and objcopy
+BDEPEND="sys-devel/binutils"
+
+DOCS=( README.txt NEWS.txt )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.14.0.2-clang.patch
+ "${FILESDIR}"/${P}-fix-gnu-efi-3.0.18.patch
+ "${FILESDIR}"/${P}-fix-freestanding-on-musl.patch
+ "${FILESDIR}"/${P}-fix-btrfs-on-musl.patch
+)
+
+checktools() {
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ # bug #832018
+ tc-export LD
+ tc-ld-force-bfd
+ # the makefile calls LD directly, so try to fix LD too
+ LD="${LD/.lld/.bfd}"
+ tc-ld-is-lld "${LD}" && die "Linking with lld produces broken executables and may lead to unbootable system"
+
+ # bug #732256
+ # llvm-objcopy does not support EFI target, try to use binutils objcopy or fail
+ tc-export OBJCOPY
+ OBJCOPY="${OBJCOPY/llvm-/}"
+ LC_ALL=C "${OBJCOPY}" --help | grep -q '\<pei-' || die "${OBJCOPY} (objcopy) does not support EFI target"
+
+ tc-is-gcc || tc-is-clang || die "Unsupported compiler"
+ fi
+}
+
+pkg_setup() {
+ if use x86; then
+ export EFIARCH=ia32
+ export BUILDARCH=ia32
+ elif use amd64; then
+ export EFIARCH=x64
+ export BUILDARCH=x86_64
+ fi
+ secureboot_pkg_setup
+
+ # this does not only check, but also exports LD and OBJCOPY
+ checktools
+}
+
+src_prepare() {
+ default
+
+ # bug #598647 - PIE not supported
+ sed -e '/^CFLAGS/s/$/ -fno-PIE/' -i Make.common || die
+ sed -e '1 i\.NOTPARALLEL:' -i filesystems/Makefile || die
+
+ cp "${FILESDIR}"/refind-sbat-gentoo-${PV}.csv refind-sbat-gentoo.csv || die
+}
+
+src_compile() {
+ # Update fs targets depending on uses
+ local fs fs_names=()
+ for fs in ${FS_USE}; do
+ fs=${fs#+}
+ if use "${fs}"; then
+ fs_names+=( ${fs} )
+ fi
+ done
+ fs_names=( "${fs_names[@]/%/_gnuefi}" )
+
+ # Prepare flags
+ local make_flags=(
+ ARCH="${BUILDARCH}"
+ CC="$(tc-getCC)"
+ AS="$(tc-getAS)"
+ LD="${LD}"
+ AR="$(tc-getAR)"
+ RANLIB="$(tc-getRANLIB)"
+ OBJCOPY="${OBJCOPY}"
+ GNUEFILIB="${ESYSROOT}/usr/$(get_libdir)"
+ EFILIB="${ESYSROOT}/usr/$(get_libdir)"
+ EFICRT0="${ESYSROOT}/usr/$(get_libdir)"
+ FILESYSTEMS="${fs_names[*]}"
+ FILESYSTEMS_GNUEFI="${fs_names[*]}"
+ REFIND_SBAT_CSV=refind-sbat-gentoo.csv
+ )
+
+ # see the comments in "${FILESDIR}"/${P}-fix-freestanding-on-musl.patch
+ tc-export CC
+ if tc-is-gcc; then
+ local -x CPPINCLUDEDIR=$(LC_ALL=C ${CC} -print-search-dirs 2> /dev/null | grep ^install: | cut -f2 -d' ')/include
+ elif tc-is-clang; then
+ local -x CPPINCLUDEDIR=$(LC_ALL=C ${CC} -print-resource-dir 2> /dev/null)/include
+ local -x EXTRACFLAGS=-D__DEFINED_wchar_t
+ fi
+
+ emake "${make_flags[@]}" all_gnuefi
+}
+
+src_install() {
+ exeinto "/usr/$(get_libdir)/${PN}"
+ doexe refind-install
+ dosym -r "/usr/$(get_libdir)/${PN}/refind-install" "/usr/sbin/refind-install"
+
+ doman "docs/man/"*
+ use doc && DOCS+=( docs/refind docs/Styles )
+ einstalldocs
+
+ insinto "/usr/$(get_libdir)/${PN}/refind"
+ doins "refind/refind_${EFIARCH}.efi"
+ doins "refind.conf-sample"
+ doins -r images icons fonts banners
+
+ if [[ -d "drivers_${EFIARCH}" ]]; then
+ doins -r "drivers_${EFIARCH}"
+ fi
+
+ insinto "/usr/$(get_libdir)/${PN}/refind/tools_${EFIARCH}"
+ doins "gptsync/gptsync_${EFIARCH}.efi"
+
+ insinto "/etc/refind.d"
+ doins -r "keys"
+
+ dosbin "mkrlconf"
+ dosbin "mvrefind"
+ dosbin "refind-mkdefault"
+
+ secureboot_auto_sign --in-place
+}
+
+pkg_postinst() {
+ elog "rEFInd has been built and installed into ${EROOT}/usr/$(get_libdir)/${PN}"
+ elog "You will need to use the command 'refind-install' to install"
+ elog "the binaries into your EFI System Partition"
+
+ optfeature_header "refind-install requires additional packages to be fully functional:"
+ optfeature "binary signing for use with SecureBoot" app-crypt/sbsigntools
+ optfeature "writing to NVRAM" sys-boot/efibootmgr
+ optfeature "ESP management" sys-apps/gptfdisk
+ elog ""
+
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "A sample configuration can be found at"
+ elog "${EROOT}/usr/$(get_libdir)/${PN}/refind/refind.conf-sample"
+ else
+ if ver_test "${REPLACING_VERSIONS}" -lt "0.12.0"; then
+ ewarn "This new version uses sys-apps/gptfdisk instead of sys-block/parted"
+ ewarn "to manage ESP"
+ ewarn ""
+ fi
+ ewarn "Note that this installation will not update any EFI binaries"
+ ewarn "on your EFI System Partition - this needs to be done manually"
+ fi
+}