Github messages for voidlinux
 help / color / mirror / Atom feed
From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] vboot-utils: update to 89.13729.
Date: Sun, 21 Feb 2021 05:32:24 +0100	[thread overview]
Message-ID: <20210221043224.c6y5fknYEjCDHZuxVuCTQyYuunTpBGct1HsnEL3a8ZE@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28911@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1713 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages vboot
https://github.com/void-linux/void-packages/pull/28911

vboot-utils: update to 89.13729.
Also clean up template.

Related #28507.

@ackalker could you please test this out?

@Gottox for awareness

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28911.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-vboot-28911.patch --]
[-- Type: text/x-diff, Size: 6152 bytes --]

From dce6fbc06ac0598c4f273b384e81ab1508619d4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sat, 20 Feb 2021 02:39:02 -0300
Subject: [PATCH] vboot-utils: update to 89.13729.

Also clean up template.

Related #28507.
---
 .../vboot-utils/patches/fix-glibc-2.28.patch  | 13 -----
 srcpkgs/vboot-utils/patches/fix-musl.patch    | 49 -----------------
 .../vboot-utils/patches/format-glibc.patch    |  0
 .../vboot-utils/patches/tpm_lite_stub.patch   | 10 ----
 srcpkgs/vboot-utils/template                  | 52 +++++++++----------
 5 files changed, 24 insertions(+), 100 deletions(-)
 delete mode 100644 srcpkgs/vboot-utils/patches/fix-glibc-2.28.patch
 delete mode 100644 srcpkgs/vboot-utils/patches/fix-musl.patch
 create mode 100644 srcpkgs/vboot-utils/patches/format-glibc.patch
 delete mode 100644 srcpkgs/vboot-utils/patches/tpm_lite_stub.patch

diff --git a/srcpkgs/vboot-utils/patches/fix-glibc-2.28.patch b/srcpkgs/vboot-utils/patches/fix-glibc-2.28.patch
deleted file mode 100644
index 4f091aaf2ce..00000000000
--- a/srcpkgs/vboot-utils/patches/fix-glibc-2.28.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/cgpt/cgpt_wrapper.c b/cgpt/cgpt_wrapper.c
-index 62635f3f..b27a3eef 100644
---- cgpt/cgpt_wrapper.c
-+++ cgpt/cgpt_wrapper.c
-@@ -20,6 +20,7 @@
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <unistd.h>
-+#include <sys/sysmacros.h>
- 
- #include "cgpt.h"
- #include "cgpt_nor.h"
-
diff --git a/srcpkgs/vboot-utils/patches/fix-musl.patch b/srcpkgs/vboot-utils/patches/fix-musl.patch
deleted file mode 100644
index 1819bdc2a56..00000000000
--- a/srcpkgs/vboot-utils/patches/fix-musl.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- firmware/stub/vboot_api_stub_sf.c.orig
-+++ firmware/stub/vboot_api_stub_sf.c
-@@ -5,7 +5,9 @@
-  * Stub implementations of firmware-provided API functions.
-  */
- 
-+#if defined(__GLIBC__)
- #include <execinfo.h>
-+#endif
- #include <stdint.h>
- 
- #define _STUB_IMPLEMENTATION_
-@@ -34,11 +36,13 @@ static struct alloc_node *alloc_head;
- 
- static void print_stacktrace(void)
- {
-+#if defined(__GLIBC__)
- 	void *buffer[MAX_STACK_LEVELS];
- 	int levels = backtrace(buffer, MAX_STACK_LEVELS);
- 
- 	// print to stderr (fd = 2), and remove this function from the trace
- 	backtrace_symbols_fd(buffer + 1, levels - 1, 2);
-+#endif
- }
- 
- void *VbExMalloc(size_t size)
-@@ -57,7 +61,11 @@ void *VbExMalloc(size_t size)
- 	node->next = alloc_head;
- 	node->ptr = p;
- 	node->size = size;
-+#if defined(__GLIBC__)
- 	node->bt_levels = backtrace(node->bt_buffer, MAX_STACK_LEVELS);
-+#else
-+	node->bt_levels = 0;
-+#endif
- 	alloc_head = node;
- 
- 	return p;
-@@ -118,8 +126,10 @@ int vboot_api_stub_check_memory(void)
- 		next = node->next;
- 		fprintf(stderr, "\nptr=%p, size=%zd\n", node->ptr, node->size);
- 		fflush(stderr);
-+#if defined(__GLIBC__)
- 		backtrace_symbols_fd(node->bt_buffer + 1, node->bt_levels - 1,
- 				     2);
-+#endif
- 		free(node);
- 	}
- 
diff --git a/srcpkgs/vboot-utils/patches/format-glibc.patch b/srcpkgs/vboot-utils/patches/format-glibc.patch
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/srcpkgs/vboot-utils/patches/tpm_lite_stub.patch b/srcpkgs/vboot-utils/patches/tpm_lite_stub.patch
deleted file mode 100644
index a736beb856a..00000000000
--- a/srcpkgs/vboot-utils/patches/tpm_lite_stub.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./firmware/stub/tpm_lite_stub.c.orig	2015-06-16 12:29:51.609619681 +0200
-+++ ./firmware/stub/tpm_lite_stub.c	2015-06-16 12:30:01.216620121 +0200
-@@ -14,6 +14,7 @@
- #include "utility.h"
- #include "vboot_api.h"
- 
-+#include <assert.h>
- #include <errno.h>
- #include <fcntl.h>
- #include <stdarg.h>
diff --git a/srcpkgs/vboot-utils/template b/srcpkgs/vboot-utils/template
index 61068975964..dd93cb9151a 100644
--- a/srcpkgs/vboot-utils/template
+++ b/srcpkgs/vboot-utils/template
@@ -1,42 +1,38 @@
 # Template file for 'vboot-utils'
 pkgname=vboot-utils
