Update to 0.0.9

Signed-off-by: Robert Fairley <rfairley@redhat.com>
This commit is contained in:
Robert Fairley 2020-03-24 06:36:25 +00:00 committed by Robert
parent f344529635
commit 96c8302f14
5 changed files with 155 additions and 3 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/zincati-0.0.5.crate
/zincati-0.0.6.crate
/zincati-0.0.8.crate
/zincati-0.0.9.crate

View File

@ -0,0 +1,127 @@
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<RefreshTick> 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<Self, Result<Release, ()>> {
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<Self, Result<(bool, BTreeSet<Release>), ()>> {
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<Self, Result<Release, ()>> {
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<Self, Result<(), ()>> {
let nop = actix::fut::ok(());
- Box::new(nop)
+ Box::pin(nop)
}
}

View File

@ -5,7 +5,7 @@
%global crate zincati
Name: rust-%{crate}
Version: 0.0.8
Version: 0.0.9
Release: 1%{?dist}
Summary: Update agent for Fedora CoreOS
@ -13,6 +13,10 @@ Summary: Update agent for Fedora CoreOS
License: ASL 2.0
URL: https://crates.io/crates/zincati
Source: %{crates_source}
# Update actix from ^0.9 to 0.10.0-alpha.1
Patch0000: zincati-fix-metadata.diff
# Update for actix 0.10.0-alpha.1 API
Patch0001: 0001-Update-agent-update-to-actix-0.10.0-alpha.1-API.patch
ExclusiveArch: %{rust_arches}
@ -37,6 +41,7 @@ Summary: %{summary}
%license COPYRIGHT LICENSE
%dir %{_prefix}/lib/%{crate}
%dir %{_prefix}/lib/%{crate}/config.d
%{_prefix}/lib/%{crate}/config.d/10-agent.toml
%{_prefix}/lib/%{crate}/config.d/10-auto-updates.toml
%{_prefix}/lib/%{crate}/config.d/10-identity.toml
%{_prefix}/lib/%{crate}/config.d/30-updates-strategy.toml
@ -44,7 +49,9 @@ Summary: %{summary}
%attr(0775, zincati, zincati) %dir /run/%{crate}
%attr(0775, zincati, zincati) %dir /run/%{crate}/config.d
%attr(0770, zincati, zincati) %dir /run/%{crate}/private
# TODO: add /run/zincati/public once created in zincati.conf tmpfile.
%attr(0775, zincati, zincati) %dir /run/%{crate}/public
%verify(not size mtime md5) /run/%{crate}/public/metrics.promsock
%verify(not size mtime md5) /run/%{crate}/private/metrics.promsock
%dir %{_sysconfdir}/%{crate}
%dir %{_sysconfdir}/%{crate}/config.d
%{_unitdir}/zincati.service
@ -85,6 +92,8 @@ install -Dpm0644 -t %{buildroot}%{_prefix}/lib/%{crate}/config.d \
dist/config.d/*.toml
mkdir -p %{buildroot}/run/%{crate}/config.d
mkdir -p %{buildroot}/run/%{crate}/private
mkdir -p %{buildroot}/run/%{crate}/public
touch %{buildroot}/run/%{crate}/public/metrics.promsock
mkdir -p %{buildroot}%{_sysconfdir}/%{crate}/config.d
install -Dpm0644 -t %{buildroot}%{_unitdir} \
dist/systemd/system/*.service
@ -94,6 +103,7 @@ install -Dpm0644 -t %{buildroot}%{_tmpfilesdir} \
dist/tmpfiles.d/*.conf
install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/rules.d \
dist/polkit-1/rules.d/*.rules
ln -srnf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/metrics.promsock
%if %{with check}
%check
@ -101,6 +111,9 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/rules.d \
%endif
%changelog
* Tue Mar 24 2020 Robert Fairley <rfairley@redhat.com> - 0.0.9-1
- Update to 0.0.9
* Sun Feb 23 10:42:48 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.0.8-1
- Update to 0.0.8

View File

@ -1 +1 @@
SHA512 (zincati-0.0.8.crate) = 0accf30ac92b2236b0359f710a6aa7ecf3ed59751b1ef62e01804cdf678f17651cafc554af8e8b8d9f10a7ea6114fdca63b9e5399036d3229752bac275d751fe
SHA512 (zincati-0.0.9.crate) = ab71aca6ce1e6c58dbc182bddeb8b3d7be5c7e71b4aee37257b7b96dbff2ab98d79ddfcd525733e4e9ec6baed2f04ed6aa0d796869726e03e8d2bc10d380b773

11
zincati-fix-metadata.diff Normal file
View File

@ -0,0 +1,11 @@
--- zincati-0.0.9/Cargo.toml 2020-03-10T17:44:04+00:00
+++ zincati-0.0.9/Cargo.toml 2020-03-24T21:58:59.464293+00:00
@@ -29,7 +29,7 @@
[profile.release]
lto = true
[dependencies.actix]
-version = "^0.9"
+version = "0.10.0-alpha.1"
[dependencies.cfg-if]
version = "^0.1"