From cabe24874510ae44506ce16e9a79740ed9a30ecc Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 5 Mar 2020 11:41:42 -0800 Subject: [PATCH] Update to 0.6.3 --- .gitignore | 1 + ...go-update-to-latest-hostname-version.patch | 52 ------------------- resolv-conf-fix-metadata.diff | 11 ---- rust-resolv-conf.spec | 12 ++--- sources | 2 +- 5 files changed, 7 insertions(+), 71 deletions(-) delete mode 100644 0001-cargo-update-to-latest-hostname-version.patch delete mode 100644 resolv-conf-fix-metadata.diff diff --git a/.gitignore b/.gitignore index e9c8da1..fb6efe9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /resolv-conf-0.6.2.crate +/resolv-conf-0.6.3.crate diff --git a/0001-cargo-update-to-latest-hostname-version.patch b/0001-cargo-update-to-latest-hostname-version.patch deleted file mode 100644 index c18dc7a..0000000 --- a/0001-cargo-update-to-latest-hostname-version.patch +++ /dev/null @@ -1,52 +0,0 @@ -From c0305a3e4b08d740eb6702b69e9eee079a84fd0a Mon Sep 17 00:00:00 2001 -From: Luca BRUNO -Date: Thu, 27 Feb 2020 10:50:36 +0000 -Subject: [PATCH] cargo: update to latest hostname version - -This updates the optional `hostname` dependency to the latest -version (0.3.0). - -Signed-off-by: Luca BRUNO ---- - src/config.rs | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/src/config.rs b/src/config.rs -index 36b6185..f0074ae 100644 ---- a/src/config.rs -+++ b/src/config.rs -@@ -4,9 +4,6 @@ use std::slice::Iter; - use {grammar, Network, ParseError, ScopedIp}; - use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; - --#[cfg(feature = "system")] --use hostname::get_hostname; -- - const NAMESERVER_LIMIT:usize = 3; - const SEARCH_LIMIT:usize = 6; - -@@ -278,14 +275,19 @@ impl Config { - return self.domain.clone(); - } - -- get_hostname().and_then(|s| { -+ let hostname = match ::hostname::get().ok() { -+ Some(name) => name.into_string().ok(), -+ None => return None, -+ }; -+ -+ hostname.and_then(|s| { - if let Some(pos) = s.find('.') { - let hn = s[pos + 1..].to_string(); - if !hn.is_empty() { - return Some(hn) - } - }; -- return None; -+ None - }) - } - } --- -2.25.1 - diff --git a/resolv-conf-fix-metadata.diff b/resolv-conf-fix-metadata.diff deleted file mode 100644 index 577004a..0000000 --- a/resolv-conf-fix-metadata.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- resolv-conf-0.6.2/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ resolv-conf-0.6.2/Cargo.toml 2020-02-28T12:07:29.374198+00:00 -@@ -26,7 +26,7 @@ - name = "resolv_conf" - path = "src/lib.rs" - [dependencies.hostname] --version = "0.1.5" -+version = "0.3" - optional = true - - [dependencies.quick-error] diff --git a/rust-resolv-conf.spec b/rust-resolv-conf.spec index 76d35e3..2176a54 100644 --- a/rust-resolv-conf.spec +++ b/rust-resolv-conf.spec @@ -5,19 +5,14 @@ %global crate resolv-conf Name: rust-%{crate} -Version: 0.6.2 -Release: 5%{?dist} +Version: 0.6.3 +Release: 1%{?dist} Summary: Resolv.conf file parser # Upstream license specification: MIT/Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/resolv-conf Source: %{crates_source} -# Initial patched metadata -# * Update hostname to 0.3, https://github.com/tailhook/resolv-conf/pull/19 -Patch0: resolv-conf-fix-metadata.diff -# Finish update of hostname -Patch0001: 0001-cargo-update-to-latest-hostname-version.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -101,6 +96,9 @@ which use "system" feature of "%{crate}" crate. %endif %changelog +* Thu Mar 05 2020 Josh Stone - 0.6.3-1 +- Update to 0.6.3 + * Fri Feb 28 13:07:29 CET 2020 Igor Raits - 0.6.2-5 - Update hostname to 0.3 diff --git a/sources b/sources index 393362a..b9b75c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (resolv-conf-0.6.2.crate) = 5065fffb8fcc6afb2c42ee82cb09ebe879605e6ef2a6f02decf4892967730271bf4e798de02fdf37b4b55b0610f76689ef749ca85870b6656669af4cfd859473 +SHA512 (resolv-conf-0.6.3.crate) = 063affa9aae0231234cc0d685971a86dcd2f6a8311d46f65a3df17414fcffd8b923b2f72f4ccf540e738c17959d53b36f0d0f585ba63d9de119c082e313e153f