-version=45.7262
-revision=13
+version=89.13729
+revision=1
+_version=${version/./-}
 archs="x86_64* i686* aarch64* arm*"
-_githash=0e8c964915fffb58032bb59bdb31949de718ca90
-hostmakedepends="pkg-config git"
-makedepends="libressl-devel libuuid-devel liblzma-devel libyaml-devel"
+create_wrksrc=yes
+build_style=gnu-makefile
+make_use_env=yes
+hostmakedepends="pkg-config"
+makedepends="libressl-devel libuuid-devel zlib-devel"
 short_desc="Verified boot kernel utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="https://chromium.googlesource.com/chromiumos/platform/vboot_reference.git"
-CFLAGS='-D_GNU_SOURCE -Wno-error -fcommon'
+distfiles="https://chromium.googlesource.com/chromiumos/platform/vboot_reference.git/+archive/refs/heads/release-R${_version}.B.tar.gz"
+checksum=@3d8edd7e3a1672b29f02d93c4cf89f19ad7477694968b0653aa968783c8ba3e6
+# 2crypto specifies a section for some variables, which lead to text relocations in the binary
+# let's play it safe and disable PIE
+nopie=yes
 
-case "$XBPS_TARGET_MACHINE" in
-	aarch64*) broken="https://build.voidlinux.org/builders/aarch64-musl_builder/builds/8508/steps/shell_3/logs/stdio" ;;
+case $XBPS_TARGET_MACHINE in
+	x86_64*) _arch=x86_64 ;;
+	i686*) _arch=x86 ;;
+	arm*|aarch64*) _arch=arm ;;
+	*) broken="This package doesn't have a configuration for this target" ;;
 esac
+make_build_args="ARCH=${_arch} WERROR="
 
-do_fetch() {
-	git clone https://chromium.googlesource.com/chromiumos/platform/vboot_reference.git $pkgname-$version || true
-	cd $pkgname-$version
-	git checkout $_githash
-}
-
-do_build() {
-	local _arch=
-	sed -i "s/MTD_CHAR_MAJOR/90/" cgpt/cgpt_wrapper.c
-	case $XBPS_TARGET_MACHINE in
-		x86_64*) _arch=x86_64 ;;
-		i686*) _arch=x86 ;;
-		arm*) _arch=arm ;;
-	esac
-	make CC="$CC" LD="$CC" AR="$AR" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
-		MINIMAL=1 ARCH=$_arch ${makejobs} \
-		cgpt utils futil
-}
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" musl-fts-devel"
+	export LDLIBS="-lfts"
+fi
 
-do_install() {
-	make STRIP=true DESTDIR=${DESTDIR} MINIMAL=1 install
+post_install() {
 	vmkdir usr/share/vboot
 	vcopy tests/devkeys usr/share/vboot/devkeys
 	vlicense LICENSE

  parent reply	other threads:[~2021-02-21  4:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-20  5:41 [PR PATCH] " ericonr
2021-02-20  5:42 ` [PR PATCH] [Updated] " ericonr
2021-02-20  5:45 ` ericonr
2021-02-20 22:07 ` ackalker
2021-02-20 22:22 ` ackalker
2021-02-21  3:18 ` ericonr
2021-02-21  4:31 ` [PR PATCH] [Updated] " ericonr
2021-02-21  4:32 ` ericonr [this message]
2021-02-21 19:08 ` ericonr
2021-02-23 21:20 ` [PR PATCH] [Merged]: " ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210221043224.c6y5fknYEjCDHZuxVuCTQyYuunTpBGct1HsnEL3a8ZE@z \
    --to=ericonr@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).