From 01e5499b45dc0f4806ec63d14005da48a5445ac4 Mon Sep 17 00:00:00 2001 From: Qiumiao Zhang Date: Thu, 16 Nov 2023 11:26:06 +0800 Subject: [PATCH] support openEuler signature Signed-off-by: Qiumiao Zhang (cherry picked from commit ff7aab7c6032ca8c05300ebc886d3d6c8c58af2f) --- grub2.spec | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/grub2.spec b/grub2.spec index 440f7bc..b24a87d 100644 --- a/grub2.spec +++ b/grub2.spec @@ -14,7 +14,7 @@ Name: grub2 Epoch: 1 Version: 2.06 -Release: 38 +Release: 39 Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -41,6 +41,10 @@ BuildRequires: freetype-devel libusb-devel bzip2-devel rpm-devel rpm-libs BuildRequires: autoconf automake device-mapper-devel freetype-devel git BuildRequires: texinfo gettext-devel dejavu-sans-fonts help2man systemd fuse-devel +%if 0%{?openEuler_sign_rsa} +BuildRequires: sign-openEuler +%endif + %ifarch %{golang_arches} BuildRequires: pesign >= 0.99-8 %endif @@ -197,6 +201,10 @@ makeinfo --info --no-split -I docs -o docs/grub-dev.info docs/grub-dev.texi makeinfo --info --no-split -I docs -o docs/grub.info docs/grub.texi makeinfo --html --no-split -I docs -o docs/grub-dev.html docs/grub-dev.texi makeinfo --html --no-split -I docs -o docs/grub.html docs/grub.texi +%if 0%{?openEuler_sign_rsa} +/opt/sign-openEuler/client --config /opt/sign-openEuler/config.toml add --key-name default-x509ee --file-type efi-image --key-type x509ee --sign-type authenticode %{_builddir}/grub-%{version}/grub-%{grubefiarch}-%{tarversion}/%{grubefiname} +/opt/sign-openEuler/client --config /opt/sign-openEuler/config.toml add --key-name default-x509ee --file-type efi-image --key-type x509ee --sign-type authenticode %{_builddir}/grub-%{version}/grub-%{grubefiarch}-%{tarversion}/%{grubeficdname} +%endif %check pushd %{_builddir}/%{?buildsubdir}/grub-%{grubefiarch}-%{tarversion}/grub-core @@ -440,6 +448,12 @@ fi %{_datadir}/man/man* %changelog +* Thu Nov 16 2023 zhangqiumiao - 1:2.06-39 +- Type:requirement +- CVE:NA +- SUG:NA +- DESC:support openEuler signature + * Sat Oct 7 2023 zhangqiumiao - 1:2.06-38 - Type:CVE - CVE:CVE-2023-4692 CVE-2023-4693