diff --git a/grub/grub2/centos/build_srpm.data b/grub/grub2/centos/build_srpm.data index 13895e83d..2b07debcb 100644 --- a/grub/grub2/centos/build_srpm.data +++ b/grub/grub2/centos/build_srpm.data @@ -1,3 +1,3 @@ COPY_LIST="" -TIS_PATCH_VER=4 +TIS_PATCH_VER=12 BUILD_IS_SLOW=8 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 c9b76e513..17035c775 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 @@ -1,28 +1,13 @@ -From 7cb38901901be87761aee423b1c2f96b9907d785 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Tue, 3 Jan 2017 13:45:49 -0500 -Subject: [PATCH 1/2] WRS: - 0001-grub2-Update-package-versioning-for-TIS-format.patch - -Conflicts: - SPECS/grub2.spec ---- - SPECS/grub2.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec -index 9259c13..5baf5c4 100644 +index a56d930..a4e87f5 100644 --- a/SPECS/grub2.spec +++ b/SPECS/grub2.spec -@@ -45,7 +45,7 @@ +@@ -8,7 +8,7 @@ Name: grub2 Epoch: 1 Version: 2.02 --Release: 0.44%{?dist} -+Release: 0.44.el7.centos%{?_tis_dist}.%{tis_patch_ver} +-Release: 0.64%{?dist}%{?buildid} ++Release: 0.64.el7.centos%{?_tis_dist}.%{tis_patch_ver} Summary: Bootloader with support for Linux, Multiboot and more - Group: System Environment/Base --- -1.8.3.1 - + License: GPLv3+ diff --git a/grub/grub2/centos/meta_patches/0002-1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch b/grub/grub2/centos/meta_patches/0002-1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch deleted file mode 100644 index a3259576d..000000000 --- a/grub/grub2/centos/meta_patches/0002-1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 662913fede85b09f54e5272451e4dc3f295a4e05 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Tue, 3 Jan 2017 15:55:20 -0500 -Subject: [PATCH] WRS: spec-10_linux-mktitle-de-brand-the-grub.cfg-menu.patch - ---- - SOURCES/grub.patches | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches -index 8c7d946..fcd0a51 100644 ---- a/SOURCES/grub.patches -+++ b/SOURCES/grub.patches -@@ -210,3 +210,4 @@ Patch0210: 0210-Fix-duplicate-shell-entries-1226325.patch - Patch0211: 0211-Coverity-rightly-noticed-that-grub_ipv6_get_masksize.patch - Patch0212: 0212-Export-grub-get-kernel-settings-variables.patch - Patch0213: 0213-Normalize-slashes-in-tftp-paths.patch -+Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch --- -1.8.3.1 - diff --git a/grub/grub2/centos/meta_patches/0002-grub2-fix-cflags.patch b/grub/grub2/centos/meta_patches/0002-grub2-fix-cflags.patch new file mode 100644 index 000000000..b01b1ce97 --- /dev/null +++ b/grub/grub2/centos/meta_patches/0002-grub2-fix-cflags.patch @@ -0,0 +1,22 @@ +diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros +index 168b89b..c9e5177 100644 +--- a/SOURCES/grub.macros ++++ b/SOURCES/grub.macros +@@ -12,16 +12,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-Build-unsigned-package.patch b/grub/grub2/centos/meta_patches/0003-grub2-Build-unsigned-package.patch deleted file mode 100644 index add774672..000000000 --- a/grub/grub2/centos/meta_patches/0003-grub2-Build-unsigned-package.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec -index 9c32a93..676572e 100644 ---- a/SPECS/grub2.spec -+++ b/SPECS/grub2.spec -@@ -140,6 +140,16 @@ bootloader with modular architecture. It support rich varietyof kernel formats, - file systems, computer architectures and hardware devices. This subpackage - provides tools for support of all platforms. - -+%ifarch %{efiarchs} -+%ifnarch aarch64 -+%package efi-unsigned -+Summary: Unsigned versions of GRUB EFI binaries -+ -+%description efi-unsigned -+This package contains unsigned version of GRUB EFI binaries. -+%endif # aarch64 -+%endif # %{efiarchs} -+ - %prep - %setup -T -c -n grub-%{tarversion} - %ifarch %{efiarchs} -@@ -210,6 +220,10 @@ GRUB_MODULES="${GRUB_MODULES} linuxefi" - -d grub-core ${GRUB_MODULES} - ./grub-mkimage -O %{grubefiarch} -o %{grubeficdname}.orig -p /EFI/BOOT \ - -d grub-core ${GRUB_MODULES} -+ -+cp %{grubefiname}.orig %{grubefiname}.unsigned -+cp %{grubeficdname}.orig %{grubeficdname}.unsigned -+ - %ifarch aarch64 - mv %{grubefiname}.orig %{grubefiname} - mv %{grubeficdname}.orig %{grubeficdname} -@@ -292,6 +306,12 @@ do - TGT=$(echo $MODULE |sed "s,$RPM_BUILD_ROOT,.debugroot,") - # install -m 755 -D $BASE$EXT $TGT - done -+%ifarch %{efiarchs} -+%ifnarch aarch64 -+install -m 755 %{grubefiname}.unsigned $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned -+install -m 755 %{grubeficdname}.unsigned $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned -+%endif -+%endif - install -m 755 %{grubefiname} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{grubefiname} - install -m 755 %{grubeficdname} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{grubeficdname} - install -D -m 644 unicode.pf2 $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/fonts/unicode.pf2 -@@ -444,7 +464,9 @@ fi - %files efi - %defattr(-,root,root,-) - %config(noreplace) %{_sysconfdir}/%{name}-efi.cfg --%attr(0755,root,root)/boot/efi/EFI/%{efidir} -+%attr(0755,root,root) %dir /boot/efi/EFI/%{efidir} -+%attr(0755,root,root)/boot/efi/EFI/%{efidir}/%{grubefiname} -+%attr(0755,root,root)/boot/efi/EFI/%{efidir}/%{grubeficdname} - %attr(0755,root,root)/boot/efi/EFI/%{efidir}/fonts - %ghost %config(noreplace) /boot/efi/EFI/%{efidir}/grub.cfg - %doc grub-%{tarversion}/COPYING -@@ -520,6 +542,14 @@ fi - %dir %{_datarootdir}/grub/themes - %exclude %{_datarootdir}/grub/themes/starfield - -+%ifarch %{efiarchs} -+%ifnarch aarch64 -+%files efi-unsigned -+/boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned -+/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned -+%endif -+%endif -+ - %changelog - * Sun Nov 20 2016 Johnny Hughes - 2.02-0.44 - - Roll in CentOS Secureboot keys - 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 new file mode 100644 index 000000000..ed2029d57 --- /dev/null +++ b/grub/grub2/centos/meta_patches/0003-grub2-remove-debug-pkgs.patch @@ -0,0 +1,46 @@ +diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec +index 4059aea..a56d930 100644 +--- a/SPECS/grub2.spec ++++ b/SPECS/grub2.spec +@@ -176,7 +176,6 @@ This subpackage provides tools for support of all platforms. + %install + set -e + rm -fr $RPM_BUILD_ROOT +- + %do_common_install + # Fix for hardcoded efidir + sed -i.orig -e 's@/efi/EFI/redhat/@/efi/EFI/%{efidir}/@' \ +@@ -184,7 +183,6 @@ sed -i.orig -e 's@/efi/EFI/redhat/@/efi/EFI/%{efidir}/@' \ + touch --reference=grub-%{tarversion}/util/grub-setpassword.in.orig \ + grub-%{tarversion}/util/grub-setpassword.in + rm -f grub-%{tarversion}/util/grub-setpassword.in.orig +- + %if 0%{with_efi_arch} + %do_efi_install %{grubefiarch} %{grubefiname} %{grubeficdname} + %endif +@@ -210,25 +208,6 @@ cat << EOF > ${RPM_BUILD_ROOT}%{_sysconfdir}/prelink.conf.d/grub2.conf + -b /usr/sbin/grub2-sparc64-setup + EOF + +-# Don't run debuginfo on all the grub modules and whatnot; it just +-# rejects them, complains, and slows down extraction. +-%global finddebugroot "%{_builddir}/%{?buildsubdir}/debug" +- +-%global dip RPM_BUILD_ROOT=%{finddebugroot} %{__debug_install_post} +-%define __debug_install_post ( \ +- mkdir -p %{finddebugroot}/usr \ +- mv ${RPM_BUILD_ROOT}/usr/bin %{finddebugroot}/usr/bin \ +- mv ${RPM_BUILD_ROOT}/usr/sbin %{finddebugroot}/usr/sbin \ +- %{dip} \ +- install -m 0755 -d %{buildroot}/usr/lib/ %{buildroot}/usr/src/ \ +- cp -al %{finddebugroot}/usr/lib/debug/ \\\ +- %{buildroot}/usr/lib/debug/ \ +- cp -al %{finddebugroot}/usr/src/debug/ \\\ +- %{buildroot}/usr/src/debug/ ) \ +- mv %{finddebugroot}/usr/bin %{buildroot}/usr/bin \ +- mv %{finddebugroot}/usr/sbin %{buildroot}/usr/sbin \ +- %{nil} +- + %clean + rm -rf $RPM_BUILD_ROOT + diff --git a/grub/grub2/centos/meta_patches/0004-grub2-Build-pxeboot-package.patch b/grub/grub2/centos/meta_patches/0004-grub2-Build-pxeboot-package.patch deleted file mode 100644 index 6b36fa1ce..000000000 --- a/grub/grub2/centos/meta_patches/0004-grub2-Build-pxeboot-package.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec -index 53778b3..4829e91 100644 ---- a/SPECS/grub2.spec -+++ b/SPECS/grub2.spec -@@ -149,6 +149,14 @@ Summary: Unsigned versions of GRUB EFI binaries - - %description efi-unsigned - This package contains unsigned version of GRUB EFI binaries. -+ -+%package efi-pxeboot -+Summary: PXE bootable GRUB EFI binaries -+ -+%description efi-pxeboot -+This package contains the version of EFI GRUB that is served by the pxeboot -+server -+ - %endif # aarch64 - %endif # %{efiarchs} - -@@ -312,6 +320,7 @@ done - %ifnarch aarch64 - install -m 755 %{grubefiname}.unsigned $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned - install -m 755 %{grubeficdname}.unsigned $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned -+install -D -m 755 %{grubefiname} $RPM_BUILD_ROOT/pxeboot/EFI/%{grubefiname} - %endif - %endif - install -m 755 %{grubefiname} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{grubefiname} -@@ -546,9 +555,14 @@ fi - - %ifarch %{efiarchs} - %ifnarch aarch64 -+ - %files efi-unsigned - /boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned - /boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned -+ -+%files efi-pxeboot -+/pxeboot/EFI/%{grubefiname} -+ - %endif - %endif - 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 new file mode 100644 index 000000000..82fed5be0 --- /dev/null +++ b/grub/grub2/centos/meta_patches/0004-grub2-remove-32b-requirements.patch @@ -0,0 +1,16 @@ +diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec +index a4e87f5..95fa027 100644 +--- a/SPECS/grub2.spec ++++ b/SPECS/grub2.spec +@@ -39,11 +39,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. +-%if 0%{?centos}%{?mock} +-BuildRequires: /usr/lib/crt1.o glibc-static(x86-32) glibc-devel(x86-32) +-%else +-BuildRequires: /usr/lib/crt1.o glibc32 +-%endif + %else + # ppc64 builds need the ppc crt1.o + BuildRequires: /usr/lib/crt1.o glibc-static glibc-devel diff --git a/grub/grub2/centos/meta_patches/0005-add-tboot.patch b/grub/grub2/centos/meta_patches/0005-add-tboot.patch deleted file mode 100644 index 56396eaa4..000000000 --- a/grub/grub2/centos/meta_patches/0005-add-tboot.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 69f56affb4e910470072b79824f3c6ecccefa4c2 Mon Sep 17 00:00:00 2001 -From: Bin Qian -Date: Wed, 6 Dec 2017 10:45:42 -0500 -Subject: [PATCH 1/1] WRS: Add tboot support - ---- - SPECS/grub2.spec | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec -index 4d92bf9..5719df6 100644 ---- a/SPECS/grub2.spec -+++ b/SPECS/grub2.spec -@@ -65,6 +65,7 @@ Source6: gitignore - %include %{SOURCE3} - - Patch9999: 0001-centos-grub2-password-fix.patch -+Patch10001: 10001-add-tboot.patch - - BuildRequires: flex bison binutils python - BuildRequires: ncurses-devel xz-devel bzip2-devel -@@ -119,7 +120,7 @@ provides support for EFI systems. - Summary: Modules used to build custom grub.efi images - Group: System Environment/Base - Requires: %{name}-tools = %{epoch}:%{version}-%{release} --Obsoletes: grub2-efi <= 1:2.00-20%{?dist} -+# Obsoletes: grub2-efi <= 1:2.00-20%{?dist} - - %description efi-modules - The GRand Unified Bootloader (GRUB) is a highly configurable and customizable -@@ -219,6 +220,10 @@ GRUB_MODULES=" all_video boot btrfs cat chain configfile echo efifwsetup \ - part_apple part_msdos part_gpt password_pbkdf2 png \ - reboot search search_fs_uuid search_fs_file search_label \ - sleep syslinuxcfg test tftp regexp video xfs" -+ -+# WRS: Adding new modules for tboot support -+GRUB_MODULES="${GRUB_MODULES} multiboot multiboot2" -+ - %ifarch aarch64 - GRUB_MODULES="${GRUB_MODULES} linux" - %else --- -1.8.3.1 - 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 new file mode 100644 index 000000000..b909ad68a --- /dev/null +++ b/grub/grub2/centos/meta_patches/0005-grub2-remove-32b-build.patch @@ -0,0 +1,40 @@ +From 3a2d3bf327d82d3d916fa1a14b3dbbe84023a29c Mon Sep 17 00:00:00 2001 +From: root +Date: Mon, 22 Jan 2018 16:05:57 -0500 +Subject: [PATCH] macros + +--- + SOURCES/grub.macros | 14 +++----------- + 1 file changed, 3 insertions(+), 11 deletions(-) + +diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros +index c9e5177..f03bc1a 100755 +--- a/SOURCES/grub.macros ++++ b/SOURCES/grub.macros +@@ -78,15 +78,6 @@ + %global legacy_package_arch pc + %global platform pc + +-%global alt_efi_arch ia32 +-%global alt_target_cpu_name i386 +-%global alt_grub_target_name i386-efi +-%global alt_platform efi +-%global alt_package_arch efi-ia32 +-%global alt_efi_cflags %(echo %{efi_cflags} | \\\ +- sed \\\ +- -e 's/-m64//g' \\\ +- ) %{nil} + %endif + + %ifarch aarch64 +@@ -378,6 +369,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/ \ + 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 \ + rm -f $RPM_BUILD_ROOT%{_infodir}/grub.info \ + fi \ +-- +1.8.3.1 + 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 new file mode 100644 index 000000000..4d4d1605a --- /dev/null +++ b/grub/grub2/centos/meta_patches/0006-grub2-ship-lst-files.patch @@ -0,0 +1,25 @@ +From c5f65a1bf71e37f73bb102472b2f067f50da1079 Mon Sep 17 00:00:00 2001 +From: root +Date: Tue, 23 Jan 2018 09:24:16 -0500 +Subject: [PATCH] ship .lst files + +--- + SPECS/grub2.spec | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec +index dcb0e64..85ee94d 100755 +--- a/SPECS/grub2.spec ++++ b/SPECS/grub2.spec +@@ -275,6 +275,8 @@ fi + + %files common -f grub.lang + %dir %{_libdir}/grub/ ++%dir %{_libdir}/grub/%{grubefiarch}/ ++%{_libdir}/grub/%{grubefiarch}/*.lst + %dir %{_datarootdir}/grub/ + %dir %{_datarootdir}/grub/themes/ + %exclude %{_datarootdir}/grub/themes/* +-- +1.8.3.1 + 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 new file mode 100644 index 000000000..d73d3f110 --- /dev/null +++ b/grub/grub2/centos/meta_patches/0007-1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch @@ -0,0 +1,21 @@ +From 38914a0de0b29f5f0efbf3e93a60fa8596f160e7 Mon Sep 17 00:00:00 2001 +From: root +Date: Tue, 23 Jan 2018 13:29:11 -0500 +Subject: [PATCH 1/4] 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 2ef8ce5..b69fb31 100644 +--- a/SOURCES/grub.patches ++++ b/SOURCES/grub.patches +@@ -257,3 +257,4 @@ Patch0256: 0256-efinet-Setting-DNS-server-from-UEFI-protocol.patch + Patch0257: 0257-set-rootpath.patch + Patch0258: 0258-Fix-one-more-coverity-complaint.patch + Patch0260: 0260-Fix-up-linux-params-usage.patch ++Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch +-- +1.8.3.1 + 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 new file mode 100644 index 000000000..f3ee9ca07 --- /dev/null +++ b/grub/grub2/centos/meta_patches/0008-grub2-Build-unsigned-package.patch @@ -0,0 +1,57 @@ +From 0e70c8a35c4434fa23717228cfa819bd64ed082f Mon Sep 17 00:00:00 2001 +From: root +Date: Tue, 23 Jan 2018 14:46:01 -0500 +Subject: [PATCH 2/4] add unsigned package + +--- + SOURCES/grub.macros | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros +index f03bc1a..486604c 100755 +--- a/SOURCES/grub.macros ++++ b/SOURCES/grub.macros +@@ -212,6 +212,13 @@ Requires: %{name}-common = %{evr} \ + %{expand:%%description %{1}-cdboot} \ + %{desc} \ + This subpackage provides optional components of grub used with removeable media on %{1} systems.\ ++ \ ++%package %{1}-unsigned \ ++Summary: Unsigned versions of GRUB EFI binaries \ ++ \ ++%description %{1}-unsigned \ ++This package contains unsigned version of GRUB EFI binaries. \ ++ \ + %{nil} + + %global do_common_setup() \ +@@ -286,6 +293,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} \ ++cp %{2}.orig %{2}.unsigned \ ++cp %{3}.orig %{3}.unsigned \ + %{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} +@@ -380,6 +389,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 \\\ +@@ -470,4 +481,8 @@ cd .. \ + %defattr(-,root,root,-) \ + %attr(0755,root,root)/boot/efi/EFI/%{efidir}/%{3} \ + %attr(0755,root,root)/boot/efi/EFI/%{efidir}/fonts \ ++ \ ++%{expand:%%files %{1}-unsigned} \ ++/boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \ ++/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ + %{nil} +-- +1.8.3.1 + 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 new file mode 100644 index 000000000..dc8af1d79 --- /dev/null +++ b/grub/grub2/centos/meta_patches/0009-grub2-Build-pxeboot-package.patch @@ -0,0 +1,47 @@ +From 22076d1eea7ccb10541073c7318043d7634b7852 Mon Sep 17 00:00:00 2001 +From: root +Date: Tue, 23 Jan 2018 14:57:29 -0500 +Subject: [PATCH 3/4] add pxeboot package + +--- + SOURCES/grub.macros | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros +index 486604c..40cb5d5 100755 +--- a/SOURCES/grub.macros ++++ b/SOURCES/grub.macros +@@ -219,6 +219,13 @@ Summary: Unsigned versions of GRUB EFI binaries \ + %description %{1}-unsigned \ + This package contains unsigned version of GRUB EFI binaries. \ + \ ++%package %{1}-pxeboot \ ++Summary: PXE bootable GRUB EFI binaries \ ++ \ ++%description %{1}-pxeboot \ ++This package contains the version of EFI GRUB that is served by the pxeboot \ ++server \ ++ \ + %{nil} + + %global do_common_setup() \ +@@ -391,6 +398,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 \\\ +@@ -485,4 +493,8 @@ cd .. \ + %{expand:%%files %{1}-unsigned} \ + /boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \ + /boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ ++ \ ++%{expand:%%files %{1}-pxeboot} \ ++/pxeboot/EFI/%{grubefiname} \ ++ \ + %{nil} +-- +1.8.3.1 + diff --git a/grub/grub2/centos/meta_patches/0010-grub2-add-tboot.patch b/grub/grub2/centos/meta_patches/0010-grub2-add-tboot.patch new file mode 100644 index 000000000..b5a7c854f --- /dev/null +++ b/grub/grub2/centos/meta_patches/0010-grub2-add-tboot.patch @@ -0,0 +1,45 @@ +From 9f0825676d399b40dd28ea405f09d26c9459f1e8 Mon Sep 17 00:00:00 2001 +From: jmckenna +Date: Wed, 28 Mar 2018 12:53:34 -0400 +Subject: [PATCH 1/2] WRS: 0010-grub2-add-tboot.patch + +--- + SOURCES/grub.macros | 5 +++++ + SOURCES/grub.patches | 1 + + 2 files changed, 6 insertions(+) + +diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros +index 40cb5d5..247bb71 100755 +--- a/SOURCES/grub.macros ++++ b/SOURCES/grub.macros +@@ -78,6 +78,10 @@ + %global legacy_package_arch pc + %global platform pc + ++%global wrs_modules " multiboot multiboot2" ++%else ++%global wrs_modules "" ++ + %endif + + %ifarch aarch64 +@@ -324,6 +328,7 @@ GRUB_MODULES=" all_video boot btrfs cat chain configfile echo \\\ + search_label serial sleep syslinuxcfg test tftp \\\ + video xfs" \ + GRUB_MODULES+=%{efi_modules} \ ++GRUB_MODULES+=%{wrs_modules} \ + %{expand:%%{mkimage %{1} %{2} %{3} %{4} %{5} %{6} %{7}}} \ + %{nil} + +diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches +index b69fb31..5e63d71 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 + Patch1000: 1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch ++Patch1001: 1001-add-tboot.patch +-- +1.8.3.1 + 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 new file mode 100644 index 000000000..636b97fbe --- /dev/null +++ b/grub/grub2/centos/meta_patches/0011-grub2-fix-str-for-6B-macs.patch @@ -0,0 +1,40 @@ +From f38f3a21e50130d5807088bae79c163233271a97 Mon Sep 17 00:00:00 2001 +From: jmckenna +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 + 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. +--- + SOURCES/grub.macros | 2 +- + SOURCES/grub.patches | 4 +++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros +index 247bb71..908315d 100755 +--- a/SOURCES/grub.macros ++++ b/SOURCES/grub.macros +@@ -78,7 +78,7 @@ + %global legacy_package_arch pc + %global platform pc + +-%global wrs_modules " multiboot multiboot2" ++%global wrs_modules " multiboot multiboot2 regexp" + %else + %global wrs_modules "" + +diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches +index 5e63d71..688d81b 100644 +--- a/SOURCES/grub.patches ++++ b/SOURCES/grub.patches +@@ -259,3 +259,5 @@ Patch0258: 0258-Fix-one-more-coverity-complaint.patch + Patch0260: 0260-Fix-up-linux-params-usage.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 ++ +-- +1.8.3.1 + 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 new file mode 100644 index 000000000..137fb1303 --- /dev/null +++ b/grub/grub2/centos/meta_patches/0012-grub2-Don-t-strip-img-files-from-non-EFI-build.patch @@ -0,0 +1,25 @@ +From a62820e84598cf6007a751db01567a8a2ac8d369 Mon Sep 17 00:00:00 2001 +From: root +Date: Fri, 6 Apr 2018 11:36:01 -0400 +Subject: [PATCH] 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 4e3bdc0..f403c91 100755 +--- a/SOURCES/grub.macros ++++ b/SOURCES/grub.macros +@@ -468,8 +468,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} + +-- +1.8.3.1 + diff --git a/grub/grub2/centos/meta_patches/PATCH_ORDER b/grub/grub2/centos/meta_patches/PATCH_ORDER index 09b8b4943..f11838a64 100644 --- a/grub/grub2/centos/meta_patches/PATCH_ORDER +++ b/grub/grub2/centos/meta_patches/PATCH_ORDER @@ -1,5 +1,12 @@ 0001-grub2-Update-package-versioning-for-TIS-format.patch -0002-1000_linux-mktitle-de-brand-the-grub.cfg-menu.patch -0003-grub2-Build-unsigned-package.patch -0004-grub2-Build-pxeboot-package.patch -0005-add-tboot.patch +0002-grub2-fix-cflags.patch +0003-grub2-remove-debug-pkgs.patch +0004-grub2-remove-32b-requirements.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 diff --git a/grub/grub2/centos/patches/10001-add-tboot.patch b/grub/grub2/centos/patches/1001-add-tboot.patch similarity index 100% rename from grub/grub2/centos/patches/10001-add-tboot.patch rename to grub/grub2/centos/patches/1001-add-tboot.patch 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 new file mode 100644 index 000000000..5558adba0 --- /dev/null +++ b/grub/grub2/centos/patches/1002-Don-t-write-trailing-colon-when-populating-MAC-strin.patch @@ -0,0 +1,37 @@ +From f521055ce4f334a942d23ccab6ad6b0366c0a204 Mon Sep 17 00:00:00 2001 +From: root +Date: Wed, 28 Mar 2018 11:23:17 -0400 +Subject: [PATCH] Don't write trailing colon when populating MAC string + +--- + grub-core/net/net.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/grub-core/net/net.c b/grub-core/net/net.c +index 6b4b10b..a637da5 100644 +--- a/grub-core/net/net.c ++++ b/grub-core/net/net.c +@@ -792,11 +792,19 @@ grub_net_hwaddr_to_str (const grub_net_link_level_address_t *addr, char *str) + addr->type, addr->len); + return; + } +- for (ptr = str, i = 0; i < addr->len; i++) ++ ++ if (addr->len == 0) ++ { ++ return; ++ } ++ ++ for (ptr = str, i = 0; i < (addr->len - 1); i++) + { + ptr += grub_snprintf (ptr, GRUB_NET_MAX_STR_HWADDR_LEN - (ptr - str), + "%02x:", addr->mac[i] & 0xff); + } ++ ptr += grub_snprintf (ptr, GRUB_NET_MAX_STR_HWADDR_LEN - (ptr - str), ++ "%02x", addr->mac[i] & 0xff); + } + + int +-- +1.8.3.1 + diff --git a/grub/grub2/centos/srpm_path b/grub/grub2/centos/srpm_path index 404d20b3d..3deeb3024 100644 --- a/grub/grub2/centos/srpm_path +++ b/grub/grub2/centos/srpm_path @@ -1 +1 @@ -mirror:Source/grub2-2.02-0.44.el7.centos.src.rpm +mirror:Source/grub2-2.02-0.64.el7.centos.src.rpm