~ubuntu-branches/ubuntu/saucy/sbsigntool/saucy

« back to all changes in this revision

Viewing changes to debian/patches/efi_arch_ia32.patch

  • Committer: Package Import Robot
  • Author(s): Steve Langasek
  • Date: 2013-08-23 21:07:17 UTC
  • Revision ID: package-import@ubuntu.com-20130823210717-rpsbissvuhtsnewn
Tags: 0.6-0ubuntu4
* debian/patches/efi_arch_ia32.patch: Use AC_CANONICAL_HOST, not uname -m,
  to determine target. Closes LP: #1066038.
* debian/patches/Align-signature-data-to-8-bytes.patch: Align signature
  data to 8 bytes.  This matches the Microsoft signing implementation,
  which enables us to use sbattach to verify the integrity of the binaries
  returned by the SysDev signing service.
* debian/patches/update_checksums.patch: make sure we update the PE checksum
  field as well, also needed for matching the Microsoft signing
  implementation.
* debian/patches/fix-signature-padding.patch: fix calculation of the
  size of our signature data, so that we don't write out extra zeroes
  when we detach a signature.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Fix FTBFS on i386 by defining EFI_ARCH to ia32 instead of uname.
2
 
Author: Adam Conrad <adconrad@ubuntu.com>
3
 
Forwarded: no
4
 
 
5
 
--- sbsigntool-0.4.orig/configure.ac
6
 
+++ sbsigntool-0.4/configure.ac
7
 
@@ -65,6 +65,11 @@ PKG_CHECK_MODULES(uuid, uuid,
 
1
From ffbf59032c9dff0afc19490f012066d4bbd5a0c3 Mon Sep 17 00:00:00 2001
 
2
From: Steve Langasek <steve.langasek@canonical.com>
 
3
Date: Fri, 12 Oct 2012 16:48:53 -0700
 
4
Subject: [PATCH] Use AC_CANONICAL_HOST, not uname -m, to determine target
 
5
 
 
6
The EFI architecture should be set from the standard autoconf macros, not
 
7
from uname -m.  Uname -m is wrong not just when cross-building, but also when
 
8
running 32-bit userspace on a 64-bit kernel.
 
9
 
 
10
Ref: https://bugs.launchpad.net/bugs/1066038
 
11
---
 
12
 configure.ac |   15 ++++++++++++++-
 
13
 1 file changed, 14 insertions(+), 1 deletion(-)
 
14
 
 
15
diff --git a/configure.ac b/configure.ac
 
16
index 0d8f0bb..a693d96 100644
 
17
--- a/configure.ac
 
18
+++ b/configure.ac
 
19
@@ -7,6 +7,8 @@ AC_PREREQ(2.60)
 
20
 AC_CONFIG_HEADERS(config.h)
 
21
 AC_CONFIG_SRCDIR(src/sbsign.c)
 
22
 
 
23
+AC_CANONICAL_HOST
 
24
+
 
25
 AM_PROG_AS
 
26
 AC_PROG_CC
 
27
 AM_PROG_CC_C_O
 
28
@@ -64,7 +66,18 @@ PKG_CHECK_MODULES(uuid, uuid,
 
29
     AC_MSG_ERROR([libuuid (from the uuid package) is required]))
8
30
 
9
31
 dnl gnu-efi headers require extra include dirs
10
 
 EFI_ARCH=$(uname -m)
11
 
+case $EFI_ARCH in
12
 
+       i*86)
13
 
+               EFI_ARCH="ia32"
14
 
+               ;;
15
 
+esac
16
 
 EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \
17
 
  -DEFI_FUNCTION_WRAPPER"
18
 
 CPPFLAGS_save="$CPPFLAGS"
19
 
--- sbsigntool-0.4.orig/configure
20
 
+++ sbsigntool-0.4/configure
21
 
@@ -5480,6 +5480,11 @@ $as_echo "yes" >&6; }
22
 
 fi
23
 
 
24
 
 EFI_ARCH=$(uname -m)
25
 
+case $EFI_ARCH in
26
 
+       i*86)
27
 
+               EFI_ARCH="ia32"
28
 
+               ;;
29
 
+esac
30
 
 EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \
31
 
  -DEFI_FUNCTION_WRAPPER"
32
 
 CPPFLAGS_save="$CPPFLAGS"
 
32
-EFI_ARCH=$(uname -m)
 
33
+case $host_cpu in
 
34
+       x86_64)
 
35
+               EFI_ARCH=$host_cpu
 
36
+               ;;
 
37
+       i*86)
 
38
+               EFI_ARCH=ia32
 
39
+               ;;
 
40
+       *)
 
41
+               AC_MSG_ERROR([unsupported EFI architecture $host_cpu])
 
42
+               ;;
 
43
+esac
 
44
+
 
45
 EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \
 
46
  -DEFI_FUNCTION_WRAPPER"
 
47
 CPPFLAGS_save="$CPPFLAGS"
 
48
-- 
 
49
1.7.10.4
 
50