Blame SOURCES/0001-Grub-support-the-setkey-directive.patch

de83c0
From bc46ce8269a89a55b87a906226cfe8b54e9e5d11 Mon Sep 17 00:00:00 2001
de83c0
From: Matthew Booth <mbooth@redhat.com>
de83c0
Date: Tue, 27 Aug 2013 15:24:48 +0100
de83c0
Subject: [PATCH 1/3] Grub: support the 'setkey' directive
de83c0
de83c0
---
de83c0
 lenses/grub.aug            | 7 +++++++
de83c0
 lenses/tests/test_grub.aug | 6 ++++++
de83c0
 2 files changed, 13 insertions(+)
de83c0
de83c0
diff --git a/lenses/grub.aug b/lenses/grub.aug
de83c0
index 2c19ffa..d8fd5ed 100644
de83c0
--- a/lenses/grub.aug
de83c0
+++ b/lenses/grub.aug
de83c0
@@ -132,6 +132,12 @@ module Grub =
de83c0
           |[ spc . switch_arg /timeout|lines/ ])* .
de83c0
           [ spc . key /console|serial|hercules/ ]* . eol ]
de83c0
 
de83c0
+    (* View: setkey *)
de83c0
+    let setkey = [ command "setkey" "" .
de83c0
+      ( spc . [ label "to" . store Rx.no_spaces ] .
de83c0
+        spc . [ label "from" . store Rx.no_spaces ] )? .
de83c0
+      eol ]
de83c0
+
de83c0
     (* View: menu_setting *)
de83c0
     let menu_setting = kw_menu_arg "default"
de83c0
                      | kw_menu_arg "fallback"
de83c0
@@ -145,6 +151,7 @@ module Grub =
de83c0
                      | password_arg
de83c0
                      | color
de83c0
 		     | device
de83c0
+                     | setkey
de83c0
 
de83c0
     (* View: title *)
de83c0
     let title = del /title[ \t=]+/ "title " . value_to_eol . eol
de83c0
diff --git a/lenses/tests/test_grub.aug b/lenses/tests/test_grub.aug
de83c0
index 3eba710..e4dc228 100644
de83c0
--- a/lenses/tests/test_grub.aug
de83c0
+++ b/lenses/tests/test_grub.aug
de83c0
@@ -12,6 +12,8 @@ module Test_grub =
de83c0
 device (hd0) HD(1,800,64000,9895c137-d4b2-4e3b-a93b-dc9ac4)
de83c0
 password --md5 $1$M9NLj$p2gs87vwNv48BUu.wAfVw0
de83c0
 default=0
de83c0
+setkey
de83c0
+setkey less backquote
de83c0
 background 103332
de83c0
 timeout=5
de83c0
 splashimage=(hd0,0)/grub/splash.xpm.gz
de83c0
@@ -54,6 +56,10 @@ title othermenu
de83c0
     { "password" = "$1$M9NLj$p2gs87vwNv48BUu.wAfVw0"
de83c0
         { "md5" } }
de83c0
     { "default" = "0" }
de83c0
+    { "setkey" }
de83c0
+    { "setkey"
de83c0
+        { "to" = "less" }
de83c0
+        { "from" = "backquote" } }
de83c0
     { "background" = "103332" }
de83c0
     { "timeout" = "5" }
de83c0
     { "splashimage" = "(hd0,0)/grub/splash.xpm.gz" }
de83c0
-- 
de83c0
1.8.3.1
de83c0
de83c0
de83c0
From f55175ed0e17a5a4f50a32d9ad5cba5f486eb577 Mon Sep 17 00:00:00 2001
de83c0
From: Matthew Booth <mbooth@redhat.com>
de83c0
Date: Tue, 27 Aug 2013 15:24:49 +0100
de83c0
Subject: [PATCH 2/3] Grub: NFC fix whitespace errors introduced by 4e09d15
de83c0
de83c0
Kill tabs!
de83c0
---
de83c0
 lenses/grub.aug            | 6 +++---
de83c0
 lenses/tests/test_grub.aug | 2 +-
de83c0
 2 files changed, 4 insertions(+), 4 deletions(-)
de83c0
de83c0
diff --git a/lenses/grub.aug b/lenses/grub.aug
de83c0
index d8fd5ed..a64a572 100644
de83c0
--- a/lenses/grub.aug
de83c0
+++ b/lenses/grub.aug
de83c0
@@ -102,8 +102,8 @@ module Grub =
de83c0
      *  This is a shell-only directive in upstream grub; the grub versions
