diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-crypt/sbsigntool | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-crypt/sbsigntool')
-rw-r--r-- | app-crypt/sbsigntool/Manifest | 1 | ||||
-rw-r--r-- | app-crypt/sbsigntool/files/0002-image.c-clear-image-variable.patch | 29 | ||||
-rw-r--r-- | app-crypt/sbsigntool/files/0003-Fix-for-multi-sign.patch | 39 | ||||
-rw-r--r-- | app-crypt/sbsigntool/metadata.xml | 11 | ||||
-rw-r--r-- | app-crypt/sbsigntool/sbsigntool-0.6-r1.ebuild | 38 | ||||
-rw-r--r-- | app-crypt/sbsigntool/sbsigntool-0.6.ebuild | 36 |
6 files changed, 154 insertions, 0 deletions
diff --git a/app-crypt/sbsigntool/Manifest b/app-crypt/sbsigntool/Manifest new file mode 100644 index 000000000000..bbdd012f4e6c --- /dev/null +++ b/app-crypt/sbsigntool/Manifest @@ -0,0 +1 @@ +DIST sbsigntool_0.6.orig.tar.gz 212375 SHA256 84fb0c8f6fb1e79aa418a4f70a3139b38d5630043b28291c875f383e9b4294b8 SHA512 ed314d1cb7278cf5f27d4c3cd17f2195678419a7f9e47770429b6f95df35f7df035331e60c45970183ddd9b150a9b752f876c777929598b0525872b3255af95c WHIRLPOOL 3b86b9861f5e26586e8a9eb9bbf48adf1a12714b294f0acd605d53e37c27192006c6ecc81d31bf4f200f8e88508f38a52ef93e9e01e301c4245a11894227cecc diff --git a/app-crypt/sbsigntool/files/0002-image.c-clear-image-variable.patch b/app-crypt/sbsigntool/files/0002-image.c-clear-image-variable.patch new file mode 100644 index 000000000000..dfe183e66cd2 --- /dev/null +++ b/app-crypt/sbsigntool/files/0002-image.c-clear-image-variable.patch @@ -0,0 +1,29 @@ +From 21e984fa9d93a760cc03f5d9d13d023809227df2 Mon Sep 17 00:00:00 2001 +From: James Bottomley <JBottomley@Parallels.com> +Date: Thu, 11 Apr 2013 21:12:17 -0700 +Subject: image.c: clear image variable + +Not zeroing the image after talloc occasionally leads to a segfault because +the programme thinks it has a signature when in reality it just has a junk +pointer and segfaults. + +Signed-off-by: James Bottomley <JBottomley@Parallels.com> +--- + src/image.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/image.c b/src/image.c +index cc55791..10eba0e 100644 +--- a/src/image.c ++++ b/src/image.c +@@ -401,6 +401,7 @@ struct image *image_load(const char *filename) + return NULL; + } + ++ memset(image, 0, sizeof(*image)); + rc = fileio_read_file(image, filename, &image->buf, &image->size); + if (rc) + goto err; +-- +1.8.2.1 + diff --git a/app-crypt/sbsigntool/files/0003-Fix-for-multi-sign.patch b/app-crypt/sbsigntool/files/0003-Fix-for-multi-sign.patch new file mode 100644 index 000000000000..f42c69616d13 --- /dev/null +++ b/app-crypt/sbsigntool/files/0003-Fix-for-multi-sign.patch @@ -0,0 +1,39 @@ +From e58a528ef57e53008222f238cce7c326a14572e2 Mon Sep 17 00:00:00 2001 +From: James Bottomley <JBottomley@Parallels.com> +Date: Mon, 30 Sep 2013 19:25:37 -0700 +Subject: [PATCH 4/4] Fix for multi-sign + +The new Tianocore multi-sign code fails now for images signed with +sbsigntools. The reason is that we don't actually align the signature table, +we just slap it straight after the binary data. Unfortunately, the new +multi-signature code checks that our alignment offsets are correct and fails +the signature for this reason. Fix by adding junk to the end of the image to +align the signature section. + +Signed-off-by: James Bottomley <JBottomley@Parallels.com> +--- + src/image.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/image.c b/src/image.c +index 10eba0e..519e288 100644 +--- a/src/image.c ++++ b/src/image.c +@@ -385,7 +385,13 @@ static int image_find_regions(struct image *image) + + /* record the size of non-signature data */ + r = &image->checksum_regions[image->n_checksum_regions - 1]; +- image->data_size = (r->data - (void *)image->buf) + r->size; ++ /* ++ * The new Tianocore multisign does a stricter check of the signatures ++ * in particular, the signature table must start at an aligned offset ++ * fix this by adding bytes to the end of the text section (which must ++ * be included in the hash) ++ */ ++ image->data_size = align_up((r->data - (void *)image->buf) + r->size, 8); + + return 0; + } +-- +1.8.4 + diff --git a/app-crypt/sbsigntool/metadata.xml b/app-crypt/sbsigntool/metadata.xml new file mode 100644 index 000000000000..5deed91a82bb --- /dev/null +++ b/app-crypt/sbsigntool/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>vapier@gentoo.org</email> + <description>do whatever</description> + </maintainer> + <upstream> + <remote-id type="launchpad">ubuntu</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-crypt/sbsigntool/sbsigntool-0.6-r1.ebuild b/app-crypt/sbsigntool/sbsigntool-0.6-r1.ebuild new file mode 100644 index 000000000000..3fd1601dd3e8 --- /dev/null +++ b/app-crypt/sbsigntool/sbsigntool-0.6-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="Utilities for signing and verifying files for UEFI Secure Boot" +HOMEPAGE="https://launchpad.net/ubuntu/+source/sbsigntool" +SRC_URI="https://launchpad.net/ubuntu/+archive/primary/+files/${PN}_${PV}.orig.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +RDEPEND="dev-libs/openssl + sys-apps/util-linux" +DEPEND="${RDEPEND} + sys-apps/help2man + sys-boot/gnu-efi + virtual/pkgconfig" + +src_prepare() { + local iarch + case ${ARCH} in + ia64) iarch=ia64 ;; + x86) iarch=ia32 ;; + amd64) iarch=x86_64 ;; + *) die "unsupported architecture: ${ARCH}" ;; + esac + sed -i "/^EFI_ARCH=/s:=.*:=${iarch}:" configure || die + sed -i 's/-m64$/& -march=x86-64/' tests/Makefile.in || die + sed -i "/^AR /s:=.*:= $(tc-getAR):" lib/ccan/Makefile.in || die #481480 + epatch "${FILESDIR}"/0002-image.c-clear-image-variable.patch + epatch "${FILESDIR}"/0003-Fix-for-multi-sign.patch +} diff --git a/app-crypt/sbsigntool/sbsigntool-0.6.ebuild b/app-crypt/sbsigntool/sbsigntool-0.6.ebuild new file mode 100644 index 000000000000..5810850a8a04 --- /dev/null +++ b/app-crypt/sbsigntool/sbsigntool-0.6.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit toolchain-funcs + +DESCRIPTION="Utilities for signing and verifying files for UEFI Secure Boot" +HOMEPAGE="https://launchpad.net/ubuntu/+source/sbsigntool" +SRC_URI="https://launchpad.net/ubuntu/+archive/primary/+files/${PN}_${PV}.orig.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +RDEPEND="dev-libs/openssl + sys-apps/util-linux" +DEPEND="${RDEPEND} + sys-apps/help2man + sys-boot/gnu-efi + virtual/pkgconfig" + +src_prepare() { + local iarch + case ${ARCH} in + ia64) iarch=ia64 ;; + x86) iarch=ia32 ;; + amd64) iarch=x86_64 ;; + *) die "unsupported architecture: ${ARCH}" ;; + esac + sed -i "/^EFI_ARCH=/s:=.*:=${iarch}:" configure || die + sed -i 's/-m64$/& -march=x86-64/' tests/Makefile.in || die + sed -i "/^AR /s:=.*:= $(tc-getAR):" lib/ccan/Makefile.in || die #481480 +} |