public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/libressl:migration commit in: sys-boot/vboot-utils/files/, sys-boot/vboot-utils/
@ 2021-01-17 20:50 Quentin Retornaz
  0 siblings, 0 replies; only message in thread
From: Quentin Retornaz @ 2021-01-17 20:50 UTC (permalink / raw
  To: gentoo-commits

commit:     b6cab09bc706e64c167873c95eeb0edaf2187035
Author:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
AuthorDate: Sun Jan 17 20:50:40 2021 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sun Jan 17 20:50:40 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=b6cab09b

sys-boot/vboot-utils: new package

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 sys-boot/vboot-utils/Manifest                      |   2 +
 .../files/vboot-utils-72_p20181229-libressl.patch  |  11 +++
 .../files/vboot-utils-80-musl-fts.patch            |  17 ++++
 sys-boot/vboot-utils/metadata.xml                  |  15 +++
 .../vboot-utils/vboot-utils-72_p20181229-r1.ebuild | 101 ++++++++++++++++++++
 .../vboot-utils/vboot-utils-80_p20200108.ebuild    | 104 +++++++++++++++++++++
 6 files changed, 250 insertions(+)

diff --git a/sys-boot/vboot-utils/Manifest b/sys-boot/vboot-utils/Manifest
new file mode 100644
index 0000000..94f473c
--- /dev/null
+++ b/sys-boot/vboot-utils/Manifest
@@ -0,0 +1,2 @@
+DIST vboot-utils-72_p20181229.tar.xz 18489004 BLAKE2B 444eb0bc2c571ad79d26d473da724016d6d041207beaae161f6c1155768ff9d0b1c8b7b070b828083cc1396266cc77175a75e8067ce22613c75b4d77780dda75 SHA512 41df034dc5498bcbec0d49a472331ceb2fbc2eb3b4173d5c56e920d65ae485382b3d811e5f2c13cf45a1b05a5d6a24197924fa1c76ada9c3aac14fa3c4c363fe
+DIST vboot-utils-80_p20200108.tar.xz 18448212 BLAKE2B f7e375133fb6dc90def1e22c42c7511a3b649c34d067a447f44fb99c1ec37a73d034837c2212e5d6ad368a4f4b011c8cb9eb479e81db4a52b1160cda99382a77 SHA512 077d137d8fe89f35b6f7ec6408b2e9fc7a28765b0987646c1964e6e0c039e359711ab79958c45ee555a0fe810997217225d072a7f1011b1c73c4aefb4e57fcc1

diff --git a/sys-boot/vboot-utils/files/vboot-utils-72_p20181229-libressl.patch b/sys-boot/vboot-utils/files/vboot-utils-72_p20181229-libressl.patch
new file mode 100644
index 0000000..6702a9f
--- /dev/null
+++ b/sys-boot/vboot-utils/files/vboot-utils-72_p20181229-libressl.patch
@@ -0,0 +1,11 @@
+--- a/host/include/openssl_compat.h	2019-01-03 17:32:20.000000000 -0500
++++ b/host/include/openssl_compat.h	2019-02-23 13:40:27.521664838 -0500
+@@ -12,7 +12,7 @@
+ 
+ #include <openssl/rsa.h>
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER < 0x2080000L
+ 
+ static inline void RSA_get0_key(const RSA *rsa, const BIGNUM **n,
+ 				const BIGNUM **e, const BIGNUM **d)

diff --git a/sys-boot/vboot-utils/files/vboot-utils-80-musl-fts.patch b/sys-boot/vboot-utils/files/vboot-utils-80-musl-fts.patch
new file mode 100644
index 0000000..bd291f9
--- /dev/null
+++ b/sys-boot/vboot-utils/files/vboot-utils-80-musl-fts.patch
@@ -0,0 +1,17 @@
+--- a/Makefile
++++ b/Makefile
+@@ -231,4 +231,7 @@
+ ifndef HAVE_MUSL
+   CFLAGS += -DHAVE_EXECINFO_H
++# Musl doesn't have fts.h so enable linking to the standalone lib.
++else
++  MUSL_LIBS := -lfts
+ endif
+ 
+@@ -1043,5 +1046,5 @@
+ 
+ # FUTIL_LIBS is shared by FUTIL_BIN and TEST_FUTIL_BINS.
+-FUTIL_LIBS = ${CRYPTO_LIBS} ${LIBZIP_LIBS}
++FUTIL_LIBS = ${CRYPTO_LIBS} ${LIBZIP_LIBS} ${MUSL_LIBS}
+ 
+ ${FUTIL_BIN}: LDLIBS += ${FUTIL_LIBS}

diff --git a/sys-boot/vboot-utils/metadata.xml b/sys-boot/vboot-utils/metadata.xml
new file mode 100644
index 0000000..c4bb35a
--- /dev/null
+++ b/sys-boot/vboot-utils/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<upstream>
+		<bugs-to>http://crbug.com</bugs-to>
+		<changelog>https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+log/master</changelog>
+		<doc>https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/master/README</doc>
+	</upstream>
+	<maintainer type="person">
+		<email>zmedico@gentoo.org</email>
+	</maintainer>
+	<use>
+		<flag name="libzip">Use dev-libs/libzip.</flag>
+	</use>
+</pkgmetadata>

diff --git a/sys-boot/vboot-utils/vboot-utils-72_p20181229-r1.ebuild b/sys-boot/vboot-utils/vboot-utils-72_p20181229-r1.ebuild
new file mode 100644
index 0000000..c4798ea
--- /dev/null
+++ b/sys-boot/vboot-utils/vboot-utils-72_p20181229-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+# This is the latest commit in the latest branch.
+GIT_SHA1="a32c930e8c46424a3bba3c296fd78b3e60f50aeb"
+
+DESCRIPTION="Chrome OS verified boot tools"
+HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform/vboot_reference/ http://dev.chromium.org/chromium-os/chromiumos-design-docs/verified-boot"
+# Can't use gitiles directly until b/19710536 is fixed.
+#SRC_URI="https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+archive/${GIT_SHA1}.tar.gz -> ${P}.tar.gz"
+SRC_URI="mirror://gentoo/${P}.tar.xz
+	https://dev.gentoo.org/~zmedico/dist/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
+IUSE="libressl minimal static"
+
+LIB_DEPEND="
+	dev-libs/libyaml:=[static-libs(+)]
+	app-arch/xz-utils:=[static-libs(+)]"
+LIB_DEPEND_MINIMAL="
+	!libressl? ( dev-libs/openssl:0=[static-libs(+)] )
+	libressl? ( dev-libs/libressl:0=[static-libs(+)] )
+	sys-apps/util-linux:=[static-libs(+)]
+	dev-libs/libzip:=[static-libs(+)]"
+RDEPEND="!static? (
+		${LIB_DEPEND_MINIMAL//\[static-libs(+)]}
+		!minimal? ( ${LIB_DEPEND//\[static-libs(+)]} )
+	)
+	elibc_musl? ( sys-libs/fts-standalone )"
+DEPEND="${RDEPEND}
+	static? (
+		${LIB_DEPEND_MINIMAL}
+		!minimal? ( ${LIB_DEPEND} )
+	)
+	app-crypt/trousers"
+
+S=${WORKDIR}
+
+src_prepare() {
+	eapply "${FILESDIR}"/${P}-libressl.patch
+
+	default
+	sed -i \
+		-e 's:${DESTDIR}/\(bin\|${LIBDIR}\):${DESTDIR}/usr/\1:g' \
+		-e 's:${DESTDIR}/default:${DESTDIR}/etc/default:g' \
+		-e 's:${TEST_INSTALL_DIR}/bin:${TEST_INSTALL_DIR}/usr/bin:' \
+		-e '/cgpt -D 358400/d' \
+		Makefile || die
+	sed -e 's:^BIN_DIR=${BUILD_DIR}/install_for_test/bin:BIN_DIR=${BUILD_DIR}/install_for_test/usr/bin:' \
+		-i tests/common.sh || die
+	sed -e "s:/mnt/host/source/src/platform/vboot_reference:${S}:" \
+		-i tests/futility/expect_output/* || die
+}
+
+_emake() {
+	local arch=$(tc-arch)
+	emake \
+		V=1 \
+		QEMU_ARCH= \
+		ARCH=${arch} \
+		HOST_ARCH=${arch} \
+		LIBDIR="$(get_libdir)" \
+		DEBUG_FLAGS= \
+		WERROR= \
+		MINIMAL=$(usev minimal) \
+		STATIC=$(usev static) \
+		$(usex elibc_musl HAVE_MUSL=1 "") \
+		"$@"
+}
+
+src_compile() {
+	tc-export CC AR CXX PKG_CONFIG
+	_emake TEST_BINS= all
+}
+
+src_test() {
+	_emake runtests
+}
+
+src_install() {
+	_emake DESTDIR="${ED}" install
+
+	insinto /usr/share/vboot/devkeys
+	doins tests/devkeys/*
+
+	insinto /usr/include/vboot
+	doins host/include/* \
+		firmware/include/gpt.h \
+		firmware/include/tlcl.h \
+		firmware/include/tss_constants.h
+
+	dolib.a build/libvboot_host.a
+
+	dodoc README
+}

diff --git a/sys-boot/vboot-utils/vboot-utils-80_p20200108.ebuild b/sys-boot/vboot-utils/vboot-utils-80_p20200108.ebuild
new file mode 100644
index 0000000..c3388e7
--- /dev/null
+++ b/sys-boot/vboot-utils/vboot-utils-80_p20200108.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+# Can't use gitiles directly until b/19710536 is fixed.
+# This is the name of the latest release branch.
+#RELEASE="release-R80-12739.B"
+# This is the latest commit in the release-R80-12739.B branch.
+#GIT_SHA1="236bd46bfb59f0262dcb1771a108ebb5e90df578"
+
+DESCRIPTION="Chrome OS verified boot tools"
+HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform/vboot_reference/ https://dev.chromium.org/chromium-os/chromiumos-design-docs/verified-boot"
+# Can't use gitiles directly until b/19710536 is fixed.
+#SRC_URI="https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+archive/refs/heads/${RELEASE}.tar.gz -> ${P}.tar.gz"
+#SRC_URI="https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+archive/${GIT_SHA1}.tar.gz -> ${P}.tar.gz"
+SRC_URI="mirror://gentoo/${P}.tar.xz
+	https://dev.gentoo.org/~zmedico/dist/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
+IUSE="libressl +libzip minimal static"
+
+LIB_DEPEND="
+	dev-libs/libyaml:=[static-libs(+)]
+	app-arch/xz-utils:=[static-libs(+)]"
+LIB_DEPEND_MINIMAL="
+	elibc_musl? ( sys-libs/fts-standalone:=[static-libs(+)] )
+	!libressl? ( dev-libs/openssl:0=[static-libs(+)] )
+	libressl? ( dev-libs/libressl:0=[static-libs(+)] )
+	libzip? ( dev-libs/libzip:=[static-libs(+)] )
+	sys-apps/util-linux:=[static-libs(+)]"
+RDEPEND="!static? (
+		${LIB_DEPEND_MINIMAL//\[static-libs(+)]}
+		!minimal? ( ${LIB_DEPEND//\[static-libs(+)]} )
+	)"
+DEPEND="${RDEPEND}
+	static? (
+		${LIB_DEPEND_MINIMAL}
+		!minimal? ( ${LIB_DEPEND} )
+	)
+	app-crypt/trousers"
+BDEPEND="virtual/pkgconfig"
+
+S=${WORKDIR}
+
+PATCHES=(
+	# Bug #687820
+	"${FILESDIR}"/${PN}-80-musl-fts.patch
+)
+
+src_prepare() {
+	default
+
+	# Bug #687008
+	if ! use libzip; then
+		sed -e 's|^\(LIBZIP_VERSION :=\).*|\1|' -i Makefile || die
+	fi
+
+	sed -i \
+		-e 's:${DESTDIR}/\(bin\|include\|${LIBDIR}\|share\):${DESTDIR}/usr/\1:g' \
+		-e 's:${DESTDIR}/default:${DESTDIR}/etc/default:g' \
+		-e 's:${TEST_INSTALL_DIR}/bin:${TEST_INSTALL_DIR}/usr/bin:' \
+		Makefile || die
+	sed -e 's:^BIN_DIR=${BUILD_DIR}/install_for_test/bin:BIN_DIR=${BUILD_DIR}/install_for_test/usr/bin:' \
+		-i tests/common.sh || die
+}
+
+_emake() {
+	local arch=$(tc-arch)
+	emake \
+		V=1 \
+		QEMU_ARCH= \
+		ARCH=${arch} \
+		HOST_ARCH=${arch} \
+		LIBDIR="$(get_libdir)" \
+		DEBUG_FLAGS= \
+		WERROR= \
+		MINIMAL=$(usev minimal) \
+		STATIC=$(usev static) \
+		$(usex elibc_musl HAVE_MUSL=1 "") \
+		"$@"
+}
+
+src_compile() {
+	tc-export CC AR CXX PKG_CONFIG
+	_emake FUZZ_TEST_BINS= TEST_BINS= all
+}
+
+src_test() {
+	_emake runtests
+}
+
+src_install() {
+	_emake DESTDIR="${ED}" install install_dev
+
+	insinto /usr/share/vboot/devkeys
+	doins tests/devkeys/*
+
+	dodoc README
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-17 20:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-17 20:50 [gentoo-commits] repo/proj/libressl:migration commit in: sys-boot/vboot-utils/files/, sys-boot/vboot-utils/ Quentin Retornaz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox