Skip to content

Commit

Permalink
grub2: 2.06 -> 2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
sighook committed Mar 19, 2024
1 parent b567d3f commit 2c70346
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 72 deletions.
5 changes: 4 additions & 1 deletion grub2/.footprint
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ drwxr-xr-x root/root etc/grub.d/
-rwxr-xr-x root/root etc/grub.d/00_header
-rwxr-xr-x root/root etc/grub.d/10_linux
-rwxr-xr-x root/root etc/grub.d/20_linux_xen
-rwxr-xr-x root/root etc/grub.d/25_bli
-rwxr-xr-x root/root etc/grub.d/30_os-prober
-rwxr-xr-x root/root etc/grub.d/30_uefi-firmware
-rwxr-xr-x root/root etc/grub.d/40_custom
Expand Down Expand Up @@ -228,6 +229,7 @@ drwxr-xr-x root/root usr/lib/grub/i386-pc/
-rw-r--r-- root/root usr/lib/grub/i386-pc/gdb.mod
-rwxr-xr-x root/root usr/lib/grub/i386-pc/gdb.module
-rw-r--r-- root/root usr/lib/grub/i386-pc/gdb_grub
-rw-r--r-- root/root usr/lib/grub/i386-pc/gdb_helper.py
-rw-r--r-- root/root usr/lib/grub/i386-pc/geli.mod
-rwxr-xr-x root/root usr/lib/grub/i386-pc/geli.module
-rw-r--r-- root/root usr/lib/grub/i386-pc/gettext.mod
Expand All @@ -240,7 +242,6 @@ drwxr-xr-x root/root usr/lib/grub/i386-pc/
-rwxr-xr-x root/root usr/lib/grub/i386-pc/gfxterm_background.module
-rw-r--r-- root/root usr/lib/grub/i386-pc/gfxterm_menu.mod
-rwxr-xr-x root/root usr/lib/grub/i386-pc/gfxterm_menu.module
-rw-r--r-- root/root usr/lib/grub/i386-pc/gmodule.pl
-rw-r--r-- root/root usr/lib/grub/i386-pc/gptsync.mod
-rwxr-xr-x root/root usr/lib/grub/i386-pc/gptsync.module
-rw-r--r-- root/root usr/lib/grub/i386-pc/gzio.mod
Expand Down Expand Up @@ -427,6 +428,8 @@ drwxr-xr-x root/root usr/lib/grub/i386-pc/
-rwxr-xr-x root/root usr/lib/grub/i386-pc/pcidump.module
-rw-r--r-- root/root usr/lib/grub/i386-pc/pgp.mod
-rwxr-xr-x root/root usr/lib/grub/i386-pc/pgp.module
-rw-r--r-- root/root usr/lib/grub/i386-pc/plainmount.mod
-rwxr-xr-x root/root usr/lib/grub/i386-pc/plainmount.module
-rw-r--r-- root/root usr/lib/grub/i386-pc/plan9.mod
-rwxr-xr-x root/root usr/lib/grub/i386-pc/plan9.module
-rw-r--r-- root/root usr/lib/grub/i386-pc/play.mod
Expand Down
5 changes: 3 additions & 2 deletions grub2/.md5sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
bf4ac2f1ee74359bd689fe6bee82f2e9 csum_seed.patch
cf0fd928b1e5479c8108ee52cb114363 grub-2.06.tar.xz
1591dae3685f6f0b6da9f463a9d38560 grub2-tweaks.patch
43e08eb0137bd7ffafda6bf4c7a9b327 extra_deps.lst
60c564b1bdc39d8e43b3aab4bc0fb140 grub-2.12.tar.xz
8945d02b41013f91b44652ba5c6caee9 grub2-tweaks.patch
fc1de0fd5ce0f235906da98aefbd9517 unifont-9.0.06.pcf.gz
17 changes: 10 additions & 7 deletions grub2/Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@
# Depends on: freetype libdevmapper python3

name=grub2
version=2.06
release=4
version=2.12
release=1
source="https://ftp.gnu.org/gnu/grub/grub-$version.tar.xz
http://jaeger.morpheus.net/linux/crux/files/unifont-9.0.06.pcf.gz
grub2-tweaks.patch
csum_seed.patch"
csum_seed.patch
extra_deps.lst"

