Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] vboot-utils: update to 89.13729.
@ 2021-02-20  5:41 ericonr
  2021-02-20  5:42 ` [PR PATCH] [Updated] " ericonr
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: ericonr @ 2021-02-20  5:41 UTC (permalink / raw)
  To: ml

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

There is a new 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?

<!-- 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: 5696 bytes --]

From 88ad2479ab9616839ca83b144568bf1f614920a6 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/tpm_lite_stub.patch   | 10 ----
 srcpkgs/vboot-utils/template                  | 49 +++++++++----------
 4 files changed, 22 insertions(+), 99 deletions(-)
 delete mode 100644 srcpkgs/vboot-utils/patches/fix-glibc-2.28.patch
 delete mode 100644 srcpkgs/vboot-utils/patches/fix-musl.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/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..d6c6eeaf363 100644
--- a/srcpkgs/vboot-utils/template
+++ b/srcpkgs/vboot-utils/template
@@ -1,42 +1,37 @@
 # Template file for 'vboot-utils'
 pkgname=vboot-utils
-version=45.7262
-revision=13
+version=89.13729
+revision=1
+_version=${version/./-}
+create_wrksrc=yes
+build_style=gnu-makefile
+make_use_env=yes
 archs="x86_64* i686* aarch64* arm*"
-_githash=0e8c964915fffb58032bb59bdb31949de718ca90
-hostmakedepends="pkg-config git"
+hostmakedepends="pkg-config wget"
 makedepends="libressl-devel libuuid-devel liblzma-devel libyaml-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=35dced2d27781607a9f074e4bb9e07f3745fbb5e86d170952b8fbfb695826318
 
-case "$XBPS_TARGET_MACHINE" in
-	aarch64*) broken="https://build.voidlinux.org/builders/aarch64-musl_builder/builds/8508/steps/shell_3/logs/stdio" ;;
-esac
+CFLAGS='-Wno-error'
 
-do_fetch() {
-	git clone https://chromium.googlesource.com/chromiumos/platform/vboot_reference.git $pkgname-$version || true
-	cd $pkgname-$version
-	git checkout $_githash
-}
+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}"
 
-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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] vboot-utils: update to 89.13729.
  2021-02-20  5:41 [PR PATCH] vboot-utils: update to 89.13729 ericonr
@ 2021-02-20  5:42 ` ericonr
  2021-02-20  5:45 ` ericonr
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-02-20  5:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1688 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?

<!-- 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: 5691 bytes --]

From c4d25bc18a510d98991a4a824644984df1e24214 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/tpm_lite_stub.patch   | 10 ----
 srcpkgs/vboot-utils/template                  | 49 +++++++++----------
 4 files changed, 22 insertions(+), 99 deletions(-)
 delete mode 100644 srcpkgs/vboot-utils/patches/fix-glibc-2.28.patch
 delete mode 100644 srcpkgs/vboot-utils/patches/fix-musl.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/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..c678bc7766f 100644
--- a/srcpkgs/vboot-utils/template
+++ b/srcpkgs/vboot-utils/template
@@ -1,42 +1,37 @@
 # Template file for 'vboot-utils'
 pkgname=vboot-utils
-version=45.7262
-revision=13
+version=89.13729
+revision=1
+_version=${version/./-}
+create_wrksrc=yes
+build_style=gnu-makefile
+make_use_env=yes
 archs="x86_64* i686* aarch64* arm*"
-_githash=0e8c964915fffb58032bb59bdb31949de718ca90
-hostmakedepends="pkg-config git"
+hostmakedepends="pkg-config"
 makedepends="libressl-devel libuuid-devel liblzma-devel libyaml-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=35dced2d27781607a9f074e4bb9e07f3745fbb5e86d170952b8fbfb695826318
 
-case "$XBPS_TARGET_MACHINE" in
-	aarch64*) broken="https://build.voidlinux.org/builders/aarch64-musl_builder/builds/8508/steps/shell_3/logs/stdio" ;;
-esac
+CFLAGS='-Wno-error'
 
-do_fetch() {
-	git clone https://chromium.googlesource.com/chromiumos/platform/vboot_reference.git $pkgname-$version || true
-	cd $pkgname-$version
-	git checkout $_githash
-}
+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}"
 
-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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] vboot-utils: update to 89.13729.
  2021-02-20  5:41 [PR PATCH] vboot-utils: update to 89.13729 ericonr
  2021-02-20  5:42 ` [PR PATCH] [Updated] " ericonr
