rpm-ostree/0001-main-Update-ostree-ext-add-provisional-repair-entryp.patch
2023-07-21 16:13:35 -04:00

65 lines
2.5 KiB
Diff

From 53fb8c7cb7075e4ecda4564f3a17af84ad4a2e32 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Fri, 21 Jul 2023 15:21:00 -0400
Subject: [PATCH] main: Update ostree-ext, add provisional-repair entrypoint
This updates us to vendor the provisional-repair code. One can
now run `ostree provisional-repair` directly.
(Yes, it's very confusing how in rpm-ostree, we vendor the ostree-ext
source, and then install a wrapper symlink which tells the main
(C) `ostree` binary to call back into us... but it's how the
`ostree container` stuff has been working for a long time)
---
Cargo.lock | 4 ++--
Makefile-rpm-ostree.am | 1 +
rust/src/main.rs | 4 +++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 5ae6366a..c6826a4d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1775,9 +1775,9 @@ dependencies = [
[[package]]
name = "ostree-ext"
-version = "0.11.1"
+version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a690495144c18cb333a67a2ec61dd008831710bbd37804cfa79ab93b51146a6f"
+checksum = "8511513a60fa0c20a84ba8d30255286687c848bec21d24cd3dd4d16ecf48123b"
dependencies = [
"anyhow",
"async-compression 0.3.15",
diff --git a/Makefile-rpm-ostree.am b/Makefile-rpm-ostree.am
index 2ef84f83..be80a6d7 100644
--- a/Makefile-rpm-ostree.am
+++ b/Makefile-rpm-ostree.am
@@ -132,6 +132,7 @@ install-rpmostree-hook:
install -m 0755 -t $(DESTDIR)$(bindir) rpm-ostree
install -d -m 0755 $(ostreeextdir)
ln -Tsr -f $(DESTDIR)$(bindir)/rpm-ostree $(ostreeextdir)/ostree-ima-sign
+ ln -Tsr -f $(DESTDIR)$(bindir)/rpm-ostree $(ostreeextdir)/ostree-provisional-repair
ln -Tsr -f $(DESTDIR)$(bindir)/rpm-ostree $(ostreeextdir)/ostree-container
INSTALL_EXEC_HOOKS += install-rpmostree-hook
diff --git a/rust/src/main.rs b/rust/src/main.rs
index 9088c5f0..569cf094 100644
--- a/rust/src/main.rs
+++ b/rust/src/main.rs
@@ -53,7 +53,9 @@ async fn dispatch_ostree_ext(args: Vec<String>) -> Result<i32> {
/// Dispatch multicall binary to relevant logic, based on callname from `argv[0]`.
async fn dispatch_multicall(callname: String, args: Vec<String>) -> Result<i32> {
match callname.as_str() {
- "ostree-container" | "ostree-ima-sign" => dispatch_ostree_ext(args).await,
+ "ostree-container" | "ostree-ima-sign" | "ostree-provisional-repair" => {
+ dispatch_ostree_ext(args).await
+ }
_ => inner_async_main(args).await, // implicitly includes "rpm-ostree"
}
}
--
2.40.1