summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@gentoo.org>2013-09-01 22:19:57 +0000
committerGreg Kroah-Hartman <gregkh@gentoo.org>2013-09-01 22:19:57 +0000
commit4093f244275cf719e915014952e1b06b3873a432 (patch)
tree9110b038b6681b562f343fdf4f97655c9b93ab22 /app-crypt/efitools
parentVersion bump. (diff)
downloadgentoo-2-4093f244275cf719e915014952e1b06b3873a432.tar.gz
gentoo-2-4093f244275cf719e915014952e1b06b3873a432.tar.bz2
gentoo-2-4093f244275cf719e915014952e1b06b3873a432.zip
remove vim-core build dependancy by replacing it with a small perl script that has been send upstream.
(Portage version: 2.2.1/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'app-crypt/efitools')
-rw-r--r--app-crypt/efitools/ChangeLog9
-rw-r--r--app-crypt/efitools/efitools-1.4.1-r2.ebuild29
-rw-r--r--app-crypt/efitools/files/xxdi.patch110
3 files changed, 147 insertions, 1 deletions
diff --git a/app-crypt/efitools/ChangeLog b/app-crypt/efitools/ChangeLog
index 6dc378057622..44fce4a1377f 100644
--- a/app-crypt/efitools/ChangeLog
+++ b/app-crypt/efitools/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-crypt/efitools
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/efitools/ChangeLog,v 1.2 2013/08/30 16:29:26 gregkh Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/efitools/ChangeLog,v 1.3 2013/09/01 22:19:56 gregkh Exp $
+
+*efitools-1.4.1-r2 (01 Sep 2013)
+
+ 01 Sep 2013; Greg Kroah-Hartman <gregkh@gentoo.org> +efitools-1.4.1-r2.ebuild,
+ +files/xxdi.patch:
+ remove vim-core build dependancy by replacing it with a small perl script that
+ has been send upstream.
*efitools-1.4.1-r1 (30 Aug 2013)
diff --git a/app-crypt/efitools/efitools-1.4.1-r2.ebuild b/app-crypt/efitools/efitools-1.4.1-r2.ebuild
new file mode 100644
index 000000000000..f0ca1865132b
--- /dev/null
+++ b/app-crypt/efitools/efitools-1.4.1-r2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/efitools/efitools-1.4.1-r2.ebuild,v 1.1 2013/09/01 22:19:56 gregkh Exp $
+
+EAPI="4"
+inherit eutils
+
+DESCRIPTION="Tools for manipulating UEFI secure boot platforms"
+HOMEPAGE="git://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git"
+SRC_URI="https://build.opensuse.org/package/rawsourcefile/home:jejb1:UEFI/efitools/efitools-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl
+ sys-apps/util-linux"
+DEPEND="${RDEPEND}
+ sys-apps/help2man
+ sys-boot/gnu-efi
+ dev-perl/File-Slurp
+ app-crypt/sbsigntool
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/xxdi.patch
+ chmod 755 ${WORKDIR}/${P}/xxdi.pl
+}
diff --git a/app-crypt/efitools/files/xxdi.patch b/app-crypt/efitools/files/xxdi.patch
new file mode 100644
index 000000000000..ec62125ea4ad
--- /dev/null
+++ b/app-crypt/efitools/files/xxdi.patch
@@ -0,0 +1,110 @@
+From gregkh@linuxfoundation.org Sun Sep 1 14:55:47 2013
+Date: Sun, 1 Sep 2013 14:58:15 -0700
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+To: James Bottomley <James.Bottomley@HansenPartnership.com>
+Cc: JBottomley@Parallels.com, greg@kroah.com
+Subject: [efitools PATCH] Makefile/Make.rules: don't rely on vim-core
+Message-ID: <20130901215815.GA8749@kroah.com>
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+Subject: Makefile/Make.rules: don't rely on vim-core
+
+This adds the xxdi.pl script to replace the call to 'xxd -i', removing a
+build dependancy on vim-core, which some distros don't really want to
+have (i.e. Gentoo and its build derivatives like ChromeOS and CoreOS.)
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Make.rules | 2 +-
+ Makefile | 2 +-
+ xxdi.pl | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 52 insertions(+), 2 deletions(-)
+ create mode 100755 xxdi.pl
+
+diff --git a/Make.rules b/Make.rules
+index 419b3b9..309b231 100644
+--- a/Make.rules
++++ b/Make.rules
+@@ -38,7 +38,7 @@ endif
+ nm -D $@ | grep ' U ' && exit 1 || exit 0
+
+ %.h: %.auth
+- xxd -i $< > $@
++ ./xxdi.pl $< > $@
+
+ %.hash: %.efi hash-to-efi-sig-list
+ ./hash-to-efi-sig-list $< $@
+diff --git a/Makefile b/Makefile
+index 52f4551..a39cafe 100644
+--- a/Makefile
++++ b/Makefile
+@@ -62,7 +62,7 @@ DB.auth: DB.esl KEK.crt sign-efi-sig-list
+
+ hashlist.h: HashTool.hash
+ cat $^ > /tmp/tmp.hash
+- xxd -i /tmp/tmp.hash > $@
++ ./xxdi.pl /tmp/tmp.hash > $@
+ rm -f /tmp/tmp.hash
+
+
+diff --git a/xxdi.pl b/xxdi.pl
+new file mode 100755
+index 0000000..acc974c
+--- /dev/null
++++ b/xxdi.pl
+@@ -0,0 +1,50 @@
++#!/usr/bin/env perl
++#
++# xxdi.pl - perl implementation of 'xxd -i' mode
++#
++# Copyright 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
++# Copyright 2013 Linux Foundation
++#
++# Released under the GPLv2.
++#
++# Implements the "basic" functionality of 'xxd -i' in perl to keep build
++# systems from having to build/install/rely on vim-core, which not all
++# distros want to do. But everyone has perl, so use it instead.
++#
++
++use strict;
++use warnings;
++use File::Slurp qw(slurp);
++
++my $indata = slurp(@ARGV ? $ARGV[0] : \*STDIN);
++my $len_data = length($indata);
++my $num_digits_per_line = 12;
++my $var_name;
++my $outdata;
++
++# Use the variable name of the file we read from, converting '/' and '.
++# to '_', or, if this is stdin, just use "stdin" as the name.
++if (@ARGV) {
++ $var_name = $ARGV[0];
++ $var_name =~ s/\//_/g;
++ $var_name =~ s/\./_/g;
++} else {
++ $var_name = "stdin";
++}
++
++$outdata .= "unsigned char $var_name\[] = {";
++
++# trailing ',' is acceptable, so instead of duplicating the logic for
++# just the last character, live with the extra ','.
++for (my $key= 0; $key < $len_data; $key++) {
++ if ($key % $num_digits_per_line == 0) {
++ $outdata .= "\n\t";
++ }
++ $outdata .= sprintf("0x%.2x, ", ord(substr($indata, $key, 1)));
++}
++
++$outdata .= "\n};\nunsigned int $var_name\_len = $len_data;\n";
++
++binmode STDOUT;
++print {*STDOUT} $outdata;
++
+--
+1.8.4.6.g82e253f.dirty
+
+