build() {
patch -p1 -d grub-$version -i $SRC/grub2-tweaks.patch
patch -p1 -d grub-$version -i $SRC/csum_seed.patch
#patch -p1 -d grub-$version -i $SRC/csum_seed.patch

export CFLAGS="$CFLAGS -Wno-error"
export PYTHON=python3

cp $SRC/extra_deps.lst grub-$version/grub-core/

mkdir build; cd build

../grub-$version/configure \
Expand All @@ -27,9 +30,9 @@ build() {
--disable-grub-mount \
--disable-nls \

_BCD=/usr/share/bash-completion/completions
_BASHCOMPDIR=/usr/share/bash-completion/completions
make V=1
make DESTDIR=$PKG bashcompletiondir=$_BCD install
make DESTDIR=$PKG bashcompletiondir=$_BASHCOMPDIR install

# install unifont
install -d $PKG/usr/lib/grub/fonts
Expand All @@ -40,5 +43,5 @@ build() {
$PKG/usr/share/grub/unicode.pf2

# remove junk
rm -r $PKG/usr/share/info/
rm -r $PKG/usr/share/info
}
1 change: 1 addition & 0 deletions grub2/extra_deps.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
depends bli part_gpt
75 changes: 13 additions & 62 deletions grub2/grub2-tweaks.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -urN grub-2.06.orig/util/grub.d/00_header.in grub-2.06/util/grub.d/00_header.in
--- grub-2.06.orig/util/grub.d/00_header.in 2018-11-24 11:13:02.000000000 -0600
+++ grub-2.06/util/grub.d/00_header.in 2023-01-20 20:18:25.323977639 -0600
diff -urN grub-2.12.orig/util/grub.d/00_header.in grub-2.12/util/grub.d/00_header.in
--- grub-2.12.orig/util/grub.d/00_header.in 2022-10-04 14:58:22.000000000 +0000
+++ grub-2.12/util/grub.d/00_header.in 2023-12-21 19:19:03.142352196 +0000
@@ -152,7 +152,7 @@
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT}"` ; then
EOF
Expand All @@ -10,65 +10,16 @@ diff -urN grub-2.06.orig/util/grub.d/00_header.in grub-2.06/util/grub.d/00_heade
for basename in unicode unifont ascii; do
path="${dir}/${basename}.pf2"
if is_path_readable_by_grub "${path}" > /dev/null ; then
diff -urN grub-2.06.orig/util/grub.d/10_hurd.in grub-2.06/util/grub.d/10_hurd.in
--- grub-2.06.orig/util/grub.d/10_hurd.in 2019-10-21 07:02:43.000000000 -0500
+++ grub-2.06/util/grub.d/10_hurd.in 2023-01-20 20:20:15.763433153 -0600
@@ -176,7 +176,7 @@
hurd_entry "$kernel" advanced
hurd_entry "$kernel" recovery

- kernels=`echo $kernels | tr ' ' '\n' | fgrep -vx "$kernel" | tr '\n' ' '`
+ kernels=`echo $kernels | tr ' ' '\n' | grep -Fvx "$kernel" | tr '\n' ' '`
done

# If at least one kernel was found, then we need to
diff -urN grub-2.06.orig/util/grub.d/10_kfreebsd.in grub-2.06/util/grub.d/10_kfreebsd.in
--- grub-2.06.orig/util/grub.d/10_kfreebsd.in 2019-10-21 07:02:43.000000000 -0500
+++ grub-2.06/util/grub.d/10_kfreebsd.in 2023-01-20 20:20:21.670249001 -0600
@@ -239,7 +239,7 @@
kfreebsd_entry "${OS}" "${version}" recovery "-s"
fi

- list=`echo $list | tr ' ' '\n' | fgrep -vx "$kfreebsd" | tr '\n' ' '`
+ list=`echo $list | tr ' ' '\n' | grep -Fvx "$kfreebsd" | tr '\n' ' '`
done

# If at least one kernel was found, then we need to
diff -urN grub-2.06.orig/util/grub.d/10_linux.in grub-2.06/util/grub.d/10_linux.in
--- grub-2.06.orig/util/grub.d/10_linux.in 2020-12-22 17:24:17.000000000 -0600
+++ grub-2.06/util/grub.d/10_linux.in 2023-01-20 20:19:01.471557011 -0600
@@ -213,6 +213,7 @@
initrd_real=
for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
"initrd-${version}" "initramfs-${version}.img" \
+ "initramfs-${version}.gz" \
diff -urN grub-2.12.orig/util/grub.d/10_linux.in grub-2.12/util/grub.d/10_linux.in
--- grub-2.12.orig/util/grub.d/10_linux.in 2022-12-07 13:47:11.000000000 +0000
+++ grub-2.12/util/grub.d/10_linux.in 2023-12-21 19:21:16.004258494 +0000
@@ -226,7 +226,8 @@
for i in "initrd.img-${version}" "initrd-${version}.img" \
"initrd-${alt_version}.img.old" "initrd-${version}.gz" \
"initrd-${alt_version}.gz.old" "initrd-${version}" \
- "initramfs-${version}.img" "initramfs-${alt_version}.img.old" \
+ "initramfs-${version}.img" "initramfs-${version}.gz" \
+ "initramfs-${alt_version}.img.old" \
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
"initramfs-genkernel-${version}" \
@@ -290,7 +291,7 @@
"single ${GRUB_CMDLINE_LINUX}"
fi

- list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
+ list=`echo $list | tr ' ' '\n' | grep -Fvx "$linux" | tr '\n' ' '`
done

# If at least one kernel was found, then we need to
diff -urN grub-2.06.orig/util/grub.d/20_linux_xen.in grub-2.06/util/grub.d/20_linux_xen.in
--- grub-2.06.orig/util/grub.d/20_linux_xen.in 2020-12-22 17:24:17.000000000 -0600
+++ grub-2.06/util/grub.d/20_linux_xen.in 2023-01-20 20:19:11.451809007 -0600
@@ -346,12 +346,12 @@
"single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
fi

- list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
+ list=`echo $list | tr ' ' '\n' | grep -Fvx "$linux" | tr '\n' ' '`
done
if [ x"$is_top_level" != xtrue ]; then
echo ' }'
fi
- xen_list=`echo $xen_list | tr ' ' '\n' | fgrep -vx "$current_xen" | tr '\n' ' '`
+ xen_list=`echo $xen_list | tr ' ' '\n' | grep -Fvx "$current_xen" | tr '\n' ' '`
done

# If at least one kernel was found, then we need to

0 comments on commit 2c70346

Please sign in to comment.