From b9c87e78318b9cdf45365adcc945bd63aaab2e3054c0febb58e74132336546ad Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dleuenberger@suse.com>
Date: Fri, 5 Jun 2015 06:45:33 +0000
Subject: [PATCH] Accepting request 310191 from Base:System

1

OBS-URL: https://build.opensuse.org/request/show/310191
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=117
---
 ...m64-setjmp-Add-missing-license-macro.patch | 34 +++++++++++++++++++
 grub2.changes                                 |  6 ++++
 grub2.spec                                    |  2 ++
 3 files changed, 42 insertions(+)
 create mode 100644 grub2-arm64-setjmp-Add-missing-license-macro.patch

diff --git a/grub2-arm64-setjmp-Add-missing-license-macro.patch b/grub2-arm64-setjmp-Add-missing-license-macro.patch
new file mode 100644
index 0000000..a121f32
--- /dev/null
+++ b/grub2-arm64-setjmp-Add-missing-license-macro.patch
@@ -0,0 +1,34 @@
+From 3ac342205dc81293bb8e2d91b8c5ebe124b4ad35 Mon Sep 17 00:00:00 2001
+From: dann frazier <dann.frazier@canonical.com>
+Date: Thu, 21 May 2015 10:28:48 -0600
+Subject: [PATCH 1/2] arm64/setjmp: Add missing license macro
+
+Including the setjmp module in an arm64-efi image will cause it to
+immediately exit with an "incompatible license" error.
+
+The source file includes a GPLv3+ boilerplate, so fix this by declaring a
+GPLv3+ license using the GRUB_MOD_LICENSE macro.
+
+Signed-off-by: dann frazier <dann.frazier@canonical.com>
+---
+ grub-core/lib/arm64/setjmp.S | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/grub-core/lib/arm64/setjmp.S b/grub-core/lib/arm64/setjmp.S
+index adaafe4..eabfd99 100644
+--- a/grub-core/lib/arm64/setjmp.S
++++ b/grub-core/lib/arm64/setjmp.S
+@@ -17,8 +17,10 @@
+  */
+ 
+ #include <grub/symbol.h>
++#include <grub/dl.h>
+ 
+ 	.file	"setjmp.S"
++GRUB_MOD_LICENSE "GPLv3+"
+ 	.text
+ 
+ /*
+-- 
+2.4.1
+
diff --git a/grub2.changes b/grub2.changes
index 7b39cdf..c9078b5 100644
--- a/grub2.changes
+++ b/grub2.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Wed Jun  3 20:07:33 UTC 2015 - agraf@suse.com
+
+- Fix license for setjmp module
+  * added grub2-arm64-setjmp-Add-missing-license-macro.patch
+
 -------------------------------------------------------------------
 Thu May 21 09:23:52 UTC 2015 - mchang@suse.com
 
diff --git a/grub2.spec b/grub2.spec
index f316d83..548589c 100644
--- a/grub2.spec
+++ b/grub2.spec
@@ -244,6 +244,7 @@ Patch236:       grub2-efi_gop-avoid-low-resolution.patch
 Patch237:       grub2-ppc64le-fix-64bit-trampoline-in-dyn-linker.patch
 Patch238:       grub2-arm64-Reduce-timer-event-frequency-by-10.patch
 Patch239:       grub2-arm64-set-correct-length.patch
+Patch240:       grub2-arm64-setjmp-Add-missing-license-macro.patch
 
 Requires:       gettext-runtime
 %if 0%{?suse_version} >= 1140
@@ -486,6 +487,7 @@ mv po/grub.pot po/%{name}.pot
 %patch237 -p1
 %patch238 -p1
 %patch239 -p1
+%patch240 -p1
 
 # Generate po/LINGUAS for message catalogs ...
 ./linguas.sh