[packages/grub2/DEVEL] Version: 2.00.git20131218 (current upstream git ss)

jajcus jajcus at pld-linux.org
Wed Dec 18 16:14:15 CET 2013


commit 5bafb558ac0c2c324b52af35415024aa8d529b7a
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Wed Dec 18 16:03:17 2013 +0100

    Version: 2.00.git20131218 (current upstream git ss)
    
    The GRUB release cycle is ridiculous, the last release (2.00) is buggy
    and lacks features and back-porting upstream fixes becomes harder and
    harder.
    
    Copying nearly 500 patches from Fedora doesn't sound right either.
    
    Instead, let's try current upstream snapshot with just a basic set of
    patches.
    
    Patches dropped:
    
    – already upstream:
     * Issue-separate-DNS-queries-for-ipv4-and-ipv6.patch
     * add-GRUB-DISABLE-SUBMENU-option.patch
     * fix-http-crash.patch
     * grub2-awk.patch
     * grub2-efinet_fix.patch
     * grub2-freetype_include.patch
     * grub2-gets.patch
     * grub2-linuxefi.patch
     * grub2-tftp_fixes.patch
    
    – those which looked like Fedora-specific and probably not used by
    anybody in PLD (if anyone wishes tu support them, they may be brought
    back):
     * add-X-option-to-printf-functions.patch
     * dhcp-client-id-and-uuid-options-added.patch
     * search-for-specific-config-file-for-netboot.patch
    
    – most probably obsolete:
     * ppc.patch (we don't support PPC any more, do we? and the patch was
    	      GCC-version specific)
     * grub2-generated_files.patch (the build process have been changed
                                    upstream)
    
    Builds, not tested if actually works.

 Issue-separate-DNS-queries-for-ipv4-and-ipv6.patch | 230 ----------
 add-GRUB-DISABLE-SUBMENU-option.patch              | 114 -----
 add-X-option-to-printf-functions.patch             |  58 ---
 add-vlan-tag-support.patch                         |  81 ++--
 choose-preferred-initrd.patch                      |  23 +-
 dhcp-client-id-and-uuid-options-added.patch        | 121 ------
 fix-http-crash.patch                               |  28 --
 grub-lvmdevice.patch                               |   9 +-
 grub-mkconfig-diagnostics.patch                    | 108 ++---
 grub2-awk.patch                                    |  12 -
 grub2-efinet_fix.patch                             |  65 ---
 grub2-freetype_include.patch                       |  12 -
 grub2-generated_files.patch                        |  44 --
 grub2-gets.patch                                   |  11 -
 grub2-linuxefi.patch                               | 482 ---------------------
 grub2-tftp_fixes.patch                             | 144 ------
 grub2.spec                                         |  80 ++--
 just-say-linux.patch                               |  35 +-
 ppc.patch                                          |  27 --
 search-for-specific-config-file-for-netboot.patch  | 205 ---------
 sort-version.patch                                 |  29 --
 21 files changed, 149 insertions(+), 1769 deletions(-)
---
diff --git a/grub2.spec b/grub2.spec
index 9f22384..6d31856 100644
--- a/grub2.spec
+++ b/grub2.spec
@@ -45,45 +45,38 @@ Summary(hu.UTF-8):	GRUB2 - rendszerbetöltő x86 és ppc gépekhez
 Summary(pl.UTF-8):	GRUB2 - bootloader dla x86 i ppc
 Summary(pt_BR.UTF-8):	Gerenciador de inicialização GRUB2
 Name:		grub2
-Version:	2.00
-Release:	6
+Version:	2.00.git20131218
+Release:	0.1
 License:	GPL v2
 Group:		Base
-Source0:	http://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz
-# Source0-md5:	a1043102fbc7bcedbf53e7ee3d17ab91
+# git://git.savannah.gnu.org/grub.git
+# TS=$(date +'%Y%m%d') ; \
+# git archive --format=tar --prefix=grub-2.00.git$TS/ master | \
+# xz > grub-2.00.git$TS.tar.xz
+Source0:	grub-%{version}.tar.xz
+# Source0-md5:	64bd6ea9d99205559fbe576ed3d80800
 Source1:	update-grub
 Source2:	update-grub.8
 Source3:	grub.sysconfig
 Source4:	grub-custom.cfg
+# ./linguas.sh
+# TS=$(date +'%Y%m%d') ; tar cjvf grub-po-2.00.git$TS.tar.bz2 po/*.po po/LINGUAS
+Source5:	grub-po-%{version}.tar.bz2
+# Source5-md5:	274b652b6616780318cf7bd43f183ab9
 Patch1:		pld-sysconfdir.patch
 Patch2:		grub-garbage.patch
 Patch3:		grub-lvmdevice.patch
 Patch4:		pld-mkconfigdir.patch
 Patch5:		grub-mkconfig-diagnostics.patch
-Patch6:		ppc.patch
-Patch7:		%{name}-awk.patch
 Patch8:		posix.patch
-Patch9:		%{name}-gets.patch
 Patch10:	%{name}-fonts_path.patch
-Patch11:	%{name}-tftp_fixes.patch
 Patch12:	add-vlan-tag-support.patch
 Patch13:	just-say-linux.patch
-Patch14:	add-GRUB-DISABLE-SUBMENU-option.patch
-Patch15:	add-X-option-to-printf-functions.patch
-Patch16:	dhcp-client-id-and-uuid-options-added.patch
-Patch17:	fix-http-crash.patch
-Patch18:	Issue-separate-DNS-queries-for-ipv4-and-ipv6.patch
-Patch19:	search-for-specific-config-file-for-netboot.patch
 Patch20:	ignore-kernel-symlinks.patch
 Patch21:	choose-preferred-initrd.patch
 Patch22:	%{name}-cfg.patch
-Patch23:	%{name}-freetype_include.patch
-Patch24:	%{name}-efinet_fix.patch
-Patch25:	%{name}-linuxefi.patch
-Patch26:	%{name}-generated_files.patch
 URL:		http://www.gnu.org/software/grub/
 BuildRequires:	autoconf >= 2.53
-BuildRequires:	autogen
 BuildRequires:	automake >= 1:1.11.1-1
 BuildRequires:	bison
 BuildRequires:	device-mapper-devel
@@ -92,11 +85,14 @@ BuildRequires:	fonts-TTF-DejaVu
 BuildRequires:	freetype-devel >= 2
 BuildRequires:	gawk
 BuildRequires:	gettext-devel
+BuildRequires:	glibc-localedb-all
 BuildRequires:	glibc-static
 BuildRequires:	help2man
 BuildRequires:	libfuse-devel
 BuildRequires:	libtool
 BuildRequires:	ncurses-devel
+BuildRequires:	python
+BuildRequires:	python-modules
 BuildRequires:	rpm >= 4.4.9-56
 BuildRequires:	rpmbuild(macros) >= 1.213
 BuildRequires:	sed >= 4.0
@@ -288,33 +284,22 @@ starfield theme for GRUB.
 Motyw starfield dla GRUB-a.
 
 %prep
-%setup -q -n grub-%{version}
+%setup -q -n grub-%{version} -a5
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch6 -p1
-%patch7 -p1
 %patch8 -p1
-%patch9 -p1
 %patch10 -p1
-%patch11 -p1
 %patch12 -p1
 %patch13 -p1
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
-%patch19 -p1
 %patch20 -p1
 %patch21 -p1
 %patch22 -p0
-%patch23 -p1
-%patch24 -p1
-%patch25 -p1
-%patch26 -p1
+
+# we don't have C.utf-8 and need an UTF-8 locale for build
+sed -i -e 's/LC_ALL=C.UTF-8/LC_ALL=en_US.utf-8/g' po/Makefile* po/Rules*
 
 %build
 # if gold is used then grub doesn't even boot
@@ -324,13 +309,8 @@ install -d our-ld
 ln -s /usr/bin/ld.bfd our-ld/ld
 export PATH=$(pwd)/our-ld:$PATH
 
-cp -f /usr/share/automake/config.sub .
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoheader}
-echo timestamp > stamp-h.in
-%{__autoconf}
-%{__automake}
+# not only the typicall autotools stuff
+./autogen.sh
 
 for platform in %{platforms} ; do
 	install -d build-${platform}
@@ -446,8 +426,11 @@ fi
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/grub
 %attr(755,root,root) %{_sbindir}/grub-editenv
 %attr(755,root,root) %{_sbindir}/grub-fstest
+%attr(755,root,root) %{_sbindir}/grub-file
+%attr(755,root,root) %{_sbindir}/grub-glue-efi
 %attr(755,root,root) %{_sbindir}/grub-kbdcomp
 %attr(755,root,root) %{_sbindir}/grub-install
+%attr(755,root,root) %{_sbindir}/grub-macbless
 %attr(755,root,root) %{_sbindir}/grub-menulst2cfg
 %attr(755,root,root) %{_sbindir}/grub-mkconfig
 %attr(755,root,root) %{_sbindir}/grub-mklayout
@@ -459,8 +442,10 @@ fi
 %attr(755,root,root) %{_sbindir}/grub-mount
 %attr(755,root,root) %{_sbindir}/grub-ofpathname
 %attr(755,root,root) %{_sbindir}/grub-reboot
+%attr(755,root,root) %{_sbindir}/grub-render-label
 %attr(755,root,root) %{_sbindir}/grub-script-check
 %attr(755,root,root) %{_sbindir}/grub-set-default
+%attr(755,root,root) %{_sbindir}/grub-syslinux2cfg
 %attr(755,root,root) %{_sbindir}/update-grub
 %ifarch %{ix86} %{x8664}
 %attr(755,root,root) %{_sbindir}/grub-bios-setup
@@ -478,19 +463,24 @@ fi
 %{_mandir}/man8/grub-sparc64-setup.8*
 %endif
 %{_mandir}/man1/grub-editenv.1*
+%{_mandir}/man1/grub-file.1*
 %{_mandir}/man1/grub-fstest.1*
+%{_mandir}/man1/grub-glue-efi.1*
 %{_mandir}/man1/grub-kbdcomp.1*
+%{_mandir}/man1/grub-macbless.1*
 %{_mandir}/man1/grub-menulst2cfg.1*
 %{_mandir}/man1/grub-mklayout.1*
+%{_mandir}/man1/grub-mknetdir.1*
 %{_mandir}/man1/grub-mkpasswd-pbkdf2.1*
 %{_mandir}/man1/grub-mkrelpath.1*
 %{_mandir}/man1/grub-mkrescue.1*
 %{_mandir}/man1/grub-mkstandalone.1*
 %{_mandir}/man1/grub-mount.1*
+%{_mandir}/man1/grub-render-label.1*
 %{_mandir}/man1/grub-script-check.1*
+%{_mandir}/man1/grub-syslinux2cfg.1*
 %{_mandir}/man8/grub-install.8*
 %{_mandir}/man8/grub-mkconfig.8*
-%{_mandir}/man8/grub-mknetdir.8*
 %{_mandir}/man8/grub-ofpathname.8*
 %{_mandir}/man8/grub-reboot.8*
 %{_mandir}/man8/grub-set-default.8*
@@ -517,7 +507,12 @@ fi
 %dir /lib/grub.d
 %doc /lib/grub.d/README
 %attr(755,root,root) /lib/grub.d/00_header
+%attr(755,root,root) /lib/grub.d/10_hurd
+%attr(755,root,root) /lib/grub.d/10_illumos
+%attr(755,root,root) /lib/grub.d/10_kfreebsd
 %attr(755,root,root) /lib/grub.d/10_linux
+%attr(755,root,root) /lib/grub.d/10_netbsd
+%attr(755,root,root) /lib/grub.d/10_xnu
 %attr(755,root,root) /lib/grub.d/20_linux_xen
 %attr(755,root,root) /lib/grub.d/30_os-prober
 %attr(755,root,root) /lib/grub.d/41_custom
