de-fuzz grub2 patches

When do Centos 7.5 upgraded, some patches didn't resolve and cause
the fuzzy in the line numbers of the patches. And it may cause
.orig file is created when do patch. And this .orig file will lead
to rpm packaging failure due to the unexpected and unpackaged .orig
file.

Please visit below link to get more detail info:
https://bugs.launchpad.net/starlingx/+bug/1794611

Solution:
  Safest solution is to de-fuzz our patches.

Story: 2003389
Task: 26755

Change-Id: I4bcf73175e81083a575d35d4b1448b29b11beaf7
Signed-off-by: slin14 <shuicheng.lin@intel.com>
This commit is contained in:
slin14 2018-09-28 08:10:39 +08:00
parent 79eb1d3a08
commit d3d8639028
9 changed files with 57 additions and 58 deletions

View File

@ -1,8 +1,8 @@
diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros
index 168b89b..c9e5177 100644 index 6e12329..10f74df 100644
--- a/SOURCES/grub.macros --- a/SOURCES/grub.macros
+++ b/SOURCES/grub.macros +++ b/SOURCES/grub.macros
@@ -12,16 +12,7 @@ @@ -15,16 +15,7 @@
%global cc_equals %{nil} %global cc_equals %{nil}
%endif %endif

View File

@ -1,8 +1,8 @@
diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec
index a4e87f5..95fa027 100644 index 11f6b0e..613f2e1 100644
--- a/SPECS/grub2.spec --- a/SPECS/grub2.spec
+++ b/SPECS/grub2.spec +++ b/SPECS/grub2.spec
@@ -39,11 +39,6 @@ BuildRequires: /usr/lib64/crt1.o glibc-static glibc-devel @@ -37,11 +37,6 @@ BuildRequires: /usr/lib64/crt1.o glibc-static glibc-devel
BuildRequires: /usr/lib64/crt1.o glibc-static(x86-64) glibc-devel(x86-64) BuildRequires: /usr/lib64/crt1.o glibc-static(x86-64) glibc-devel(x86-64)
# glibc32 is what will be in the buildroots, but glibc-static(x86-32) is what # glibc32 is what will be in the buildroots, but glibc-static(x86-32) is what
# will be in an epel-7 (i.e. centos) mock root. I think. # will be in an epel-7 (i.e. centos) mock root. I think.

View File

@ -1,17 +1,17 @@
From 3a2d3bf327d82d3d916fa1a14b3dbbe84023a29c Mon Sep 17 00:00:00 2001 From 432caafd03704396941acec4ff059390ad749719 Mon Sep 17 00:00:00 2001
From: root <root@yow-cgts4-lx.wrs.com> From: root <root@yow-cgts4-lx.wrs.com>
Date: Mon, 22 Jan 2018 16:05:57 -0500 Date: Mon, 22 Jan 2018 16:05:57 -0500
Subject: [PATCH] macros Subject: macros
--- ---
SOURCES/grub.macros | 14 +++----------- SOURCES/grub.macros | 10 +---------
1 file changed, 3 insertions(+), 11 deletions(-) 1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros
index c9e5177..f03bc1a 100755 index 10f74df..075727c 100644
--- a/SOURCES/grub.macros --- a/SOURCES/grub.macros
+++ b/SOURCES/grub.macros +++ b/SOURCES/grub.macros
@@ -78,15 +78,6 @@ @@ -81,15 +81,6 @@
%global legacy_package_arch pc %global legacy_package_arch pc
%global platform pc %global platform pc
@ -27,7 +27,7 @@ index c9e5177..f03bc1a 100755
%endif %endif
%ifarch aarch64 %ifarch aarch64
@@ -378,6 +369,7 @@ cd grub-%{1}-%{tarversion} \ @@ -381,6 +372,7 @@ cd grub-%{1}-%{tarversion} \
install -m 755 -d $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/ \ install -m 755 -d $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/ \
install -m 755 -d $RPM_BUILD_ROOT/boot/grub2/ \ install -m 755 -d $RPM_BUILD_ROOT/boot/grub2/ \
make DESTDIR=$RPM_BUILD_ROOT install \ make DESTDIR=$RPM_BUILD_ROOT install \
@ -36,5 +36,5 @@ index c9e5177..f03bc1a 100755
rm -f $RPM_BUILD_ROOT%{_infodir}/grub.info \ rm -f $RPM_BUILD_ROOT%{_infodir}/grub.info \
fi \ fi \
-- --
1.8.3.1 2.7.4