@ 2021-02-20  5:45 ` ericonr
  2021-02-20 22:07 ` ackalker
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-02-20  5:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1688 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?

<!-- 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: 5672 bytes --]

From 3a535c7150c55dea85c27d74fc006664d0a7bb1b 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/tpm_lite_stub.patch   | 10 ----
 srcpkgs/vboot-utils/template                  | 47 ++++++++----------
 4 files changed, 20 insertions(+), 99 deletions(-)
 delete mode 100644 srcpkgs/vboot-utils/patches/fix-glibc-2.28.patch
 delete mode 100644 srcpkgs/vboot-utils/patches/fix-musl.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/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..31e45a8871e 100644
--- a/srcpkgs/vboot-utils/template
+++ b/srcpkgs/vboot-utils/template
@@ -1,42 +1,35 @@
 # 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"
+create_wrksrc=yes
+build_style=gnu-makefile
+make_use_env=yes
+hostmakedepends="pkg-config"
 makedepends="libressl-devel libuuid-devel liblzma-devel libyaml-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
 
-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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vboot-utils: update to 89.13729.
  2021-02-20  5:41 [PR PATCH] vboot-utils: update to 89.13729 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
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ackalker @ 2021-02-20 22:07 UTC (permalink / raw)
  To: ml

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

New comment by ackalker on void-packages repository

https://github.com/void-linux/void-packages/pull/28911#issuecomment-782756634

Comment:
@ericonr I have tested the updated package with several ChromeOS related tools, and it works very well. Thanks for updating it!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vboot-utils: update to 89.13729.
  2021-02-20  5:41 [PR PATCH] vboot-utils: update to 89.13729 ericonr
                   ` (2 preceding siblings ...)
  2021-02-20 22:07 ` ackalker
@ 2021-02-20 22:22 ` ackalker
  2021-02-21  3:18 ` ericonr
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ackalker @ 2021-02-20 22:22 UTC (permalink / raw)
  To: ml

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

New comment by ackalker on void-packages repository

https://github.com/void-linux/void-packages/pull/28911#issuecomment-782756634

Comment:
@ericonr I have built and tested the updated package from this PR with several ChromeOS related tools (brunch, exract-recovery-image (unreleased)), and it works very well. Thanks for updating it!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vboot-utils: update to 89.13729.
  2021-02-20  5:41 [PR PATCH] vboot-utils: update to 89.13729 ericonr
                   ` (3 preceding siblings ...)
  2021-02-20 22:22 ` ackalker
@ 2021-02-21  3:18 ` ericonr
  2021-02-21  4:31 ` [PR PATCH] [Updated] " ericonr
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-02-21  3:18 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/28911#issuecomment-782788574

Comment:
There's a tiny issue that these are generating text relocations, which aren't supported on musl. So gotta fix that. And their code seems to do some funky stuff on 32bit machines as well :/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] vboot-utils: update to 89.13729.
  2021-02-20  5:41 [PR PATCH] vboot-utils: update to 89.13729 ericonr
                   ` (4 preceding siblings ...)
  2021-02-21  3:18 ` ericonr
@ 2021-02-21  4:31 ` ericonr
  2021-02-21  4:32 ` ericonr
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-02-21  4:31 UTC (permalink / raw)
  To: ml

[-- 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: 5872 bytes --]

From 16048e9ee8c0a7073f5518708edcfab302ee651d 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/tpm_lite_stub.patch   | 10 ----
 srcpkgs/vboot-utils/template                  | 52 +++++++++----------
 4 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
 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/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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] vboot-utils: update to 89.13729.
  2021-02-20  5:41 [PR PATCH] vboot-utils: update to 89.13729 ericonr
                   ` (5 preceding siblings ...)
  2021-02-21  4:31 ` [PR PATCH] [Updated] " ericonr
