Update to 4.1.1
Also: Regenerate specfile using rust2rpm 10 with DynamicBuildRequires Signed-off-by: Robert Fairley <rfairley@redhat.com>
This commit is contained in:
parent
c2d56ed8dc
commit
f361e562cc
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/afterburn-4.1.0.crate
|
||||
/afterburn-4.1.1.crate
|
||||
|
@ -1,115 +0,0 @@
|
||||
From 96d1972ca872559fc70ad847a53bf9e20417e505 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
Date: Sun, 28 Apr 2019 10:43:24 +0200
|
||||
Subject: [PATCH] Use pnet_* subcrates
|
||||
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
---
|
||||
src/main.rs | 1 -
|
||||
src/network.rs | 2 +-
|
||||
src/providers/digitalocean/mod.rs | 2 +-
|
||||
src/providers/packet/mod.rs | 2 +-
|
||||
src/providers/vagrant_virtualbox/mod.rs | 6 +++---
|
||||
src/util/mod.rs | 4 ++--
|
||||
6 files changed, 8 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/main.rs b/src/main.rs
|
||||
index 337f3da..9743425 100644
|
||||
--- a/src/main.rs
|
||||
+++ b/src/main.rs
|
||||
@@ -22,7 +22,6 @@ extern crate ipnetwork;
|
||||
extern crate nix;
|
||||
extern crate openssh_keys;
|
||||
extern crate openssl;
|
||||
-extern crate pnet;
|
||||
extern crate reqwest;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
diff --git a/src/network.rs b/src/network.rs
|
||||
index f084a75..d12037d 100644
|
||||
--- a/src/network.rs
|
||||
+++ b/src/network.rs
|
||||
@@ -16,7 +16,7 @@
|
||||
//! interface unit files. All that is left is to write the resulting string to
|
||||
//! the necessary unit.
|
||||
|
||||
-use pnet::util::MacAddr;
|
||||
+use pnet_base::MacAddr;
|
||||
use std::net::IpAddr;
|
||||
use std::string::String;
|
||||
use std::string::ToString;
|
||||
diff --git a/src/providers/digitalocean/mod.rs b/src/providers/digitalocean/mod.rs
|
||||
index eeaa7c2..e6ad868 100644
|
||||
--- a/src/providers/digitalocean/mod.rs
|
||||
+++ b/src/providers/digitalocean/mod.rs
|
||||
@@ -21,7 +21,7 @@ use std::str::FromStr;
|
||||
use ipnetwork;
|
||||
use ipnetwork::{IpNetwork, Ipv4Network, Ipv6Network};
|
||||
use openssh_keys::PublicKey;
|
||||
-use pnet::util::MacAddr;
|
||||
+use pnet_base::MacAddr;
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::network;
|
||||
diff --git a/src/providers/packet/mod.rs b/src/providers/packet/mod.rs
|
||||
index f471baf..3a42520 100644
|
||||
--- a/src/providers/packet/mod.rs
|
||||
+++ b/src/providers/packet/mod.rs
|
||||
@@ -23,7 +23,7 @@ use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
|
||||
use std::str::FromStr;
|
||||
|
||||
use openssh_keys::PublicKey;
|
||||
-use pnet::util::MacAddr;
|
||||
+use pnet_base::MacAddr;
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::network::{self, Device, Interface, NetworkRoute, Section};
|
||||
diff --git a/src/providers/vagrant_virtualbox/mod.rs b/src/providers/vagrant_virtualbox/mod.rs
|
||||
index e4d4109..5d5ee40 100644
|
||||
--- a/src/providers/vagrant_virtualbox/mod.rs
|
||||
+++ b/src/providers/vagrant_virtualbox/mod.rs
|
||||
@@ -21,7 +21,7 @@ use std::time::Duration;
|
||||
|
||||
use hostname;
|
||||
use openssh_keys::PublicKey;
|
||||
-use pnet;
|
||||
+use pnet_datalink;
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::network;
|
||||
@@ -52,8 +52,8 @@ impl VagrantVirtualboxProvider {
|
||||
Err("eth1 was not found!".into())
|
||||
}
|
||||
|
||||
- fn find_eth1() -> Option<pnet::datalink::NetworkInterface> {
|
||||
- let mut ifaces = pnet::datalink::interfaces();
|
||||
+ fn find_eth1() -> Option<pnet_datalink::NetworkInterface> {
|
||||
+ let mut ifaces = pnet_datalink::interfaces();
|
||||
ifaces.retain(|i| i.name == "eth1");
|
||||
if !ifaces.is_empty() {
|
||||
Some(ifaces[0].clone())
|
||||
diff --git a/src/util/mod.rs b/src/util/mod.rs
|
||||
index 80ab3c7..daa49b1 100644
|
||||
--- a/src/util/mod.rs
|
||||
+++ b/src/util/mod.rs
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::retry;
|
||||
-use pnet;
|
||||
+use pnet_datalink;
|
||||
use std::fs::File;
|
||||
use std::io::{BufRead, BufReader, Read};
|
||||
use std::path::Path;
|
||||
@@ -52,7 +52,7 @@ pub fn key_lookup<R: Read>(delim: char, key: &str, reader: R) -> Result<Option<S
|
||||
}
|
||||
|
||||
pub fn dns_lease_key_lookup(key: &str) -> Result<String> {
|
||||
- let interfaces = pnet::datalink::interfaces();
|
||||
+ let interfaces = pnet_datalink::interfaces();
|
||||
trace!("interfaces - {:?}", interfaces);
|
||||
|
||||
retry::Retry::new()
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 25ed3f304937ef502cf0a2562f108511f927b70f Mon Sep 17 00:00:00 2001
|
||||
From: Robert Fairley <rfairley@redhat.com>
|
||||
Date: Tue, 14 May 2019 17:22:14 -0400
|
||||
Subject: [PATCH] systemd: enable sshkeys unit on supported platforms
|
||||
|
||||
Add `ConditionKernelCommandLine` triggering conditions so that
|
||||
the `afterburn-sshkeys@.service` unit is enabled on supported
|
||||
platforms only.
|
||||
|
||||
Note this only adds conditions for platforms where the cloud
|
||||
metadata provider is also identified through `ignition.platform.id`.
|
||||
|
||||
Part of: https://github.com/coreos/fedora-coreos-tracker/issues/4
|
||||
---
|
||||
systemd/afterburn-sshkeys@.service.in | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/systemd/afterburn-sshkeys@.service.in b/systemd/afterburn-sshkeys@.service.in
|
||||
index 3bc8ff4..f0677e0 100644
|
||||
--- a/systemd/afterburn-sshkeys@.service.in
|
||||
+++ b/systemd/afterburn-sshkeys@.service.in
|
||||
@@ -1,5 +1,10 @@
|
||||
[Unit]
|
||||
Description=Afterburn (SSH Keys)
|
||||
+ConditionKernelCommandLine=|ignition.platform.id=aws
|
||||
+ConditionKernelCommandLine=|ignition.platform.id=azure
|
||||
+ConditionKernelCommandLine=|ignition.platform.id=digitalocean
|
||||
+ConditionKernelCommandLine=|ignition.platform.id=gcp
|
||||
+ConditionKernelCommandLine=|ignition.platform.id=packet
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
@ -1,25 +0,0 @@
|
||||
From 97e21b89edc80d52f2ddf0f34890752e0ab1c4b4 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Lebon <jonathan@jlebon.com>
|
||||
Date: Fri, 17 May 2019 12:05:04 -0400
|
||||
Subject: [PATCH] systemd: add comment to sshkeys@.service
|
||||
|
||||
This should help readers trying to piece together how SSH key
|
||||
provisioning is wired up.
|
||||
---
|
||||
systemd/afterburn-sshkeys@.service.in | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/systemd/afterburn-sshkeys@.service.in b/systemd/afterburn-sshkeys@.service.in
|
||||
index f0677e0..f5a94d6 100644
|
||||
--- a/systemd/afterburn-sshkeys@.service.in
|
||||
+++ b/systemd/afterburn-sshkeys@.service.in
|
||||
@@ -1,5 +1,9 @@
|
||||
[Unit]
|
||||
Description=Afterburn (SSH Keys)
|
||||
+# Platforms which support SSH keys and provide a consistent source of metadata.
|
||||
+# Platforms which support SSH keys but require selecting from multiple metadata
|
||||
+# sources are not listed here; for those platforms, CT writes a drop-in which
|
||||
+# adds the appropriate triggering condition and sets AFTERBURN_OPT_PROVIDER.
|
||||
ConditionKernelCommandLine=|ignition.platform.id=aws
|
||||
ConditionKernelCommandLine=|ignition.platform.id=azure
|
||||
ConditionKernelCommandLine=|ignition.platform.id=digitalocean
|
@ -1,27 +1,10 @@
|
||||
--- afterburn-4.1.0/Cargo.toml 1970-01-01T00:00:00+00:00
|
||||
+++ afterburn-4.1.0/Cargo.toml 2019-06-05T00:15:37.660452+00:00
|
||||
@@ -56,7 +56,7 @@
|
||||
version = "0.3"
|
||||
|
||||
[dependencies.nix]
|
||||
-version = "^0.13.0"
|
||||
+version = "^0.14.0"
|
||||
|
||||
[dependencies.openssh-keys]
|
||||
version = "^0.4.1"
|
||||
@@ -64,11 +64,14 @@
|
||||
[dependencies.openssl]
|
||||
version = "^0.10.20"
|
||||
|
||||
-[dependencies.pnet]
|
||||
+[dependencies.pnet_base]
|
||||
+version = "0.22"
|
||||
+
|
||||
+[dependencies.pnet_datalink]
|
||||
version = "0.22"
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -71,7 +71,7 @@ version = "^0.22.0"
|
||||
version = "^0.22.0"
|
||||
|
||||
[dependencies.reqwest]
|
||||
-version = "^0.9.15"
|
||||
-version = "^0.9.18"
|
||||
+version = "^0.9.13"
|
||||
|
||||
[dependencies.serde]
|
||||
|
@ -1,11 +1,12 @@
|
||||
# Generated by rust2rpm
|
||||
# Generated by rust2rpm 10
|
||||
%bcond_without check
|
||||
%global __cargo_skip_build 0
|
||||
|
||||
%global crate afterburn
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 4.1.0
|
||||
Release: 3%{?dist}
|
||||
Version: 4.1.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Simple cloud provider agent
|
||||
|
||||
# Upstream license specification: Apache-2.0
|
||||
@ -13,51 +14,16 @@ License: ASL 2.0
|
||||
URL: https://crates.io/crates/afterburn
|
||||
Source: %{crates_source}
|
||||
# Initial patched metadata
|
||||
# * Switch to split version of pnet_*
|
||||
# * Downgrade reqwest to 0.9.13 temporarily
|
||||
# * Bump nix to 0.14, https://github.com/coreos/afterburn/pull/221
|
||||
Patch0: afterburn-fix-metadata.diff
|
||||
# Finish splitting pnet_*
|
||||
Patch0001: 0001-Use-pnet_-subcrates.patch
|
||||
Patch0002: 0002-systemd-enable-sshkeys-unit-on-supported-platforms.patch
|
||||
Patch0003: 0003-systemd-add-comment-to-sshkeys-service.patch
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
BuildRequires: rust-packaging
|
||||
BuildRequires: (crate(base64/default) >= 0.10.1 with crate(base64/default) < 0.11.0)
|
||||
BuildRequires: (crate(byteorder/default) >= 1.3.0 with crate(byteorder/default) < 2.0.0)
|
||||
BuildRequires: (crate(clap/default) >= 2.33.0 with crate(clap/default) < 3.0.0)
|
||||
BuildRequires: (crate(error-chain) >= 0.12.0 with crate(error-chain) < 0.13.0)
|
||||
BuildRequires: (crate(hostname/default) >= 0.1.0 with crate(hostname/default) < 0.2.0)
|
||||
BuildRequires: (crate(ipnetwork/default) >= 0.14.0 with crate(ipnetwork/default) < 0.15.0)
|
||||
BuildRequires: (crate(mime/default) >= 0.3.0 with crate(mime/default) < 0.4.0)
|
||||
BuildRequires: (crate(nix/default) >= 0.14.0 with crate(nix/default) < 0.15.0)
|
||||
BuildRequires: (crate(openssh-keys/default) >= 0.4.1 with crate(openssh-keys/default) < 0.5.0)
|
||||
BuildRequires: (crate(openssl/default) >= 0.10.20 with crate(openssl/default) < 0.11.0)
|
||||
BuildRequires: (crate(pnet_base/default) >= 0.22.0 with crate(pnet_base/default) < 0.23.0)
|
||||
BuildRequires: (crate(pnet_datalink/default) >= 0.22.0 with crate(pnet_datalink/default) < 0.23.0)
|
||||
BuildRequires: (crate(reqwest/default) >= 0.9.13 with crate(reqwest/default) < 0.10.0)
|
||||
BuildRequires: (crate(serde-xml-rs/default) >= 0.3.0 with crate(serde-xml-rs/default) < 0.4.0)
|
||||
BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0)
|
||||
BuildRequires: (crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0)
|
||||
BuildRequires: (crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0)
|
||||
BuildRequires: (crate(slog-async/default) >= 2.1.0 with crate(slog-async/default) < 3.0.0)
|
||||
BuildRequires: (crate(slog-scope/default) >= 4.1.0 with crate(slog-scope/default) < 4.2.0)
|
||||
BuildRequires: (crate(slog-term/default) >= 2.2.0 with crate(slog-term/default) < 3.0.0)
|
||||
BuildRequires: (crate(slog/default) >= 2.0.0 with crate(slog/default) < 3.0.0)
|
||||
BuildRequires: (crate(slog/max_level_trace) >= 2.0.0 with crate(slog/max_level_trace) < 3.0.0)
|
||||
BuildRequires: (crate(slog/release_max_level_info) >= 2.0.0 with crate(slog/release_max_level_info) < 3.0.0)
|
||||
BuildRequires: (crate(tempdir/default) >= 0.3.0 with crate(tempdir/default) < 0.4.0)
|
||||
BuildRequires: (crate(tempfile/default) >= 3.0.7 with crate(tempfile/default) < 4.0.0)
|
||||
BuildRequires: (crate(users/default) >= 0.9.1 with crate(users/default) < 0.10.0)
|
||||
%if %{with check}
|
||||
BuildRequires: (crate(mockito/default) >= 0.17.0 with crate(mockito/default) < 0.18.0)
|
||||
%endif
|
||||
BuildRequires: systemd
|
||||
|
||||
%global _description \
|
||||
A simple cloud provider agent.
|
||||
%global _description %{expand:
|
||||
Simple cloud provider agent.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
@ -104,6 +70,9 @@ sed -e 's,@DEFAULT_INSTANCE@,core,' < \
|
||||
systemd/afterburn-sshkeys@.service
|
||||
%cargo_prep
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
|
||||
@ -118,6 +87,10 @@ sed -e 's,@DEFAULT_INSTANCE@,core,' < \
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jun 21 2019 Robert Fairley <rfairley@redhat.com> - 4.1.1-1
|
||||
- Update to 4.1.1
|
||||
- Regenerate specfile using rust2rpm 10 with DynamicBuildRequires
|
||||
|
||||
* Wed Jun 05 2019 Josh Stone <jistone@redhat.com> - 4.1.0-3
|
||||
- Bump nix to 0.14
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (afterburn-4.1.0.crate) = 171f24befd2af780840d75be98d84130590a2a62c3c8a961c6c408ce561555084d6c8c19ca6746891175fe0fc597066cdaef23e22524fbc38866729102b47598
|
||||
SHA512 (afterburn-4.1.1.crate) = 22199a01c2fc9caf3333a69201f30ffe279ea28643d9849c1a1f649f23ac67a039a382eb92afc5c965e6574493904cf3c773beec2dcef69da965eb3448988e12
|
||||
|
Loading…
Reference in New Issue
Block a user