mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-27 23:34:51 +00:00
e1531466e1
This change updates grub to the 2.04 release. The new release changed how grub is built, so the bootstrap and bootstrap.conf files have to be added to the dist-git. Also, the gitignore file changed so it has to be updated. Since the patches have been forward ported to 2.04, there's no need for a logic to maintain a patch with the delta between the release and the grub master branch. So the release-to-master.patch is dropped and no longer is updated by the do-rebase script. Also since gnulib isn't part of the grub repository anymore and cloned by the boostrap tool, a gnulib tarball is included as other source file and copied before calling the bootstrap tool. That way grub can be built even in builders that only have access to the sources lookaside cache. Resolves: rhbz#1727279 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Peter Jones <pjones@redhat.com>
|
|
Date: Mon, 30 Jul 2018 16:39:57 -0400
|
|
Subject: [PATCH] efi/http: Make root_url reflect the protocol+hostname of our
|
|
boot url.
|
|
|
|
This lets you write config files that don't know urls.
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
---
|
|
grub-core/net/efi/http.c | 19 +++++++++++++++++++
|
|
1 file changed, 19 insertions(+)
|
|
|
|
diff --git a/grub-core/net/efi/http.c b/grub-core/net/efi/http.c
|
|
index 3f61fd2fa5b..243acbaa35b 100644
|
|
--- a/grub-core/net/efi/http.c
|
|
+++ b/grub-core/net/efi/http.c
|
|
@@ -4,6 +4,7 @@
|
|
#include <grub/misc.h>
|
|
#include <grub/net/efi.h>
|
|
#include <grub/charset.h>
|
|
+#include <grub/env.h>
|
|
|
|
static void
|
|
http_configure (struct grub_efi_net_device *dev, int prefer_ip6)
|
|
@@ -351,6 +352,24 @@ grub_efihttp_open (struct grub_efi_net_device *dev,
|
|
grub_err_t err;
|
|
grub_off_t size;
|
|
char *buf;
|
|
+ char *root_url;
|
|
+ grub_efi_ipv6_address_t address;
|
|
+ const char *rest;
|
|
+
|
|
+ if (grub_efi_string_to_ip6_address (file->device->net->server, &address, &rest) && *rest == 0)
|
|
+ root_url = grub_xasprintf ("%s://[%s]", type ? "https" : "http", file->device->net->server);
|
|
+ else
|
|
+ root_url = grub_xasprintf ("%s://%s", type ? "https" : "http", file->device->net->server);
|
|
+ if (root_url)
|
|
+ {
|
|
+ grub_env_unset ("root_url");
|
|
+ grub_env_set ("root_url", root_url);
|
|
+ grub_free (root_url);
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ return grub_errno;
|
|
+ }
|
|
|
|
err = efihttp_request (dev->http, file->device->net->server, file->device->net->name, type, 1, 0);
|
|
if (err != GRUB_ERR_NONE)
|