Package: efivar
Version: 0.10-2
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu utopic ubuntu-patch



In Ubuntu, the attached patch was applied to achieve the following:

  * Pull two patches from upstream git to satisfy main inclusion review:
    - 05-balign.patch: Use .balign instead of .align to fix armhf build.
    - 06-manpage.patch: Replace broken stub manpage with a real manpage.
  * 07-assembly-comment.patch: Swap in % for @ to fix assembly on armhf.

Just forwarding the entire Ubuntu delta here.  Patch 05 and 07 are
required to fix the build on armhf, while I suspect you're fairly
familiar with patch 06, having written it. ;)

I've forwarded patch 07 to pjones, so here's hoping it lands upstream
when he wakes up and checks IRC.

... Adam


-- System Information:
Debian Release: jessie/sid
  APT prefers utopic-updates
  APT policy: (500, 'utopic-updates'), (500, 'utopic-security'), (500, 'utopic')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.15.0-6-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru efivar-0.10/debian/changelog efivar-0.10/debian/changelog
diff -Nru efivar-0.10/debian/patches/05-balign.patch efivar-0.10/debian/patches/05-balign.patch
--- efivar-0.10/debian/patches/05-balign.patch	1969-12-31 17:00:00.000000000 -0700
+++ efivar-0.10/debian/patches/05-balign.patch	2014-06-21 18:07:10.000000000 -0600
@@ -0,0 +1,74 @@
+commit 68f86cdd0a455bf964a7b53d2d1bb232fff17fc1
+Author: Peter Jones <pjo...@redhat.com>
+Date:   Tue Jun 17 09:50:11 2014 -0400
+
+    Use .balign in assembler.
+    
+    On some platforms, .align is synonymous with .balign, and so
+    
+    .align 16
+    
+    is the same as
+    
+    .balign 16
+    
+    But on some platforms, gas likes to have fun with us, and it treats it
+    as .p2align instead, in which case that statement means
+    
+    .balign 1<<16
+    
+    Which is obviously always wrong.
+    
+    Some people wonder why other people don't like the gnu toolchain.
+    
+    Signed-off-by: Peter Jones <pjo...@redhat.com>
+
+diff --git a/src/guids.S b/src/guids.S
+index 4074564..bd08499 100644
+--- a/src/guids.S
++++ b/src/guids.S
+@@ -1,27 +1,27 @@
+ 	.globl well_known_guids
+ 	.data
+-	.align 16
++	.balign 16
+ 	.type	well_known_guids, @object
+ 	.size	well_known_guids, well_known_guids_end - well_known_guids
+ well_known_guids:
+ .incbin "guids.bin"
+ 	.globl well_known_guids_end
+ 	.data
+-	.align 16
++	.balign 16
+ 	.type	well_known_guids_end, @object
+ 	.size	well_known_guids_end, 1
+ well_known_guids_end:
+ 	.byte 0
+ 	.globl well_known_names
+ 	.data
+-	.align 16
++	.balign 16
+ 	.type	well_known_names, @object
+ 	.size	well_known_names, well_known_names_end - well_known_names
+ well_known_names:
+ .incbin "names.bin"
+ 	.globl well_known_names_end
+ 	.data
+-	.align 16
++	.balign 16
+ 	.type	well_known_names_end, @object
+ 	.size	well_known_names_end, 1
+ well_known_names_end:
+diff --git a/src/makeguids.c b/src/makeguids.c
+index 34dad48..96a6031 100644
+--- a/src/makeguids.c
++++ b/src/makeguids.c
+@@ -140,7 +140,7 @@ main(int argc, char *argv[])
+ 	for (unsigned int i = 0; i < line-1; i++) {
+ 		fprintf(symout, "\t.globl %s\n"
+ 				"\t.data\n"
+-				"\t.align 1\n"
++				"\t.balign 1\n"
+ 				"\t.type %s, @object\n"
+ 				"\t.size %s, %s_end - %s\n"
+ 				"%s:\n",
diff -Nru efivar-0.10/debian/patches/06-manpage.patch efivar-0.10/debian/patches/06-manpage.patch
--- efivar-0.10/debian/patches/06-manpage.patch	1969-12-31 17:00:00.000000000 -0700
+++ efivar-0.10/debian/patches/06-manpage.patch	2014-06-21 18:07:25.000000000 -0600
@@ -0,0 +1,55 @@
+commit 6967b28d686bd1185486c65a41f846650ae61376
+Author: Daniel Jared Dominguez <jared_doming...@dell.com>
+Date:   Tue Jun 17 11:42:45 2014 -0500
+
+    Give efivar(1) a real man page
+    
+    Signed-off-by: Daniel Jared Dominguez <jared_doming...@dell.com>
+
+diff --git a/docs/efivar.1 b/docs/efivar.1
+index 22ae452..8c5aa0f 100644
+--- a/docs/efivar.1
++++ b/docs/efivar.1
+@@ -1,10 +1,34 @@
+-.TH EFIVAR 3 "Thu Aug 20 2012"
++.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.45.1.
++.TH EFIVAR "1" "June 2014" "efivar 0.10" "User Commands"
+ .SH NAME
+-efivar \-
+-manipulate UEFI variables
++efivar \- Tool to manipulate UEFI variables
+ .SH SYNOPSIS
+-This is a placeholder...
+-.SH AUTHORS
+-.nf
+-Peter Jones
+-.fi
++.B efivar
++[\fI\,OPTION\/\fR...]
++.SH DESCRIPTION
++.TP
++\fB\-l\fR, \fB\-\-list\fR
++list current variables
++.TP
++\fB\-p\fR, \fB\-\-print\fR
++print variable specified by \fB\-\-name\fR
++.TP
++\fB\-n\fR, \fB\-\-name=\fR<guid\-name>
++variable to manipulate, in the form
++8be4df61\-93ca\-11d2\-aa0d\-00e098032b8c\-Boot0000
++.TP
++\fB\-a\fR, \fB\-\-append\fR
++append to variable specified by \fB\-\-name\fR
++.TP
++\fB\-f\fR, \fB\-\-fromfile=\fR<file>
++use data from <file>
++.TP
++\fB\-t\fR, \fB\-\-attributes=\fR<attributes>
++attributes to use on append
++.SS "Help options:"
++.TP
++\-?, \fB\-\-help\fR
++Show this help message
++.TP
++\fB\-\-usage\fR
++Display brief usage message
diff -Nru efivar-0.10/debian/patches/07-assembly-comment.patch efivar-0.10/debian/patches/07-assembly-comment.patch
--- efivar-0.10/debian/patches/07-assembly-comment.patch	1969-12-31 17:00:00.000000000 -0700
+++ efivar-0.10/debian/patches/07-assembly-comment.patch	2014-06-21 18:46:34.000000000 -0600
@@ -0,0 +1,64 @@
+commit bbd82af67412f99fd43f68f1acad060456049e6a
+Author: Adam Conrad <adcon...@0c3.net>
+Date:   Sat Jun 21 18:41:11 2014 -0600
+
+    Swap in % for @ to fix assembly on (at least) ARM.
+    
+    Quoting from the gas manual:
+    
+    > Note on targets where the @ character is the start of a comment
+    > (eg ARM) then another character is used instead. For example the
+    > ARM port uses the % character.
+    
+    Luckily, % works fine on x86 too, so let's do that unconditionally.
+
+diff --git a/src/guids.S b/src/guids.S
+index 661f57b..b99b80f 100644
+--- a/src/guids.S
++++ b/src/guids.S
+@@ -1,28 +1,28 @@
+ 	.globl well_known_guids
+ 	.data
+ 	.balign 16
+-	.type	well_known_guids, @object
++	.type	well_known_guids, %object
+ 	.size	well_known_guids, well_known_guids_end - well_known_guids
+ well_known_guids:
+ .incbin "guids.bin"
+ 	.globl well_known_guids_end
+ 	.data
+ 	.balign 16
+-	.type	well_known_guids_end, @object
++	.type	well_known_guids_end, %object
+ 	.size	well_known_guids_end, 1
+ well_known_guids_end:
+ 	.byte 0
+ 	.globl well_known_names
+ 	.data
+ 	.balign 16
+-	.type	well_known_names, @object
++	.type	well_known_names, %object
+ 	.size	well_known_names, well_known_names_end - well_known_names
+ well_known_names:
+ .incbin "names.bin"
+ 	.globl well_known_names_end
+ 	.data
+ 	.balign 16
+-	.type	well_known_names_end, @object
++	.type	well_known_names_end, %object
+ 	.size	well_known_names_end, 1
+ well_known_names_end:
+ 	.byte 0
+diff --git a/src/makeguids.c b/src/makeguids.c
+index 5eb042a..dbefea6 100644
+--- a/src/makeguids.c
++++ b/src/makeguids.c
+@@ -141,7 +141,7 @@ main(int argc, char *argv[])
+ 		fprintf(symout, "\t.globl %s\n"
+ 				"\t.data\n"
+ 				"\t.balign 1\n"
+-				"\t.type %s, @object\n"
++				"\t.type %s, %%object\n"
+ 				"\t.size %s, %s_end - %s\n"
+ 				"%s:\n",
+ 			outbuf[i].symbol,
diff -Nru efivar-0.10/debian/patches/series efivar-0.10/debian/patches/series
--- efivar-0.10/debian/patches/series	2014-06-10 14:49:05.000000000 -0600
+++ efivar-0.10/debian/patches/series	2014-06-21 18:20:03.000000000 -0600
@@ -2,3 +2,6 @@
 02-version.patch
 03-append_variable.patch
 04-nx-stack.patch
+05-balign.patch
+06-manpage.patch
+07-assembly-comment.patch

Reply via email to