summaryrefslogtreecommitdiffstats
path: root/recipes/ostree/ostree/0005-Do-not-use-grub2-mkconfig.patch
blob: 1414ff76358819328c704ddf5ed45451a3e6c63d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From b613d60319beffc861f5b1faa906d2ee0c685f52 Mon Sep 17 00:00:00 2001
From: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
Date: Wed, 24 Feb 2016 18:12:27 +0100
Subject: [PATCH] Do not use grub2-mkconfig.

For details see: https://bugzilla.gnome.org/show_bug.cgi?id=762220
---
 src/libostree/ostree-bootloader-grub2.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/libostree/ostree-bootloader-grub2.c b/src/libostree/ostree-bootloader-grub2.c
index 1f89914..7cfb0dc 100644
--- a/src/libostree/ostree-bootloader-grub2.c
+++ b/src/libostree/ostree-bootloader-grub2.c
@@ -282,6 +282,8 @@ grub2_child_setup (gpointer user_data)
     }
 }
 
+#define OSTREE_NO_GRUB2_MKCONFIG
+
 static gboolean
 _ostree_bootloader_grub2_write_config (OstreeBootloader      *bootloader,
                                        int                    bootversion,
@@ -300,6 +302,7 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader      *bootloader,
   g_autoptr(GFile) config_path_efi_dir = NULL;
   g_autofree char *grub2_mkconfig_chroot = NULL;
 
+#ifndef OSTREE_NO_GRUB2_MKCONFIG
   if (ostree_sysroot_get_booted_deployment (self->sysroot) == NULL
       && g_file_has_parent (self->sysroot->path, NULL))
     {
@@ -322,7 +325,7 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader      *bootloader,
       tool_deployment_root = ostree_sysroot_get_deployment_directory (self->sysroot, tool_deployment);
       grub2_mkconfig_chroot = g_file_get_path (tool_deployment_root);
     }
-
+#endif
   if (self->is_efi)
     {
       config_path_efi_dir = g_file_get_parent (self->config_path_efi);
@@ -337,9 +340,16 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader      *bootloader,
                                                       bootversion);
     }
 
+#ifdef OSTREE_NO_GRUB2_MKCONFIG
+  procctx = gs_subprocess_context_newv ("ostree-grub-generator", "-o",
+                                        gs_file_get_path_cached (new_config_path),
+                                        NULL);
+#else
   procctx = gs_subprocess_context_newv ("grub2-mkconfig", "-o",
                                         gs_file_get_path_cached (new_config_path),
                                         NULL);
+#endif
+
   child_env = g_environ_setenv (child_env, "_OSTREE_GRUB2_BOOTVERSION", bootversion_str, TRUE);
   /* We have to pass our state to the child */
   if (self->is_efi)
-- 
2.7.0