@@ -551,6 +546,7 @@ fi
 %{_libexecdir}/*-pc/kernel.img
 %ifarch %{ix86} %{x8664} sparc sparc64
 %{_libexecdir}/*-pc/boot.img
+%{_libexecdir}/*-pc/boot_hybrid.img
 %{_libexecdir}/*-pc/cdboot.img
 %{_libexecdir}/*-pc/diskboot.img
 %{_libexecdir}/*-pc/lnxboot.img
diff --git a/Issue-separate-DNS-queries-for-ipv4-and-ipv6.patch b/Issue-separate-DNS-queries-for-ipv4-and-ipv6.patch
deleted file mode 100644
index 953f2bd..0000000
--- a/Issue-separate-DNS-queries-for-ipv4-and-ipv6.patch
+++ /dev/null
@@ -1,230 +0,0 @@
-From 3e00d82827f80461f9fe6da37acd84235c08e5a5 Mon Sep 17 00:00:00 2001
-From: Gustavo Luiz Duarte <gustavold at linux.vnet.ibm.com>
-Date: Fri, 28 Sep 2012 19:42:07 -0400
-Subject: [PATCH] Issue separate DNS queries for ipv4 and ipv6
-
-Adding multiple questions on a single DNS query is not supportted by
-most DNS servers. This patch issues two separate DNS queries
-sequentially for ipv4 and then for ipv6.
-
-There are 4 possible config options:
- DNS_OPTION_IPV4: issue only one ipv4 query
- DNS_OPTION_IPV6: issue only one ipv6 query
- DNS_OPTION_PREFER_IPV4: issue the ipv4 query first and fallback to ipv6
- DNS_OPTION_PREFER_IPV6: issue the ipv6 query first and fallback to ipv4
-However, there is no code yet to set such config option. The default is
-DNS_OPTION_PREFER_IPV4.
-
-Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=860829
----
- grub-core/net/dns.c | 99 ++++++++++++++++++++++++++++++++++++-----------------
- include/grub/net.h  |  9 +++++
- 2 files changed, 76 insertions(+), 32 deletions(-)
-
-diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c
-index 3381ea7..725725c 100644
---- a/grub-core/net/dns.c
-+++ b/grub-core/net/dns.c
-@@ -34,6 +34,14 @@ struct dns_cache_element
- #define DNS_CACHE_SIZE 1021
- #define DNS_HASH_BASE 423
- 
-+typedef enum grub_dns_qtype_id
-+  {
-+    GRUB_DNS_QTYPE_A = 1,
-+    GRUB_DNS_QTYPE_AAAA = 28
-+  } grub_dns_qtype_id_t;
-+
-+static grub_dns_option_t dns_type_option = DNS_OPTION_PREFER_IPV4;
-+
- static struct dns_cache_element dns_cache[DNS_CACHE_SIZE];
- static struct grub_net_network_level_address *dns_servers;
- static grub_size_t dns_nservers, dns_servers_alloc;
-@@ -410,13 +418,13 @@ recv_hook (grub_net_udp_socket_t sock __attribute__ ((unused)),
-   return GRUB_ERR_NONE;
- }
- 
--grub_err_t
--grub_net_dns_lookup (const char *name,
-+static grub_err_t
-+grub_net_dns_lookup_qtype (const char *name,
- 		     const struct grub_net_network_level_address *servers,
- 		     grub_size_t n_servers,
- 		     grub_size_t *naddresses,
- 		     struct grub_net_network_level_address **addresses,
--		     int cache)
-+		     int cache, grub_dns_qtype_id_t qtype)
- {
-   grub_size_t send_servers = 0;
-   grub_size_t i, j;
-@@ -471,8 +479,7 @@ grub_net_dns_lookup (const char *name,
- 			   + GRUB_NET_MAX_LINK_HEADER_SIZE
- 			   + GRUB_NET_UDP_HEADER_SIZE
- 			   + sizeof (struct dns_header)
--			   + grub_strlen (name) + 2 + 4
--			   + 2 + 4);
-+			   + grub_strlen (name) + 2 + 4);
-   if (!nb)
-     {
-       grub_free (data.name);
-@@ -482,7 +489,7 @@ grub_net_dns_lookup (const char *name,
- 			+ GRUB_NET_MAX_LINK_HEADER_SIZE
- 			+ GRUB_NET_UDP_HEADER_SIZE);
-   grub_netbuff_put (nb, sizeof (struct dns_header)
--		    + grub_strlen (name) + 2 + 4 + 2 + 4);
-+		    + grub_strlen (name) + 2 + 4);
-   head = (struct dns_header *) nb->data;
-   optr = (grub_uint8_t *) (head + 1);
-   for (iptr = name; *iptr; )
-@@ -509,18 +516,7 @@ grub_net_dns_lookup (const char *name,
- 
-   /* Type: A.  */
-   *optr++ = 0;
--  *optr++ = 1;
--
--  /* Class.  */
--  *optr++ = 0;
--  *optr++ = 1;
--
--  /* Compressed name.  */
--  *optr++ = 0xc0;
--  *optr++ = 0x0c;
--  /* Type: AAAA.  */
--  *optr++ = 0;
--  *optr++ = 28;
-+  *optr++ = qtype;
- 
-   /* Class.  */
-   *optr++ = 0;
-@@ -529,7 +525,7 @@ grub_net_dns_lookup (const char *name,
-   head->id = data.id;
-   head->flags = FLAGS_RD;
-   head->ra_z_r_code = 0;
--  head->qdcount = grub_cpu_to_be16_compile_time (2);
-+  head->qdcount = grub_cpu_to_be16_compile_time (1);
-   head->ancount = grub_cpu_to_be16_compile_time (0);
-   head->nscount = grub_cpu_to_be16_compile_time (0);
-   head->arcount = grub_cpu_to_be16_compile_time (0);
-@@ -587,16 +583,47 @@ grub_net_dns_lookup (const char *name,
-   if (*data.naddresses)
-     return GRUB_ERR_NONE;
-   if (data.dns_err)
--    return grub_error (GRUB_ERR_NET_NO_DOMAIN,
--		       N_("no DNS record found"));
--    
-+    {
-+      grub_dprintf ("dns", "%s. QTYPE: %u QNAME: %s\n",
-+                    N_("no DNS record found"), qtype, name);
-+      return GRUB_ERR_NET_NO_DOMAIN;
-+    }
-   if (err)
-     {
-       grub_errno = err;
-       return err;
-     }
--  return grub_error (GRUB_ERR_TIMEOUT,
--		     N_("no DNS reply received"));
-+  grub_dprintf ("dns", "%s. QTYPE: %u QNAME: %s\n",
-+                N_("no DNS reply received"), qtype, name);
-+  return GRUB_ERR_TIMEOUT;
-+}
-+
-+grub_err_t
-+grub_net_dns_lookup (const char *name,
-+		     const struct grub_net_network_level_address *servers,
-+		     grub_size_t n_servers,
-+		     grub_size_t *naddresses,
-+		     struct grub_net_network_level_address **addresses,
-+		     int cache)
-+{
-+  if (dns_type_option == DNS_OPTION_IPV6 || dns_type_option == DNS_OPTION_PREFER_IPV6)
-+      grub_net_dns_lookup_qtype (name, servers, n_servers, naddresses,
-+                                 addresses, cache, GRUB_DNS_QTYPE_AAAA);
-+  else
-+      grub_net_dns_lookup_qtype (name, servers, n_servers, naddresses,
-+                                 addresses, cache, GRUB_DNS_QTYPE_A);
-+  if (!*naddresses)
-+    {
-+      if (dns_type_option == DNS_OPTION_PREFER_IPV4)
-+          grub_net_dns_lookup_qtype (name, servers, n_servers, naddresses,
-+                                     addresses, cache, GRUB_DNS_QTYPE_AAAA);
-+      else if (dns_type_option == DNS_OPTION_PREFER_IPV6)
-+          grub_net_dns_lookup_qtype (name, servers, n_servers, naddresses,
-+                                     addresses, cache, GRUB_DNS_QTYPE_A);
-+    }
-+  if (!*naddresses)
-+      return GRUB_ERR_NET_NO_DOMAIN;
-+  return GRUB_ERR_NONE;
- }
- 
- static grub_err_t
-@@ -604,22 +631,28 @@ grub_cmd_nslookup (struct grub_command *cmd __attribute__ ((unused)),
- 		   int argc, char **args)
- {
-   grub_err_t err;
--  grub_size_t naddresses, i;
-+  struct grub_net_network_level_address cmd_server;
-+  struct grub_net_network_level_address *servers;
-+  grub_size_t nservers, i, naddresses = 0;
-   struct grub_net_network_level_address *addresses = 0;
-   if (argc != 2 && argc != 1)
-     return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("two arguments expected"));
-   if (argc == 2)
-     {
--      struct grub_net_network_level_address server;
--      err = grub_net_resolve_address (args[1], &server);
-+      err = grub_net_resolve_address (args[1], &cmd_server);
-       if (err)
- 	return err;
--      err = grub_net_dns_lookup (args[0], &server, 1, &naddresses,
--				 &addresses, 0);
-+      servers = &cmd_server;
-+      nservers = 1;
-     }
-   else
--    err = grub_net_dns_lookup (args[0], dns_servers, dns_nservers, &naddresses,
--			       &addresses, 0);
-+    {
-+      servers = dns_servers;
-+      nservers = dns_nservers;
-+    }
-+
-+  grub_net_dns_lookup (args[0], servers, nservers, &naddresses,
-+                       &addresses, 0);
- 
-   for (i = 0; i < naddresses; i++)
-     {
-@@ -628,7 +661,9 @@ grub_cmd_nslookup (struct grub_command *cmd __attribute__ ((unused)),
-       grub_printf ("%s\n", buf);
-     }
-   grub_free (addresses);
--  return GRUB_ERR_NONE;
-+  if (naddresses)
-+    return GRUB_ERR_NONE;
-+  return grub_error (GRUB_ERR_NET_NO_DOMAIN, N_("no DNS record found"));
- }
- 
- static grub_err_t
-diff --git a/include/grub/net.h b/include/grub/net.h
-index 3877451..a7e5b2c 100644
---- a/include/grub/net.h
-+++ b/include/grub/net.h
-@@ -505,6 +505,15 @@ grub_err_t
- grub_net_link_layer_resolve (struct grub_net_network_level_interface *inf,
- 			     const grub_net_network_level_address_t *proto_addr,
- 			     grub_net_link_level_address_t *hw_addr);
-+
-+typedef enum
-+  {
-+    DNS_OPTION_IPV4,
-+    DNS_OPTION_IPV6,
-+    DNS_OPTION_PREFER_IPV4,
-+    DNS_OPTION_PREFER_IPV6
-+  } grub_dns_option_t;
-+
- grub_err_t
- grub_net_dns_lookup (const char *name,
- 		     const struct grub_net_network_level_address *servers,
--- 
-1.7.11.4
-
diff --git a/add-GRUB-DISABLE-SUBMENU-option.patch b/add-GRUB-DISABLE-SUBMENU-option.patch
deleted file mode 100644
index 54f733d..0000000
--- a/add-GRUB-DISABLE-SUBMENU-option.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 81e46875469ae8b2a803e6457784801a0a7a7963 Mon Sep 17 00:00:00 2001
-From: Prarit Bhargava <prarit at redhat.com>
-Date: Thu, 7 Feb 2013 11:53:41 -0500
-Subject: [PATCH] add GRUB_DISABLE_SUBMENU option
-
-This patch adds the ability to disable the grub2 submenus from
-/etc/default/grub
-
-To disable the submenus
-
-echo 'GRUB_DISABLE_SUBMENU="true"' >> /etc/default/grub
-
-
----
- util/grub-mkconfig.in   |  3 ++-
- util/grub.d/10_linux.in | 24 ++++++++++++++----------
- 2 files changed, 16 insertions(+), 11 deletions(-)
-
-diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
-index 516be86..354eb43 100644
---- a/util/grub-mkconfig.in
-+++ b/util/grub-mkconfig.in
-@@ -216,7 +216,8 @@ export GRUB_DEFAULT \
-   GRUB_INIT_TUNE \
-   GRUB_SAVEDEFAULT \
-   GRUB_ENABLE_CRYPTODISK \
--  GRUB_BADRAM
-+  GRUB_BADRAM \
-+  GRUB_DISABLE_SUBMENU
- 
- if test "x${grub_cfg}" != "x"; then
-   rm -f "${grub_cfg}.new"
-diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index e2b8ab3..9427a39 100644
---- a/util/grub.d/10_linux.in
-+++ b/util/grub.d/10_linux.in
-@@ -240,17 +240,19 @@ while [ "x$list" != "x" ] ; do
-     linux_root_device_thisversion=${GRUB_DEVICE}
-   fi
- 
--  if [ "x$is_first_entry" = xtrue ]; then
--    linux_entry "${OS}" "${version}" simple \
--    "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
-+  if [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
-+    if [ "x$is_first_entry" = xtrue ]; then
-+      linux_entry "${OS}" "${version}" simple \
-+      "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
- 
--    submenu_indentation="\t"
-+      submenu_indentation="\t"
-     
--    if [ -z "$boot_device_id" ]; then
--	boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
-+      if [ -z "$boot_device_id" ]; then
-+	  boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
-+      fi
-+      # TRANSLATORS: %s is replaced with an OS name
-+      echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
-     fi
--    # TRANSLATORS: %s is replaced with an OS name
--    echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
-   fi
- 
-   linux_entry "${OS}" "${version}" advanced \
-@@ -266,8 +268,10 @@ done
- 
- # If at least one kernel was found, then we need to
- # add a closing '}' for the submenu command.
--if [ x"$is_first_entry" != xtrue ]; then
--  echo '}'
-+if [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
-+  if [ x"$is_first_entry" != xtrue ]; then
-+    echo '}'
-+  fi
- fi
- 
- echo "$title_correction_code"
---- grub-2.00/util/grub.d/20_linux_xen.in~	2013-04-15 00:03:09.162253769 +0200
-+++ grub-2.00/util/grub.d/20_linux_xen.in	2013-04-15 00:18:49.254774567 +0200
-@@ -232,7 +232,8 @@
- 	    linux_root_device_thisversion=${GRUB_DEVICE}
- 	fi
- 
--	if [ "x$is_first_entry" = xtrue ]; then
-+        if [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
-+	  if [ "x$is_first_entry" = xtrue ]; then
- 	    linux_entry "${OS}" "${version}" "${xen_version}" simple \
- 		"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
- 
-@@ -243,9 +244,10 @@
- 	    fi
-             # TRANSLATORS: %s is replaced with an OS name
- 	    echo "submenu '$(gettext_printf "Advanced options for %s (with Xen hypervisor)" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
--	echo "	submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
-+	    echo "	submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
-+	  fi
-+	  is_first_entry=false
- 	fi
--	is_first_entry=false
- 
- 	linux_entry "${OS}" "${version}" "${xen_version}" advanced \
- 	    "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
-@@ -256,8 +258,10 @@
- 
- 	list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
-     done
--    if [ x"$is_first_entry" != xtrue ]; then
-+    if [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
-+      if [ x"$is_first_entry" != xtrue ]; then
- 	echo '	}'
-+      fi
-     fi
-     xen_list=`echo $xen_list | tr ' ' '\n' | grep -vx $current_xen | tr '\n' ' '`
- done
diff --git a/add-X-option-to-printf-functions.patch b/add-X-option-to-printf-functions.patch
deleted file mode 100644
index 63d7b79..0000000
--- a/add-X-option-to-printf-functions.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 80f81f233bf74aac740d7a299d075ea46c9c7bd4 Mon Sep 17 00:00:00 2001
-From: Paulo Flabiano Smorigo <pfsmorigo at br.ibm.com>
-Date: Tue, 27 Nov 2012 16:58:39 -0200
-Subject: [PATCH 1/3] Add %X option to printf functions.
-
----
- grub-core/kern/misc.c |    7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
-index 95d4624..8ac087a 100644
---- a/grub-core/kern/misc.c
-+++ b/grub-core/kern/misc.c
-@@ -596,7 +596,7 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, grub_uint64_t *r)
- static char *
- grub_lltoa (char *str, int c, unsigned long long n)
- {
--  unsigned base = (c == 'x') ? 16 : 10;
-+  unsigned base = ((c == 'x') || (c == 'X')) ? 16 : 10;
-   char *p;
- 
-   if ((long long) n < 0 && c == 'd')
-@@ -611,7 +611,7 @@ grub_lltoa (char *str, int c, unsigned long long n)
-     do
-       {
- 	unsigned d = (unsigned) (n & 0xf);
--	*p++ = (d > 9) ? d + 'a' - 10 : d + '0';
-+	*p++ = (d > 9) ? d + ((c == 'x') ? 'a' : 'A') - 10 : d + '0';
-       }
-     while (n >>= 4);
-   else
-@@ -702,6 +702,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a
- 	{
- 	case 'p':
- 	case 'x':
-+	case 'X':
- 	case 'u':
- 	case 'd':
- 	case 'c':
-@@ -777,6 +778,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a
-       switch (c)
- 	{
- 	case 'x':
-+	case 'X':
- 	case 'u':
- 	case 'd':
- 	  if (longlongfmt)
-@@ -918,6 +920,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a
- 	  longlongfmt |= (sizeof (void *) == sizeof (long long));
- 	  /* Fall through. */
- 	case 'x':
-+	case 'X':
- 	case 'u':
- 	  unsig = 1;
- 	  /* Fall through. */
--- 
-1.7.10.4
-
diff --git a/add-vlan-tag-support.patch b/add-vlan-tag-support.patch
index be01c58..c45473e 100644
--- a/add-vlan-tag-support.patch
+++ b/add-vlan-tag-support.patch
@@ -1,29 +1,7 @@
-From 5573f16fd05c1f8f310f2ead176b52ed6d4a08ec Mon Sep 17 00:00:00 2001
-From: Paulo Flabiano Smorigo <pfsmorigo at br.ibm.com>
-Date: Tue, 30 Oct 2012 15:19:39 -0200
-Subject: [PATCH] Add vlan-tag support
-
-This patch adds support for virtual LAN (VLAN) tagging. VLAN tagging allows
-multiple VLANs in a bridged network to share the same physical network link but
-maintain isolation:
-
-http://en.wikipedia.org/wiki/IEEE_802.1Q
-
-This patch should fix this bugzilla:
-https://bugzilla.redhat.com/show_bug.cgi?id=871563
----
- grub-core/kern/ieee1275/init.c   |    1 +
- grub-core/kern/ieee1275/openfw.c |   30 +++++++++++++++++++++++++++
- grub-core/net/ethernet.c         |   42 +++++++++++++++++++++++++++++++++++---
- include/grub/ieee1275/ieee1275.h |    1 +
- include/grub/net.h               |    2 ++
- 5 files changed, 73 insertions(+), 3 deletions(-)
-
-diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
-index 5c45947..209cf8a 100644
---- a/grub-core/kern/ieee1275/init.c
-+++ b/grub-core/kern/ieee1275/init.c
-@@ -102,6 +102,7 @@ grub_machine_get_bootlocation (char **device, char **path)
+diff -dur grub-2.00.git20131218.orig/grub-core/kern/ieee1275/init.c grub-2.00.git20131218/grub-core/kern/ieee1275/init.c
+--- grub-2.00.git20131218.orig/grub-core/kern/ieee1275/init.c	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/grub-core/kern/ieee1275/init.c	2013-12-18 14:39:17.000000000 +0100
+@@ -118,6 +118,7 @@
        char *dev, *canon;
        char *ptr;
        dev = grub_ieee1275_get_aliasdevname (bootpath);
@@ -31,10 +9,10 @@ index 5c45947..209cf8a 100644
        canon = grub_ieee1275_canonicalise_devname (dev);
        ptr = canon + grub_strlen (canon) - 1;
        while (ptr > canon && (*ptr == ',' || *ptr == ':'))
-diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c
-index c2b1bdf..9fdfafa 100644
---- a/grub-core/kern/ieee1275/openfw.c
-+++ b/grub-core/kern/ieee1275/openfw.c
+Only in grub-2.00.git20131218/grub-core/kern/ieee1275: init.c.orig
+diff -dur grub-2.00.git20131218.orig/grub-core/kern/ieee1275/openfw.c grub-2.00.git20131218/grub-core/kern/ieee1275/openfw.c
+--- grub-2.00.git20131218.orig/grub-core/kern/ieee1275/openfw.c	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/grub-core/kern/ieee1275/openfw.c	2013-12-18 14:39:17.000000000 +0100
 @@ -23,6 +23,7 @@
  #include <grub/mm.h>
  #include <grub/ieee1275/ieee1275.h>
@@ -43,7 +21,7 @@ index c2b1bdf..9fdfafa 100644
  
  enum grub_ieee1275_parse_type
  {
-@@ -413,6 +414,35 @@ fail:
+@@ -451,6 +452,35 @@
    return ret;
  }
  
@@ -79,10 +57,10 @@ index c2b1bdf..9fdfafa 100644
  char *
  grub_ieee1275_get_device_type (const char *path)
  {
-diff --git a/grub-core/net/ethernet.c b/grub-core/net/ethernet.c
-index b38e2c8..5e45d46 100644
---- a/grub-core/net/ethernet.c
-+++ b/grub-core/net/ethernet.c
+Only in grub-2.00.git20131218/grub-core/kern/ieee1275: openfw.c.orig
+diff -dur grub-2.00.git20131218.orig/grub-core/net/ethernet.c grub-2.00.git20131218/grub-core/net/ethernet.c
+--- grub-2.00.git20131218.orig/grub-core/net/ethernet.c	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/grub-core/net/ethernet.c	2013-12-18 14:39:17.000000000 +0100
 @@ -23,6 +23,7 @@
  #include <grub/net/arp.h>
  #include <grub/net/netbuff.h>
@@ -91,7 +69,7 @@ index b38e2c8..5e45d46 100644
  #include <grub/time.h>
  #include <grub/net/arp.h>
  
-@@ -56,10 +57,19 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
+@@ -56,10 +57,19 @@
  {
    struct etherhdr *eth;
    grub_err_t err;
@@ -113,7 +91,7 @@ index b38e2c8..5e45d46 100644
    if (err)
      return err;
    eth = (struct etherhdr *) nb->data;
-@@ -76,6 +86,19 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
+@@ -76,6 +86,19 @@
  	return err;
        inf->card->opened = 1;
      }
@@ -133,7 +111,7 @@ index b38e2c8..5e45d46 100644
    return inf->card->driver->send (inf->card, nb);
  }
  
-@@ -90,10 +113,23 @@ grub_net_recv_ethernet_packet (struct grub_net_buff *nb,
+@@ -90,10 +113,23 @@
    grub_net_link_level_address_t hwaddress;
    grub_net_link_level_address_t src_hwaddress;
    grub_err_t err;
@@ -158,28 +136,25 @@ index b38e2c8..5e45d46 100644
    if (err)
      return err;
  
-diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
-index 416a544..a8cf093 100644
---- a/include/grub/ieee1275/ieee1275.h
-+++ b/include/grub/ieee1275/ieee1275.h
-@@ -210,5 +210,6 @@ char *EXPORT_FUNC(grub_ieee1275_canonicalise_devname) (const char *path);
- char *EXPORT_FUNC(grub_ieee1275_get_aliasdevname) (const char *path);
+diff -dur grub-2.00.git20131218.orig/include/grub/ieee1275/ieee1275.h grub-2.00.git20131218/include/grub/ieee1275/ieee1275.h
+--- grub-2.00.git20131218.orig/include/grub/ieee1275/ieee1275.h	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/include/grub/ieee1275/ieee1275.h	2013-12-18 14:40:11.000000000 +0100
+@@ -226,6 +226,7 @@
  char *EXPORT_FUNC(grub_ieee1275_canonicalise_devname) (const char *path);
  char *EXPORT_FUNC(grub_ieee1275_get_device_type) (const char *path);
+ char *EXPORT_FUNC(grub_ieee1275_get_devname) (const char *path);
 +int EXPORT_FUNC(grub_ieee1275_parse_net_options) (const char *path);
  
- #endif /* ! GRUB_IEEE1275_HEADER */
-diff --git a/include/grub/net.h b/include/grub/net.h
-index a7e5b2c..f4fec17 100644
---- a/include/grub/net.h
-+++ b/include/grub/net.h
-@@ -532,4 +532,6 @@ extern char *grub_net_default_server;
+ void EXPORT_FUNC(grub_ieee1275_devalias_init_iterator) (struct grub_ieee1275_devalias *alias);
+ void EXPORT_FUNC(grub_ieee1275_devalias_free) (struct grub_ieee1275_devalias *alias);
+diff -dur grub-2.00.git20131218.orig/include/grub/net.h grub-2.00.git20131218/include/grub/net.h
+--- grub-2.00.git20131218.orig/include/grub/net.h	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/include/grub/net.h	2013-12-18 14:39:18.000000000 +0100
+@@ -533,4 +533,6 @@
  #define GRUB_NET_TRIES 40
  #define GRUB_NET_INTERVAL 400
  
 +#define VLANTAG_IDENTIFIER 0x8100
 +
  #endif /* ! GRUB_NET_HEADER */
--- 
-1.7.10.4
-
+Only in grub-2.00.git20131218/include/grub: net.h.orig
diff --git a/choose-preferred-initrd.patch b/choose-preferred-initrd.patch
index f84e380..12a01ba 100644
--- a/choose-preferred-initrd.patch
+++ b/choose-preferred-initrd.patch
@@ -1,18 +1,20 @@
---- grub-2.00/util/grub-mkconfig.in~	2013-04-15 00:03:09.162253769 +0200
-+++ grub-2.00/util/grub-mkconfig.in	2013-04-15 01:39:22.112705322 +0200
-@@ -233,7 +233,8 @@
-   GRUB_SAVEDEFAULT \
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub-mkconfig.in grub-2.00.git20131218/util/grub-mkconfig.in
+--- grub-2.00.git20131218.orig/util/grub-mkconfig.in	2013-12-18 14:44:31.000000000 +0100
++++ grub-2.00.git20131218/util/grub-mkconfig.in	2013-12-18 14:45:37.000000000 +0100
+@@ -255,7 +255,8 @@
    GRUB_ENABLE_CRYPTODISK \
    GRUB_BADRAM \
+   GRUB_OS_PROBER_SKIP_LIST \
 -  GRUB_DISABLE_SUBMENU
 +  GRUB_DISABLE_SUBMENU \
 +  GRUB_PREFER_DRACUT
  
  if test "x${grub_cfg}" != "x"; then
    rm -f "${grub_cfg}.new"
---- grub-2.00/util/grub.d/10_linux.in~	2013-04-15 00:03:09.162253769 +0200
-+++ grub-2.00/util/grub.d/10_linux.in	2013-04-15 01:38:26.992181771 +0200
-@@ -191,10 +191,12 @@
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/10_linux.in grub-2.00.git20131218/util/grub.d/10_linux.in
+--- grub-2.00.git20131218.orig/util/grub.d/10_linux.in	2013-12-18 14:44:31.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/10_linux.in	2013-12-18 14:44:49.000000000 +0100
+@@ -198,10 +198,12 @@
    linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
  
    initrd=
@@ -29,9 +31,10 @@
  	   "initramfs-genkernel-${version}" \
  	   "initramfs-genkernel-${alt_version}" \
  	   "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
---- grub-2.00/util/grub.d/20_linux_xen.in~	2013-04-15 11:47:30.852286811 +0200
-+++ grub-2.00/util/grub.d/20_linux_xen.in	2013-04-15 11:49:05.606550816 +0200
-@@ -212,10 +212,12 @@
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in grub-2.00.git20131218/util/grub.d/20_linux_xen.in
+--- grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in	2013-12-18 14:44:31.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/20_linux_xen.in	2013-12-18 14:44:49.000000000 +0100
+@@ -207,10 +207,12 @@
  	linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
  
  	initrd=
diff --git a/dhcp-client-id-and-uuid-options-added.patch b/dhcp-client-id-and-uuid-options-added.patch
deleted file mode 100644
index c573936..0000000
--- a/dhcp-client-id-and-uuid-options-added.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From d63a0b7fd665fae1dd34d3e86127b93dd87b8114 Mon Sep 17 00:00:00 2001
-From: Paulo Flabiano Smorigo <pfsmorigo at br.ibm.com>
-Date: Tue, 27 Nov 2012 17:18:53 -0200
-Subject: [PATCH 2/3] DHCP client ID and UUID options added.
-
----
- grub-core/net/bootp.c |   56 +++++++++++++++++++++++++++++++++++++++++--------
- include/grub/net.h    |    2 ++
- 2 files changed, 49 insertions(+), 9 deletions(-)
-
-diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
-index bc07d53..3b4130d 100644
---- a/grub-core/net/bootp.c
-+++ b/grub-core/net/bootp.c
-@@ -51,6 +51,14 @@ set_env_limn_ro (const char *intername, const char *suffix,
-   grub_register_variable_hook (varname, 0, grub_env_write_readonly);
- }
- 
-+static char
-+hexdigit (grub_uint8_t val)
-+{
-+  if (val < 10)
-+    return val + '0';
-+  return val + 'a' - 10;
-+}
-+
- static void
- parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
- {
-@@ -81,6 +89,9 @@ parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
- 
-       taglength = *ptr++;
- 
-+      grub_dprintf("net", "DHCP option %u (0x%02x) found with length %u.\n",
-+                   tagtype, tagtype, taglength);
-+
-       switch (tagtype)
- 	{
- 	case GRUB_NET_BOOTP_NETMASK:
-@@ -121,7 +132,9 @@ parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
- 		grub_net_add_dns_server (&s);
- 		ptr += 4;
- 	      }
--	  }
-+            /* Skip adittional increment */
-+            continue;
-+          }
- 	  break;
- 	case GRUB_NET_BOOTP_HOSTNAME:
- 	  set_env_limn_ro (name, "hostname", (char *) ptr, taglength);
-@@ -139,6 +152,39 @@ parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
- 	  set_env_limn_ro (name, "extensionspath", (char *) ptr, taglength);
- 	  break;
- 
-+        case GRUB_NET_BOOTP_CLIENT_ID:
-+	  set_env_limn_ro (name, "clientid", (char *) ptr, taglength);
-+          break;
-+
-+        case GRUB_NET_BOOTP_CLIENT_UUID:
-+            {
-+              if (taglength != 17)
-+                break;
-+
-+              /* The format is 9cfe245e-d0c8-bd45-a79f-54ea5fbd3d97 */
-+
-+              ptr += 1;
-+              taglength -= 1;
-+
-+              char *val = grub_malloc (2 * taglength + 4 + 1);
-+              int i = 0;
-+              int j = 0;
-+              for (i = 0; i < taglength; i++)
-+                {
-+                  val[2 * i + j] = hexdigit (ptr[i] >> 4);
-+                  val[2 * i + 1 + j] = hexdigit (ptr[i] & 0xf);
-+
-+                  if ((i == 3) || (i == 5) || (i == 7) || (i == 9))
-+                    {
-+                      j++;
-+                      val[2 * i + 1+ j] = '-';
-+                    }
-+                }
-+
-+              set_env_limn_ro (name, "clientuuid", (char *) val, 2 * taglength + 4);
-+            }
-+          break;
-+
- 	  /* If you need any other options please contact GRUB
- 	     developpement team.  */
- 	}
-@@ -299,14 +345,6 @@ grub_net_process_dhcp (struct grub_net_buff *nb,
-     }
- }
- 
--static char
--hexdigit (grub_uint8_t val)
--{
--  if (val < 10)
--    return val + '0';
--  return val + 'a' - 10;
--}
--
- static grub_err_t
- grub_cmd_dhcpopt (struct grub_command *cmd __attribute__ ((unused)),
- 		  int argc, char **args)
-diff --git a/include/grub/net.h b/include/grub/net.h
-index a7e5b2c..45348dd 100644
---- a/include/grub/net.h
-+++ b/include/grub/net.h
-@@ -423,6 +423,8 @@ enum
-     GRUB_NET_BOOTP_DOMAIN = 0x0f,
-     GRUB_NET_BOOTP_ROOT_PATH = 0x11,
-     GRUB_NET_BOOTP_EXTENSIONS_PATH = 0x12,
-+    GRUB_NET_BOOTP_CLIENT_ID = 0x3d,
-+    GRUB_NET_BOOTP_CLIENT_UUID = 0x61,
-     GRUB_NET_BOOTP_END = 0xff
-   };
- 
--- 
-1.7.10.4
-
diff --git a/fix-http-crash.patch b/fix-http-crash.patch
deleted file mode 100644
index ac110c3..0000000
--- a/fix-http-crash.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 4414df5e72937b0bb1c4a0bb66cd1132ec2a5720 Mon Sep 17 00:00:00 2001
-From: Gustavo Luiz Duarte <gustavold at linux.vnet.ibm.com>
-Date: Tue, 25 Sep 2012 18:40:55 -0400
-Subject: [PATCH] Fix crash on http
-
-Don't free file->data on receiving FIN flag since it is used all over without
-checking. http_close() will be called later to free that memory.
-https://bugzilla.redhat.com/show_bug.cgi?id=860834
----
- grub-core/net/http.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/grub-core/net/http.c b/grub-core/net/http.c
-index a7542d1..a5f6f31 100644
---- a/grub-core/net/http.c
-+++ b/grub-core/net/http.c
-@@ -386,7 +386,7 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial)
- 
-   data->sock = grub_net_tcp_open (file->device->net->server,
- 				  HTTP_PORT, http_receive,
--				  http_err, http_err,
-+				  http_err, NULL,
- 				  file);
-   if (!data->sock)
-     {
--- 
-1.7.11.4
-
diff --git a/grub-lvmdevice.patch b/grub-lvmdevice.patch
index 8f04e80..cea1ebb 100644
--- a/grub-lvmdevice.patch
+++ b/grub-lvmdevice.patch
@@ -1,9 +1,10 @@
---- grub-1.97.1/util/grub-mkconfig.in~	2009-11-17 17:02:16.626243372 +0200
-+++ grub-1.97.1/util/grub-mkconfig.in	2009-11-17 17:02:08.346050859 +0200
-@@ -120,6 +120,27 @@
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub-mkconfig.in grub-2.00.git20131218/util/grub-mkconfig.in
+--- grub-2.00.git20131218.orig/util/grub-mkconfig.in	2013-12-18 14:20:33.000000000 +0100
++++ grub-2.00.git20131218/util/grub-mkconfig.in	2013-12-18 14:21:31.000000000 +0100
+@@ -138,6 +138,27 @@
  
  # Device containing our userland.  Typically used for root= parameter.
- GRUB_DEVICE="`${grub_probe} --target=device /`"
+ GRUB_DEVICE="`${grub_probe} --target=device "$GRUB_ROOT"/`"
 +
 +# Rewrite to sane LVM node (Code from PLD Linux geninitrd):
 +# /dev/mapper/sys-rootfs -> /dev/sys/rootfs
diff --git a/grub-mkconfig-diagnostics.patch b/grub-mkconfig-diagnostics.patch
index 6f2ab81..34d7d22 100644
--- a/grub-mkconfig-diagnostics.patch
+++ b/grub-mkconfig-diagnostics.patch
@@ -1,7 +1,7 @@
-diff -dur grub-2.00.orig/util/grub-mkconfig.in grub-2.00/util/grub-mkconfig.in
---- grub-2.00.orig/util/grub-mkconfig.in	2012-10-27 15:05:15.000000000 +0200
-+++ grub-2.00/util/grub-mkconfig.in	2012-10-27 15:14:32.787243346 +0200
-@@ -221,11 +236,16 @@
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub-mkconfig.in grub-2.00.git20131218/util/grub-mkconfig.in
+--- grub-2.00.git20131218.orig/util/grub-mkconfig.in	2013-12-18 14:24:56.000000000 +0100
++++ grub-2.00.git20131218/util/grub-mkconfig.in	2013-12-18 14:31:16.000000000 +0100
+@@ -259,11 +259,16 @@
  if test "x${grub_cfg}" != "x"; then
    rm -f "${grub_cfg}.new"
    oldumask=$(umask); umask 077
@@ -13,19 +13,21 @@ diff -dur grub-2.00.orig/util/grub-mkconfig.in grub-2.00/util/grub-mkconfig.in
 +  # open fd &3 for diagnostic messages
 +  exec 3>&2
  fi
--gettext "Generating grub.cfg ..." >&2
+-gettext "Generating grub configuration file ..." >&2
 -echo >&2
-+gettext "Generating grub.cfg ..." >&3
++gettext "Generating grub configuration file ..." >&3
 +echo >&3
  
  cat << EOF
  #
-@@ -259,12 +279,15 @@
+@@ -325,13 +330,16 @@
      gettext_printf "Syntax errors are detected in generated GRUB config file.
  Ensure that there are no errors in /etc/sysconfig/grub
  and /etc/grub.d/* files or please file a bug report with
 -%s file attached." "${grub_cfg}.new" >&2
+-    echo >&2
 +%s file attached." "${grub_cfg}.new" >&3
++    echo >&3
    else
      # none of the children aborted with error, install the new grub.cfg
      mv -f ${grub_cfg}.new ${grub_cfg}
@@ -39,10 +41,10 @@ diff -dur grub-2.00.orig/util/grub-mkconfig.in grub-2.00/util/grub-mkconfig.in
 +
 +# close diagnostic stream
 +exec 3>&-
-diff -dur grub-2.00.orig/util/grub.d/00_header.in grub-2.00/util/grub.d/00_header.in
---- grub-2.00.orig/util/grub.d/00_header.in	2012-05-04 01:04:39.000000000 +0200
-+++ grub-2.00/util/grub.d/00_header.in	2012-10-27 15:16:00.665356307 +0200
-@@ -219,7 +219,7 @@
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/00_header.in grub-2.00.git20131218/util/grub.d/00_header.in
+--- grub-2.00.git20131218.orig/util/grub.d/00_header.in	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/00_header.in	2013-12-18 14:29:45.000000000 +0100
+@@ -229,7 +229,7 @@
  if [ "x$gfxterm" = x1 ]; then
      if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
  	&& is_path_readable_by_grub "$GRUB_THEME"; then
@@ -51,7 +53,7 @@ diff -dur grub-2.00.orig/util/grub.d/00_header.in grub-2.00/util/grub.d/00_heade
  
  	prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
  	cat << EOF
-@@ -255,12 +255,12 @@
+@@ -265,12 +265,12 @@
  EOF
      elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
  	    && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
@@ -66,13 +68,13 @@ diff -dur grub-2.00.orig/util/grub.d/00_header.in grub-2.00/util/grub.d/00_heade
  	esac
  	prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
  	cat << EOF
-diff -dur grub-2.00.orig/util/grub.d/10_hurd.in grub-2.00/util/grub.d/10_hurd.in
---- grub-2.00.orig/util/grub.d/10_hurd.in	2012-03-04 21:10:04.000000000 +0100
-+++ grub-2.00/util/grub.d/10_hurd.in	2012-10-27 15:16:00.665356307 +0200
-@@ -45,8 +45,8 @@
-     basename=`basename $i`
-     dirname=`dirname $i`
-     rel_dirname=`make_system_path_relative_to_its_root $dirname`
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/10_hurd.in grub-2.00.git20131218/util/grub.d/10_hurd.in
+--- grub-2.00.git20131218.orig/util/grub.d/10_hurd.in	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/10_hurd.in	2013-12-18 14:32:14.000000000 +0100
+@@ -55,8 +55,8 @@
+     basename=`basename "$i"`
+     dirname=`dirname "$i"`
+     rel_dirname=`make_system_path_relative_to_its_root "$dirname"`
 -    gettext_printf "Found GNU Mach: %s" "$i" >&2
 -    echo >&2
 +    gettext_printf "Found GNU Mach: %s" "$i" >&3
@@ -80,10 +82,10 @@ diff -dur grub-2.00.orig/util/grub.d/10_hurd.in grub-2.00/util/grub.d/10_hurd.in
      kernels="${kernels} ${rel_dirname}/${basename}"
      at_least_one=true
    fi
-@@ -60,8 +60,8 @@
+@@ -70,8 +70,8 @@
  
- for i in /hurd/${hurd_fs}.static /hurd/exec ; do
-   if test -e "$i" ; then
+ for i in "$GRUB_ROOT"/hurd/${hurd_fs}.static "$GRUB_ROOT"/hurd/exec ; do
+   if test -f "$i" ; then
 -    gettext_printf "Found Hurd module: %s" "$i" >&2
 -    echo >&2
 +    gettext_printf "Found Hurd module: %s" "$i" >&3
@@ -91,10 +93,10 @@ diff -dur grub-2.00.orig/util/grub.d/10_hurd.in grub-2.00/util/grub.d/10_hurd.in
      at_least_one=true
    else
      all_of_them=false
-@@ -74,8 +74,8 @@
+@@ -84,8 +84,8 @@
  fi
  
- if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else
+ if ${all_of_them} && test -f "$GRUB_ROOT"/lib/ld.so.1 ; then : ; else
 -  gettext "Some Hurd stuff found, but not enough to boot." >&2
 -  echo >&2
 +  gettext "Some Hurd stuff found, but not enough to boot." >&3
@@ -102,10 +104,10 @@ diff -dur grub-2.00.orig/util/grub.d/10_hurd.in grub-2.00/util/grub.d/10_hurd.in
    exit 1
  fi
  
-diff -dur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfreebsd.in
---- grub-2.00.orig/util/grub.d/10_kfreebsd.in	2012-03-04 22:02:30.000000000 +0100
-+++ grub-2.00/util/grub.d/10_kfreebsd.in	2012-10-27 15:16:00.668689695 +0200
-@@ -158,7 +158,7 @@
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/10_kfreebsd.in grub-2.00.git20131218/util/grub.d/10_kfreebsd.in
+--- grub-2.00.git20131218.orig/util/grub.d/10_kfreebsd.in	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/10_kfreebsd.in	2013-12-18 14:29:45.000000000 +0100
+@@ -168,7 +168,7 @@
  
  while [ "x$list" != "x" ] ; do
    kfreebsd=`version_find_latest $list`
@@ -114,7 +116,7 @@ diff -dur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
    basename=`basename $kfreebsd`
    dirname=`dirname $kfreebsd`
    rel_dirname=`make_system_path_relative_to_its_root $dirname`
-@@ -207,7 +207,7 @@
+@@ -217,7 +217,7 @@
      fi
    done
    if test -n "${module_dir}" ; then
@@ -123,11 +125,11 @@ diff -dur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
      module_dir_rel=$(make_system_path_relative_to_its_root $module_dir)
    fi
  
-diff -dur grub-2.00.orig/util/grub.d/10_linux.in grub-2.00/util/grub.d/10_linux.in
---- grub-2.00.orig/util/grub.d/10_linux.in	2012-10-27 15:05:15.000000000 +0200
-+++ grub-2.00/util/grub.d/10_linux.in	2012-10-27 15:16:00.668689695 +0200
-@@ -182,7 +182,7 @@
- is_first_entry=true
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/10_linux.in grub-2.00.git20131218/util/grub.d/10_linux.in
+--- grub-2.00.git20131218.orig/util/grub.d/10_linux.in	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/10_linux.in	2013-12-18 14:29:45.000000000 +0100
+@@ -189,7 +189,7 @@
+ is_top_level=true
  while [ "x$list" != "x" ] ; do
    linux=`version_find_latest $list`
 -  gettext_printf "Found linux image: %s\n" "$linux" >&2
@@ -135,7 +137,7 @@ diff -dur grub-2.00.orig/util/grub.d/10_linux.in grub-2.00/util/grub.d/10_linux.
    basename=`basename $linux`
    dirname=`dirname $linux`
    rel_dirname=`make_system_path_relative_to_its_root $dirname`
-@@ -220,7 +220,7 @@
+@@ -226,7 +226,7 @@
    fi
  
    if test -n "${initrd}" ; then
@@ -144,21 +146,21 @@ diff -dur grub-2.00.orig/util/grub.d/10_linux.in grub-2.00/util/grub.d/10_linux.
    elif test -z "${initramfs}" ; then
      # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs.  Since there's
      # no initrd or builtin initramfs, it can't work here.
-diff -dur grub-2.00.orig/util/grub.d/10_netbsd.in grub-2.00/util/grub.d/10_netbsd.in
---- grub-2.00.orig/util/grub.d/10_netbsd.in	2012-03-04 20:47:35.000000000 +0100
-+++ grub-2.00/util/grub.d/10_netbsd.in	2012-10-27 15:16:00.668689695 +0200
-@@ -155,7 +155,7 @@
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/10_netbsd.in grub-2.00.git20131218/util/grub.d/10_netbsd.in
+--- grub-2.00.git20131218.orig/util/grub.d/10_netbsd.in	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/10_netbsd.in	2013-12-18 14:29:45.000000000 +0100
+@@ -166,7 +166,7 @@
      continue
    fi
  
 -  gettext_printf "Found NetBSD kernel: %s\n" "$k" >&2
 +  gettext_printf "Found NetBSD kernel: %s\n" "$k" >&3
  
-   if [ "x$is_first_entry" = xtrue ]; then
+   if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
        netbsd_entry "knetbsd"   "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}"
-diff -dur grub-2.00.orig/util/grub.d/10_windows.in grub-2.00/util/grub.d/10_windows.in
---- grub-2.00.orig/util/grub.d/10_windows.in	2012-03-04 22:11:43.000000000 +0100
-+++ grub-2.00/util/grub.d/10_windows.in	2012-10-27 15:16:00.668689695 +0200
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/10_windows.in grub-2.00.git20131218/util/grub.d/10_windows.in
+--- grub-2.00.git20131218.orig/util/grub.d/10_windows.in	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/10_windows.in	2013-12-18 14:29:45.000000000 +0100
 @@ -82,7 +82,7 @@
    # Get boot device.
    dev=`${grub_probe} -t device "$dir" 2>/dev/null` || continue
@@ -168,10 +170,10 @@ diff -dur grub-2.00.orig/util/grub.d/10_windows.in grub-2.00/util/grub.d/10_wind
    cat << EOF
  menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' {
  EOF
-diff -dur grub-2.00.orig/util/grub.d/20_linux_xen.in grub-2.00/util/grub.d/20_linux_xen.in
---- grub-2.00.orig/util/grub.d/20_linux_xen.in	2012-06-03 21:57:42.000000000 +0200
-+++ grub-2.00/util/grub.d/20_linux_xen.in	2012-10-27 15:16:00.672023083 +0200
-@@ -203,7 +203,7 @@
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in grub-2.00.git20131218/util/grub.d/20_linux_xen.in
+--- grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/20_linux_xen.in	2013-12-18 14:29:45.000000000 +0100
+@@ -198,7 +198,7 @@
      fi
      while [ "x$list" != "x" ] ; do
  	linux=`version_find_latest $list`
@@ -180,7 +182,7 @@ diff -dur grub-2.00.orig/util/grub.d/20_linux_xen.in grub-2.00/util/grub.d/20_li
  	basename=`basename $linux`
  	dirname=`dirname $linux`
  	rel_dirname=`make_system_path_relative_to_its_root $dirname`
-@@ -226,7 +226,7 @@
+@@ -221,7 +221,7 @@
  	    fi
  	done
  	if test -n "${initrd}" ; then
@@ -189,10 +191,10 @@ diff -dur grub-2.00.orig/util/grub.d/20_linux_xen.in grub-2.00/util/grub.d/20_li
  	else
      # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
  	    linux_root_device_thisversion=${GRUB_DEVICE}
-diff -dur grub-2.00.orig/util/grub.d/30_os-prober.in grub-2.00/util/grub.d/30_os-prober.in
---- grub-2.00.orig/util/grub.d/30_os-prober.in	2012-03-04 21:52:03.000000000 +0100
-+++ grub-2.00/util/grub.d/30_os-prober.in	2012-10-27 15:16:00.675356471 +0200
-@@ -117,7 +117,7 @@
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/30_os-prober.in grub-2.00.git20131218/util/grub.d/30_os-prober.in
+--- grub-2.00.git20131218.orig/util/grub.d/30_os-prober.in	2013-12-18 13:11:29.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/30_os-prober.in	2013-12-18 14:29:45.000000000 +0100
+@@ -134,7 +134,7 @@
      LONGNAME="${LABEL}"
    fi
  
@@ -201,7 +203,7 @@ diff -dur grub-2.00.orig/util/grub.d/30_os-prober.in grub-2.00/util/grub.d/30_os
  
    case ${BOOT} in
      chain)
-@@ -267,7 +267,7 @@
+@@ -321,7 +321,7 @@
      *)
        echo -n "  "
        # TRANSLATORS: %s is replaced by OS name.
diff --git a/grub2-awk.patch b/grub2-awk.patch
deleted file mode 100644
index 162fa5c..0000000
--- a/grub2-awk.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -dur grub-2.00.orig/grub-core/Makefile.am grub-2.00/grub-core/Makefile.am
---- grub-2.00.orig/grub-core/Makefile.am	2012-06-26 01:56:55.000000000 +0200
-+++ grub-2.00/grub-core/Makefile.am	2012-10-27 15:19:54.321231750 +0200
-@@ -349,7 +349,7 @@
- 
- # generate global module dependencies list
- moddep.lst: syminfo.lst genmoddep.awk video.lst
--	cat $< | sort | awk -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
-+	cat $< | sort | $(AWK) -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
- platform_DATA += moddep.lst
- CLEANFILES += config.log syminfo.lst moddep.lst
- 
diff --git a/grub2-efinet_fix.patch b/grub2-efinet_fix.patch
deleted file mode 100644
index 06cb593..0000000
--- a/grub2-efinet_fix.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-commit c5898eb4505dcd5f367048d33ec5ea9ed40dfdeb (HEAD, tmp)
-Author: Vladimir 'phcoder' Serbinenko <phcoder at gmail.com>
-Date:   Sun Mar 17 13:33:16 2013 +0100
-
-    	Resend a packet if we got the wrong buffer in status.
-    
-    (cherry picked from commit 2f1071d57ec026a7f271b1bfe302d14e86673c0f)
-
-diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
-index 28f2db2..2b344d6 100644
---- a/grub-core/net/drivers/efi/efinet.c
-+++ b/grub-core/net/drivers/efi/efinet.c
-@@ -37,7 +37,6 @@ send_card_buffer (struct grub_net_card *dev,
-   grub_efi_status_t st;
-   grub_efi_simple_network_t *net = dev->efi_net;
-   grub_uint64_t limit_time = grub_get_time_ms () + 4000;
--  grub_size_t len;
- 
-   if (dev->txbusy)
-     while (1)
-@@ -52,17 +51,26 @@ send_card_buffer (struct grub_net_card *dev,
- 	    dev->txbusy = 0;
- 	    break;
- 	  }
-+	if (txbuf)
-+	  {
-+	    st = efi_call_7 (net->transmit, net, 0, dev->last_pkt_size,
-+			     dev->txbuf, NULL, NULL, NULL);
-+	    if (st != GRUB_EFI_SUCCESS)
-+	      return grub_error (GRUB_ERR_IO,
-+				 N_("couldn't send network packet"));
-+	  }
- 	if (limit_time < grub_get_time_ms ())
--	  return grub_error (GRUB_ERR_TIMEOUT, N_("couldn't send network packet"));
-+	  return grub_error (GRUB_ERR_TIMEOUT,
-+			     N_("couldn't send network packet"));
-       }
- 
--  len = (pack->tail - pack->data);
--  if (len > dev->mtu)
--    len = dev->mtu;
-+  dev->last_pkt_size = (pack->tail - pack->data);
-+  if (dev->last_pkt_size > dev->mtu)
-+    dev->last_pkt_size = dev->mtu;
- 
--  grub_memcpy (dev->txbuf, pack->data, len);
-+  grub_memcpy (dev->txbuf, pack->data, dev->last_pkt_size);
- 
--  st = efi_call_7 (net->transmit, net, 0, len,
-+  st = efi_call_7 (net->transmit, net, 0, dev->last_pkt_size,
- 		   dev->txbuf, NULL, NULL, NULL);
-   if (st != GRUB_EFI_SUCCESS)
-     return grub_error (GRUB_ERR_IO, N_("couldn't send network packet"));
-diff --git a/include/grub/net.h b/include/grub/net.h
-index 3877451..1bd7af2 100644
---- a/include/grub/net.h
-+++ b/include/grub/net.h
-@@ -139,6 +139,7 @@ struct grub_net_card
-     {
-       struct grub_efi_simple_network *efi_net;
-       grub_efi_handle_t efi_handle;
-+      grub_size_t last_pkt_size;
-     };
- #endif
-     void *data;
diff --git a/grub2-freetype_include.patch b/grub2-freetype_include.patch
deleted file mode 100644
index 185ce70..0000000
--- a/grub2-freetype_include.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -dur grub-2.00.orig/util/grub-mkfont.c grub-2.00/util/grub-mkfont.c
---- grub-2.00.orig/util/grub-mkfont.c	2012-03-10 13:17:57.000000000 +0100
-+++ grub-2.00/util/grub-mkfont.c	2013-11-30 12:42:43.623031541 +0100
-@@ -39,7 +39,7 @@
- #include FT_FREETYPE_H
- #include FT_TRUETYPE_TAGS_H
- #include FT_TRUETYPE_TABLES_H
--#include <freetype/ftsynth.h>
-+#include FT_SYNTHESIS_H
- 
- #undef __FTERRORS_H__
- #define FT_ERROR_START_LIST   const char *ft_errmsgs[] = { 
diff --git a/grub2-generated_files.patch b/grub2-generated_files.patch
deleted file mode 100644
index f1a40ad..0000000
--- a/grub2-generated_files.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -dur -x '*~' grub-2.00.orig/grub-core/Makefile.core.def grub-2.00/grub-core/Makefile.core.def
---- grub-2.00.orig/grub-core/Makefile.core.def	2013-12-10 13:20:26.000000000 +0100
-+++ grub-2.00/grub-core/Makefile.core.def	2013-12-10 13:23:01.000000000 +0100
-@@ -1848,3 +1848,4 @@
-   enable = i386;
- };
- 
-+#include Makefile.gcry.def
-diff -dur -x '*~' grub-2.00.orig/grub-core/Makefile.in grub-2.00/grub-core/Makefile.in
---- grub-2.00.orig/grub-core/Makefile.in	2012-06-26 14:12:27.000000000 +0200
-+++ grub-2.00/grub-core/Makefile.in	2013-12-10 13:22:48.000000000 +0100
-@@ -70505,7 +70505,7 @@
- .PRECIOUS: $(top_srcdir)/grub-core/Makefile.core.am
- $(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def $(top_srcdir)/Makefile.tpl
- 	if [ "x$$GRUB_CONTRIB" != x ]; then echo "You need to run ./autogen.sh manually." >&2; exit 1; fi
--	autogen -T $(top_srcdir)/Makefile.tpl $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
-+	autogen -T $(top_srcdir)/Makefile.tpl $(top_srcdir)/grub-core/Makefile.core.def | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
- 	mv $@.new $@
- 
- # gentrigtables
---- grub-2.00.orig/conf/Makefile.common	2013-12-10 13:20:26.000000000 +0100
-+++ grub-2.00/conf/Makefile.common	2013-12-10 13:44:26.000000000 +0100
-@@ -174,5 +174,5 @@
- .PRECIOUS: $(top_srcdir)/grub-core/Makefile.core.am
- $(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def $(top_srcdir)/Makefile.tpl
- 	if [ "x$$GRUB_CONTRIB" != x ]; then echo "You need to run ./autogen.sh manually." >&2; exit 1; fi
--	autogen -T $(top_srcdir)/Makefile.tpl $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
-+	autogen -T $(top_srcdir)/Makefile.tpl $(top_srcdir)/grub-core/Makefile.core.def | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
- 	mv $@.new $@
---- grub-2.00.orig/configure.ac	2013-12-10 13:32:13.000000000 +0100
-+++ grub-2.00/configure.ac	2013-12-10 13:32:19.000000000 +0100
-@@ -1169,6 +1169,11 @@
- AC_CONFIG_FILES([util/bash-completion.d/Makefile])
- AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
- AC_CONFIG_FILES([config.h])
-+AC_CONFIG_FILES([grub-core/gdb_grub])
-+AC_CONFIG_FILES([grub-core/genmod.sh])
-+AC_CONFIG_FILES([grub-core/gensyminfo.sh])
-+AC_CONFIG_FILES([grub-core/gmodule.pl])
-+AC_CONFIG_FILES([grub-core/modinfo.sh])
- 
- AC_OUTPUT
- [
-
diff --git a/grub2-gets.patch b/grub2-gets.patch
deleted file mode 100644
index d74b1a7..0000000
--- a/grub2-gets.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -dur grub-2.00.orig/grub-core/gnulib/stdio.in.h grub-2.00/grub-core/gnulib/stdio.in.h
---- grub-2.00.orig/grub-core/gnulib/stdio.in.h	2010-12-01 15:45:43.000000000 +0100
-+++ grub-2.00/grub-core/gnulib/stdio.in.h	2012-10-27 15:43:17.539201562 +0200
-@@ -141,7 +141,6 @@
-    so any use of gets warrants an unconditional warning.  Assume it is
-    always declared, since it is required by C89.  */
- #undef gets
--_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
- 
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@
diff --git a/grub2-linuxefi.patch b/grub2-linuxefi.patch
deleted file mode 100644
index 73a72a0..0000000
--- a/grub2-linuxefi.patch
+++ /dev/null
@@ -1,482 +0,0 @@
-From 9f8104db535a8d2f9ef42824669431bdd86b3fe8 Mon Sep 17 00:00:00 2001
-From: Matthew Garrett <mjg at redhat.com>
-Date: Tue, 10 Jul 2012 11:58:52 -0400
-Subject: [PATCH 446/482] Add support for linuxefi
-
----
- grub-core/Makefile.core.def       |   8 +
- grub-core/kern/efi/mm.c           |  32 ++++
- grub-core/loader/i386/efi/linux.c | 371 ++++++++++++++++++++++++++++++++++++++
- include/grub/efi/efi.h            |   3 +
- include/grub/i386/linux.h         |   1 +
- 5 files changed, 415 insertions(+)
- create mode 100644 grub-core/loader/i386/efi/linux.c
-
-diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
-index bb62dce..def6606 100644
---- a/grub-core/Makefile.core.def
-+++ b/grub-core/Makefile.core.def
-@@ -1534,6 +1534,14 @@ module = {
- };
- 
- module = {
-+  name = linuxefi;
-+  efi = loader/i386/efi/linux.c;
-+  efi = lib/cmdline.c;
-+  enable = i386_efi;
-+  enable = x86_64_efi;
-+};
-+
-+module = {
-   name = chain;
-   efi = loader/efi/chainloader.c;
-   i386_pc = loader/i386/pc/chainloader.c;
-diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
-index 77c9384..025d665 100644
---- a/grub-core/kern/efi/mm.c
-+++ b/grub-core/kern/efi/mm.c
-@@ -47,6 +47,38 @@ static grub_efi_uintn_t finish_desc_size;
- static grub_efi_uint32_t finish_desc_version;
- int grub_efi_is_finished = 0;
- 
-+/* Allocate pages below a specified address */
-+void *
-+grub_efi_allocate_pages_max (grub_efi_physical_address_t max,
-+			     grub_efi_uintn_t pages)
-+{
-+  grub_efi_status_t status;
-+  grub_efi_boot_services_t *b;
-+  grub_efi_physical_address_t address = max;
-+
-+  if (max > 0xffffffff)
-+    return 0;
-+
-+  b = grub_efi_system_table->boot_services;
-+  status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_MAX_ADDRESS, GRUB_EFI_LOADER_DATA, pages, &address);
-+
-+  if (status != GRUB_EFI_SUCCESS)
-+    return 0;
-+
-+  if (address == 0)
-+    {
-+      /* Uggh, the address 0 was allocated... This is too annoying,
-+	 so reallocate another one.  */
-+      address = max;
-+      status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_MAX_ADDRESS, GRUB_EFI_LOADER_DATA, pages, &address);
-+      grub_efi_free_pages (0, pages);
-+      if (status != GRUB_EFI_SUCCESS)
-+	return 0;
-+    }
-+
-+  return (void *) ((grub_addr_t) address);
-+}
-+
- /* Allocate pages. Return the pointer to the first of allocated pages.  */
- void *
- grub_efi_allocate_pages (grub_efi_physical_address_t address,
-diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
-new file mode 100644
-index 0000000..b79e632
---- /dev/null
-+++ b/grub-core/loader/i386/efi/linux.c
-@@ -0,0 +1,371 @@
-+/*
-+ *  GRUB  --  GRand Unified Bootloader
-+ *  Copyright (C) 2012  Free Software Foundation, Inc.
-+ *
-+ *  GRUB is free software: you can redistribute it and/or modify
-+ *  it under the terms of the GNU General Public License as published by
-+ *  the Free Software Foundation, either version 3 of the License, or
-+ *  (at your option) any later version.
-+ *
-+ *  GRUB is distributed in the hope that it will be useful,
-+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ *  GNU General Public License for more details.
-+ *
-+ *  You should have received a copy of the GNU General Public License
-+ *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#include <grub/loader.h>
-+#include <grub/file.h>
-+#include <grub/err.h>
-+#include <grub/types.h>
-+#include <grub/mm.h>
-+#include <grub/cpu/linux.h>
-+#include <grub/command.h>
-+#include <grub/i18n.h>
-+#include <grub/lib/cmdline.h>
-+#include <grub/efi/efi.h>
-+
-+GRUB_MOD_LICENSE ("GPLv3+");
-+
-+static grub_dl_t my_mod;
-+static int loaded;
-+static void *kernel_mem;
-+static grub_uint64_t kernel_size;
-+static grub_uint8_t *initrd_mem;
-+static grub_uint32_t handover_offset;
-+struct linux_kernel_params *params;
-+static char *linux_cmdline;
-+
-+#define BYTES_TO_PAGES(bytes)   (((bytes) + 0xfff) >> 12)
-+
-+#define SHIM_LOCK_GUID \
-+  { 0x605dab50, 0xe046, 0x4300, {0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23} }
-+
-+struct grub_efi_shim_lock
-+{
-+  grub_efi_status_t (*verify) (void *buffer, grub_uint32_t size);
-+};
-+typedef struct grub_efi_shim_lock grub_efi_shim_lock_t;
-+
-+static grub_efi_boolean_t
-+grub_linuxefi_secure_validate (void *data, grub_uint32_t size)
-+{
-+  grub_efi_guid_t guid = SHIM_LOCK_GUID;
-+  grub_efi_shim_lock_t *shim_lock;
-+
-+  shim_lock = grub_efi_locate_protocol(&guid, NULL);
-+
-+  if (!shim_lock)
-+    return 1;
-+
-+  if (shim_lock->verify(data, size) == GRUB_EFI_SUCCESS)
-+    return 1;
-+
-+  return 0;
-+}
-+
-+typedef void(*handover_func)(void *, grub_efi_system_table_t *, struct linux_kernel_params *);
-+
-+static grub_err_t
-+grub_linuxefi_boot (void)
-+{
-+  handover_func hf;
-+  int offset = 0;
-+
-+#ifdef __x86_64__
-+  offset = 512;
-+#endif
-+
-+  hf = (handover_func)((char *)kernel_mem + handover_offset + offset);
-+
-+  asm volatile ("cli");
-+
-+  hf (grub_efi_image_handle, grub_efi_system_table, params);
-+
-+  /* Not reached */
-+  return GRUB_ERR_NONE;
-+}
-+
-+static grub_err_t
-+grub_linuxefi_unload (void)
-+{
-+  grub_dl_unref (my_mod);
-+  loaded = 0;
-+  if (initrd_mem)
-+    grub_efi_free_pages((grub_efi_physical_address_t)initrd_mem, BYTES_TO_PAGES(params->ramdisk_size));
-+  if (linux_cmdline)
-+    grub_efi_free_pages((grub_efi_physical_address_t)linux_cmdline, BYTES_TO_PAGES(params->cmdline_size + 1));
-+  if (kernel_mem)
-+    grub_efi_free_pages((grub_efi_physical_address_t)kernel_mem, BYTES_TO_PAGES(kernel_size));
-+  if (params)
-+    grub_efi_free_pages((grub_efi_physical_address_t)params, BYTES_TO_PAGES(16384));
-+  return GRUB_ERR_NONE;
-+}
-+
-+static grub_err_t
-+grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
-+                 int argc, char *argv[])
-+{
-+  grub_file_t *files = 0;
-+  int i, nfiles = 0;
-+  grub_size_t size = 0;
-+  grub_uint8_t *ptr;
-+
-+  if (argc == 0)
-+    {
-+      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
-+      goto fail;
-+    }
-+
-+  if (!loaded)
-+    {
-+      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("you need to load the kernel first"));
-+      goto fail;
-+    }
-+
-+  files = grub_zalloc (argc * sizeof (files[0]));
-+  if (!files)
-+    goto fail;
-+
-+  for (i = 0; i < argc; i++)
-+    {
-+      grub_file_filter_disable_compression ();
-+      files[i] = grub_file_open (argv[i]);
-+      if (! files[i])
-+        goto fail;
-+      nfiles++;
-+      size += ALIGN_UP (grub_file_size (files[i]), 4);
-+    }
-+
-+  initrd_mem = grub_efi_allocate_pages_max (0x3fffffff, BYTES_TO_PAGES(size));
-+
-+  if (!initrd_mem)
-+    {
-+      grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("can't allocate initrd"));
-+      goto fail;
-+    }
-+
-+  params->ramdisk_size = size;
-+  params->ramdisk_image = (grub_uint32_t)(grub_uint64_t) initrd_mem;
-+
-+  ptr = initrd_mem;
-+
-+  for (i = 0; i < nfiles; i++)
-+    {
-+      grub_ssize_t cursize = grub_file_size (files[i]);
-+      if (grub_file_read (files[i], ptr, cursize) != cursize)
-+        {
-+          if (!grub_errno)
-+            grub_error (GRUB_ERR_FILE_READ_ERROR, N_("premature end of file %s"),
-+                        argv[i]);
-+          goto fail;
-+        }
-+      ptr += cursize;
-+      grub_memset (ptr, 0, ALIGN_UP_OVERHEAD (cursize, 4));
-+      ptr += ALIGN_UP_OVERHEAD (cursize, 4);
-+    }
-+
-+  params->ramdisk_size = size;
-+
-+ fail:
-+  for (i = 0; i < nfiles; i++)
-+    grub_file_close (files[i]);
-+  grub_free (files);
-+
-+  if (initrd_mem && grub_errno)
-+    grub_efi_free_pages((grub_efi_physical_address_t)initrd_mem, BYTES_TO_PAGES(size));
-+
-+  return grub_errno;
-+}
-+
-+static grub_err_t
-+grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
-+		int argc, char *argv[])
-+{
-+  grub_file_t file = 0;
-+  struct linux_kernel_header lh;
-+  grub_ssize_t len, start, filelen;
-+  void *kernel;
-+
-+  grub_dl_ref (my_mod);
-+
-+  if (argc == 0)
-+    {
-+      grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
-+      goto fail;
-+    }
-+
-+  file = grub_file_open (argv[0]);
-+  if (! file)
-+    goto fail;
-+
-+  filelen = grub_file_size (file);
-+
-+  kernel = grub_malloc(filelen);
-+
-+  if (!kernel)
-+    {
-+      grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("cannot allocate kernel buffer"));
-+      goto fail;
-+    }
-+
-+  if (grub_file_read (file, kernel, filelen) != filelen)
-+    {
-+      grub_error (GRUB_ERR_FILE_READ_ERROR, N_("Can't read kernel %s"), argv[0]);
-+      goto fail;
-+    }
-+
-+  if (! grub_linuxefi_secure_validate (kernel, filelen))
-+    {
-+      grub_error (GRUB_ERR_INVALID_COMMAND, N_("%s has invalid signature"), argv[0]);
-+      grub_free (kernel);
-+      goto fail;
-+    }
-+
-+  grub_file_seek (file, 0);
-+
-+  grub_free(kernel);
-+
-+  params = grub_efi_allocate_pages_max (0x3fffffff, BYTES_TO_PAGES(16384));
-+
-+  if (! params)
-+    {
-+      grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot allocate kernel parameters");
-+      goto fail;
-+    }
-+
-+  memset (params, 0, 16384);
-+
-+  if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh))
-+    {
-+      if (!grub_errno)
-+	grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
-+		    argv[0]);
-+      goto fail;
-+    }
-+
-+  if (lh.boot_flag != grub_cpu_to_le16 (0xaa55))
-+    {
-+      grub_error (GRUB_ERR_BAD_OS, N_("invalid magic number"));
-+      goto fail;
-+    }
-+
-+  if (lh.setup_sects > GRUB_LINUX_MAX_SETUP_SECTS)
-+    {
-+      grub_error (GRUB_ERR_BAD_OS, N_("too many setup sectors"));
-+      goto fail;
-+    }
-+
-+  if (lh.version < grub_cpu_to_le16 (0x020b))
-+    {
-+      grub_error (GRUB_ERR_BAD_OS, N_("kernel too old"));
-+      goto fail;
-+    }
-+
-+  if (!lh.handover_offset)
-+    {
-+      grub_error (GRUB_ERR_BAD_OS, N_("kernel doesn't support EFI handover"));
-+      goto fail;
-+    }
-+
-+  linux_cmdline = grub_efi_allocate_pages_max(0x3fffffff,
-+					 BYTES_TO_PAGES(lh.cmdline_size + 1));
-+
-+  if (!linux_cmdline)
-+    {
-+      grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("can't allocate cmdline"));
-+      goto fail;
-+    }
-+
-+  grub_memcpy (linux_cmdline, LINUX_IMAGE, sizeof (LINUX_IMAGE));
-+  grub_create_loader_cmdline (argc, argv,
-+                              linux_cmdline + sizeof (LINUX_IMAGE) - 1,
-+			      lh.cmdline_size - (sizeof (LINUX_IMAGE) - 1));
-+
-+  lh.cmd_line_ptr = (grub_uint32_t)(grub_uint64_t)linux_cmdline;
-+
-+  handover_offset = lh.handover_offset;
-+
-+  start = (lh.setup_sects + 1) * 512;
-+  len = grub_file_size(file) - start;
-+
-+  kernel_mem = grub_efi_allocate_pages(lh.pref_address,
-+				       BYTES_TO_PAGES(lh.init_size));
-+
-+  if (!kernel_mem)
-+    kernel_mem = grub_efi_allocate_pages_max(0x3fffffff,
-+					     BYTES_TO_PAGES(lh.init_size));
-+
-+  if (!kernel_mem)
-+    {
-+      grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("can't allocate kernel"));
-+      goto fail;
-+    }
-+
-+  if (grub_file_seek (file, start) == (grub_off_t) -1)
-+    {
-+      grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
-+		  argv[0]);
-+      goto fail;
-+    }
-+
-+  if (grub_file_read (file, kernel_mem, len) != len && !grub_errno)
-+    {
-+      grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
-+		  argv[0]);
-+    }
-+
-+  if (grub_errno == GRUB_ERR_NONE)
-+    {
-+      grub_loader_set (grub_linuxefi_boot, grub_linuxefi_unload, 0);
-+      loaded = 1;
-+      lh.code32_start = (grub_uint32_t)(grub_uint64_t) kernel_mem;
-+    }
-+
-+  memcpy(params, &lh, 2 * 512);
-+
-+  params->type_of_loader = 0x21;
-+
-+ fail:
-+
-+  if (file)
-+    grub_file_close (file);
-+
-+  if (grub_errno != GRUB_ERR_NONE)
-+    {
-+      grub_dl_unref (my_mod);
-+      loaded = 0;
-+    }
-+
-+  if (linux_cmdline && !loaded)
-+    grub_efi_free_pages((grub_efi_physical_address_t)linux_cmdline, BYTES_TO_PAGES(lh.cmdline_size + 1));
-+
-+  if (kernel_mem && !loaded)
-+    grub_efi_free_pages((grub_efi_physical_address_t)kernel_mem, BYTES_TO_PAGES(kernel_size));
-+
-+  if (params && !loaded)
-+    grub_efi_free_pages((grub_efi_physical_address_t)params, BYTES_TO_PAGES(16384));
-+
-+  return grub_errno;
-+}
-+
-+static grub_command_t cmd_linux, cmd_initrd;
-+
-+GRUB_MOD_INIT(linuxefi)
-+{
-+  cmd_linux =
-+    grub_register_command ("linuxefi", grub_cmd_linux,
-+                           0, N_("Load Linux."));
-+  cmd_initrd =
-+    grub_register_command ("initrdefi", grub_cmd_initrd,
-+                           0, N_("Load initrd."));
-+  my_mod = mod;
-+}
-+
-+GRUB_MOD_FINI(linuxefi)
-+{
-+  grub_unregister_command (cmd_linux);
-+  grub_unregister_command (cmd_initrd);
-+}
-diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
-index 489cf9e..9370fd5 100644
---- a/include/grub/efi/efi.h
-+++ b/include/grub/efi/efi.h
-@@ -40,6 +40,9 @@ void EXPORT_FUNC(grub_efi_stall) (grub_efi_uintn_t microseconds);
- void *
- EXPORT_FUNC(grub_efi_allocate_pages) (grub_efi_physical_address_t address,
- 				      grub_efi_uintn_t pages);
-+void *
-+EXPORT_FUNC(grub_efi_allocate_pages_max) (grub_efi_physical_address_t max,
-+					  grub_efi_uintn_t pages);
- void EXPORT_FUNC(grub_efi_free_pages) (grub_efi_physical_address_t address,
- 				       grub_efi_uintn_t pages);
- int
-diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h
-index 9d064c8..c29c5af 100644
---- a/include/grub/i386/linux.h
-+++ b/include/grub/i386/linux.h
-@@ -139,6 +139,7 @@ struct linux_kernel_header
-   grub_uint64_t setup_data;
-   grub_uint64_t pref_address;
-   grub_uint32_t init_size;
-+  grub_uint32_t handover_offset;
- } __attribute__ ((packed));
- 
- /* Boot parameters for Linux based on 2.6.12. This is used by the setup
--- 
-1.8.2.1
-
diff --git a/grub2-tftp_fixes.patch b/grub2-tftp_fixes.patch
deleted file mode 100644
index 3846463..0000000
--- a/grub2-tftp_fixes.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-From 1ff55c8030ed529b17b02993877ac4803e7aa449 Mon Sep 17 00:00:00 2001
-From: Vladimir 'phcoder' Serbinenko <phcoder at gmail.com>
-Date: Mon, 2 Jul 2012 11:22:50 +0200
-Subject: [PATCH 1/3] 	* grub-core/net/tftp.c (ack): Fix endianness problem. 
- (tftp_receive): Likewise. 	Reported by: Michael Davidsaver.
-
-(cherry picked from commit a706f4cc6bddd03e67a66620101209c471177b53)
----
- grub-core/net/tftp.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
-index 9c70efb..d0f39ea 100644
---- a/grub-core/net/tftp.c
-+++ b/grub-core/net/tftp.c
-@@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block)
- 
-   tftph_ack = (struct tftphdr *) nb_ack.data;
-   tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
--  tftph_ack->u.ack.block = block;
-+  tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
- 
-   err = grub_net_send_udp_packet (data->sock, &nb_ack);
-   if (err)
-@@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
- 	    grub_priority_queue_pop (data->pq);
- 
- 	    if (file->device->net->packs.count < 50)
--	      err = ack (data, tftph->u.data.block);
-+	      err = ack (data, data->block + 1);
- 	    else
- 	      {
- 		file->device->net->stall = 1;
--- 
-1.8.2
-
-
-From 412928c729fff75cf53914cd4acac88c5e229397 Mon Sep 17 00:00:00 2001
-From: Avik Sil <aviksil at in.ibm.com>
-Date: Wed, 14 Aug 2013 20:32:42 -0300
-Subject: [PATCH 2/3] * grub-core/net/tftp.c: Send tftp ack packet before
- closing the socket.
-
-(cherry picked from commit 369508b3cb0a84c0118ee32adef923109ad187dc)
----
- grub-core/net/tftp.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
-index d0f39ea..b9d9549 100644
---- a/grub-core/net/tftp.c
-+++ b/grub-core/net/tftp.c
-@@ -243,6 +243,8 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
- 	    data->block++;
- 	    if (size < data->block_size)
- 	      {
-+		if (data->ack_sent < data->block)
-+		  ack (data, data->block);
- 		file->device->net->eof = 1;
- 		file->device->net->stall = 1;
- 		grub_net_udp_close (data->sock);
--- 
-1.8.2
-
-
-From e944f5bb19bb7f07ca065df75979ba3067306ae1 Mon Sep 17 00:00:00 2001
-From: Vladimir Serbinenko <phcoder at gmail.com>
-Date: Sat, 26 Oct 2013 12:48:49 +0200
-Subject: [PATCH 3/3] 	* grub-core/net/tftp.c: Retransmit ack when
- rereceiving old packet. 	Try to handle more than 0xFFFF packets.
-
-(cherry picked from commit cf8d6bbd9eb2f5c6cbb0b6e437466c77fc7b6e9b)
----
- grub-core/net/tftp.c | 26 +++++++++++++++++---------
- 1 file changed, 17 insertions(+), 9 deletions(-)
-
-diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
-index b9d9549..97217d2 100644
---- a/grub-core/net/tftp.c
-+++ b/grub-core/net/tftp.c
-@@ -102,7 +102,7 @@ typedef struct tftp_data
-   grub_uint64_t file_size;
-   grub_uint64_t block;
-   grub_uint32_t block_size;
--  grub_uint32_t ack_sent;
-+  grub_uint64_t ack_sent;
-   int have_oack;
-   struct grub_error_saved save_err;
-   grub_net_udp_socket_t sock;
-@@ -110,6 +110,17 @@ typedef struct tftp_data
- } *tftp_data_t;
- 
- static int
-+cmp_block (grub_uint16_t a, grub_uint16_t b)
-+{
-+  grub_int16_t i = (grub_int16_t) (a - b);
-+  if (i > 0)
-+    return +1;
-+  if (i < 0)
-+    return -1;
-+  return 0;
-+}
-+
-+static int
- cmp (const void *a__, const void *b__)
- {
-   struct grub_net_buff *a_ = *(struct grub_net_buff **) a__;
-@@ -117,15 +128,11 @@ cmp (const void *a__, const void *b__)
-   struct tftphdr *a = (struct tftphdr *) a_->data;
-   struct tftphdr *b = (struct tftphdr *) b_->data;
-   /* We want the first elements to be on top.  */
--  if (grub_be_to_cpu16 (a->u.data.block) < grub_be_to_cpu16 (b->u.data.block))
--    return +1;
--  if (grub_be_to_cpu16 (a->u.data.block) > grub_be_to_cpu16 (b->u.data.block))
--    return -1;
--  return 0;
-+  return -cmp_block (grub_be_to_cpu16 (a->u.data.block), grub_be_to_cpu16 (b->u.data.block));
- }
- 
- static grub_err_t
--ack (tftp_data_t data, grub_uint16_t block)
-+ack (tftp_data_t data, grub_uint64_t block)
- {
-   struct tftphdr *tftph_ack;
-   grub_uint8_t nbdata[512];
-@@ -213,12 +220,13 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
- 	      return GRUB_ERR_NONE;
- 	    nb_top = *nb_top_p;
- 	    tftph = (struct tftphdr *) nb_top->data;
--	    if (grub_be_to_cpu16 (tftph->u.data.block) >= data->block + 1)
-+	    if (cmp_block (grub_be_to_cpu16 (tftph->u.data.block), data->block + 1) >= 0)
- 	      break;
-+	    ack (data, grub_be_to_cpu16 (tftph->u.data.block));
- 	    grub_netbuff_free (nb_top);
- 	    grub_priority_queue_pop (data->pq);
- 	  }
--	if (grub_be_to_cpu16 (tftph->u.data.block) == data->block + 1)
-+	while (cmp_block (grub_be_to_cpu16 (tftph->u.data.block), data->block + 1) == 0)
- 	  {
- 	    unsigned size;
- 
--- 
-1.8.2
-
diff --git a/just-say-linux.patch b/just-say-linux.patch
index 6cce32b..97cecbc 100644
--- a/just-say-linux.patch
+++ b/just-say-linux.patch
@@ -1,18 +1,7 @@
-From d4bd41f972c6e22b86c773cbba2a1e14f400a8be Mon Sep 17 00:00:00 2001
-From: Peter Jones <pjones at redhat.com>
-Date: Mon, 14 Mar 2011 14:27:42 -0400
-Subject: [PATCH] Don't say "GNU/Linux" in generated menus.
-
----
- util/grub.d/10_linux.in     |    4 ++--
- util/grub.d/20_linux_xen.in |    4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index a09c3e6..0b0df78 100644
---- a/util/grub.d/10_linux.in
-+++ b/util/grub.d/10_linux.in
-@@ -29,9 +29,9 @@ export TEXTDOMAINDIR=@localedir@
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/10_linux.in grub-2.00.git20131218/util/grub.d/10_linux.in
+--- grub-2.00.git20131218.orig/util/grub.d/10_linux.in	2013-12-18 14:41:17.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/10_linux.in	2013-12-18 14:42:46.000000000 +0100
+@@ -54,9 +54,9 @@
  CLASS="--class gnu-linux --class gnu --class os"
  
  if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
@@ -21,14 +10,13 @@ index a09c3e6..0b0df78 100644
  else
 -  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
 +  OS="${GRUB_DISTRIBUTOR}"
-   CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
+   CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
  fi
  
-diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
-index ee49cd9..10422b0 100644
---- a/util/grub.d/20_linux_xen.in
-+++ b/util/grub.d/20_linux_xen.in
-@@ -29,9 +29,9 @@ export TEXTDOMAINDIR=@localedir@
+diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in grub-2.00.git20131218/util/grub.d/20_linux_xen.in
+--- grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in	2013-12-18 14:41:17.000000000 +0100
++++ grub-2.00.git20131218/util/grub.d/20_linux_xen.in	2013-12-18 14:43:11.000000000 +0100
+@@ -33,9 +33,9 @@
  CLASS="--class gnu-linux --class gnu --class os --class xen"
  
  if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
@@ -37,9 +25,6 @@ index ee49cd9..10422b0 100644
  else
 -  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
 +  OS="${GRUB_DISTRIBUTOR}"
-   CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
+   CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
  fi
  
--- 
-1.7.4
-
diff --git a/ppc.patch b/ppc.patch
deleted file mode 100644
index fde494c..0000000
--- a/ppc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-disable -m32 on ppc (gcc 3.3.6 does not like it)
-
-revert 'returns_twice' attribute for grub_setjmp.
-http://repo.or.cz/w/grub2.git/commitdiff/2c7825edcb18e9d0680a953f1475ef2caf6b0f0f
-
---- grub-1.98/configure.ac~	2010-03-06 20:51:37.000000000 +0000
-+++ grub-1.98/configure.ac	2010-07-19 13:59:46.468351205 +0000
-@@ -114,7 +114,7 @@
- esac
- 
- case "$target_cpu" in
--  i386 | powerpc) target_m32=1 ;;
-+  i386) target_m32=1 ;;
-   x86_64 | sparc64) target_m64=1 ;;
- esac
- 
---- grub-1.98/include/grub/powerpc/setjmp.h~	2010-03-06 20:51:37.000000000 +0000
-+++ grub-1.98/include/grub/powerpc/setjmp.h	2010-07-19 16:37:03.616853413 +0000
-@@ -21,7 +21,7 @@
- 
- typedef unsigned long grub_jmp_buf[20];
- 
--int grub_setjmp (grub_jmp_buf env) __attribute__ ((returns_twice));
-+int grub_setjmp (grub_jmp_buf env);
- void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn));
- 
- #endif /* ! GRUB_SETJMP_CPU_HEADER */
diff --git a/search-for-specific-config-file-for-netboot.patch b/search-for-specific-config-file-for-netboot.patch
deleted file mode 100644
index 33e3793..0000000
--- a/search-for-specific-config-file-for-netboot.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-From 38d458ddd69cb7dd6e7f58f9e9f3197c6b6184f3 Mon Sep 17 00:00:00 2001
-From: Paulo Flabiano Smorigo <pfsmorigo at br.ibm.com>
-Date: Tue, 27 Nov 2012 17:22:07 -0200
-Subject: [PATCH 3/3] Search for specific config file for netboot
-
-This patch implements a search for a specific configuration when the config
-file is on a remoteserver. It uses the following order:
-   1) DHCP client UUID option.
-   2) MAC address (in lower case hexadecimal with dash separators);
-   3) IP (in upper case hexadecimal) or IPv6;
-   4) The original grub.cfg file.
-
-This procedure is similar to what is used by pxelinux and yaboot:
-http://www.syslinux.org/wiki/index.php/PXELINUX#config
-
-This should close the bugzilla:
-https://bugzilla.redhat.com/show_bug.cgi?id=873406
----
- grub-core/net/net.c     |  118 +++++++++++++++++++++++++++++++++++++++++++++++
- grub-core/normal/main.c |   18 ++++++--
- include/grub/net.h      |    3 ++
- 3 files changed, 135 insertions(+), 4 deletions(-)
-
-diff --git a/grub-core/net/net.c b/grub-core/net/net.c
-index 01c5d32..49c32c5 100644
---- a/grub-core/net/net.c
-+++ b/grub-core/net/net.c
-@@ -1548,6 +1548,124 @@ grub_net_restore_hw (void)
-   return GRUB_ERR_NONE;
- }
- 
-+grub_err_t
-+grub_net_search_configfile (char *config)
-+{
-+  grub_size_t config_len;
-+  char *suffix;
-+
-+  auto int search_through (grub_size_t num_tries, grub_size_t slice_size);
-+  int search_through (grub_size_t num_tries, grub_size_t slice_size)
-+    {
-+      while (num_tries-- > 0)
-+        {
-+	  grub_dprintf ("net", "probe %s\n", config);
-+
-+          grub_file_t file;
-+          file = grub_file_open (config);
-+
-+          if (file)
-+            {
-+              grub_file_close (file);
-+              grub_dprintf ("net", "found!\n");
-+              return 0;
-+            }
-+          else
-+            {
-+              if (grub_errno == GRUB_ERR_IO)
-+                grub_errno = GRUB_ERR_NONE;
-+            }
-+
-+          if (grub_strlen (suffix) < slice_size)
-+            break;
-+
-+          config[grub_strlen (config) - slice_size] = '\0';
-+        }
-+
-+      return 1;
-+    }
-+
-+  config_len = grub_strlen (config);
-+  config[config_len] = '-';
-+  suffix = config + config_len + 1;
-+
-+  struct grub_net_network_level_interface *inf;
-+  FOR_NET_NETWORK_LEVEL_INTERFACES (inf)
-+    {
-+      /* By the Client UUID. */
-+
-+      char client_uuid_var[sizeof ("net_") + grub_strlen (inf->name) +
-+                           sizeof ("_clientuuid") + 1];
-+      grub_snprintf (client_uuid_var, sizeof (client_uuid_var),
-+                     "net_%s_clientuuid", inf->name);
-+
-+      const char *client_uuid;
-+      client_uuid = grub_env_get (client_uuid_var);
-+
-+      if (client_uuid)
-+        {
-+          grub_strcpy (suffix, client_uuid);
-+          if (search_through (1, 0) == 0) return GRUB_ERR_NONE;
-+        }
-+
-+      /* By the MAC address. */
-+
-+      /* Add ethernet type */
-+      grub_strcpy (suffix, "01-");
-+
-+      grub_net_hwaddr_to_str (&inf->hwaddress, suffix + 3);
-+
-+      char *ptr;
-+      for (ptr = suffix; *ptr; ptr++)
-+        if (*ptr == ':')
-+          *ptr = '-';
-+
-+      if (search_through (1, 0) == 0) return GRUB_ERR_NONE;
-+
-+      /* By IP address */
-+
-+      switch ((&inf->address)->type)
-+        {
-+        case GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4:
-+            {
-+              grub_uint32_t n = grub_be_to_cpu32 ((&inf->address)->ipv4);
-+              grub_snprintf (suffix, GRUB_NET_MAX_STR_ADDR_LEN, "%02X%02X%02X%02X", \
-+                             ((n >> 24) & 0xff), ((n >> 16) & 0xff), \
-+                             ((n >> 8) & 0xff), ((n >> 0) & 0xff));
-+
-+              if (search_through (8, 1) == 0) return GRUB_ERR_NONE;
-+              break;
-+            }
-+        case GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6:
-+            {
-+              char buf[GRUB_NET_MAX_STR_ADDR_LEN];
-+              struct grub_net_network_level_address base;
-+              base.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6;
-+              grub_memcpy (&base.ipv6, ((&inf->address)->ipv6), 16);
-+              grub_net_addr_to_str (&base, buf);
-+
-+              for (ptr = buf; *ptr; ptr++)
-+                if (*ptr == ':')
-+                  *ptr = '-';
-+
-+              grub_snprintf (suffix, GRUB_NET_MAX_STR_ADDR_LEN, "%s", buf);
-+              if (search_through (1, 0) == 0) return GRUB_ERR_NONE;
-+              break;
-+            }
-+        case GRUB_NET_NETWORK_LEVEL_PROTOCOL_DHCP_RECV:
-+          return grub_error (GRUB_ERR_BUG, "shouldn't reach here");
-+        default:
-+          return grub_error (GRUB_ERR_BUG,
-+                             "unsupported address type %d", (&inf->address)->type);
-+        }
-+    }
-+
-+  /* Remove the remaining minus sign at the end. */
-+  config[config_len] = '\0';
-+
-+  return GRUB_ERR_NONE;
-+}
-+
- static struct grub_preboot *fini_hnd;
- 
- static grub_command_t cmd_addaddr, cmd_deladdr, cmd_addroute, cmd_delroute;
-diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
-index aa0b3e5..cc519a5 100644
---- a/grub-core/normal/main.c
-+++ b/grub-core/normal/main.c
-@@ -32,6 +32,7 @@
- #include <grub/i18n.h>
- #include <grub/charset.h>
- #include <grub/script_sh.h>
-+#include <grub/net.h>
- 
- GRUB_MOD_LICENSE ("GPLv3+");
- 
-@@ -379,10 +380,19 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
- 
-       prefix = grub_env_get ("prefix");
-       if (prefix)
--	{
--	  config = grub_xasprintf ("%s/grub.cfg", prefix);
--	  if (! config)
--	    goto quit;
-+        {
-+          grub_size_t config_len;
-+          config_len = grub_strlen (prefix) +
-+                      sizeof ("/grub.cfg-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
-+          config = grub_malloc (config_len);
-+
-+          if (! config)
-+            goto quit;
-+
-+          grub_snprintf (config, config_len, "%s/grub.cfg", prefix);
-+
-+          if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0)
-+            grub_net_search_configfile (config);
- 
- 	  grub_enter_normal_mode (config);
- 	  grub_free (config);
-diff --git a/include/grub/net.h b/include/grub/net.h
-index 45348dd..09b8d56 100644
---- a/include/grub/net.h
-+++ b/include/grub/net.h
-@@ -534,6 +534,9 @@ extern char *grub_net_default_server;
- #define GRUB_NET_TRIES 40
- #define GRUB_NET_INTERVAL 400
-
- #define VLANTAG_IDENTIFIER 0x8100
- 
-+grub_err_t
-+grub_net_search_configfile (char *config);
-+
- #endif /* ! GRUB_NET_HEADER */
--- 
-1.7.10.4
-
diff --git a/sort-version.patch b/sort-version.patch
deleted file mode 100644
index a0ed155..0000000
--- a/sort-version.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-grub-mkconfig does not get it right when sorting "recent kernel first":
-
-sort kernel versions correctly:
-
-Wrong:
-        echo    'Loading Linux 3.0.8-1 ...'
-        echo    'Loading Linux 3.0.4-2 ...'
-        echo    'Loading Linux 3.0.13-1 ...'
-        echo    'Loading Linux 3.0.12-2 ...'
-        echo    'Loading Linux 2.6.38.8-1 ...'
-
-Correct:
-        echo    'Loading Linux 3.0.13-1 ...'
-        echo    'Loading Linux 3.0.12-2 ...'
-        echo    'Loading Linux 3.0.8-1 ...'
-        echo    'Loading Linux 3.0.4-2 ...'
-        echo    'Loading Linux 2.6.38.8-1 ...'
-
---- grub-1.99/util/grub-mkconfig_lib.in~	2012-01-12 00:47:28.626740879 +0200
-+++ grub-1.99/util/grub-mkconfig_lib.in	2012-01-12 00:53:49.554292436 +0200
-@@ -165,7 +165,7 @@
-     a="$b"
-     b="$c"
-   fi
--  if (echo "$a" ; echo "$b") | sort -n | head -n 1 | grep -qx "$b" ; then
-+  if (echo "$a" ; echo "$b") | sort -V | head -n 1 | grep -qx "$b" ; then
-     return 0
-   else
-     return 1
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/grub2.git/commitdiff/5bafb558ac0c2c324b52af35415024aa8d529b7a




More information about the pld-cvs-commit mailing list