View File

@ -1,4 +1,4 @@
From c5f65a1bf71e37f73bb102472b2f067f50da1079 Mon Sep 17 00:00:00 2001 From 8fb898476d6a86b2b280bd63f1557dfe4d1360a4 Mon Sep 17 00:00:00 2001
From: root <root@yow-cgts4-lx.wrs.com> From: root <root@yow-cgts4-lx.wrs.com>
Date: Tue, 23 Jan 2018 09:24:16 -0500 Date: Tue, 23 Jan 2018 09:24:16 -0500
Subject: [PATCH] ship .lst files Subject: [PATCH] ship .lst files
@ -8,10 +8,10 @@ Subject: [PATCH] ship .lst files
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec
index dcb0e64..85ee94d 100755 index 613f2e1..7e11008 100644
--- a/SPECS/grub2.spec --- a/SPECS/grub2.spec
+++ b/SPECS/grub2.spec +++ b/SPECS/grub2.spec
@@ -275,6 +275,8 @@ fi @@ -265,6 +265,8 @@ fi
%files common -f grub.lang %files common -f grub.lang
%dir %{_libdir}/grub/ %dir %{_libdir}/grub/
@ -21,5 +21,5 @@ index dcb0e64..85ee94d 100755
%dir %{_datarootdir}/grub/themes/ %dir %{_datarootdir}/grub/themes/
%exclude %{_datarootdir}/grub/themes/* %exclude %{_datarootdir}/grub/themes/*
-- --
1.8.3.1 2.7.4

View File

@ -1,17 +1,17 @@
From 0e70c8a35c4434fa23717228cfa819bd64ed082f Mon Sep 17 00:00:00 2001 From fadbfe260a2678e1a6e79f8df4372b2eaee5dc9f Mon Sep 17 00:00:00 2001
From: root <root@yow-cgts4-lx.wrs.com> From: root <root@yow-cgts4-lx.wrs.com>
Date: Tue, 23 Jan 2018 14:46:01 -0500 Date: Tue, 23 Jan 2018 14:46:01 -0500
Subject: [PATCH 2/4] add unsigned package Subject: add unsigned package
--- ---
SOURCES/grub.macros | 15 +++++++++++++++ SOURCES/grub.macros | 15 +++++++++++++++
1 file changed, 15 insertions(+) 1 file changed, 15 insertions(+)
diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros
index f03bc1a..486604c 100755 index 075727c..5581deb 100644
--- a/SOURCES/grub.macros --- a/SOURCES/grub.macros
+++ b/SOURCES/grub.macros +++ b/SOURCES/grub.macros
@@ -212,6 +212,13 @@ Requires: %{name}-common = %{evr} \ @@ -215,6 +215,13 @@ Requires: %{name}-common = %{evr} \
%{expand:%%description %{1}-cdboot} \ %{expand:%%description %{1}-cdboot} \
%{desc} \ %{desc} \
This subpackage provides optional components of grub used with removeable media on %{1} systems.\ This subpackage provides optional components of grub used with removeable media on %{1} systems.\
@ -25,7 +25,7 @@ index f03bc1a..486604c 100755
%{nil} %{nil}
%global do_common_setup() \ %global do_common_setup() \
@@ -286,6 +293,8 @@ done \ @@ -289,6 +296,8 @@ done \
-p /EFI/%{efidir} -d grub-core ${GRUB_MODULES} \ -p /EFI/%{efidir} -d grub-core ${GRUB_MODULES} \
%{4}./grub-mkimage -O %{1} -o %{3}.orig \\\ %{4}./grub-mkimage -O %{1} -o %{3}.orig \\\
-p /EFI/BOOT -d grub-core ${GRUB_MODULES} \ -p /EFI/BOOT -d grub-core ${GRUB_MODULES} \
@ -34,7 +34,7 @@ index f03bc1a..486604c 100755
%{expand:%%{pesign -s -i %{2}.orig -o %{2} -a %{5} -c %{6} -n %{7}}} \ %{expand:%%{pesign -s -i %{2}.orig -o %{2} -a %{5} -c %{6} -n %{7}}} \
%{expand:%%{pesign -s -i %{3}.orig -o %{3} -a %{5} -c %{6} -n %{7}}} \ %{expand:%%{pesign -s -i %{3}.orig -o %{3} -a %{5} -c %{6} -n %{7}}} \
%{nil} %{nil}
@@ -380,6 +389,8 @@ find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} '\;' \ @@ -383,6 +392,8 @@ find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} '\;' \
touch $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/grub.cfg \ touch $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/grub.cfg \
ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\ ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \
@ -43,7 +43,7 @@ index f03bc1a..486604c 100755
install -m 755 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \ install -m 755 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \
install -m 755 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \ install -m 755 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \
install -D -m 644 unicode.pf2 \\\ install -D -m 644 unicode.pf2 \\\
@@ -470,4 +481,8 @@ cd .. \ @@ -473,4 +484,8 @@ cd .. \
%defattr(-,root,root,-) \ %defattr(-,root,root,-) \
%attr(0755,root,root)/boot/efi/EFI/%{efidir}/%{3} \ %attr(0755,root,root)/boot/efi/EFI/%{efidir}/%{3} \
%attr(0755,root,root)/boot/efi/EFI/%{efidir}/fonts \ %attr(0755,root,root)/boot/efi/EFI/%{efidir}/fonts \
@ -53,5 +53,5 @@ index f03bc1a..486604c 100755
+/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ +/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \
%{nil} %{nil}
-- --
1.8.3.1 2.7.4

View File

@ -1,17 +1,17 @@
From 22076d1eea7ccb10541073c7318043d7634b7852 Mon Sep 17 00:00:00 2001 From ca7e4edddd48b0ffd0520a2ccb271bbe036aa1e5 Mon Sep 17 00:00:00 2001
From: root <root@yow-cgts4-lx.wrs.com> From: root <root@yow-cgts4-lx.wrs.com>
Date: Tue, 23 Jan 2018 14:57:29 -0500 Date: Tue, 23 Jan 2018 14:57:29 -0500
Subject: [PATCH 3/4] add pxeboot package Subject: add pxeboot package
--- ---
SOURCES/grub.macros | 12 ++++++++++++ SOURCES/grub.macros | 12 ++++++++++++
1 file changed, 12 insertions(+) 1 file changed, 12 insertions(+)
diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros
index 486604c..40cb5d5 100755 index 5581deb..9ef91d6 100644
--- a/SOURCES/grub.macros --- a/SOURCES/grub.macros
+++ b/SOURCES/grub.macros +++ b/SOURCES/grub.macros
@@ -219,6 +219,13 @@ Summary: Unsigned versions of GRUB EFI binaries \ @@ -222,6 +222,13 @@ Summary: Unsigned versions of GRUB EFI binaries \
%description %{1}-unsigned \ %description %{1}-unsigned \
This package contains unsigned version of GRUB EFI binaries. \ This package contains unsigned version of GRUB EFI binaries. \
\ \
@ -25,7 +25,7 @@ index 486604c..40cb5d5 100755
%{nil} %{nil}
%global do_common_setup() \ %global do_common_setup() \
@@ -391,6 +398,7 @@ ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\ @@ -394,6 +401,7 @@ ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \
install -m 755 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2}.unsigned \ install -m 755 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2}.unsigned \
install -m 755 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3}.unsigned \ install -m 755 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3}.unsigned \
@ -33,7 +33,7 @@ index 486604c..40cb5d5 100755
install -m 755 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \ install -m 755 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \
install -m 755 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \ install -m 755 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \
install -D -m 644 unicode.pf2 \\\ install -D -m 644 unicode.pf2 \\\
@@ -485,4 +493,8 @@ cd .. \ @@ -488,4 +496,8 @@ cd .. \
%{expand:%%files %{1}-unsigned} \ %{expand:%%files %{1}-unsigned} \
/boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \ /boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \
/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ /boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \
@ -43,5 +43,5 @@ index 486604c..40cb5d5 100755
+ \ + \
%{nil} %{nil}
-- --
1.8.3.1 2.7.4

View File

@ -1,7 +1,7 @@
From 9f0825676d399b40dd28ea405f09d26c9459f1e8 Mon Sep 17 00:00:00 2001 From 25964e485c769efcccf853babcc8263eb1c89baf Mon Sep 17 00:00:00 2001
From: jmckenna <jason.mckenna@windriver.com> From: jmckenna <jason.mckenna@windriver.com>
Date: Wed, 28 Mar 2018 12:53:34 -0400 Date: Wed, 28 Mar 2018 12:53:34 -0400
Subject: [PATCH 1/2] WRS: 0010-grub2-add-tboot.patch Subject: WRS: 0010-grub2-add-tboot.patch
--- ---
SOURCES/grub.macros | 5 +++++ SOURCES/grub.macros | 5 +++++
@ -9,10 +9,10 @@ Subject: [PATCH 1/2] WRS: 0010-grub2-add-tboot.patch
2 files changed, 6 insertions(+) 2 files changed, 6 insertions(+)
diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros
index 40cb5d5..247bb71 100755 index 9ef91d6..ffdd23c 100644
--- a/SOURCES/grub.macros --- a/SOURCES/grub.macros
+++ b/SOURCES/grub.macros +++ b/SOURCES/grub.macros
@@ -78,6 +78,10 @@ @@ -81,6 +81,10 @@
%global legacy_package_arch pc %global legacy_package_arch pc
%global platform pc %global platform pc
@ -23,7 +23,7 @@ index 40cb5d5..247bb71 100755
%endif %endif
%ifarch aarch64 %ifarch aarch64
@@ -324,6 +328,7 @@ GRUB_MODULES=" all_video boot btrfs cat chain configfile echo \\\ @@ -327,6 +331,7 @@ GRUB_MODULES=" all_video boot btrfs cat chain configfile echo \\\
search_label serial sleep syslinuxcfg test tftp \\\ search_label serial sleep syslinuxcfg test tftp \\\
video xfs" \ video xfs" \
GRUB_MODULES+=%{efi_modules} \ GRUB_MODULES+=%{efi_modules} \
@ -32,14 +32,14 @@ index 40cb5d5..247bb71 100755
%{nil} %{nil}
diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches
index b69fb31..5e63d71 100644 index d7475f0..e24bd8c 100644
--- a/SOURCES/grub.patches --- a/SOURCES/grub.patches
+++ b/SOURCES/grub.patches +++ b/SOURCES/grub.patches
@@ -258,3 +258,4 @@ Patch0257: 0257-set-rootpath.patch @@ -259,3 +259,4 @@ Patch0258: 0258-Fix-one-more-coverity-complaint.patch
Patch0258: 0258-Fix-one-more-coverity-complaint.patch
Patch0260: 0260-Fix-up-linux-params-usage.patch Patch0260: 0260-Fix-up-linux-params-usage.patch
Patch0261: 0261-Fix-grub_net_hwaddr_to_str.patch
Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch
+Patch1001: 1001-add-tboot.patch +Patch1001: 1001-add-tboot.patch
-- --
1.8.3.1 2.7.4

View File

@ -1,22 +1,21 @@
From f38f3a21e50130d5807088bae79c163233271a97 Mon Sep 17 00:00:00 2001 From 5e0c8a6125403db7e90990d20c1cdda5cb9deb78 Mon Sep 17 00:00:00 2001
From: jmckenna <jason.mckenna@windriver.com> From: jmckenna <jason.mckenna@windriver.com>
Date: Wed, 28 Mar 2018 14:08:57 -0400 Date: Wed, 28 Mar 2018 14:08:57 -0400
Subject: [PATCH 2/2] Patch GRUB so that it doesn't add a trailing colon after Subject: Patch GRUB so that it doesn't add a trailing colon after MAC
MAC
A CentOS GRUB patch added support for macs > 6B in size. This A CentOS GRUB patch added support for macs > 6B in size. This
breaks PXEbooting the installer, because a routine within grub breaks PXEbooting the installer, because a routine within grub
relies on the max MAC string length. relies on the max MAC string length.
--- ---
SOURCES/grub.macros | 2 +- SOURCES/grub.macros | 2 +-
SOURCES/grub.patches | 4 +++- SOURCES/grub.patches | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-) 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros
index 247bb71..908315d 100755 index ffdd23c..8fcb272 100644
--- a/SOURCES/grub.macros --- a/SOURCES/grub.macros
+++ b/SOURCES/grub.macros +++ b/SOURCES/grub.macros
@@ -78,7 +78,7 @@ @@ -81,7 +81,7 @@
%global legacy_package_arch pc %global legacy_package_arch pc
%global platform pc %global platform pc
@ -26,15 +25,15 @@ index 247bb71..908315d 100755
%global wrs_modules "" %global wrs_modules ""
diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches
index 5e63d71..688d81b 100644 index e24bd8c..73ccdee 100644
--- a/SOURCES/grub.patches --- a/SOURCES/grub.patches
+++ b/SOURCES/grub.patches +++ b/SOURCES/grub.patches
@@ -259,3 +259,5 @@ Patch0258: 0258-Fix-one-more-coverity-complaint.patch @@ -260,3 +260,5 @@ Patch0260: 0260-Fix-up-linux-params-usage.patch
Patch0260: 0260-Fix-up-linux-params-usage.patch Patch0261: 0261-Fix-grub_net_hwaddr_to_str.patch
Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch
Patch1001: 1001-add-tboot.patch Patch1001: 1001-add-tboot.patch
+Patch1002: 1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch +Patch1002: 1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch
+ +
-- --
1.8.3.1 2.7.4

View File

@ -1,17 +1,17 @@
From a62820e84598cf6007a751db01567a8a2ac8d369 Mon Sep 17 00:00:00 2001 From 31310ca5b5d10aff6bd4480bc78ef75504711ab1 Mon Sep 17 00:00:00 2001
From: root <root@yow-cgts1-lx.wrs.com> From: root <root@yow-cgts1-lx.wrs.com>
Date: Fri, 6 Apr 2018 11:36:01 -0400 Date: Fri, 6 Apr 2018 11:36:01 -0400
Subject: [PATCH] Don't strip files from non-EFI build of grub Subject: Don't strip files from non-EFI build of grub
--- ---
SOURCES/grub.macros | 2 -- SOURCES/grub.macros | 2 --
1 file changed, 2 deletions(-) 1 file changed, 2 deletions(-)
diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros
index 4e3bdc0..f403c91 100755 index 8fcb272..cd2da06 100644
--- a/SOURCES/grub.macros --- a/SOURCES/grub.macros
+++ b/SOURCES/grub.macros +++ b/SOURCES/grub.macros
@@ -468,8 +468,6 @@ cd .. \ @@ -471,8 +471,6 @@ cd .. \
%defattr(-,root,root) \ %defattr(-,root,root) \
%dir %{_libdir}/grub/%{2}/ \ %dir %{_libdir}/grub/%{2}/ \
%{_libdir}/grub/%{2}/* \ %{_libdir}/grub/%{2}/* \
@ -21,5 +21,5 @@ index 4e3bdc0..f403c91 100755
%{nil} %{nil}
-- --
1.8.3.1 2.7.4