From 3bdd3a4a5d4256c75e038877e59030daddfc9882 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sat, 18 Feb 2023 00:49:45 +0000 Subject: [PATCH] Auto sync2gitlab import of rpm-ostree-2022.10.112.g3d0ac35b-3.el8.src.rpm --- .gitignore | 1 + ...ailure-to-query-base-image-non-fatal.patch | 74 +++++++++++++++++++ rpm-ostree.spec | 13 +++- sources | 2 +- 4 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 0001-daemon-Make-failure-to-query-base-image-non-fatal.patch diff --git a/.gitignore b/.gitignore index 02ef7d9..ef7f744 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /rpm-ostree-2022.10.90.g4abaf4b4.tar.xz /rpm-ostree-2022.10.97.gade6df33.tar.xz /rpm-ostree-2022.10.99.g0049dbdd.tar.xz +/rpm-ostree-2022.10.112.g3d0ac35b.tar.xz diff --git a/0001-daemon-Make-failure-to-query-base-image-non-fatal.patch b/0001-daemon-Make-failure-to-query-base-image-non-fatal.patch new file mode 100644 index 0000000..aed7df0 --- /dev/null +++ b/0001-daemon-Make-failure-to-query-base-image-non-fatal.patch @@ -0,0 +1,74 @@ +From a0f1275dfbd835b704355d095e610ac1f1254f25 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Sun, 11 Dec 2022 13:40:15 -0500 +Subject: [PATCH] daemon: Make failure to query base image non-fatal + +We had a GC bug which then propagates into a hard daemon +failure right now because we try to gather data on all deployments. + +Make this non-fatal; we should try to stumble forward as much +as possible so that one can e.g. perform an upgrade operation. + +(cherry picked from commit 8dd45f293afc1ca32b42bda86dde47c66e652dda) +--- + src/app/rpmostree-builtin-status.cxx | 12 +++++++++--- + src/daemon/rpmostreed-deployment-utils.cxx | 20 ++++++++++++++------ + 2 files changed, 23 insertions(+), 9 deletions(-) + +diff --git a/src/app/rpmostree-builtin-status.cxx b/src/app/rpmostree-builtin-status.cxx +index cec0a2e3..ee82e589 100644 +--- a/src/app/rpmostree-builtin-status.cxx ++++ b/src/app/rpmostree-builtin-status.cxx +@@ -688,9 +688,15 @@ print_one_deployment (RPMOSTreeSysroot *sysroot_proxy, GVariant *child, gint ind + break; + case rpmostreecxx::RefspecType::Container: + { +- g_assert (g_variant_dict_lookup (dict, "container-image-reference-digest", "s", +- &container_image_reference_digest)); +- g_print ("%s", origin_refspec); ++ if (g_variant_dict_lookup (dict, "container-image-reference-digest", "s", ++ &container_image_reference_digest)) ++ { ++ g_print ("%s", origin_refspec); ++ } ++ else ++ { ++ g_print ("(error fetching image metadata)"); ++ } + } + break; + } +diff --git a/src/daemon/rpmostreed-deployment-utils.cxx b/src/daemon/rpmostreed-deployment-utils.cxx +index b7b27fed..48480509 100644 +--- a/src/daemon/rpmostreed-deployment-utils.cxx ++++ b/src/daemon/rpmostreed-deployment-utils.cxx +@@ -214,12 +214,20 @@ rpmostreed_deployment_generate_variant (OstreeSysroot *sysroot, OstreeDeployment + case rpmostreecxx::RefspecType::Container: + { + g_variant_dict_insert (dict, "container-image-reference", "s", refspec); +- CXX_TRY_VAR (state, rpmostreecxx::query_container_image_commit (*repo, base_checksum), +- error); +- g_variant_dict_insert (dict, "container-image-reference-digest", "s", +- state->image_digest.c_str ()); +- if (state->version.size () > 0) +- g_variant_dict_insert (dict, "version", "s", state->version.c_str ()); ++ // For now, make this non-fatal https://github.com/coreos/rpm-ostree/issues/4185 ++ try ++ { ++ auto state = rpmostreecxx::query_container_image_commit (*repo, base_checksum); ++ g_variant_dict_insert (dict, "container-image-reference-digest", "s", ++ state->image_digest.c_str ()); ++ if (state->version.size () > 0) ++ g_variant_dict_insert (dict, "version", "s", state->version.c_str ()); ++ } ++ catch (std::exception &e) ++ { ++ sd_journal_print (LOG_ERR, "failed to query container image base metadata: %s", ++ e.what ()); ++ } + } + break; + case rpmostreecxx::RefspecType::Checksum: +-- +2.31.1 + diff --git a/rpm-ostree.spec b/rpm-ostree.spec index 0a8297d..0facedd 100644 --- a/rpm-ostree.spec +++ b/rpm-ostree.spec @@ -3,7 +3,7 @@ Summary: Hybrid image/package system Name: rpm-ostree -Version: 2022.10.99.g0049dbdd +Version: 2022.10.112.g3d0ac35b Release: 3%{?dist} License: LGPLv2+ URL: https://github.com/coreos/rpm-ostree @@ -11,6 +11,8 @@ URL: https://github.com/coreos/rpm-ostree # in the upstream git. It also contains vendored Rust sources. This is generated from the "rhel8" branch. Source0: https://github.com/coreos/rpm-ostree/releases/download/v%{version}/rpm-ostree-%{version}.tar.xz +Patch0: 0001-daemon-Make-failure-to-query-base-image-non-fatal.patch + ExclusiveArch: %{rust_arches} BuildRequires: make @@ -227,6 +229,15 @@ $PYTHON autofiles.py > files.devel \ %files devel -f files.devel %changelog +* Thu Feb 16 2023 Colin Walters - 2022.10.112.g3d0ac35b-3 +- Cherry pick + https://github.com/coreos/rpm-ostree/pull/4311/commits/a0f1275dfbd835b704355d095e610ac1f1254f25 + Resolves: rhbz#2170579 + +* Tue Feb 14 2023 Colin Walters - 2022.10.112.g3d0ac35b-2 +- Sync to latest rhel8 branch + Resolves: rhbz#2169429 + * Fri Oct 14 2022 Colin Walters - 2022.10.99.g0049dbdd-3 - Resolves: rhbz#2134630 diff --git a/sources b/sources index fce7836..0c50e85 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rpm-ostree-2022.10.99.g0049dbdd.tar.xz) = d839224c73a0071b0284348fa146bdc002ad536f73eb6be20b4cc32b3095a6dbe5332821c7526a5f812061223e7d89bbf955094e47d7d6cb9073b924856dbdb5 +SHA512 (rpm-ostree-2022.10.112.g3d0ac35b.tar.xz) = 8c4b2507bee13a95e7128b7adb7fc2ca0e96a3bc2fcc89517c034434ac5fea430bea3a7ac2630a5f48388c7a86fa4fdda6451e65a6a37dfb010e812b5d247f03