-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ostree and rpm-ostree versions (#1741)
- Loading branch information
1 parent
16b2a76
commit 92b8ff5
Showing
12 changed files
with
258 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,22 +11,20 @@ Signed-off-by: Ankit Jain <[email protected]> | |
--- | ||
src/libostree/ostree-sysroot-deploy.c | 70 +++++++++++++++++++++++++++++++++++ | ||
1 file changed, 70 insertions(+) | ||
mode change 100644 => 100755 src/libostree/ostree-sysroot-deploy.c | ||
|
||
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c | ||
old mode 100644 | ||
new mode 100755 | ||
index 3ca6c14..0744d7e | ||
--- a/src/libostree/ostree-sysroot-deploy.c | ||
diff --git a/src/libostree/ostree-sysroot-deploy.c.newold b/src/libostree/ostree-sysroot-deploy.c | ||
index 6a13a41..976c4b5 100644 | ||
--- a/src/libostree/ostree-sysroot-deploy.c.newold | ||
+++ b/src/libostree/ostree-sysroot-deploy.c | ||
@@ -876,12 +876,17 @@ ostree_sysroot_write_origin_file (OstreeSysroot *sysroot, | ||
@@ -987,6 +987,7 @@ ostree_sysroot_write_origin_file (OstreeSysroot *sysroot, | ||
|
||
typedef struct { | ||
int boot_dfd; | ||
+ int ostree_boot_dfd; | ||
char *kernel_srcpath; | ||
char *kernel_namever; | ||
char *initramfs_srcpath; | ||
char *kernel_hmac_srcpath; | ||
@@ -995,6 +996,10 @@ typedef struct { | ||
char *initramfs_namever; | ||
char *devicetree_srcpath; | ||
char *devicetree_namever; | ||
|
@@ -37,7 +35,7 @@ index 3ca6c14..0744d7e | |
char *bootcsum; | ||
} OstreeKernelLayout; | ||
static void | ||
@@ -894,6 +899,10 @@ _ostree_kernel_layout_free (OstreeKernelLayout *layout) | ||
@@ -1009,6 +1014,10 @@ _ostree_kernel_layout_free (OstreeKernelLayout *layout) | ||
g_free (layout->initramfs_namever); | ||
g_free (layout->devicetree_srcpath); | ||
g_free (layout->devicetree_namever); | ||
|
@@ -48,13 +46,13 @@ index 3ca6c14..0744d7e | |
g_free (layout->bootcsum); | ||
g_free (layout); | ||
} | ||
@@ -1031,6 +1040,25 @@ get_kernel_from_tree_usrlib_modules (int deployment_dfd, | ||
@@ -1182,6 +1191,26 @@ get_kernel_from_tree_usrlib_modules (OstreeSysroot *sysroot, | ||
ret_layout->kernel_hmac_namever = g_strdup_printf (".%s.hmac", ret_layout->kernel_namever); | ||
} | ||
|
||
g_clear_object (&in); | ||
glnx_close_fd (&fd); | ||
+/* Setting the param for Copying Photon Specific config files to sutiable location */ | ||
+ if (!glnx_opendirat (deployment_dfd, "usr/lib/ostree-boot", FALSE, &ret_layout->ostree_boot_dfd, error)) | ||
+ return FALSE; | ||
+ return FALSE; | ||
+ if (!ot_openat_ignore_enoent (ret_layout->ostree_boot_dfd, "photon.cfg", &fd, error)) | ||
+ return FALSE; | ||
+ if (fd != -1) | ||
|
@@ -71,24 +69,24 @@ index 3ca6c14..0744d7e | |
+ ret_layout->systemdcfg_namever = g_strdup ("systemd.cfg"); | ||
+ } | ||
+ glnx_close_fd (&fd); | ||
+ | ||
char hexdigest[OSTREE_SHA256_STRING_LEN+1]; | ||
ot_checksum_get_hexdigest (&checksum, hexdigest, sizeof (hexdigest)); | ||
@@ -1686,6 +1714,35 @@ install_deployment_kernel (OstreeSysroot *sysroot, | ||
} | ||
ret_layout->bootcsum = g_strdup (hexdigest); | ||
@@ -1897,6 +1926,34 @@ install_deployment_kernel (OstreeSysroot *sysroot, | ||
g_ptr_array_add (overlay_initrds, g_steal_pointer (&destpath)); | ||
} | ||
|
||
+/* Copying Photon Specific config files to sutiable location */ | ||
+ /* Copying Photon Specific config files to sutiable location */ | ||
+ if (kernel_layout->kernelcfg_srcpath) | ||
+ { | ||
+ if (!glnx_fstatat_allow_noent (bootcsum_dfd, kernel_layout->kernelcfg_namever, &stbuf, 0, error)) | ||
+ return FALSE; | ||
+ if (errno == ENOENT) | ||
+ { | ||
+ if (!install_into_boot (sepolicy, kernel_layout->ostree_boot_dfd, kernel_layout->kernelcfg_srcpath, | ||
+ bootcsum_dfd, kernel_layout->kernelcfg_namever, | ||
+ sysroot->debug_flags, | ||
+ cancellable, error)) | ||
+ if (!install_into_boot (repo, sepolicy, kernel_layout->ostree_boot_dfd, kernel_layout->kernelcfg_srcpath, | ||
+ bootcsum_dfd, kernel_layout->kernelcfg_namever, | ||
+ cancellable, error)) | ||
+ return FALSE; | ||
+ } | ||
+ } | ||
|
@@ -99,37 +97,33 @@ index 3ca6c14..0744d7e | |
+ return FALSE; | ||
+ if (errno == ENOENT) | ||
+ { | ||
+ if (!install_into_boot (sepolicy, kernel_layout->ostree_boot_dfd, kernel_layout->systemdcfg_srcpath, | ||
+ bootcsum_dfd, kernel_layout->systemdcfg_namever, | ||
+ sysroot->debug_flags, | ||
+ cancellable, error)) | ||
+ return FALSE; | ||
+ if (!install_into_boot (repo, sepolicy, kernel_layout->ostree_boot_dfd, kernel_layout->systemdcfg_srcpath, | ||
+ bootcsum_dfd, kernel_layout->systemdcfg_namever, | ||
+ cancellable, error)) | ||
+ return FALSE; | ||
+ } | ||
+ } | ||
+ | ||
+ | ||
g_autofree char *contents = NULL; | ||
if (!glnx_fstatat_allow_noent (deployment_dfd, "usr/lib/os-release", &stbuf, 0, error)) | ||
return FALSE; | ||
@@ -1775,6 +1832,19 @@ install_deployment_kernel (OstreeSysroot *sysroot, | ||
_ostree_kernel_args_replace_take (kargs, g_steal_pointer (&prepare_root_arg)); | ||
@@ -1992,6 +2049,18 @@ install_deployment_kernel (OstreeSysroot *sysroot, | ||
ostree_kernel_args_replace_take (kargs, g_steal_pointer (&prepare_root_arg)); | ||
} | ||
|
||
+ if (kernel_layout->systemdcfg_namever) | ||
+ { | ||
+ g_autofree char * boot_relpath = g_strconcat ("/", bootcsumdir, "/", kernel_layout->systemdcfg_namever, NULL); | ||
+ ostree_bootconfig_parser_set (bootconfig, "systemdcfg", boot_relpath); | ||
+ g_autofree char * systemdcfg_boot_relpath = g_strconcat ("/", bootcsumdir, "/", kernel_layout->systemdcfg_namever, NULL); | ||
+ ostree_bootconfig_parser_set (bootconfig, "systemdcfg", systemdcfg_boot_relpath); | ||
+ } | ||
+ | ||
+ if (kernel_layout->kernelcfg_namever) | ||
+ { | ||
+ g_autofree char * boot_relpath = g_strconcat ("/", bootcsumdir, "/", kernel_layout->kernelcfg_namever, NULL); | ||
+ ostree_bootconfig_parser_set (bootconfig, "kernelcfg", boot_relpath); | ||
+ g_autofree char * kernelcfg_boot_relpath = g_strconcat ("/", bootcsumdir, "/", kernel_layout->kernelcfg_namever, NULL); | ||
+ ostree_bootconfig_parser_set (bootconfig, "kernelcfg", kernelcfg_boot_relpath); | ||
+ } | ||
+ | ||
+ | ||
if (kernel_layout->devicetree_namever) | ||
{ | ||
g_autofree char * boot_relpath = g_strconcat ("/", bootcsumdir, "/", kernel_layout->devicetree_namever, NULL); | ||
-- | ||
2.7.4 | ||
|
||
g_autofree char * dt_boot_relpath = g_strconcat ("/", bootcsumdir, "/", kernel_layout->devicetree_namever, NULL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,11 @@ to add kernel and systemd commandline parameter | |
Signed-off-by: Ajay Kaher <[email protected]> | ||
Signed-off-by: Ankit Jain <[email protected]> | ||
--- | ||
src/libostree/ostree-bootloader-grub2.c | 21 +++++++++++++++++++++ | ||
1 file changed, 21 insertions(+) | ||
src/libostree/ostree-bootloader-grub2.c | 18 ++++++++++++++++++ | ||
1 file changed, 18 insertions(+) | ||
|
||
diff --git a/src/libostree/ostree-bootloader-grub2.c b/src/libostree/ostree-bootloader-grub2.c | ||
index ee3ae6f..ad74509 100644 | ||
index 22037f1..53fbfa6 100644 | ||
--- a/src/libostree/ostree-bootloader-grub2.c | ||
+++ b/src/libostree/ostree-bootloader-grub2.c | ||
@@ -193,6 +193,8 @@ _ostree_bootloader_grub2_generate_config (OstreeSysroot *sysroot | ||
|
@@ -25,14 +25,11 @@ index ee3ae6f..ad74509 100644 | |
char *quoted_title = NULL; | ||
char *uuid = NULL; | ||
char *quoted_uuid = NULL; | ||
@@ -217,6 +219,25 @@ _ostree_bootloader_grub2_generate_config (OstreeSysroot *sysroot | ||
@@ -217,6 +219,22 @@ _ostree_bootloader_grub2_generate_config (OstreeSysroot *sysroot | ||
g_string_append (output, grub2_prepare_root_cache); | ||
g_string_append_c (output, '\n'); | ||
|
||
+ | ||
+ | ||
+ kernelcfg = ostree_bootconfig_parser_get (config, "kernelcfg"); | ||
+ | ||
+ if(kernelcfg) | ||
+ { | ||
+ g_string_append (output, "load_env -f "); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"Signatures": { | ||
"91-ostree.preset": "24cdb413163cec872dda583cc55eb070ee1472e6fb1fbf1a4a5e8aeafbeb8b8c", | ||
"ostree-2019.2-withsubmodules.tar.gz": "62bb190feefa4256a1e9cecea7e1da6d63a2bd60a40a54270984541dbb91d5e6" | ||
"libostree-2021.4.tar.xz": "db5ce01a1606af3466ec77236700f53a63ce20e4984a549d0eaba3f66a3d9361" | ||
} | ||
} |
Oops, something went wrong.