Update to 4.3.1
Signed-off-by: Robert Fairley <rfairley@redhat.com>
This commit is contained in:
parent
9b57bc8f12
commit
20dc599d54
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
|||||||
/afterburn-4.1.2.crate
|
/afterburn-4.1.2.crate
|
||||||
/afterburn-4.1.3.crate
|
/afterburn-4.1.3.crate
|
||||||
/afterburn-4.2.0.crate
|
/afterburn-4.2.0.crate
|
||||||
|
/afterburn-4.3.1.crate
|
||||||
|
37
0001-Revert-providers-vagrant-fix-deprecated-calls.patch
Normal file
37
0001-Revert-providers-vagrant-fix-deprecated-calls.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
This reverts commit 7e870a1d51935c5ca8954b4b006387bbbf719d65.
|
||||||
|
---
|
||||||
|
src/providers/vagrant_virtualbox/mod.rs | 11 ++---------
|
||||||
|
1 file changed, 2 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/providers/vagrant_virtualbox/mod.rs b/src/providers/vagrant_virtualbox/mod.rs
|
||||||
|
index 975ae9c..4c45bc2 100644
|
||||||
|
--- a/src/providers/vagrant_virtualbox/mod.rs
|
||||||
|
+++ b/src/providers/vagrant_virtualbox/mod.rs
|
||||||
|
@@ -68,10 +68,7 @@ impl MetadataProvider for VagrantVirtualboxProvider {
|
||||||
|
fn attributes(&self) -> Result<HashMap<String, String>> {
|
||||||
|
let mut out = HashMap::with_capacity(2);
|
||||||
|
|
||||||
|
- let hostname = hostname::get()
|
||||||
|
- .chain_err(|| "unable to get hostname")?
|
||||||
|
- .to_string_lossy()
|
||||||
|
- .into_owned();
|
||||||
|
+ let hostname = hostname::get_hostname().ok_or("unable to get hostname")?;
|
||||||
|
let ip = VagrantVirtualboxProvider::get_ip()?;
|
||||||
|
|
||||||
|
out.insert("VAGRANT_VIRTUALBOX_HOSTNAME".to_string(), hostname);
|
||||||
|
@@ -81,11 +78,7 @@ impl MetadataProvider for VagrantVirtualboxProvider {
|
||||||
|
}
|
||||||
|
|
||||||
|
fn hostname(&self) -> Result<Option<String>> {
|
||||||
|
- let hostname = hostname::get()
|
||||||
|
- .chain_err(|| "unable to get hostname")?
|
||||||
|
- .to_string_lossy()
|
||||||
|
- .into_owned();
|
||||||
|
- Ok(Some(hostname))
|
||||||
|
+ Ok(hostname::get_hostname())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn ssh_keys(&self) -> Result<Vec<PublicKey>> {
|
||||||
|
--
|
||||||
|
2.25.0
|
||||||
|
|
87
0002-Revert-afterburn-update-to-new-reqwest-API.patch
Normal file
87
0002-Revert-afterburn-update-to-new-reqwest-API.patch
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
This reverts commit 322105d38f386363e088fa4a21984230241eed2c.
|
||||||
|
---
|
||||||
|
src/retry/client.rs | 19 ++++++++++---------
|
||||||
|
1 file changed, 10 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/retry/client.rs b/src/retry/client.rs
|
||||||
|
index 0771767..41d19e2 100644
|
||||||
|
--- a/src/retry/client.rs
|
||||||
|
+++ b/src/retry/client.rs
|
||||||
|
@@ -23,7 +23,8 @@ use std::borrow::Cow;
|
||||||
|
use std::io::Read;
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
|
-use reqwest::{self, blocking, header, Method};
|
||||||
|
+use reqwest::header;
|
||||||
|
+use reqwest::{self, Method, Request};
|
||||||
|
use slog_scope::info;
|
||||||
|
|
||||||
|
use serde;
|
||||||
|
@@ -94,7 +95,7 @@ impl Deserializer for Raw {
|
||||||
|
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct Client {
|
||||||
|
- client: blocking::Client,
|
||||||
|
+ client: reqwest::Client,
|
||||||
|
headers: header::HeaderMap,
|
||||||
|
retry: Retry,
|
||||||
|
return_on_404: bool,
|
||||||
|
@@ -102,7 +103,7 @@ pub struct Client {
|
||||||
|
|
||||||
|
impl Client {
|
||||||
|
pub fn try_new() -> Result<Self> {
|
||||||
|
- let client = blocking::Client::builder()
|
||||||
|
+ let client = reqwest::Client::builder()
|
||||||
|
.build()
|
||||||
|
.chain_err(|| "failed to initialize client")?;
|
||||||
|
Ok(Client {
|
||||||
|
@@ -183,7 +184,7 @@ where
|
||||||
|
url: String,
|
||||||
|
body: Option<String>,
|
||||||
|
d: D,
|
||||||
|
- client: blocking::Client,
|
||||||
|
+ client: reqwest::Client,
|
||||||
|
headers: header::HeaderMap,
|
||||||
|
retry: Retry,
|
||||||
|
return_on_404: bool,
|
||||||
|
@@ -203,7 +204,7 @@ where
|
||||||
|
T: for<'de> serde::Deserialize<'de>,
|
||||||
|
{
|
||||||
|
let url = reqwest::Url::parse(self.url.as_str()).chain_err(|| "failed to parse uri")?;
|
||||||
|
- let mut req = blocking::Request::new(Method::GET, url);
|
||||||
|
+ let mut req = Request::new(Method::GET, url);
|
||||||
|
req.headers_mut().extend(self.headers.clone().into_iter());
|
||||||
|
|
||||||
|
self.retry.clone().retry(|attempt| {
|
||||||
|
@@ -216,7 +217,7 @@ where
|
||||||
|
let url = reqwest::Url::parse(self.url.as_str()).chain_err(|| "failed to parse uri")?;
|
||||||
|
|
||||||
|
self.retry.clone().retry(|attempt| {
|
||||||
|
- let mut builder = blocking::Client::new()
|
||||||
|
+ let mut builder = reqwest::Client::new()
|
||||||
|
.post(url.clone())
|
||||||
|
.headers(self.headers.clone())
|
||||||
|
.header(header::CONTENT_TYPE, self.d.content_type());
|
||||||
|
@@ -241,7 +242,7 @@ where
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
- fn dispatch_request<T>(&self, req: &blocking::Request) -> Result<Option<T>>
|
||||||
|
+ fn dispatch_request<T>(&self, req: &Request) -> Result<Option<T>>
|
||||||
|
where
|
||||||
|
T: for<'de> serde::Deserialize<'de>,
|
||||||
|
{
|
||||||
|
@@ -273,8 +274,8 @@ where
|
||||||
|
|
||||||
|
/// Reqwests Request struct doesn't implement `Clone`,
|
||||||
|
/// so we have to do it here.
|
||||||
|
-fn clone_request(req: &blocking::Request) -> blocking::Request {
|
||||||
|
- let mut newreq = blocking::Request::new(req.method().clone(), req.url().clone());
|
||||||
|
+fn clone_request(req: &Request) -> Request {
|
||||||
|
+ let mut newreq = Request::new(req.method().clone(), req.url().clone());
|
||||||
|
newreq
|
||||||
|
.headers_mut()
|
||||||
|
.extend(req.headers().clone().into_iter());
|
||||||
|
--
|
||||||
|
2.25.0
|
||||||
|
|
@ -1,36 +1,33 @@
|
|||||||
--- afterburn-4.2.0/Cargo.toml 1970-01-01T00:00:00+00:00
|
--- afterburn-4.3.1/Cargo.toml 2020-01-21T15:19:26+00:00
|
||||||
+++ afterburn-4.2.0/Cargo.toml 2020-01-09T19:12:17.608171+00:00
|
+++ afterburn-4.3.1/Cargo.toml 2020-02-07T18:51:22.734139+00:00
|
||||||
@@ -50,13 +50,13 @@
|
@@ -45,10 +45,10 @@
|
||||||
version = "0.1"
|
default-features = false
|
||||||
|
|
||||||
|
[dependencies.hostname]
|
||||||
|
-version = "0.3"
|
||||||
|
+version = "0.1"
|
||||||
|
|
||||||
[dependencies.ipnetwork]
|
[dependencies.ipnetwork]
|
||||||
-version = "^0.15.0"
|
-version = "^0.16.0"
|
||||||
+version = "^0.14.0"
|
+version = "^0.14.0"
|
||||||
|
|
||||||
[dependencies.mime]
|
[dependencies.maplit]
|
||||||
version = "0.3"
|
version = "^1.0.2"
|
||||||
|
@@ -66,14 +66,13 @@
|
||||||
|
version = "^0.10.26"
|
||||||
|
|
||||||
[dependencies.nix]
|
[dependencies.pnet_base]
|
||||||
-version = "^0.15.0"
|
-version = "^0.25.0"
|
||||||
+version = "^0.16.0"
|
|
||||||
|
|
||||||
[dependencies.openssh-keys]
|
|
||||||
version = "^0.4.1"
|
|
||||||
@@ -93,7 +93,7 @@
|
|
||||||
version = "2.1"
|
|
||||||
|
|
||||||
[dependencies.slog-scope]
|
|
||||||
-version = "~4.1"
|
|
||||||
+version = "4.1"
|
|
||||||
|
|
||||||
[dependencies.slog-term]
|
|
||||||
version = "2.4"
|
|
||||||
@@ -114,7 +114,7 @@
|
|
||||||
version = "^1.0"
|
|
||||||
|
|
||||||
[dev-dependencies.mockito]
|
|
||||||
-version = "^0.21.0"
|
|
||||||
+version = "^0.22.0"
|
+version = "^0.22.0"
|
||||||
|
|
||||||
[features]
|
[dependencies.pnet_datalink]
|
||||||
cl-legacy = ["update-ssh-keys"]
|
-version = "^0.25.0"
|
||||||
|
+version = "^0.22.0"
|
||||||
|
|
||||||
|
[dependencies.reqwest]
|
||||||
|
-version = "^0.10.1"
|
||||||
|
-features = ["blocking"]
|
||||||
|
+version = "^0.9.24"
|
||||||
|
|
||||||
|
[dependencies.serde]
|
||||||
|
version = "1.0"
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
%global crate afterburn
|
%global crate afterburn
|
||||||
|
|
||||||
Name: rust-%{crate}
|
Name: rust-%{crate}
|
||||||
Version: 4.2.0
|
Version: 4.3.1
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Simple cloud provider agent
|
Summary: Simple cloud provider agent
|
||||||
|
|
||||||
# Upstream license specification: Apache-2.0
|
# Upstream license specification: Apache-2.0
|
||||||
@ -17,6 +17,15 @@ URL: https://crates.io/crates/afterburn
|
|||||||
Source: %{crates_source}
|
Source: %{crates_source}
|
||||||
# Initial patched metadata
|
# Initial patched metadata
|
||||||
Patch0: afterburn-fix-metadata.diff
|
Patch0: afterburn-fix-metadata.diff
|
||||||
|
# Use deprecated get_hostname calls so that hostname 0.1 can be used as
|
||||||
|
# a dependency. TODO: remove patch once at least hostname 0.2 is packaged
|
||||||
|
# in Fedora.
|
||||||
|
# https://github.com/svartalf/hostname/blob/master/CHANGELOG.md#020---2019-11-09
|
||||||
|
Patch1: 0001-Revert-providers-vagrant-fix-deprecated-calls.patch
|
||||||
|
# Use older request API so reqwest 0.9.24 can be used as a dependency.
|
||||||
|
# TODO: remove patch once at least request 0.10.0 is packaged in Fedora.
|
||||||
|
# https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md#v0100
|
||||||
|
Patch2: 0002-Revert-afterburn-update-to-new-reqwest-API.patch
|
||||||
|
|
||||||
ExclusiveArch: %{rust_arches}
|
ExclusiveArch: %{rust_arches}
|
||||||
|
|
||||||
@ -104,6 +113,9 @@ cp -a dracut/* %{buildroot}%{dracutmodulesdir}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 07 2020 Robert Fairley <rfairley@redhat.com> - 4.3.1-1
|
||||||
|
- Update to 4.3.1
|
||||||
|
|
||||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.0-3
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.0-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (afterburn-4.2.0.crate) = 350e17f9da230aee60ce0e52f70baa7f501d2fbc7292eeb7a1c70f463bd79d50058ac5a22772ec0ccb1820eada5ca08a807ccc9d191f9f6069fb7ced14e63a34
|
SHA512 (afterburn-4.3.1.crate) = 773c0fc1bf1727075a3f68331497998745e419b5c2109059a6bcf4bd25f7345c7c4bc3e092713d7f90fe8ed6e2ac1f090d35b1fe6d05075d5a20d9dc6654c3da
|
||||||
|
Loading…
Reference in New Issue
Block a user