!11 Upgrade to 20230127 to fix build error

From: @cherry530 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
This commit is contained in:
openeuler-ci-bot 2023-07-22 06:36:38 +00:00 committed by Gitee
commit 2676efa3fa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 79 additions and 23 deletions

View File

@ -0,0 +1,48 @@
From f9ae6c12bd0b67ee336089ce15d5255d7d6d11b7 Mon Sep 17 00:00:00 2001
From: Nobel Barakat <nobelbarakat@google.com>
Date: Tue, 22 Nov 2022 00:40:20 +0000
Subject: [PATCH] flashrom: ensure flashrom symbols are not loaded if
!USE_FLASHROM
The linking process during the installation phase of this package
breaks if you compile with make USE_FLASHROM=0. A new conditional has
been added to the make file that prevents utility/crossystem from
compiling if USE_FLASHROM is either not set or set to the number 0.
BUG=b:256682063
TEST=cros_run_unit_tests --board amd64-generic --packages vboot_reference
TEST=env USE="test -flashrom" emerge-amd64-generic vboot_reference
TEST=env USE="-flashrom" emerge-amd64-generic vboot_reference
BRANCH=none
Signed-off-by: Nobel Barakat nobelbarakat@google.com
Change-Id: Ia8cdd24653fdb74c9bb5f4de86b7711b138299cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4045302
Commit-Queue: Nobel Barakat <nobelbarakat@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Nobel Barakat <nobelbarakat@google.com>
---
Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 129ace99a424..cb504ff33a62 100644
--- a/Makefile
+++ b/Makefile
@@ -593,10 +593,13 @@ UTIL_BIN_NAMES_SDK = \
utility/signature_digest_utility \
utility/verify_data
UTIL_BIN_NAMES_BOARD = \
- utility/crossystem \
utility/dumpRSAPublicKey \
utility/tpmc
+ifneq ($(filter-out 0,${USE_FLASHROM}),)
+UTIL_BIN_NAMES_BOARD += utility/crossystem
+endif
+
UTIL_SCRIPTS_SDK = $(addprefix ${BUILD}/,${UTIL_SCRIPT_NAMES_SDK})
UTIL_SCRIPTS_BOARD = $(addprefix ${BUILD}/,${UTIL_SCRIPT_NAMES_BOARD})
UTIL_BINS_SDK = $(addprefix ${BUILD}/,${UTIL_BIN_NAMES_SDK})
--
2.39.1

View File

@ -1,13 +0,0 @@
diff -up vboot-utils-595108c0/futility/futility.h.me vboot-utils-595108c0/futility/futility.h
--- vboot-utils-595108c0/futility/futility.h.me 2020-02-27 15:17:14.991440799 +0100
+++ vboot-utils-595108c0/futility/futility.h 2020-02-27 15:17:48.392751737 +0100
@@ -40,7 +40,7 @@ enum vboot_version {
};
/* What's our preferred API & data format? */
-enum vboot_version vboot_version;
+extern enum vboot_version vboot_version;
/* Here's a structure to define the commands that futility implements. */
struct futil_cmd_t {
diff -up vboot-utils-595108c0/tests/vboot_common_tests.c.me vboot-utils-595108c0/tests/vboot_common_tests.c

View File

@ -0,0 +1,12 @@
diff -ru vboot-utils-61971455-orig/futility/updater_utils.c vboot-utils-61971455/futility/updater_utils.c
--- vboot-utils-61971455-orig/futility/updater_utils.c 2022-06-16 02:45:02.000000000 +0200
+++ vboot-utils-61971455/futility/updater_utils.c 2022-06-20 15:06:24.192678422 +0200
@@ -700,7 +700,7 @@
if (!cmd)
return -1;
- VB2_DEBUG(cmd);
+ VB2_DEBUG("flashrom cmd: %s\n", cmd);
r = system(cmd);
free(cmd);
if (r)

View File

@ -1,20 +1,23 @@
%define _default_patch_fuzz 2
Name: vboot-utils
Version: 20190823
Release: 6
Version: 20230127
Release: 1
Summary: Chromium OS verified boot utility
License: BSD
URL: https://chromium.googlesource.com/chromiumos/platform/vboot_reference
ExclusiveArch: aarch64 x86_64
Source0: %{name}-595108c0.tar.xz
Patch0001: vboot-utils-595108c0-gcc10.patch
Source0: %{name}-9b08a3c4.tar.xz
Patch0: vboot-utils-9b08a3c4.patch
Patch1: flashrom-ensure-flashrom-symbols-are-not-loaded-if-U.patch
BuildRequires: gcc-c++ openssl-devel trousers-devel libyaml-devel xz-devel libuuid-devel python3
%description
Verify boot is a collection of utilities for chromebook computers. Package and sign the kernel and
manage gpt partitions.
%prep
%autosetup -n vboot-utils-595108c0 -p1
%autosetup -n vboot-utils-9b08a3c4 -p1
%build
%ifarch aarch64
@ -23,21 +26,27 @@ manage gpt partitions.
%ifarch x86_64
%global ARCH x86_64
%endif
%make_build V=1 ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS"
%make_build V=1 ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS" USE_FLASHROM=0
%install
%make_install V=1 DESTDIR=%{buildroot}/usr ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS"
%make_install V=1 DESTDIR=%{buildroot} ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS" USE_FLASHROM=0
mkdir -p %{buildroot}%{_datadir}/vboot/
cp -rf tests/devkeys %{buildroot}%{_datadir}/vboot/
rm -rf %{buildroot}/usr/lib/pkgconfig/
rm -rf %{buildroot}/usr/default/
%check
make runtests || true
rm -rf %{buildroot}/etc/default/
rm -rf %{buildroot}/usr/share/vboot/bin/
rm -f %{buildroot}/usr/lib/libvboot_host.a
%files
%doc README LICENSE
%{_bindir}/*
%{_datadir}/vboot/devkeys/
%changelog
* Wed Jul 19 2023 xu_ping <707078654@qq.com> - 20230127-1
- upgrade to 20230127
* Fri Jul 30 2021 sunguoshuai <sunguoshuai@huawei.com> - 20190823-6
- upgrade to 20190823