From b5306a34ee1298a40cd0fb067adf8860f3a1ebe9 Mon Sep 17 00:00:00 2001 From: Zhe Hu Date: Thu, 27 Dec 2018 10:11:22 +0800 Subject: [PATCH] rebase grub2 patch to CentOS 7.6 version Test: Pass build and simplex deploy test Depends-On: https://review.openstack.org/627434 Story: 2004522 Task: 28417 Change-Id: Ibd2c0866dc5d7f4475e3da6ad5aeedc284ed5829 Signed-off-by: Zhe Hu --- ...te-package-versioning-for-TIS-format.patch | 6 ++--- .../0003-grub2-remove-debug-pkgs.patch | 4 ++-- .../0004-grub2-remove-32b-requirements.patch | 2 +- .../0005-grub2-remove-32b-build.patch | 12 +++++----- .../0006-grub2-ship-lst-files.patch | 4 ++-- ...x-mktitle-de-brand-the-grub.cfg-menu.patch | 8 +++---- .../0008-grub2-Build-unsigned-package.patch | 24 +++++++++---------- .../0009-grub2-Build-pxeboot-package.patch | 18 +++++++------- .../meta_patches/0010-grub2-add-tboot.patch | 14 +++++------ .../0011-grub2-fix-str-for-6B-macs.patch | 9 +++---- ...t-strip-img-files-from-non-EFI-build.patch | 2 +- ...ling-colon-when-populating-MAC-strin.patch | 2 +- grub/grub2/centos/srpm_path | 2 +- 13 files changed, 54 insertions(+), 53 deletions(-) diff --git a/grub/grub2/centos/meta_patches/0001-grub2-Update-package-versioning-for-TIS-format.patch b/grub/grub2/centos/meta_patches/0001-grub2-Update-package-versioning-for-TIS-format.patch index b221ef7ff..e8cd15056 100644 --- a/grub/grub2/centos/meta_patches/0001-grub2-Update-package-versioning-for-TIS-format.patch +++ b/grub/grub2/centos/meta_patches/0001-grub2-Update-package-versioning-for-TIS-format.patch @@ -11,12 +11,12 @@ diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec index 12d34ad..88c6c09 100644 --- a/SPECS/grub2.spec +++ b/SPECS/grub2.spec -@@ -6,7 +6,7 @@ +@@ -17,7 +17,7 @@ Name: grub2 Epoch: 1 Version: 2.02 --Release: 0.65%{?dist}%{?buildid}.2 -+Release: 0.65.el7.centos.2%{?_tis_dist}.%{tis_patch_ver} +-Release: 0.76%{?dist}%{?buildid} ++Release: 0.76.el7.centos%{?_tis_dist}.%{tis_patch_ver} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base License: GPLv3+ diff --git a/grub/grub2/centos/meta_patches/0003-grub2-remove-debug-pkgs.patch b/grub/grub2/centos/meta_patches/0003-grub2-remove-debug-pkgs.patch index b89beac76..7e3a4fbad 100644 --- a/grub/grub2/centos/meta_patches/0003-grub2-remove-debug-pkgs.patch +++ b/grub/grub2/centos/meta_patches/0003-grub2-remove-debug-pkgs.patch @@ -12,7 +12,7 @@ diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec index 88c6c09..11f6b0e 100644 --- a/SPECS/grub2.spec +++ b/SPECS/grub2.spec -@@ -172,7 +172,6 @@ rm -f grub-%{tarversion}/util/grub-setpassword.in.orig +@@ -187,7 +187,6 @@ rm -f grub-%{tarversion}/util/grub-setpassword.in.orig %install set -e rm -fr $RPM_BUILD_ROOT @@ -20,7 +20,7 @@ index 88c6c09..11f6b0e 100644 %do_common_install %if 0%{with_efi_arch} %do_efi_install %{grubefiarch} %{grubefiname} %{grubeficdname} -@@ -199,25 +198,6 @@ cat << EOF > ${RPM_BUILD_ROOT}%{_sysconfdir}/prelink.conf.d/grub2.conf +@@ -215,25 +214,6 @@ cat << EOF > ${RPM_BUILD_ROOT}%{_sysconfdir}/prelink.conf.d/grub2.conf -b /usr/sbin/grub2-sparc64-setup EOF diff --git a/grub/grub2/centos/meta_patches/0004-grub2-remove-32b-requirements.patch b/grub/grub2/centos/meta_patches/0004-grub2-remove-32b-requirements.patch index 4362b126f..bfdbfd219 100644 --- a/grub/grub2/centos/meta_patches/0004-grub2-remove-32b-requirements.patch +++ b/grub/grub2/centos/meta_patches/0004-grub2-remove-32b-requirements.patch @@ -2,7 +2,7 @@ diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec index 11f6b0e..613f2e1 100644 --- a/SPECS/grub2.spec +++ b/SPECS/grub2.spec -@@ -37,11 +37,6 @@ BuildRequires: /usr/lib64/crt1.o glibc-static glibc-devel +@@ -49,11 +49,6 @@ BuildRequires: /usr/lib64/crt1.o glibc-static glibc-devel 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 # will be in an epel-7 (i.e. centos) mock root. I think. diff --git a/grub/grub2/centos/meta_patches/0005-grub2-remove-32b-build.patch b/grub/grub2/centos/meta_patches/0005-grub2-remove-32b-build.patch index e643e99b2..1bb26ce0c 100644 --- a/grub/grub2/centos/meta_patches/0005-grub2-remove-32b-build.patch +++ b/grub/grub2/centos/meta_patches/0005-grub2-remove-32b-build.patch @@ -11,7 +11,7 @@ diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros index 10f74df..075727c 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros -@@ -81,15 +81,6 @@ +@@ -82,15 +82,6 @@ %global legacy_package_arch pc %global platform pc @@ -25,11 +25,11 @@ index 10f74df..075727c 100644 - -e 's/-m64//g' \\\ - ) %{nil} %endif - - %ifarch aarch64 -@@ -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/grub2/ \ + %ifarch %{ix86} + %global target_cpu_name %{_arch} +@@ -401,6 +392,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 \ +find $RPM_BUILD_ROOT -name "grub2-bios-setup*" | xargs rm -f \ if [ -f $RPM_BUILD_ROOT%{_infodir}/grub.info ]; then \ diff --git a/grub/grub2/centos/meta_patches/0006-grub2-ship-lst-files.patch b/grub/grub2/centos/meta_patches/0006-grub2-ship-lst-files.patch index 6f6774dee..73ac89b13 100644 --- a/grub/grub2/centos/meta_patches/0006-grub2-ship-lst-files.patch +++ b/grub/grub2/centos/meta_patches/0006-grub2-ship-lst-files.patch @@ -11,8 +11,8 @@ diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec index 613f2e1..7e11008 100644 --- a/SPECS/grub2.spec +++ b/SPECS/grub2.spec -@@ -265,6 +265,8 @@ fi - +@@ -299,6 +299,8 @@ fi + %ifarch x86_64 %files common -f grub.lang %dir %{_libdir}/grub/ +%dir %{_libdir}/grub/%{grubefiarch}/ 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 index ea8a5a2c0..f92f90958 100644 --- 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 @@ -11,10 +11,10 @@ diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches index bac4594..d7475f0 100644 --- a/SOURCES/grub.patches +++ b/SOURCES/grub.patches -@@ -258,3 +258,4 @@ Patch0257: 0257-set-rootpath.patch - Patch0258: 0258-Fix-one-more-coverity-complaint.patch - Patch0260: 0260-Fix-up-linux-params-usage.patch - Patch0261: 0261-Fix-grub_net_hwaddr_to_str.patch +@@ -286,3 +286,4 @@ Patch0285: 0285-editenv-handle-relative-symlinks.patch + Patch0286: 0286-efinet-also-use-the-firmware-acceleration-for-http.patch + Patch0287: 0287-Make-root_url-reflect-the-protocol-hostname-of-our-b.patch + Patch0289: 0288-efi-uga-Fix-PCIe-LER-when-GRUB2-accesses-non-enabled.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/0008-grub2-Build-unsigned-package.patch index d084875cc..019da45cb 100644 --- a/grub/grub2/centos/meta_patches/0008-grub2-Build-unsigned-package.patch +++ b/grub/grub2/centos/meta_patches/0008-grub2-Build-unsigned-package.patch @@ -11,7 +11,7 @@ diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros index 075727c..5581deb 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros -@@ -215,6 +215,13 @@ Requires: %{name}-common = %{evr} \ +@@ -235,6 +235,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 +25,7 @@ index 075727c..5581deb 100644 %{nil} %global do_common_setup() \ -@@ -289,6 +296,8 @@ done \ +@@ -309,6 +316,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,20 +34,20 @@ index 075727c..5581deb 100644 %{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}}} \ %{nil} -@@ -383,6 +392,8 @@ find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} '\;' \ +@@ -403,6 +412,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 \ -+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 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \ - install -m 755 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \ - install -D -m 644 unicode.pf2 \\\ -@@ -473,4 +484,8 @@ cd .. \ ++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 \ + 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 .. \ %defattr(-,root,root,-) \ - %attr(0755,root,root)/boot/efi/EFI/%{efidir}/%{3} \ - %attr(0755,root,root)/boot/efi/EFI/%{efidir}/fonts \ -+ \ + %attr(0700,root,root)/boot/efi/EFI/%{efidir}/%{3} \ + %attr(0700,root,root)/boot/efi/EFI/%{efidir}/fonts \ ++ \ +%{expand:%%files %{1}-unsigned} \ +/boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \ +/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ diff --git a/grub/grub2/centos/meta_patches/0009-grub2-Build-pxeboot-package.patch b/grub/grub2/centos/meta_patches/0009-grub2-Build-pxeboot-package.patch index c78f4e7f0..129e57dce 100644 --- a/grub/grub2/centos/meta_patches/0009-grub2-Build-pxeboot-package.patch +++ b/grub/grub2/centos/meta_patches/0009-grub2-Build-pxeboot-package.patch @@ -11,7 +11,7 @@ diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros index 5581deb..9ef91d6 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros -@@ -222,6 +222,13 @@ Summary: Unsigned versions of GRUB EFI binaries \ +@@ -242,6 +242,13 @@ Summary: Unsigned versions of GRUB EFI binaries \ %description %{1}-unsigned \ This package contains unsigned version of GRUB EFI binaries. \ \ @@ -25,15 +25,15 @@ index 5581deb..9ef91d6 100644 %{nil} %global do_common_setup() \ -@@ -394,6 +401,7 @@ ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\ +@@ -414,6 +421,7 @@ ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \ - 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 -D -m 755 %{2} $RPM_BUILD_ROOT/pxeboot/EFI/%{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 -D -m 644 unicode.pf2 \\\ -@@ -488,4 +496,8 @@ cd .. \ + 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 \ ++install -D -m 700 %{2} $RPM_BUILD_ROOT/pxeboot/EFI/%{2} \ + 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 .. \ %{expand:%%files %{1}-unsigned} \ /boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \ /boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ diff --git a/grub/grub2/centos/meta_patches/0010-grub2-add-tboot.patch b/grub/grub2/centos/meta_patches/0010-grub2-add-tboot.patch index 847f6e018..242514cf2 100644 --- a/grub/grub2/centos/meta_patches/0010-grub2-add-tboot.patch +++ b/grub/grub2/centos/meta_patches/0010-grub2-add-tboot.patch @@ -12,7 +12,7 @@ diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros index 9ef91d6..ffdd23c 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros -@@ -81,6 +81,10 @@ +@@ -82,6 +82,10 @@ %global legacy_package_arch pc %global platform pc @@ -21,9 +21,9 @@ index 9ef91d6..ffdd23c 100644 +%global wrs_modules "" + %endif - - %ifarch aarch64 -@@ -327,6 +331,7 @@ GRUB_MODULES=" all_video boot btrfs cat chain configfile echo \\\ + %ifarch %{ix86} + %global target_cpu_name %{_arch} +@@ -347,6 +351,7 @@ GRUB_MODULES=" all_video boot btrfs cat chain configfile echo \\\ search_label serial sleep syslinuxcfg test tftp \\\ video xfs" \ GRUB_MODULES+=%{efi_modules} \ @@ -35,9 +35,9 @@ diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches index d7475f0..e24bd8c 100644 --- a/SOURCES/grub.patches +++ b/SOURCES/grub.patches -@@ -259,3 +259,4 @@ Patch0258: 0258-Fix-one-more-coverity-complaint.patch - Patch0260: 0260-Fix-up-linux-params-usage.patch - Patch0261: 0261-Fix-grub_net_hwaddr_to_str.patch +@@ -287,3 +287,4 @@ Patch0286: 0286-efinet-also-use-the-firmware-acceleration-for-http.patch + Patch0287: 0287-Make-root_url-reflect-the-protocol-hostname-of-our-b.patch + Patch0289: 0288-efi-uga-Fix-PCIe-LER-when-GRUB2-accesses-non-enabled.patch Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch +Patch1001: 1001-add-tboot.patch -- diff --git a/grub/grub2/centos/meta_patches/0011-grub2-fix-str-for-6B-macs.patch b/grub/grub2/centos/meta_patches/0011-grub2-fix-str-for-6B-macs.patch index 68a48175c..27d00e42f 100644 --- a/grub/grub2/centos/meta_patches/0011-grub2-fix-str-for-6B-macs.patch +++ b/grub/grub2/centos/meta_patches/0011-grub2-fix-str-for-6B-macs.patch @@ -1,7 +1,8 @@ From 5e0c8a6125403db7e90990d20c1cdda5cb9deb78 Mon Sep 17 00:00:00 2001 From: jmckenna Date: Wed, 28 Mar 2018 14:08:57 -0400 -Subject: Patch GRUB so that it doesn't add a trailing colon after MAC +Subject: [PATCH 11/12] Patch GRUB so that it doesn'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 @@ -15,7 +16,7 @@ diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros index ffdd23c..8fcb272 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros -@@ -81,7 +81,7 @@ +@@ -82,7 +82,7 @@ %global legacy_package_arch pc %global platform pc @@ -28,8 +29,8 @@ diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches index e24bd8c..73ccdee 100644 --- a/SOURCES/grub.patches +++ b/SOURCES/grub.patches -@@ -260,3 +260,5 @@ Patch0260: 0260-Fix-up-linux-params-usage.patch - Patch0261: 0261-Fix-grub_net_hwaddr_to_str.patch +@@ -288,3 +288,5 @@ Patch0287: 0287-Make-root_url-reflect-the-protocol-hostname-of-our-b.patch + Patch0289: 0288-efi-uga-Fix-PCIe-LER-when-GRUB2-accesses-non-enabled.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 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 index 1dab2b34f..8d95c8576 100644 --- 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 @@ -11,7 +11,7 @@ diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros index 8fcb272..cd2da06 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros -@@ -471,8 +471,6 @@ cd .. \ +@@ -488,8 +488,6 @@ cd .. \ %defattr(-,root,root) \ %dir %{_libdir}/grub/%{2}/ \ %{_libdir}/grub/%{2}/* \ diff --git a/grub/grub2/centos/patches/1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch b/grub/grub2/centos/patches/1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch index 68afb58c5..68e665343 100644 --- a/grub/grub2/centos/patches/1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch +++ b/grub/grub2/centos/patches/1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch @@ -11,7 +11,7 @@ diff --git a/grub-core/net/net.c b/grub-core/net/net.c index a6566bd..f3f964e 100644 --- a/grub-core/net/net.c +++ b/grub-core/net/net.c -@@ -794,11 +794,18 @@ grub_net_hwaddr_to_str (const grub_net_link_level_address_t *addr, char *str) +@@ -797,11 +797,18 @@ grub_net_hwaddr_to_str (const grub_net_link_level_address_t *addr, char *str) return; } maxstr = addr->len * grub_strlen ("XX:"); diff --git a/grub/grub2/centos/srpm_path b/grub/grub2/centos/srpm_path index 7eb22e359..996afa187 100644 --- a/grub/grub2/centos/srpm_path +++ b/grub/grub2/centos/srpm_path @@ -1 +1 @@ -mirror:Source/grub2-2.02-0.65.el7.centos.2.src.rpm +mirror:Source/grub2-2.02-0.76.el7.centos.src.rpm