From 589e8020db72afdb2f1eafca0ce582dd8e367b9d Mon Sep 17 00:00:00 2001 From: Jim Somerville Date: Thu, 27 Jan 2022 10:21:08 -0500 Subject: [PATCH] grub2: cleanup meta patches This commit results in no change to actual code. It cleans up the following issues in the meta patches: - some patches generated fuzz and offset warnings - patch file names do not match that generated by git format-patch - some patches were not in git format, did not have a proper git header - some patches were not signed off by anybody - file names contained grub2 which is redundant - one patch added a blank line to the end of a file generating a warning, and a subsequent patch removed it. This has now been squashed out. There are 13 patches in total, they were numbered 1-14 with 4 being absent. They are now numbered 1-13. Verification: Built and captured the output, verified that there are no more fuzz and offset warnings. Closes-Bug: 1959037 Change-Id: I8056adf3ee96dc036262aa8c2d9eecfc353cc5ba Signed-off-by: Jim Somerville --- ...1-Update-package-versioning-for-STX.patch} | 12 +++--- .../centos/meta_patches/0002-fix-cflags.patch | 38 +++++++++++++++++++ .../meta_patches/0002-grub2-fix-cflags.patch | 22 ----------- ...kgs.patch => 0003-remove-debug-pkgs.patch} | 16 +++++--- ...d.patch => 0004-remove-32-bit-build.patch} | 18 +++++---- ...-files.patch => 0005-ship-lst-files.patch} | 12 ++++-- .../0006-debrand-the-grub_cfg-menu.patch | 25 ++++++++++++ ...x-mktitle-de-brand-the-grub.cfg-menu.patch | 21 ---------- ....patch => 0007-add-unsigned-package.patch} | 20 ++++++---- ...e.patch => 0008-add-pxeboot-package.patch} | 18 +++++---- ...2-add-tboot.patch => 0009-add-tboot.patch} | 22 ++++++----- ...on-t-add-a-trailing-colon-after-MAC.patch} | 23 ++++++----- ...rip-files-from-non-EFI-build-of-grub.patch | 29 ++++++++++++++ ...t-strip-img-files-from-non-EFI-build.patch | 25 ------------ ...lock-counter-to-prevent-timeouts-wit.patch | 27 +++++++++++++ ...013-Relocate-pxeboot-to-var-pxeboot.patch} | 23 +++++------ ...lock-counter-to-prevent-timeouts-wit.patch | 23 ----------- grub/grub2/centos/meta_patches/PATCH_ORDER | 26 ++++++------- 18 files changed, 226 insertions(+), 174 deletions(-) rename grub/grub2/centos/meta_patches/{0001-grub2-Update-package-versioning-for-TIS-format.patch => 0001-Update-package-versioning-for-STX.patch} (62%) create mode 100644 grub/grub2/centos/meta_patches/0002-fix-cflags.patch delete mode 100644 grub/grub2/centos/meta_patches/0002-grub2-fix-cflags.patch rename grub/grub2/centos/meta_patches/{0003-grub2-remove-debug-pkgs.patch => 0003-remove-debug-pkgs.patch} (69%) rename grub/grub2/centos/meta_patches/{0005-grub2-remove-32b-build.patch => 0004-remove-32-bit-build.patch} (62%) rename grub/grub2/centos/meta_patches/{0006-grub2-ship-lst-files.patch => 0005-ship-lst-files.patch} (50%) create mode 100644 grub/grub2/centos/meta_patches/0006-debrand-the-grub_cfg-menu.patch delete mode 100644 grub/grub2/centos/meta_patches/0007-1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch rename grub/grub2/centos/meta_patches/{0008-grub2-Build-unsigned-package.patch => 0007-add-unsigned-package.patch} (77%) rename grub/grub2/centos/meta_patches/{0009-grub2-Build-pxeboot-package.patch => 0008-add-pxeboot-package.patch} (74%) rename grub/grub2/centos/meta_patches/{0010-grub2-add-tboot.patch => 0009-add-tboot.patch} (61%) rename grub/grub2/centos/meta_patches/{0011-grub2-fix-str-for-6B-macs.patch => 0010-Don-t-add-a-trailing-colon-after-MAC.patch} (57%) create mode 100644 grub/grub2/centos/meta_patches/0011-Don-t-strip-files-from-non-EFI-build-of-grub.patch delete mode 100644 grub/grub2/centos/meta_patches/0012-grub2-Don-t-strip-img-files-from-non-EFI-build.patch create mode 100644 grub/grub2/centos/meta_patches/0012-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch rename grub/grub2/centos/meta_patches/{0014-relocate-pxeboot-to-var-pxeboot-patch.patch => 0013-Relocate-pxeboot-to-var-pxeboot.patch} (65%) delete mode 100644 grub/grub2/centos/meta_patches/0013-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch diff --git a/grub/grub2/centos/meta_patches/0001-grub2-Update-package-versioning-for-TIS-format.patch b/grub/grub2/centos/meta_patches/0001-Update-package-versioning-for-STX.patch similarity index 62% rename from grub/grub2/centos/meta_patches/0001-grub2-Update-package-versioning-for-TIS-format.patch rename to grub/grub2/centos/meta_patches/0001-Update-package-versioning-for-STX.patch index b6bd8f444..f1cabc104 100644 --- a/grub/grub2/centos/meta_patches/0001-grub2-Update-package-versioning-for-TIS-format.patch +++ b/grub/grub2/centos/meta_patches/0001-Update-package-versioning-for-STX.patch @@ -1,17 +1,19 @@ -From 008445e8d11202f53190da4a12386df338549000 Mon Sep 17 00:00:00 2001 +From 8b5576704440696a7c8f1b00735217bf1745b6a1 Mon Sep 17 00:00:00 2001 +Message-Id: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> From: slin14 Date: Fri, 17 Aug 2018 22:48:46 +0800 -Subject: [PATCH] Update-package-versioning-for-TIS-format +Subject: [PATCH 01/13] Update package versioning for STX +Signed-off-by: Jim Somerville --- SPECS/grub2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec -index 12d34ad..88c6c09 100644 +index b5e268c..c323a2a 100644 --- a/SPECS/grub2.spec +++ b/SPECS/grub2.spec -@@ -17,7 +17,7 @@ +@@ -16,7 +16,7 @@ Name: grub2 Epoch: 1 Version: 2.02 @@ -21,5 +23,5 @@ index 12d34ad..88c6c09 100644 Group: System Environment/Base License: GPLv3+ -- -2.7.4 +2.29.2 diff --git a/grub/grub2/centos/meta_patches/0002-fix-cflags.patch b/grub/grub2/centos/meta_patches/0002-fix-cflags.patch new file mode 100644 index 000000000..83cc70b37 --- /dev/null +++ b/grub/grub2/centos/meta_patches/0002-fix-cflags.patch @@ -0,0 +1,38 @@ +From 579956c74511eeb40761df7908210492768f883d Mon Sep 17 00:00:00 2001 +Message-Id: <579956c74511eeb40761df7908210492768f883d.1643237526.git.Jim.Somerville@windriver.com> +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +From: Jim Somerville +Date: Wed, 26 Jan 2022 17:24:50 -0500 +Subject: [PATCH 02/13] fix cflags + +Signed-off-by: Jim Somerville +--- + SOURCES/grub.macros | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros +index a78bda9..487ee27 100644 +--- a/SOURCES/grub.macros ++++ b/SOURCES/grub.macros +@@ -15,16 +15,7 @@ + %global cc_equals %{nil} + %endif + +-%global efi_cflags %(echo %{optflags} | \\\ +- sed \\\ +- -e 's/-O./-g3/g' \\\ +- -e 's/-fstack-protector[[:alpha:]-]\\+//g' \\\ +- -e 's/-Wp,-D_FORTIFY_SOURCE=[[:digit:]]\\+//g' \\\ +- -e 's/--param=ssp-buffer-size=4//g' \\\ +- -e 's/-mregparm=3/-mregparm=4/g' \\\ +- -e 's/-fexceptions//g' \\\ +- -e 's/-fasynchronous-unwind-tables//g' \\\ +- -e 's/^/ -fno-strict-aliasing /' ) %{nil} ++%global efi_cflags '' + %global legacy_cflags %(echo %{efi_cflags} | \\\ + sed \\\ + -e 's/-m64//g' \\\ +-- +2.29.2 + diff --git a/grub/grub2/centos/meta_patches/0002-grub2-fix-cflags.patch b/grub/grub2/centos/meta_patches/0002-grub2-fix-cflags.patch deleted file mode 100644 index 42efc5fdd..000000000 --- a/grub/grub2/centos/meta_patches/0002-grub2-fix-cflags.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index 6e12329..10f74df 100644 ---- a/SOURCES/grub.macros -+++ b/SOURCES/grub.macros -@@ -15,16 +15,7 @@ - %global cc_equals %{nil} - %endif - --%global efi_cflags %(echo %{optflags} | \\\ -- sed \\\ -- -e 's/-O./-g3/g' \\\ -- -e 's/-fstack-protector[[:alpha:]-]\\+//g' \\\ -- -e 's/-Wp,-D_FORTIFY_SOURCE=[[:digit:]]\\+//g' \\\ -- -e 's/--param=ssp-buffer-size=4//g' \\\ -- -e 's/-mregparm=3/-mregparm=4/g' \\\ -- -e 's/-fexceptions//g' \\\ -- -e 's/-fasynchronous-unwind-tables//g' \\\ -- -e 's/^/ -fno-strict-aliasing /' ) %{nil} -+%global efi_cflags '' - %global legacy_cflags %(echo %{efi_cflags} | \\\ - sed \\\ - -e 's/-m64//g' \\\ diff --git a/grub/grub2/centos/meta_patches/0003-grub2-remove-debug-pkgs.patch b/grub/grub2/centos/meta_patches/0003-remove-debug-pkgs.patch similarity index 69% rename from grub/grub2/centos/meta_patches/0003-grub2-remove-debug-pkgs.patch rename to grub/grub2/centos/meta_patches/0003-remove-debug-pkgs.patch index 7e3a4fbad..ba374619a 100644 --- a/grub/grub2/centos/meta_patches/0003-grub2-remove-debug-pkgs.patch +++ b/grub/grub2/centos/meta_patches/0003-remove-debug-pkgs.patch @@ -1,18 +1,22 @@ -From 2d237c31ea6d2fdfeaf61aef89b4755def0495a2 Mon Sep 17 00:00:00 2001 +From f51ca13eb123f7217426eb0b6d0c4a44b908725a Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> From: slin14 Date: Fri, 17 Aug 2018 23:28:59 +0800 -Subject: [PATCH] remove-debug-pkgs +Subject: [PATCH 03/13] remove debug pkgs Signed-off-by: slin14 +Signed-off-by: Jim Somerville --- SPECS/grub2.spec | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec -index 88c6c09..11f6b0e 100644 +index c323a2a..38515ac 100644 --- a/SPECS/grub2.spec +++ b/SPECS/grub2.spec -@@ -187,7 +187,6 @@ rm -f grub-%{tarversion}/util/grub-setpassword.in.orig +@@ -182,7 +182,6 @@ rm -f grub-%{tarversion}/util/grub-setpassword.in.orig %install set -e rm -fr $RPM_BUILD_ROOT @@ -20,7 +24,7 @@ index 88c6c09..11f6b0e 100644 %do_common_install %if 0%{with_efi_arch} %do_efi_install %{grubefiarch} %{grubefiname} %{grubeficdname} -@@ -215,25 +214,6 @@ cat << EOF > ${RPM_BUILD_ROOT}%{_sysconfdir}/prelink.conf.d/grub2.conf +@@ -210,25 +209,6 @@ cat << EOF > ${RPM_BUILD_ROOT}%{_sysconfdir}/prelink.conf.d/grub2.conf -b /usr/sbin/grub2-sparc64-setup EOF @@ -47,5 +51,5 @@ index 88c6c09..11f6b0e 100644 rm -rf $RPM_BUILD_ROOT -- -2.7.4 +2.29.2 diff --git a/grub/grub2/centos/meta_patches/0005-grub2-remove-32b-build.patch b/grub/grub2/centos/meta_patches/0004-remove-32-bit-build.patch similarity index 62% rename from grub/grub2/centos/meta_patches/0005-grub2-remove-32b-build.patch rename to grub/grub2/centos/meta_patches/0004-remove-32-bit-build.patch index 1bb26ce0c..97343c529 100644 --- a/grub/grub2/centos/meta_patches/0005-grub2-remove-32b-build.patch +++ b/grub/grub2/centos/meta_patches/0004-remove-32-bit-build.patch @@ -1,14 +1,18 @@ -From 432caafd03704396941acec4ff059390ad749719 Mon Sep 17 00:00:00 2001 +From 7bcc190f7bbb9503fcb911f595b1f6e7539a0d90 Mon Sep 17 00:00:00 2001 +Message-Id: <7bcc190f7bbb9503fcb911f595b1f6e7539a0d90.1643237526.git.Jim.Somerville@windriver.com> +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> From: root Date: Mon, 22 Jan 2018 16:05:57 -0500 -Subject: macros +Subject: [PATCH 04/13] remove 32 bit build +Signed-off-by: Jim Somerville --- SOURCES/grub.macros | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index 10f74df..075727c 100644 +index 487ee27..efe46cc 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros @@ -82,15 +82,6 @@ @@ -25,9 +29,9 @@ index 10f74df..075727c 100644 - -e 's/-m64//g' \\\ - ) %{nil} %endif - %ifarch %{ix86} - %global target_cpu_name %{_arch} -@@ -401,6 +392,7 @@ cd grub-%{1}-%{tarversion} \ + + %ifarch aarch64 +@@ -385,6 +376,7 @@ cd grub-%{1}-%{tarversion} \ install -m 700 -d $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/ \ install -m 700 -d $RPM_BUILD_ROOT/boot/grub2/ \ make DESTDIR=$RPM_BUILD_ROOT install \ @@ -36,5 +40,5 @@ index 10f74df..075727c 100644 rm -f $RPM_BUILD_ROOT%{_infodir}/grub.info \ fi \ -- -2.7.4 +2.29.2 diff --git a/grub/grub2/centos/meta_patches/0006-grub2-ship-lst-files.patch b/grub/grub2/centos/meta_patches/0005-ship-lst-files.patch similarity index 50% rename from grub/grub2/centos/meta_patches/0006-grub2-ship-lst-files.patch rename to grub/grub2/centos/meta_patches/0005-ship-lst-files.patch index 73ac89b13..9dd41a953 100644 --- a/grub/grub2/centos/meta_patches/0006-grub2-ship-lst-files.patch +++ b/grub/grub2/centos/meta_patches/0005-ship-lst-files.patch @@ -1,14 +1,18 @@ -From 8fb898476d6a86b2b280bd63f1557dfe4d1360a4 Mon Sep 17 00:00:00 2001 +From f12ea9652df43eabd9c02489c6b733086382b72d Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> From: root Date: Tue, 23 Jan 2018 09:24:16 -0500 -Subject: [PATCH] ship .lst files +Subject: [PATCH 05/13] ship lst files +Signed-off-by: Jim Somerville --- SPECS/grub2.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec -index 613f2e1..7e11008 100644 +index 38515ac..ffca6e9 100644 --- a/SPECS/grub2.spec +++ b/SPECS/grub2.spec @@ -299,6 +299,8 @@ fi @@ -21,5 +25,5 @@ index 613f2e1..7e11008 100644 %dir %{_datarootdir}/grub/themes/ %exclude %{_datarootdir}/grub/themes/* -- -2.7.4 +2.29.2 diff --git a/grub/grub2/centos/meta_patches/0006-debrand-the-grub_cfg-menu.patch b/grub/grub2/centos/meta_patches/0006-debrand-the-grub_cfg-menu.patch new file mode 100644 index 000000000..7f576ae1c --- /dev/null +++ b/grub/grub2/centos/meta_patches/0006-debrand-the-grub_cfg-menu.patch @@ -0,0 +1,25 @@ +From 958fb362c10e075a2bf944e7f4dfc7fd3ae2a935 Mon Sep 17 00:00:00 2001 +Message-Id: <958fb362c10e075a2bf944e7f4dfc7fd3ae2a935.1643237526.git.Jim.Somerville@windriver.com> +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +From: root +Date: Tue, 23 Jan 2018 13:29:11 -0500 +Subject: [PATCH 06/13] debrand the grub_cfg menu + +Signed-off-by: Jim Somerville +--- + SOURCES/grub.patches | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches +index 9d0ffd1..ab69be2 100644 +--- a/SOURCES/grub.patches ++++ b/SOURCES/grub.patches +@@ -332,3 +332,4 @@ Patch0331: 0331-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch + Patch0332: 0332-linux-loader-avoid-overflow-on-initrd-size-calculati.patch + Patch0333: 0333-linuxefi-fail-kernel-validation-without-shim-protoco.patch + Patch0334: 0334-linux-Fix-integer-overflows-in-initrd-size-handling.patch ++Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch +-- +2.29.2 + diff --git a/grub/grub2/centos/meta_patches/0007-1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch b/grub/grub2/centos/meta_patches/0007-1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch deleted file mode 100644 index 62caa378c..000000000 --- a/grub/grub2/centos/meta_patches/0007-1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 9056b35661962a311aafa1937b5d8e236f44b119 Mon Sep 17 00:00:00 2001 -From: root -Date: Tue, 23 Jan 2018 13:29:11 -0500 -Subject: [PATCH] debrand the grub_cfg menu - ---- - SOURCES/grub.patches | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches -index bac4594..d7475f0 100644 ---- a/SOURCES/grub.patches -+++ b/SOURCES/grub.patches -@@ -332,3 +332,4 @@ Patch0285: 0285-editenv-handle-relative-symlinks.patch - Patch0332: 0332-linux-loader-avoid-overflow-on-initrd-size-calculati.patch - Patch0333: 0333-linuxefi-fail-kernel-validation-without-shim-protoco.patch - Patch0334: 0334-linux-Fix-integer-overflows-in-initrd-size-handling.patch -+Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch --- -2.7.4 - diff --git a/grub/grub2/centos/meta_patches/0008-grub2-Build-unsigned-package.patch b/grub/grub2/centos/meta_patches/0007-add-unsigned-package.patch similarity index 77% rename from grub/grub2/centos/meta_patches/0008-grub2-Build-unsigned-package.patch rename to grub/grub2/centos/meta_patches/0007-add-unsigned-package.patch index 94a15b035..cc89ccf9a 100644 --- a/grub/grub2/centos/meta_patches/0008-grub2-Build-unsigned-package.patch +++ b/grub/grub2/centos/meta_patches/0007-add-unsigned-package.patch @@ -1,17 +1,21 @@ -From fadbfe260a2678e1a6e79f8df4372b2eaee5dc9f Mon Sep 17 00:00:00 2001 +From a3c831a18efa931cafd680d8275232e874239f50 Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> From: root Date: Tue, 23 Jan 2018 14:46:01 -0500 -Subject: add unsigned package +Subject: [PATCH 07/13] add unsigned package +Signed-off-by: Jim Somerville --- SOURCES/grub.macros | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index 075727c..5581deb 100644 +index efe46cc..539b5d5 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros -@@ -235,6 +235,13 @@ Requires: %{name}-common = %{evr} \ +@@ -217,6 +217,13 @@ Requires: %{name}-common = %{evr} \ %{expand:%%description %{1}-cdboot} \ %{desc} \ This subpackage provides optional components of grub used with removeable media on %{1} systems.\ @@ -25,7 +29,7 @@ index 075727c..5581deb 100644 %{nil} %global do_common_setup() \ -@@ -309,6 +316,8 @@ done \ +@@ -291,6 +298,8 @@ done \ -p /EFI/%{efidir} -d grub-core ${GRUB_MODULES} \ %{4}./grub-mkimage -O %{1} -o %{3}.orig \\\ -p /EFI/BOOT -d grub-core ${GRUB_MODULES} \ @@ -34,7 +38,7 @@ index 075727c..5581deb 100644 %{expand:%%{pesign -s -i %{2}.orig -o %{2}.one -a %{5} -c %{6} -n %{7}}} \ %{expand:%%{pesign -s -i %{3}.orig -o %{3}.one -a %{5} -c %{6} -n %{7}}} \ %{expand:%%{pesign -s -i %{2}.one -o %{2} -a %{8} -c %{9} -n %{10}}} \ -@@ -403,6 +412,8 @@ find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} '\;' \ +@@ -387,6 +396,8 @@ find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} '\;' \ touch $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/grub.cfg \ ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \ @@ -43,7 +47,7 @@ index 075727c..5581deb 100644 install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \ install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \ install -D -m 700 unicode.pf2 \\\ -@@ -490,4 +501,8 @@ cd .. \ +@@ -474,4 +485,8 @@ cd .. \ %defattr(-,root,root,-) \ %verify(not mtime) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/%{3} \ %verify(not mtime) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/fonts \ @@ -53,5 +57,5 @@ index 075727c..5581deb 100644 +/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ %{nil} -- -2.7.4 +2.29.2 diff --git a/grub/grub2/centos/meta_patches/0009-grub2-Build-pxeboot-package.patch b/grub/grub2/centos/meta_patches/0008-add-pxeboot-package.patch similarity index 74% rename from grub/grub2/centos/meta_patches/0009-grub2-Build-pxeboot-package.patch rename to grub/grub2/centos/meta_patches/0008-add-pxeboot-package.patch index 98055a752..b152e1bc0 100644 --- a/grub/grub2/centos/meta_patches/0009-grub2-Build-pxeboot-package.patch +++ b/grub/grub2/centos/meta_patches/0008-add-pxeboot-package.patch @@ -1,17 +1,21 @@ -From ca7e4edddd48b0ffd0520a2ccb271bbe036aa1e5 Mon Sep 17 00:00:00 2001 +From 99a034b900d55da90234fd56a00944a4721c1390 Mon Sep 17 00:00:00 2001 +Message-Id: <99a034b900d55da90234fd56a00944a4721c1390.1643237526.git.Jim.Somerville@windriver.com> +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> From: root Date: Tue, 23 Jan 2018 14:57:29 -0500 -Subject: add pxeboot package +Subject: [PATCH 08/13] add pxeboot package +Signed-off-by: Jim Somerville --- SOURCES/grub.macros | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index 5581deb..9ef91d6 100644 +index 539b5d5..c945920 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros -@@ -242,6 +242,13 @@ Summary: Unsigned versions of GRUB EFI binaries \ +@@ -224,6 +224,13 @@ Summary: Unsigned versions of GRUB EFI binaries \ %{expand:%%description %{1}-unsigned} \ This package contains unsigned version of GRUB EFI binaries. \ \ @@ -25,7 +29,7 @@ index 5581deb..9ef91d6 100644 %{nil} %global do_common_setup() \ -@@ -414,6 +421,7 @@ ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\ +@@ -398,6 +405,7 @@ ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \ install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2}.unsigned \ install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3}.unsigned \ @@ -33,7 +37,7 @@ index 5581deb..9ef91d6 100644 install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \ install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \ install -D -m 700 unicode.pf2 \\\ -@@ -505,4 +513,8 @@ cd .. \ +@@ -489,4 +497,8 @@ cd .. \ %{expand:%%files %{1}-unsigned} \ /boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \ /boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ @@ -43,5 +47,5 @@ index 5581deb..9ef91d6 100644 + \ %{nil} -- -2.7.4 +2.29.2 diff --git a/grub/grub2/centos/meta_patches/0010-grub2-add-tboot.patch b/grub/grub2/centos/meta_patches/0009-add-tboot.patch similarity index 61% rename from grub/grub2/centos/meta_patches/0010-grub2-add-tboot.patch rename to grub/grub2/centos/meta_patches/0009-add-tboot.patch index 4acfc617f..20c956bc2 100644 --- a/grub/grub2/centos/meta_patches/0010-grub2-add-tboot.patch +++ b/grub/grub2/centos/meta_patches/0009-add-tboot.patch @@ -1,15 +1,19 @@ -From 25964e485c769efcccf853babcc8263eb1c89baf Mon Sep 17 00:00:00 2001 +From 9b47b5107a4017c266b59093514dbdee603b0bdc Mon Sep 17 00:00:00 2001 +Message-Id: <9b47b5107a4017c266b59093514dbdee603b0bdc.1643237526.git.Jim.Somerville@windriver.com> +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> From: jmckenna Date: Wed, 28 Mar 2018 12:53:34 -0400 -Subject: WRS: 0010-grub2-add-tboot.patch +Subject: [PATCH 09/13] add tboot +Signed-off-by: Jim Somerville --- SOURCES/grub.macros | 5 +++++ SOURCES/grub.patches | 1 + 2 files changed, 6 insertions(+) diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index 9ef91d6..ffdd23c 100644 +index c945920..b279e7d 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros @@ -82,6 +82,10 @@ @@ -21,9 +25,9 @@ index 9ef91d6..ffdd23c 100644 +%global wrs_modules "" + %endif - %ifarch %{ix86} - %global target_cpu_name %{_arch} -@@ -347,6 +351,7 @@ GRUB_MODULES=" all_video boot btrfs cat chain configfile echo \\\ + + %ifarch aarch64 +@@ -331,6 +335,7 @@ GRUB_MODULES=" all_video boot btrfs cat chain configfile echo \\\ search_label serial sleep syslinuxcfg test tftp \\\ video xfs" \ GRUB_MODULES+=%{efi_modules} \ @@ -32,14 +36,14 @@ index 9ef91d6..ffdd23c 100644 %{nil} diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches -index d7475f0..e24bd8c 100644 +index ab69be2..ba47129 100644 --- a/SOURCES/grub.patches +++ b/SOURCES/grub.patches -@@ -333,3 +334,4 @@ Patch0286: 0286-efinet-also-use-the-firmware-acceleration-for-http.patch +@@ -333,3 +333,4 @@ Patch0332: 0332-linux-loader-avoid-overflow-on-initrd-size-calculati.patch Patch0333: 0333-linuxefi-fail-kernel-validation-without-shim-protoco.patch Patch0334: 0334-linux-Fix-integer-overflows-in-initrd-size-handling.patch Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch +Patch1001: 1001-add-tboot.patch -- -2.7.4 +2.29.2 diff --git a/grub/grub2/centos/meta_patches/0011-grub2-fix-str-for-6B-macs.patch b/grub/grub2/centos/meta_patches/0010-Don-t-add-a-trailing-colon-after-MAC.patch similarity index 57% rename from grub/grub2/centos/meta_patches/0011-grub2-fix-str-for-6B-macs.patch rename to grub/grub2/centos/meta_patches/0010-Don-t-add-a-trailing-colon-after-MAC.patch index fa91487ef..9ebdcf016 100644 --- a/grub/grub2/centos/meta_patches/0011-grub2-fix-str-for-6B-macs.patch +++ b/grub/grub2/centos/meta_patches/0010-Don-t-add-a-trailing-colon-after-MAC.patch @@ -1,19 +1,23 @@ -From 5e0c8a6125403db7e90990d20c1cdda5cb9deb78 Mon Sep 17 00:00:00 2001 +From d3bc2d9e09b1fff838e30eb064c5c73d201e47c5 Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> From: jmckenna Date: Wed, 28 Mar 2018 14:08:57 -0400 -Subject: [PATCH 11/12] Patch GRUB so that it doesn't add a trailing colon - after MAC +Subject: [PATCH 10/13] Don't add a trailing colon after MAC A CentOS GRUB patch added support for macs > 6B in size. This breaks PXEbooting the installer, because a routine within grub relies on the max MAC string length. + +Signed-off-by: Jim Somerville --- SOURCES/grub.macros | 2 +- - SOURCES/grub.patches | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) + SOURCES/grub.patches | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index ffdd23c..8fcb272 100644 +index b279e7d..00c669f 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros @@ -82,7 +82,7 @@ @@ -26,15 +30,14 @@ index ffdd23c..8fcb272 100644 %global wrs_modules "" diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches -index e24bd8c..73ccdee 100644 +index ba47129..3d4f708 100644 --- a/SOURCES/grub.patches +++ b/SOURCES/grub.patches -@@ -334,3 +334,5 @@ Patch0287: 0287-Make-root_url-reflect-the-protocol-hostname-of-our-b.patch +@@ -334,3 +334,4 @@ Patch0333: 0333-linuxefi-fail-kernel-validation-without-shim-protoco.patch Patch0334: 0334-linux-Fix-integer-overflows-in-initrd-size-handling.patch Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch Patch1001: 1001-add-tboot.patch +Patch1002: 1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch -+ -- -2.7.4 +2.29.2 diff --git a/grub/grub2/centos/meta_patches/0011-Don-t-strip-files-from-non-EFI-build-of-grub.patch b/grub/grub2/centos/meta_patches/0011-Don-t-strip-files-from-non-EFI-build-of-grub.patch new file mode 100644 index 000000000..58884f1af --- /dev/null +++ b/grub/grub2/centos/meta_patches/0011-Don-t-strip-files-from-non-EFI-build-of-grub.patch @@ -0,0 +1,29 @@ +From 69ad59e9ca9961b84563cb40e04b8dce7c650e61 Mon Sep 17 00:00:00 2001 +Message-Id: <69ad59e9ca9961b84563cb40e04b8dce7c650e61.1643237526.git.Jim.Somerville@windriver.com> +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +From: root +Date: Fri, 6 Apr 2018 11:36:01 -0400 +Subject: [PATCH 11/13] Don't strip files from non-EFI build of grub + +Signed-off-by: Jim Somerville +--- + SOURCES/grub.macros | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros +index 00c669f..d52861a 100644 +--- a/SOURCES/grub.macros ++++ b/SOURCES/grub.macros +@@ -472,8 +472,6 @@ cd .. \ + %defattr(-,root,root) \ + %dir %{_libdir}/grub/%{2}/ \ + %{_libdir}/grub/%{2}/* \ +-%exclude %{_libdir}/grub/%{2}/*.module \ +-%exclude %{_libdir}/grub/%{2}/{boot,boot_hybrid,cdboot,diskboot,lzma_decompress,pxeboot}.{image,img} \ + %exclude %{_libdir}/grub/%{2}/*.o \ + %{nil} + +-- +2.29.2 + diff --git a/grub/grub2/centos/meta_patches/0012-grub2-Don-t-strip-img-files-from-non-EFI-build.patch b/grub/grub2/centos/meta_patches/0012-grub2-Don-t-strip-img-files-from-non-EFI-build.patch deleted file mode 100644 index 8d95c8576..000000000 --- a/grub/grub2/centos/meta_patches/0012-grub2-Don-t-strip-img-files-from-non-EFI-build.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 31310ca5b5d10aff6bd4480bc78ef75504711ab1 Mon Sep 17 00:00:00 2001 -From: root -Date: Fri, 6 Apr 2018 11:36:01 -0400 -Subject: Don't strip files from non-EFI build of grub - ---- - SOURCES/grub.macros | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros -index 8fcb272..cd2da06 100644 ---- a/SOURCES/grub.macros -+++ b/SOURCES/grub.macros -@@ -488,8 +488,6 @@ cd .. \ - %defattr(-,root,root) \ - %dir %{_libdir}/grub/%{2}/ \ - %{_libdir}/grub/%{2}/* \ --%exclude %{_libdir}/grub/%{2}/*.module \ --%exclude %{_libdir}/grub/%{2}/{boot,boot_hybrid,cdboot,diskboot,lzma_decompress,pxeboot}.{image,img} \ - %exclude %{_libdir}/grub/%{2}/*.o \ - %{nil} - --- -2.7.4 - diff --git a/grub/grub2/centos/meta_patches/0012-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch b/grub/grub2/centos/meta_patches/0012-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch new file mode 100644 index 000000000..9e5387c82 --- /dev/null +++ b/grub/grub2/centos/meta_patches/0012-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch @@ -0,0 +1,27 @@ +From c2764661800f3b43fda4a7402087fafa84f9ed07 Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +From: jma1 +Date: Mon, 30 Aug 2021 06:27:13 +0000 +Subject: [PATCH 12/13] tftp: roll over block counter to prevent timeouts with + data + +Signed-off-by: Jiping Ma +Signed-off-by: Jim Somerville +--- + SOURCES/grub.patches | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches +index 3d4f708..5ce9177 100644 +--- a/SOURCES/grub.patches ++++ b/SOURCES/grub.patches +@@ -335,3 +335,4 @@ Patch0334: 0334-linux-Fix-integer-overflows-in-initrd-size-handling.patch + Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch + Patch1001: 1001-add-tboot.patch + Patch1002: 1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch ++Patch1003: 1003-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch +-- +2.29.2 + diff --git a/grub/grub2/centos/meta_patches/0014-relocate-pxeboot-to-var-pxeboot-patch.patch b/grub/grub2/centos/meta_patches/0013-Relocate-pxeboot-to-var-pxeboot.patch similarity index 65% rename from grub/grub2/centos/meta_patches/0014-relocate-pxeboot-to-var-pxeboot-patch.patch rename to grub/grub2/centos/meta_patches/0013-Relocate-pxeboot-to-var-pxeboot.patch index d68d7a7dc..ea0ce7ca6 100644 --- a/grub/grub2/centos/meta_patches/0014-relocate-pxeboot-to-var-pxeboot-patch.patch +++ b/grub/grub2/centos/meta_patches/0013-Relocate-pxeboot-to-var-pxeboot.patch @@ -1,13 +1,17 @@ -From e78aeedb002ddf204d0b970b8601ead55bf32f6f Mon Sep 17 00:00:00 2001 +From dd8a4d64d16ec8f79c768293a4057581b4683803 Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> +References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com> From: Bin Qian Date: Wed, 29 Sep 2021 16:49:47 -0400 -Subject: [PATCH] Relocate /pxeboot to /var/pxeboot +Subject: [PATCH 13/13] Relocate /pxeboot to /var/pxeboot Relocate writable directory /pxeboot to /var/pxeboot + +Signed-off-by: Jim Somerville --- - SOURCES/grub.macros | 4 ++-- - SOURCES/grub.patches | 1 - - 2 files changed, 2 insertions(+), 3 deletions(-) + SOURCES/grub.macros | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros index d52861a..fe88bf1 100644 @@ -30,15 +34,6 @@ index d52861a..fe88bf1 100644 +/var/pxeboot/EFI/%{grubefiname} \ \ %{nil} -diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches -index ece014a..5ce9177 100644 ---- a/SOURCES/grub.patches -+++ b/SOURCES/grub.patches -@@ -336,4 +336,3 @@ Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch - Patch1001: 1001-add-tboot.patch - Patch1002: 1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch - Patch1003: 1003-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch -- -- 2.29.2 diff --git a/grub/grub2/centos/meta_patches/0013-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch b/grub/grub2/centos/meta_patches/0013-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch deleted file mode 100644 index 4165b928f..000000000 --- a/grub/grub2/centos/meta_patches/0013-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch +++ /dev/null @@ -1,23 +0,0 @@ -From cff7cf7787b4619a7cbbe5ccbbfeced54999ad70 Mon Sep 17 00:00:00 2001 -From: jma1 -Date: Mon, 30 Aug 2021 06:27:13 +0000 -Subject: [PATCH] tftp: roll over block counter to prevent timeouts with data - -Signed-off-by: Jiping Ma ---- - grub.patches | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/grub.patches b/grub.patches -index 678ba4b..ece014a 100644 ---- a/SOURCES/grub.patches -+++ b/SOURCES/grub.patches -@@ -335,4 +335,5 @@ Patch0334: 0334-linux-Fix-integer-overflows-in-initrd-size-handling.patch - Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch - Patch1001: 1001-add-tboot.patch - Patch1002: 1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch -+Patch1003: 1003-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch - --- -2.29.2 - diff --git a/grub/grub2/centos/meta_patches/PATCH_ORDER b/grub/grub2/centos/meta_patches/PATCH_ORDER index a1ea61b88..0f07a1a32 100644 --- a/grub/grub2/centos/meta_patches/PATCH_ORDER +++ b/grub/grub2/centos/meta_patches/PATCH_ORDER @@ -1,13 +1,13 @@ -0001-grub2-Update-package-versioning-for-TIS-format.patch -0002-grub2-fix-cflags.patch -0003-grub2-remove-debug-pkgs.patch -0005-grub2-remove-32b-build.patch -0006-grub2-ship-lst-files.patch -0007-1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch -0008-grub2-Build-unsigned-package.patch -0009-grub2-Build-pxeboot-package.patch -0010-grub2-add-tboot.patch -0011-grub2-fix-str-for-6B-macs.patch -0012-grub2-Don-t-strip-img-files-from-non-EFI-build.patch -0013-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch -0014-relocate-pxeboot-to-var-pxeboot-patch.patch +0001-Update-package-versioning-for-STX.patch +0002-fix-cflags.patch +0003-remove-debug-pkgs.patch +0004-remove-32-bit-build.patch +0005-ship-lst-files.patch +0006-debrand-the-grub_cfg-menu.patch +0007-add-unsigned-package.patch +0008-add-pxeboot-package.patch +0009-add-tboot.patch +0010-Don-t-add-a-trailing-colon-after-MAC.patch +0011-Don-t-strip-files-from-non-EFI-build-of-grub.patch +0012-tftp-roll-over-block-counter-to-prevent-timeouts-wit.patch +0013-Relocate-pxeboot-to-var-pxeboot.patch