From 5211a9b15e2f98d876f6e451102696e0339df04d Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 29 Aug 2016 12:43:10 +0200 Subject: ostree: Update revison One of the local patches has been merged in the upstream project and is fixed to add thread safety. Change-Id: Ib3cf12ab759226aefbd4c0af5b0ac5100b3490cc Reviewed-by: Teemu Holappa --- recipes/ostree/ostree.bb | 3 +- ...-boot-Merge-ostree-s-and-systems-uEnv.txt.patch | 76 ---------------------- 2 files changed, 1 insertion(+), 78 deletions(-) delete mode 100644 recipes/ostree/ostree/u-boot-Merge-ostree-s-and-systems-uEnv.txt.patch (limited to 'recipes/ostree') diff --git a/recipes/ostree/ostree.bb b/recipes/ostree/ostree.bb index 0fcb810..f38088c 100644 --- a/recipes/ostree/ostree.bb +++ b/recipes/ostree/ostree.bb @@ -42,11 +42,10 @@ SRC_URI = " \ file://Support-for-booting-without-initramfs.patch \ file://Allow-updating-files-in-the-boot-directory.patch \ file://u-boot-add-bootdir-to-the-generated-uEnv.txt.patch \ - file://u-boot-Merge-ostree-s-and-systems-uEnv.txt.patch \ file://Create-firmware-convenience-symlinks.patch \ " -SRCREV = "77af6844d8330b31d58080076afb31e08974ce09" +SRCREV = "8ece4d6d51bdbe3e41ab318259276bb83e553aa0" S = "${WORKDIR}/git" diff --git a/recipes/ostree/ostree/u-boot-Merge-ostree-s-and-systems-uEnv.txt.patch b/recipes/ostree/ostree/u-boot-Merge-ostree-s-and-systems-uEnv.txt.patch deleted file mode 100644 index 80677c7..0000000 --- a/recipes/ostree/ostree/u-boot-Merge-ostree-s-and-systems-uEnv.txt.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 4d8648d35ba7fe60f428aab2240aa6044fb51c50 Mon Sep 17 00:00:00 2001 -From: Gatis Paeglis -Date: Tue, 23 Aug 2016 14:32:35 +0200 -Subject: [PATCH 1/2] u-boot: Merge ostree's and systems uEnv.txt - -This is a proper fix for: -https://bugzilla.gnome.org/show_bug.cgi?id=755787 - -With this patch, an admin (system builder) can now: - -1) Edit /usr/lib/ostree-boot/uEnv.txt -2) Deploy the new tree. OSTree will append system's uEnv.txt - to the OSTree's managed uEnv.txt (loader/uEnv.txt). - -It is common for u-boot systems to read in an extra env -from external /uEnv.txt. The same file OSTree uses to pass -in its env. With this patch /uEnv.txt now contains OSTree's -env + custom env added by system builders. ---- - src/libostree/ostree-bootloader-uboot.c | 40 ++++++++++++++++++++++++++++++++- - 1 file changed, 39 insertions(+), 1 deletion(-) - -diff --git a/src/libostree/ostree-bootloader-uboot.c b/src/libostree/ostree-bootloader-uboot.c -index f95ea84..5172477 100644 ---- a/src/libostree/ostree-bootloader-uboot.c -+++ b/src/libostree/ostree-bootloader-uboot.c -@@ -95,7 +95,45 @@ create_config_from_boot_loader_entries (OstreeBootloaderUboot *self, - - val = ostree_bootconfig_parser_get (config, "options"); - if (val) -- g_ptr_array_add (new_lines, g_strdup_printf ("bootargs=%s", val)); -+ { -+ glnx_fd_close int uenv_fd = -1; -+ g_autofree char* kargs = g_strdup (val); -+ const char *uenv_path = NULL; -+ const char *ostree_arg = NULL; -+ -+ g_ptr_array_add (new_lines, g_strdup_printf ("bootargs=%s", val)); -+ -+ /* Append system's uEnv.txt, if it exists in $deployment/usr/lib/ostree-boot/ */ -+ ostree_arg = strtok (kargs, " "); -+ while (ostree_arg != NULL && !g_str_has_prefix (ostree_arg, "ostree=")) -+ ostree_arg = strtok (NULL, " "); -+ if (!ostree_arg) -+ { -+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "No ostree= kernel argument found in boot loader configuration file"); -+ return FALSE; -+ } -+ uenv_path = glnx_strjoina (ostree_arg + strlen ("ostree=/"), "/usr/lib/ostree-boot/uEnv.txt"); -+ uenv_fd = openat (self->sysroot->sysroot_fd, uenv_path, O_CLOEXEC | O_RDONLY); -+ if (uenv_fd != -1) -+ { -+ char *uenv = glnx_fd_readall_utf8 (uenv_fd, NULL, cancellable, error); -+ if (!uenv) -+ { -+ glnx_set_prefix_error_from_errno (error, "%s", uenv_path); -+ return FALSE; -+ } -+ g_ptr_array_add (new_lines, uenv); -+ } -+ else -+ { -+ if (errno != ENOENT) -+ { -+ glnx_set_prefix_error_from_errno (error, "%s", uenv_path); -+ return FALSE; -+ } -+ } -+ } - - return TRUE; - } --- -2.7.4 - -- cgit v1.2.3-54-g00ecf