diff --git a/0001-fix-unaligned-point-value-with-GCC9.patch b/0001-fix-unaligned-point-value-with-GCC9.patch deleted file mode 100644 index ea34658..0000000 --- a/0001-fix-unaligned-point-value-with-GCC9.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 6e13a3b539105b2773e43055c2d44912cbba7a29 Mon Sep 17 00:00:00 2001 -From: lei_ju -Date: Wed, 3 Jun 2020 09:03:49 +0800 -Subject: [PATCH] fix unaligned point value with GCC9 - ---- - firmware/2lib/include/2struct.h | 2 +- - firmware/include/gpt.h | 2 +- - firmware/include/vboot_struct.h | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/firmware/2lib/include/2struct.h b/firmware/2lib/include/2struct.h -index 1d5b353..b045a0b 100644 ---- a/firmware/2lib/include/2struct.h -+++ b/firmware/2lib/include/2struct.h -@@ -213,7 +213,7 @@ struct vb2_shared_data { - uint32_t gbb_size; - - --} __attribute__((packed)); -+} __attribute__((aligned)); - - /****************************************************************************/ - -diff --git a/firmware/include/gpt.h b/firmware/include/gpt.h -index 4570237..f1da14d 100644 ---- a/firmware/include/gpt.h -+++ b/firmware/include/gpt.h -@@ -120,7 +120,7 @@ typedef struct { - } attrs; - uint16_t name[36]; /* UTF-16 encoded partition name */ - /* Remainder of entry is reserved and should be 0 */ --} __attribute__((packed)) GptEntry; -+} __attribute__((aligned)) GptEntry; - - #define GPTENTRY_EXPECTED_SIZE 128 - -diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h -index fd5777a..a06d038 100644 ---- a/firmware/include/vboot_struct.h -+++ b/firmware/include/vboot_struct.h -@@ -478,7 +478,7 @@ typedef struct VbSharedDataHeader { - * all the fields it knows about are present. Newer firmware needs to - * use reasonable defaults when accessing older structs. - */ --} __attribute__((packed)) VbSharedDataHeader; -+} __attribute__((aligned)) VbSharedDataHeader; - - /* - * Size of VbSharedDataheader for each version --- -2.23.0 - diff --git a/vboot-utils-00-disable-static-linking.patch b/vboot-utils-00-disable-static-linking.patch deleted file mode 100644 index 4d02711..0000000 --- a/vboot-utils-00-disable-static-linking.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- vboot-utils-a1c5f7c/Makefile.orig 2017-06-04 14:06:10.707762796 +0100 -+++ vboot-utils-a1c5f7c/Makefile 2017-06-04 14:07:04.347718848 +0100 -@@ -227,12 +227,6 @@ - CXX ?= g++ - PKG_CONFIG ?= pkg-config - --# Static? --ifneq (${STATIC},) --LDFLAGS += -static --PKG_CONFIG += --static --endif -- - # Determine QEMU architecture needed, if any - ifeq (${ARCH},${HOST_ARCH}) - # Same architecture; no need for QEMU -@@ -999,7 +993,6 @@ - # Link tests for external repos - ${BUILD}/host/linktest/extern: ${HOSTLIB} - ${BUILD}/host/linktest/extern: LIBS = ${HOSTLIB} --${BUILD}/host/linktest/extern: LDLIBS += -static - TEST_OBJS += ${BUILD}/host/linktest/extern.o - - .PHONY: hostlib -@@ -1090,9 +1083,6 @@ - ${UTIL_BINS} ${UTIL_BINS_STATIC}: ${UTILLIB} - ${UTIL_BINS} ${UTIL_BINS_STATIC}: LIBS = ${UTILLIB} - --# Utilities for auto-update toolkits must be statically linked. --${UTIL_BINS_STATIC}: LDFLAGS += -static -- - - .PHONY: utils - utils: ${UTIL_BINS} ${UTIL_SCRIPTS} -@@ -1124,7 +1114,7 @@ - - ${FUTIL_STATIC_BIN}: ${FUTIL_STATIC_OBJS} ${UTILLIB} - @${PRINTF} " LD $(subst ${BUILD}/,,$@)\n" -- ${Q}${LD} -o $@ ${CFLAGS} ${LDFLAGS} -static $^ ${LDLIBS} -+ ${Q}${LD} -o $@ ${CFLAGS} ${LDFLAGS} $^ ${LDLIBS} - - ${FUTIL_BIN}: LDLIBS += ${CRYPTO_LIBS} ${FWLIB20} - ${FUTIL_BIN}: ${FUTIL_OBJS} ${UTILLIB} ${FWLIB20} ${UTILBDB} diff --git a/vboot-utils-595108c0-gcc10.patch b/vboot-utils-595108c0-gcc10.patch new file mode 100644 index 0000000..d1e545a --- /dev/null +++ b/vboot-utils-595108c0-gcc10.patch @@ -0,0 +1,13 @@ +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 diff --git a/vboot-utils-2cc35b0.tar.xz b/vboot-utils-595108c0.tar.xz similarity index 79% rename from vboot-utils-2cc35b0.tar.xz rename to vboot-utils-595108c0.tar.xz index 85b334b..5c1f9ec 100644 Binary files a/vboot-utils-2cc35b0.tar.xz and b/vboot-utils-595108c0.tar.xz differ diff --git a/vboot-utils-cflags.patch b/vboot-utils-cflags.patch deleted file mode 100644 index 32794e2..0000000 --- a/vboot-utils-cflags.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- vboot-utils-a1c5f7c/Makefile.orig 2017-06-04 13:24:39.666009720 +0100 -+++ vboot-utils-a1c5f7c/Makefile 2017-06-04 13:25:23.960977143 +0100 -@@ -158,7 +158,7 @@ - else - # FIRMWARE_ARCH not defined; assuming local compile. - CC ?= gcc --CFLAGS += -DCHROMEOS_ENVIRONMENT -Wall ${WERROR} ${DEBUG_FLAGS} -+CFLAGS += $(COMMON_FLAGS) -DCHROMEOS_ENVIRONMENT -Wall ${WERROR} ${DEBUG_FLAGS} - endif - - ifneq (${CUSTOM_MUSIC},) diff --git a/vboot-utils.spec b/vboot-utils.spec index 929c0bc..52c8fe1 100644 --- a/vboot-utils.spec +++ b/vboot-utils.spec @@ -1,22 +1,20 @@ %define _default_patch_fuzz 2 Name: vboot-utils -Version: 20180531 -Release: 5 +Version: 20190823 +Release: 6 Summary: Chromium OS verified boot utility License: BSD URL: https://chromium.googlesource.com/chromiumos/platform/vboot_reference ExclusiveArch: aarch64 x86_64 -Source0: %{name}-2cc35b0.tar.xz -Patch0001: vboot-utils-00-disable-static-linking.patch -Patch0002: vboot-utils-cflags.patch -Patch0003: 0001-fix-unaligned-point-value-with-GCC9.patch +Source0: %{name}-595108c0.tar.xz +Patch0001: vboot-utils-595108c0-gcc10.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-2cc35b0 -p1 +%autosetup -n vboot-utils-595108c0 -p1 %build %ifarch aarch64 @@ -29,6 +27,8 @@ manage gpt partitions. %install %make_install V=1 DESTDIR=%{buildroot}/usr ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS" +rm -rf %{buildroot}/usr/lib/pkgconfig/ +rm -rf %{buildroot}/usr/default/ %check make runtests || true @@ -36,10 +36,11 @@ make runtests || true %files %doc README LICENSE %{_bindir}/* -/usr/default/ -/usr/lib/pkgconfig/ %changelog +* Fri 30 Jul 2021 sunguoshuai - 20190823-6 +- upgrade to 20190823 + * Tue Oct 27 2020 Anan Fu - 20180531-5 - disable python2