de83c0
      *  in at least Fedora/RHEL use this to find devices for UEFI boot *)
de83c0
     let device =
de83c0
-	  [ command "device" "" . Sep.space . store /\([A-Za-z0-9_.-]+\)/ . spc .
de83c0
-		  [ label "file" . value_to_eol ] . Util.eol ]
de83c0
+      [ command "device" "" . Sep.space . store /\([A-Za-z0-9_.-]+\)/ . spc .
de83c0
+        [ label "file" . value_to_eol ] . Util.eol ]
de83c0
 
de83c0
     (* View: color *)
de83c0
     let color =
de83c0
@@ -150,7 +150,7 @@ module Grub =
de83c0
                      | terminal
de83c0
                      | password_arg
de83c0
                      | color
de83c0
-		     | device
de83c0
+                     | device
de83c0
                      | setkey
de83c0
 
de83c0
     (* View: title *)
de83c0
diff --git a/lenses/tests/test_grub.aug b/lenses/tests/test_grub.aug
de83c0
index e4dc228..87bb243 100644
de83c0
--- a/lenses/tests/test_grub.aug
de83c0
+++ b/lenses/tests/test_grub.aug
de83c0
@@ -52,7 +52,7 @@ title othermenu
de83c0
     { "#comment" = "initrd /initrd-version.img" }
de83c0
     { "#comment" = "boot=/dev/sda" }
de83c0
     { "device"   = "(hd0)"
de83c0
-	    { "file" = "HD(1,800,64000,9895c137-d4b2-4e3b-a93b-dc9ac4)" } }
de83c0
+        { "file" = "HD(1,800,64000,9895c137-d4b2-4e3b-a93b-dc9ac4)" } }
de83c0
     { "password" = "$1$M9NLj$p2gs87vwNv48BUu.wAfVw0"
de83c0
         { "md5" } }
de83c0
     { "default" = "0" }
de83c0
-- 
de83c0
1.8.3.1
de83c0
de83c0
de83c0
From e3f1c15155fba5c10e74b400f2b06c8a31372420 Mon Sep 17 00:00:00 2001
de83c0
From: Matthew Booth <mbooth@redhat.com>
de83c0
Date: Tue, 27 Aug 2013 15:24:50 +0100
de83c0
Subject: [PATCH 3/3] Grub: support the 'lock' directive
de83c0
de83c0
---
de83c0
 lenses/grub.aug            | 1 +
de83c0
 lenses/tests/test_grub.aug | 2 ++
de83c0
 2 files changed, 3 insertions(+)
de83c0
de83c0
diff --git a/lenses/grub.aug b/lenses/grub.aug
de83c0
index a64a572..9f8d6af 100644
de83c0
--- a/lenses/grub.aug
de83c0
+++ b/lenses/grub.aug
de83c0
@@ -216,6 +216,7 @@ module Grub =
de83c0
         | configfile
de83c0
         | module_line
de83c0
         | map_line
de83c0
+        | kw_pres "lock"
de83c0
 
de83c0
     (* View: boot *)
de83c0
     let boot =
de83c0
diff --git a/lenses/tests/test_grub.aug b/lenses/tests/test_grub.aug
de83c0
index 87bb243..de6397d 100644
de83c0
--- a/lenses/tests/test_grub.aug
de83c0
+++ b/lenses/tests/test_grub.aug
de83c0
@@ -38,6 +38,7 @@ title Fedora (2.6.24.3-34.fc8)
de83c0
         initrd /initrd-2.6.24.3-34.fc8.img
de83c0
         map (hd0) (hd1)
de83c0
 title othermenu
de83c0
+        lock
de83c0
         configfile /boot/grub/othergrub.conf
de83c0
 "
de83c0
 
de83c0
@@ -88,6 +89,7 @@ title othermenu
de83c0
         { "initrd" = "/initrd-2.6.24.3-34.fc8.img" }
de83c0
         { "map" { "from" = "(hd0)" } { "to" = "(hd1)" } } }
de83c0
     { "title" = "othermenu"
de83c0
+        { "lock" }
de83c0
         { "configfile" = "/boot/grub/othergrub.conf" } }
de83c0
 
de83c0
 
de83c0
-- 
de83c0
1.8.3.1
de83c0