@ 2021-02-21  4:32 ` ericonr
  2021-02-21 19:08 ` ericonr
  2021-02-23 21:20 ` [PR PATCH] [Merged]: " ericonr
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-02-21  4:32 UTC (permalink / raw)
  To: ml

[-- 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] vboot-utils: update to 89.13729.
  2021-02-20  5:41 [PR PATCH] vboot-utils: update to 89.13729 ericonr
                   ` (6 preceding siblings ...)
  2021-02-21  4:32 ` ericonr
@ 2021-02-21 19:08 ` ericonr
  2021-02-23 21:20 ` [PR PATCH] [Merged]: " ericonr
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-02-21 19:08 UTC (permalink / raw)
  To: ml

[-- 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: 8299 bytes --]

From 28a88ccb3f36d3558e258f2e28bc7319d1e546f3 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    | 58 +++++++++++++++++++
 .../vboot-utils/patches/tpm_lite_stub.patch   | 10 ----
 srcpkgs/vboot-utils/template                  | 52 ++++++++---------
 5 files changed, 82 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..567ee42176c
--- /dev/null
+++ b/srcpkgs/vboot-utils/patches/format-glibc.patch
@@ -0,0 +1,58 @@
+commit 8f2787e5eb72406231b83a4bc6ee20daa640ab41
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Sun Feb 21 00:45:12 2021 -0300
+
+    Fix wrong memory access on 32-bit glibc.
+    
+    off_t on 32-bit glibc is a 32-bit value by default, and building with
+    large file is optional.
+    
+    We also fix the makefile to actually enable large file support.
+    
+    This isn't an issue on musl since it builds with large file support by
+    default.
+
+diff --git Makefile Makefile
+index 3a72d3d..0f9caa4 100644
+--- Makefile
++++ Makefile
+@@ -252,7 +252,7 @@ CFLAGS += -D_GNU_SOURCE
+ # but if the environment doesn't support it, at least compile support
+ # for what is possible.
+ # Pass through cflags_use_64bits to evaluate it only once, here.
+-cflags_use_64bits := $(call test_ccflag,-D_FILE_OFFSET_BITS=64,\#include <fts.h>)
++cflags_use_64bits := $(call test_ccflag,-D_FILE_OFFSET_BITS=64,#include <fts.h>)
+ CFLAGS += $(cflags_use_64bits)
+ 
+ # Code coverage
+diff --git futility/cmd_gbb_utility.c futility/cmd_gbb_utility.c
+index 2a76ecb..ab0d568 100644
+--- futility/cmd_gbb_utility.c
++++ futility/cmd_gbb_utility.c
+@@ -225,7 +225,7 @@ static uint8_t *read_entire_file(const char *filename, off_t *sizeptr)
+ 	buf = (uint8_t *) malloc(sb.st_size);
+ 	if (!buf) {
+ 		fprintf(stderr, "ERROR: can't malloc %" PRIi64 " bytes: %s\n",
+-			sb.st_size, strerror(errno));
++			(int64_t)sb.st_size, strerror(errno));
+ 		goto fail;
+ 	}
+ 
+@@ -333,7 +333,7 @@ static int read_from_file(const char *msg, const char *filename,
+ 	if (ferror(fp)) {
+ 		fprintf(stderr,
+ 			"ERROR: Read %zu/%" PRIi64 " bytes from %s: %s\n",
+-			count, sb.st_size, filename, strerror(errno));
++			count, (int64_t)sb.st_size, filename, strerror(errno));
+ 		errorcnt++;
+ 		r = errno;
+ 	}
+@@ -557,7 +557,7 @@ static int do_gbb(int argc, char *argv[])
+ 			errorcnt++;
+ 			fprintf(stderr,
+ 				"ERROR: can't malloc %" PRIi64 " bytes: %s\n",
+-				filesize, strerror(errno));
++				(int64_t)filesize, strerror(errno));
+ 			break;
+ 		}
+ 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Merged]: vboot-utils: update to 89.13729.
  2021-02-20  5:41 [PR PATCH] vboot-utils: update to 89.13729 ericonr
                   ` (7 preceding siblings ...)
  2021-02-21 19:08 ` ericonr
@ 2021-02-23 21:20 ` ericonr
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-02-23 21:20 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

vboot-utils: update to 89.13729.
https://github.com/void-linux/void-packages/pull/28911

Description:
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
-->


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-02-23 21:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20  5:41 [PR PATCH] vboot-utils: update to 89.13729 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
2021-02-21 19:08 ` ericonr
2021-02-23 21:20 ` [PR PATCH] [Merged]: " ericonr

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).