From ae0bae38d6ac4c0304e6f9a4ff1f01071d154ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Tue, 7 Mar 2023 11:07:58 +0700 Subject: [PATCH] refind: update to 0.14.0.2. --- .../patches/add-cross-compile-support.patch | 5 +-- .../refind/patches/force-inline-musl.patch | 12 +++--- srcpkgs/refind/patches/page-size.patch | 13 ++++++ .../patches/refind-install-abs-path.patch | 42 +++++++++---------- srcpkgs/refind/template | 4 +- 5 files changed, 42 insertions(+), 34 deletions(-) create mode 100644 srcpkgs/refind/patches/page-size.patch diff --git a/srcpkgs/refind/patches/add-cross-compile-support.patch b/srcpkgs/refind/patches/add-cross-compile-support.patch index ec59031bb6c..e506758d329 100644 --- a/srcpkgs/refind/patches/add-cross-compile-support.patch +++ b/srcpkgs/refind/patches/add-cross-compile-support.patch @@ -1,8 +1,6 @@ -diff --git a/Make.common b/Make.common -index 3f0b919..562a03e 100644 --- a/Make.common +++ b/Make.common -@@ -34,21 +34,13 @@ ARCH ?= $(HOSTARCH) +@@ -40,21 +40,13 @@ REFIND_SBAT_CSV = refind-sbat.csv # Note: TIANOBASE is defined in master Makefile and exported GENFW = $(TIANOBASE)/BaseTools/Source/C/bin/GenFw prefix = /usr/bin/ @@ -31,4 +29,3 @@ index 3f0b919..562a03e 100644 ifeq ($(MAKEWITH),TIANO) # Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, GCC46, or GCC47) - diff --git a/srcpkgs/refind/patches/force-inline-musl.patch b/srcpkgs/refind/patches/force-inline-musl.patch index 4126d7fef22..bc19753b442 100644 --- a/srcpkgs/refind/patches/force-inline-musl.patch +++ b/srcpkgs/refind/patches/force-inline-musl.patch @@ -1,5 +1,5 @@ ---- a/filesystems/zstd/fse_decompress.c 2019-11-11 17:00:57.423347660 +0700 -+++ b/filesystems/zstd/fse_decompress.c 2019-11-11 17:01:52.654692140 +0700 +--- a/filesystems/zstd/fse_decompress.c ++++ b/filesystems/zstd/fse_decompress.c @@ -40,7 +40,7 @@ /* ************************************************************** * Compiler specifics @@ -9,8 +9,8 @@ /* ************************************************************** * Includes ---- a/filesystems/zstd/zstd_internal.h 2019-11-11 15:56:42.258217148 +0700 -+++ b/filesystems/zstd/zstd_internal.h 2019-11-11 16:04:09.433867777 +0700 +--- a/filesystems/zstd/zstd_internal.h ++++ b/filesystems/zstd/zstd_internal.h @@ -20,7 +20,7 @@ /*-******************************************************* * Compiler specifics @@ -20,8 +20,8 @@ #define FORCE_NOINLINE static /*noinline*/ /*-************************************* ---- a/filesystems/zstd/huf_decompress.c 2019-11-11 17:00:46.487280468 +0700 -+++ b/filesystems/zstd/huf_decompress.c 2019-11-11 17:01:20.095488026 +0700 +--- a/filesystems/zstd/huf_decompress.c ++++ b/filesystems/zstd/huf_decompress.c @@ -40,7 +40,7 @@ /* ************************************************************** * Compiler specifics diff --git a/srcpkgs/refind/patches/page-size.patch b/srcpkgs/refind/patches/page-size.patch new file mode 100644 index 00000000000..614751d0520 --- /dev/null +++ b/srcpkgs/refind/patches/page-size.patch @@ -0,0 +1,13 @@ +--- a/filesystems/fsw_btrfs_zstd.h ++++ b/filesystems/fsw_btrfs_zstd.h +@@ -4,7 +4,9 @@ + * All rights reserved. + * + */ +- ++#ifdef PAGE_SIZE ++#undef PAGE_SIZE ++#endif + #define PAGE_SIZE 4096 + #define uint64_t fsw_u64 + #define uint32_t fsw_u32 diff --git a/srcpkgs/refind/patches/refind-install-abs-path.patch b/srcpkgs/refind/patches/refind-install-abs-path.patch index 22f30cbce01..45555fa6e34 100644 --- a/srcpkgs/refind/patches/refind-install-abs-path.patch +++ b/srcpkgs/refind/patches/refind-install-abs-path.patch @@ -1,8 +1,6 @@ -Index: refind-0.13.3.1/refind-install -=================================================================== ---- refind-0.13.3.1.orig/refind-install -+++ refind-0.13.3.1/refind-install -@@ -342,19 +342,8 @@ DeterminePlatform() { +--- a/refind-install ++++ b/refind-install +@@ -344,19 +344,8 @@ DeterminePlatform() { # $ThisDir to point to the directory in which this script resides, # and $RefindDir to point to where the rEFInd binaries live CheckForFiles() { @@ -24,7 +22,7 @@ Index: refind-0.13.3.1/refind-install if [[ ! -f "$RefindDir/refind_$Platform.efi" ]] ; then echo "The rEFInd binary file is missing! Aborting installation!" -@@ -363,8 +352,6 @@ CheckForFiles() { +@@ -365,8 +354,6 @@ CheckForFiles() { if [[ -f "$RefindDir/refind.conf-sample" ]] ; then ConfFile="$RefindDir/refind.conf-sample" @@ -33,7 +31,7 @@ Index: refind-0.13.3.1/refind-install else echo "The sample configuration file is missing! Aborting installation!" exit 1 -@@ -372,8 +359,6 @@ CheckForFiles() { +@@ -374,8 +361,6 @@ CheckForFiles() { if [[ -d "$RefindDir/icons" ]] ; then IconsDir="$RefindDir/icons" @@ -42,7 +40,7 @@ Index: refind-0.13.3.1/refind-install else echo "The icons directory is missing! Aborting installation!" exit 1 -@@ -603,7 +588,6 @@ SetBootFS() { +@@ -613,7 +598,6 @@ SetBootFS() { CopyDrivers() { if [[ $InstallDrivers == "all" ]] ; then mkdir -p "$InstallDir/$TargetDir/drivers_$1" @@ -50,7 +48,7 @@ Index: refind-0.13.3.1/refind-install cp "$RefindDir"/drivers_"$1"/*_"$1".efi "$InstallDir/$TargetDir/drivers_$1/" 2> /dev/null elif [[ "$InstallDrivers" == "boot" ]] ; then SetBootFS -@@ -628,7 +612,6 @@ CopyDrivers() { +@@ -638,7 +622,6 @@ CopyDrivers() { if [[ -n $BootFS ]] ; then echo "Installing driver for $BootFS (${DriverType}_$1.efi)" mkdir -p "$InstallDir/$TargetDir/drivers_$1" @@ -58,7 +56,7 @@ Index: refind-0.13.3.1/refind-install cp "$RefindDir/drivers_$1/${DriverType}_$1.efi" "$InstallDir/$TargetDir/drivers_$1"/ 2> /dev/null fi fi -@@ -669,7 +652,6 @@ CopyRefindFiles() { +@@ -679,7 +662,6 @@ CopyRefindFiles() { fi if [[ $InstallDrivers == "all" ]] ; then cp -r "$RefindDir"/drivers_* "$InstallDir/$TargetDir/" 2> /dev/null @@ -66,7 +64,7 @@ Index: refind-0.13.3.1/refind-install elif [[ $Upgrade == 1 || $InstallToEspOnMac == 1 ]] ; then CopyDrivers "$Platform" CopyTools "$Platform" -@@ -693,8 +675,8 @@ CopyRefindFiles() { +@@ -703,8 +685,8 @@ CopyRefindFiles() { if [[ $LocalKeys == 0 ]] ; then echo "Storing copies of rEFInd Secure Boot public keys in $EtcKeysDir" mkdir -p "$EtcKeysDir" @@ -77,7 +75,7 @@ Index: refind-0.13.3.1/refind-install fi fi if [[ "$TargetDir" == '/System/Library/CoreServices' ]] ; then -@@ -731,7 +713,7 @@ CopyRefindFiles() { +@@ -741,7 +723,7 @@ CopyRefindFiles() { Problems=1 fi mkdir -p "$InstallDir/$TargetDir/keys" @@ -86,23 +84,23 @@ Index: refind-0.13.3.1/refind-install cp -rf "$EtcKeysDir"/*.[cd]er "$InstallDir/$TargetDir/keys/" 2> /dev/null if [[ -f "$InstallDir/$TargetDir/refind.conf" ]] ; then echo "Existing refind.conf file found; copying sample file as refind.conf-sample" -@@ -1139,14 +1121,12 @@ ReSignBinaries() { +@@ -1149,14 +1131,12 @@ ReSignBinaries() { GenerateKeys mkdir -p "$TempDir/drivers_$Platform" - cp "$RefindDir/refind.conf-sample $TempDir" 2> /dev/null -- cp "$ThisDir/refind.conf-sample $TempDir" 2> /dev/null - cp "$RefindDir/refind_ia32.efi $TempDir" 2> /dev/null - cp -a "$RefindDir/drivers_ia32 $TempDir" 2> /dev/null -- cp -a "$ThisDir/drivers_ia32 $TempDir" 2> /dev/null + cp "$RefindDir"/refind.conf-sample "$TempDir" 2> /dev/null +- cp "$ThisDir"/refind.conf-sample "$TempDir" 2> /dev/null + cp "$RefindDir"/refind_ia32.efi "$TempDir" 2> /dev/null + cp -a "$RefindDir"/drivers_ia32 "$TempDir" 2> /dev/null +- cp -a "$ThisDir"/drivers_ia32 "$TempDir" 2> /dev/null SignOneBinary "$RefindDir/refind_$Platform.efi" "$TempDir/refind_$Platform.efi" SaveIFS=$IFS IFS=$(echo -en "\n\b") -- for Driver in $(ls "$RefindDir"/drivers_$Platform/*.efi "$ThisDir"/drivers_$Platform/*.efi 2> /dev/null) ; do -+ for Driver in $(ls "$RefindDir"/drivers_$Platform/*.efi 2> /dev/null) ; do +- for Driver in "$RefindDir"/drivers_"$Platform"/*.efi "$ThisDir"/drivers_"$Platform"/*.efi ; do ++ for Driver in "$RefindDir"/drivers_"$Platform"/*.efi ; do + [[ -e "$Driver" ]] || break # handle the case of no files TempName=$(basename "$Driver") SignOneBinary "$Driver" "$TempDir/drivers_$Platform/$TempName" - done -@@ -1403,7 +1383,7 @@ InstallSBKey() { +@@ -1416,7 +1396,7 @@ InstallSBKey() { if [ "$LocalKeys" == "1" ] ; then UsedDerKey="$DerKey" else diff --git a/srcpkgs/refind/template b/srcpkgs/refind/template index bec621c4e3a..8fd73e74945 100644 --- a/srcpkgs/refind/template +++ b/srcpkgs/refind/template @@ -1,6 +1,6 @@ # Template file for 'refind' pkgname=refind -version=0.13.3.1 +version=0.14.0.2 revision=1 archs="x86_64* i686* aarch64*" makedepends="gnu-efi-libs" @@ -10,7 +10,7 @@ maintainer="Đoàn Trần Công Danh " license="GPL-3.0-only, BSD-3-Clause, BSD-2-Clause, GPL-2.0-only, LGPL-2.1-only" homepage="https://sourceforge.net/projects/refind/" distfiles="${SOURCEFORGE_SITE}/refind/refind-src-${version}.tar.gz" -checksum=7a3e3f0f81bd4ae95f24e120f44e01319231f488fef7cc8bf03a1aea23c6cfd1 +checksum=26a0c55dfd3565499e1f82d8fe57464dbef19ca886ce6d01a815228b8efc8b0f python_version=2 conf_files="/etc/default/refind-kernel-hook.conf" make_dirs="/etc/refind.d/keys 0755 root root"