[packages/sbsigntool] new package
jajcus
jajcus at pld-linux.org
Fri Nov 1 14:40:30 CET 2013
commit c8769e59491c4f5fb29d8f3d83f3ca7211656333
Author: Jacek Konieczny <jajcus at jajcus.net>
Date: Fri Nov 1 14:39:59 2013 +0100
new package
sbsigntool-efivars_magic.patch | 31 ++++++++++++++++++++
sbsigntool.spec | 64 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 95 insertions(+)
---
diff --git a/sbsigntool.spec b/sbsigntool.spec
new file mode 100644
index 0000000..2adf24b
--- /dev/null
+++ b/sbsigntool.spec
@@ -0,0 +1,64 @@
+
+# Conditional build:
+%bcond_with tests # build without tests
+
+Summary: Signing utility for UEFI secure boot
+Name: sbsigntool
+Version: 0.6
+Release: 0.1
+License: GPL v3
+Group: Applications
+# git://kernel.ubuntu.com/jk/sbsigntool a7577f56b3c3c6e314576809cc9ce1bde94ae727
+Source0: %{name}-%{version}.tar.bz2
+# Source0-md5: 23d5b520a3dd26b45dbfc68b4466152f
+# git://git.ozlabs.org/~ccan/ccan b1f28e
+# git archive --format=tar --prefix=lib/ccan.git b1f28e | bzip2 > ccan-b1f28e.tar.bz2
+Source1: ccan-b1f28e.tar.bz2
+# Source1-md5: a93c0ea0c36241285cee8d60d396ed01
+Patch0: %{name}-efivars_magic.patch
+URL: https://wiki.ubuntu.com/UEFI/SecureBoot
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: gnu-efi
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Utilites for signing and verifying files for UEFI Secure Boot.
+
+%prep
+%setup -q -a1
+
+%build
+
+# from autogen.sh
+ccan_modules="talloc read_write_all build_assert array_size"
+lib/ccan.git/tools/create-ccan-tree \
+ --build-type=automake lib/ccan $ccan_modules
+
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+
+%configure \
+%ifarch %{ix86}
+ CPPFLAGS="%{rpmcppflags} -I/usr/include/efi/ia32"
+%endif
+%{__make}
+
+%{?with_tests:%{__make} -C tests test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc NEWS README
+%attr(755,root,root) %{_bindir}/sb*
+%{_mandir}/man1/sb*.1*
diff --git a/sbsigntool-efivars_magic.patch b/sbsigntool-efivars_magic.patch
new file mode 100644
index 0000000..a351ea3
--- /dev/null
+++ b/sbsigntool-efivars_magic.patch
@@ -0,0 +1,31 @@
+commit 951ee95a301674c046f55330cd7460e1314deff2 (HEAD, origin/master, origin/HEAD, master)
+Author: Jeremy Kerr <jeremy.kerr at canonical.com>
+Date: Tue Nov 13 20:22:57 2012 +0800
+
+ sbkeysync: add corrected efivars magic
+
+ Signed-off-by: Jeremy Kerr <jeremy.kerr at canonical.com>
+
+diff --git a/src/sbkeysync.c b/src/sbkeysync.c
+index 011004a..a63d3b8 100644
+--- a/src/sbkeysync.c
++++ b/src/sbkeysync.c
+@@ -56,7 +56,8 @@
+ #include "efivars.h"
+
+ #define EFIVARS_MOUNTPOINT "/sys/firmware/efi/efivars"
+-#define EFIVARS_FSTYPE 0x6165676C
++#define PSTORE_FSTYPE 0x6165676C
++#define EFIVARS_FSTYPE 0xde5e81e4
+
+ #define EFI_IMAGE_SECURITY_DATABASE_GUID \
+ { 0xd719b2cb, 0x3d3a, 0x4596, \
+@@ -533,7 +534,7 @@ static int check_efivars_mount(const char *mountpoint)
+ if (rc)
+ return -1;
+
+- if (statbuf.f_type != EFIVARS_FSTYPE)
++ if (statbuf.f_type != EFIVARS_FSTYPE && statbuf.f_type != PSTORE_FSTYPE)
+ return -1;
+
+ return 0;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/sbsigntool.git/commitdiff/c8769e59491c4f5fb29d8f3d83f3ca7211656333
More information about the pld-cvs-commit
mailing list