diff options
-rw-r--r-- | recipes/ostree/ostree.bb | 1 | ||||
-rw-r--r-- | recipes/ostree/ostree/Workaround-the-SIGCHLD-handler-issue.patch | 54 |
2 files changed, 55 insertions, 0 deletions
diff --git a/recipes/ostree/ostree.bb b/recipes/ostree/ostree.bb index 37af99d..5061218 100644 --- a/recipes/ostree/ostree.bb +++ b/recipes/ostree/ostree.bb | |||
@@ -44,6 +44,7 @@ SRC_URI = " \ | |||
44 | file://u-boot-add-bootdir-to-the-generated-uEnv.txt.patch \ | 44 | file://u-boot-add-bootdir-to-the-generated-uEnv.txt.patch \ |
45 | file://Create-firmware-convenience-symlinks.patch \ | 45 | file://Create-firmware-convenience-symlinks.patch \ |
46 | file://Print-pull-progress-also-when-not-on-console.patch \ | 46 | file://Print-pull-progress-also-when-not-on-console.patch \ |
47 | file://Workaround-the-SIGCHLD-handler-issue.patch \ | ||
47 | " | 48 | " |
48 | 49 | ||
49 | SRCREV = "8ece4d6d51bdbe3e41ab318259276bb83e553aa0" | 50 | SRCREV = "8ece4d6d51bdbe3e41ab318259276bb83e553aa0" |
diff --git a/recipes/ostree/ostree/Workaround-the-SIGCHLD-handler-issue.patch b/recipes/ostree/ostree/Workaround-the-SIGCHLD-handler-issue.patch new file mode 100644 index 0000000..ece69b8 --- /dev/null +++ b/recipes/ostree/ostree/Workaround-the-SIGCHLD-handler-issue.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From c7cf5cb80c57423e707d87013050c6f9cc6f6d37 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gatis Paeglis <gatis.paeglis@qt.io> | ||
3 | Date: Tue, 18 Oct 2016 12:19:57 +0200 | ||
4 | Subject: [PATCH] Workaround the SIGCHLD handler issue | ||
5 | |||
6 | REF: https://bugreports.qt.io/browse/QTBUG-56338 | ||
7 | --- | ||
8 | src/libostree/ostree-bootloader-grub2.c | 30 ++++++++++++++++++++++-------- | ||
9 | 1 file changed, 22 insertions(+), 8 deletions(-) | ||
10 | |||
11 | diff --git a/src/libostree/ostree-bootloader-grub2.c b/src/libostree/ostree-bootloader-grub2.c | ||
12 | index f3dc8e1..2c60b80 100644 | ||
13 | --- a/src/libostree/ostree-bootloader-grub2.c | ||
14 | +++ b/src/libostree/ostree-bootloader-grub2.c | ||
15 | @@ -380,14 +380,28 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader, | ||
16 | |||
17 | Upstream is fixed though. | ||
18 | */ | ||
19 | - proc = g_subprocess_launcher_spawn (launcher, error, | ||
20 | - grub_exec, "-o", | ||
21 | - gs_file_get_path_cached (new_config_path), | ||
22 | - NULL); | ||
23 | - | ||
24 | - if (!g_subprocess_wait_check (proc, cancellable, error)) | ||
25 | - goto out; | ||
26 | - | ||
27 | + //proc = g_subprocess_launcher_spawn (launcher, error, | ||
28 | + // grub_exec, "-o", | ||
29 | + // gs_file_get_path_cached (new_config_path), | ||
30 | + // NULL); | ||
31 | + | ||
32 | + //if (!g_subprocess_wait_check (proc, cancellable, error)) | ||
33 | + // goto out; | ||
34 | + { | ||
35 | + // REF: https://bugreports.qt.io/browse/QTBUG-56338 | ||
36 | + // We do not use the chroot (grub2_child_setup) code path, so we do not | ||
37 | + // care about GSubprocessLauncher and the custom envvars passed to it. | ||
38 | + const char *cmd = glnx_strjoina (grub_exec, " -o ", gs_file_get_path_cached (new_config_path)); | ||
39 | + FILE *fp = popen(cmd, "r"); | ||
40 | + if (!fp) { | ||
41 | + glnx_set_prefix_error_from_errno (error, "popen (%s)", cmd); | ||
42 | + goto out; | ||
43 | + } | ||
44 | + if (pclose(fp) == -1) { | ||
45 | + glnx_set_prefix_error_from_errno (error, "pclose (%s)", cmd); | ||
46 | + goto out; | ||
47 | + } | ||
48 | + } | ||
49 | /* Now let's fdatasync() for the new file */ | ||
50 | { glnx_fd_close int new_config_fd = open (gs_file_get_path_cached (new_config_path), O_RDONLY | O_CLOEXEC); | ||
51 | if (new_config_fd < 0) | ||
52 | -- | ||
53 | 2.7.4 | ||
54 | |||