diff --git a/.gitignore b/.gitignore index b98035f..455a031 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /zincati-0.0.8.crate /zincati-0.0.9.crate /zincati-0.0.10.crate +/zincati-0.0.11.crate diff --git a/0001-Update-agent-update-to-actix-0.10.0-alpha.2-API.patch b/0001-Update-agent-update-to-actix-0.10.0-alpha.2-API.patch deleted file mode 100644 index 7a280f1..0000000 --- a/0001-Update-agent-update-to-actix-0.10.0-alpha.2-API.patch +++ /dev/null @@ -1,127 +0,0 @@ -diff --git a/src/update_agent/actor.rs b/src/update_agent/actor.rs -index f3baf1f..daa362b 100644 ---- a/src/update_agent/actor.rs -+++ b/src/update_agent/actor.rs -@@ -100,7 +100,7 @@ impl Handler for UpdateAgent { - // Process state machine refresh ticks sequentially. - ctx.wait(update_machine); - -- Box::new(actix::fut::ok(())) -+ Box::pin(actix::fut::ok(())) - } - } - -@@ -159,7 +159,7 @@ impl UpdateAgent { - Ok(()) - }); - -- Box::new(initialization) -+ Box::pin(initialization) - } - - /// Try to report steady state. -@@ -176,7 +176,7 @@ impl UpdateAgent { - Ok(()) - }); - -- Box::new(state_change) -+ Box::pin(state_change) - } - - /// Try to check for updates. -@@ -207,7 +207,7 @@ impl UpdateAgent { - Ok(()) - }); - -- Box::new(state_change) -+ Box::pin(state_change) - } - - /// Try to stage an update. -@@ -219,7 +219,7 @@ impl UpdateAgent { - .then(|can_fetch, actor, _ctx| actor.locked_upgrade(can_fetch, release)) - .map(|res, actor, _ctx| res.map(|release| actor.state.update_staged(release))); - -- Box::new(state_change) -+ Box::pin(state_change) - } - - /// Try to finalize an update. -@@ -234,7 +234,7 @@ impl UpdateAgent { - .then(|can_finalize, actor, _ctx| actor.finalize_deployment(can_finalize, release)) - .map(|res, actor, _ctx| res.map(|release| actor.state.update_finalized(release))); - -- Box::new(state_change) -+ Box::pin(state_change) - } - - /// Actor job is done. -@@ -245,7 +245,7 @@ impl UpdateAgent { - Ok(()) - }); - -- Box::new(state_change) -+ Box::pin(state_change) - } - - /// Fetch and stage an update, in finalization-locked mode. -@@ -255,7 +255,7 @@ impl UpdateAgent { - release: Release, - ) -> ResponseActFuture> { - if !can_fetch { -- return Box::new(actix::fut::err(())); -+ return Box::pin(actix::fut::err(())); - } - - log::info!( -@@ -273,7 +273,7 @@ impl UpdateAgent { - .map_err(|e| log::error!("failed to stage deployment: {}", e)) - .into_actor(self); - -- Box::new(upgrade) -+ Box::pin(upgrade) - } - - /// List local deployments. -@@ -282,7 +282,7 @@ impl UpdateAgent { - can_fetch: bool, - ) -> ResponseActFuture), ()>> { - if !can_fetch { -- return Box::new(actix::fut::ok((can_fetch, BTreeSet::new()))); -+ return Box::pin(actix::fut::ok((can_fetch, BTreeSet::new()))); - } - - let msg = rpm_ostree::QueryLocalDeployments {}; -@@ -297,7 +297,7 @@ impl UpdateAgent { - }) - .into_actor(self); - -- Box::new(depls) -+ Box::pin(depls) - } - - /// Finalize a deployment (unlock and reboot). -@@ -307,7 +307,7 @@ impl UpdateAgent { - release: Release, - ) -> ResponseActFuture> { - if !can_finalize { -- return Box::new(actix::fut::err(())); -+ return Box::pin(actix::fut::err(())); - } - - log::info!( -@@ -322,12 +322,12 @@ impl UpdateAgent { - .map_err(|e| log::error!("failed to finalize deployment: {}", e)) - .into_actor(self); - -- Box::new(upgrade) -+ Box::pin(upgrade) - } - - /// Do nothing, without errors. - fn nop(&mut self) -> ResponseActFuture> { - let nop = actix::fut::ok(()); -- Box::new(nop) -+ Box::pin(nop) - } - } diff --git a/rust-zincati.spec b/rust-zincati.spec index 07583b4..60bc68b 100644 --- a/rust-zincati.spec +++ b/rust-zincati.spec @@ -5,8 +5,8 @@ %global crate zincati Name: rust-%{crate} -Version: 0.0.10 -Release: 3%{?dist} +Version: 0.0.11 +Release: 1%{?dist} Summary: Update agent for Fedora CoreOS # Upstream license specification: Apache-2.0 @@ -15,12 +15,7 @@ URL: https://crates.io/crates/zincati Source: %{crates_source} # Initial patched metadata # - Update actix from ^0.9 to 0.10.0-alpha.2 -# - Update mockito to 0.25, https://github.com/coreos/zincati/pull/267 -# - Update fail to 0.4, https://github.com/coreos/zincati/pull/272 -# - Update libsystemd to 0.2, https://github.com/coreos/zincati/pull/274 Patch0: zincati-fix-metadata.diff -# Update for actix 0.10.0-alpha.2 API -Patch0001: 0001-Update-agent-update-to-actix-0.10.0-alpha.2-API.patch ExclusiveArch: %{rust_arches} @@ -88,6 +83,8 @@ License: ASL 2.0 and BSD and MIT and MPLv2.0 %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 +# Port to the new actix +sed -i -e "s/Box::new/Box::pin/g" src/update_agent/actor.rs %cargo_prep %generate_buildrequires @@ -125,6 +122,9 @@ ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/ %endif %changelog +* Fri May 22 12:14:40 CEST 2020 Igor Raits - 0.0.11-1 +- Update to 0.0.11 + * Mon May 18 12:56:53 CEST 2020 Igor Raits - 0.0.10-3 - Update mockito to 0.25 - Update fail to 0.4 diff --git a/sources b/sources index 37d1b1e..5757c5f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zincati-0.0.10.crate) = 99126f27015ec2e8e53b9536569a96340990cad5978a5f63ddb342cb00933cbb74f493d09aee1bb985797a59b6fef534c90fa82974cdf4e0a5fd3d38d830596a +SHA512 (zincati-0.0.11.crate) = 98cf1ed26ecac92d673a4dc396e7d3d485aab1fde448454d79e152061c321ab67d647396d2a49edc7286d64cb8911aa0917148e7fbdcefee2c6de3ef727d2335 diff --git a/zincati-fix-metadata.diff b/zincati-fix-metadata.diff index 970765f..3c70270 100644 --- a/zincati-fix-metadata.diff +++ b/zincati-fix-metadata.diff @@ -1,5 +1,5 @@ ---- zincati-0.0.10/Cargo.toml 2020-04-06T07:46:34+00:00 -+++ zincati-0.0.10/Cargo.toml 2020-05-18T11:06:57.320632+00:00 +--- zincati-0.0.11/Cargo.toml 2020-05-22T07:59:03+00:00 ++++ zincati-0.0.11/Cargo.toml 2020-05-22T10:14:40.685337+00:00 @@ -29,7 +29,7 @@ [profile.release] lto = true @@ -9,30 +9,3 @@ [dependencies.cfg-if] version = "^0.1" -@@ -44,7 +44,7 @@ - version = "^0.2" - - [dependencies.fail] --version = "^0.3" -+version = "^0.4" - - [dependencies.failure] - version = "^0.1" -@@ -62,7 +62,7 @@ - version = "^0.0.2" - - [dependencies.libsystemd] --version = "^0.1" -+version = "^0.2" - - [dependencies.log] - version = "^0.4" -@@ -107,7 +107,7 @@ - version = "^0.2" - - [dev-dependencies.mockito] --version = "^0.23" -+version = "^0.25" - - [dev-dependencies.proptest] - version = "^0.9"