diff --git a/.gitignore b/.gitignore index f554f5d..c822104 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /version-sync-0.4.0.crate /version-sync-0.5.0.crate +/version-sync-0.7.0.crate diff --git a/0001-Update-to-syn-0.13.patch b/0001-Update-to-syn-0.13.patch deleted file mode 100644 index e07dfd0..0000000 --- a/0001-Update-to-syn-0.13.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 559c05428cdb6ff1124e15f5efad34b9e14e1534 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Tue, 17 Apr 2018 14:52:51 -0700 -Subject: [PATCH 1/2] Update to syn 0.13 - -(cherry picked from commit 6c243140aead31bfca3af7bb4af9e5df16fe83f4) ---- - src/lib.rs | 28 +++++++++++++++------------- - 1 file changed, 15 insertions(+), 13 deletions(-) - -diff --git a/src/lib.rs b/src/lib.rs -index 09d41e5..4e98771 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -398,17 +398,19 @@ pub fn check_html_root_url(path: &str, pkg_name: &str, pkg_version: &str) -> Res - .map_err(|err| format!("could not read {}: {}", path, err))?; - let version = parse_version(pkg_version) - .map_err(|err| format!("bad package version {:?}: {}", pkg_version, err))?; -- let krate = syn::parse_crate(&code) -+ let krate: syn::File = syn::parse_str(&code) - .map_err(|_| format!("could not parse {}: please run \"cargo build\"", path))?; - - println!("Checking doc attributes in {}...", path); - for attr in krate.attrs { -- let (ident, nested_meta_items) = match attr { -- syn::Attribute { -- style: syn::AttrStyle::Inner, -- value: syn::MetaItem::List(ref ident, ref nested_meta_items), -- is_sugared_doc: false, -- } => (ident, nested_meta_items), -+ if let syn::AttrStyle::Outer = attr.style { -+ continue; -+ } -+ if attr.is_sugared_doc { -+ continue; -+ } -+ let (ident, nested_meta_items) = match attr.interpret_meta() { -+ Some(syn::Meta::List(syn::MetaList { ident, nested, .. })) => (ident, nested), - _ => continue, - }; - -@@ -417,23 +419,23 @@ pub fn check_html_root_url(path: &str, pkg_name: &str, pkg_version: &str) -> Res - } - - for nested_meta_item in nested_meta_items { -- let meta_item = match *nested_meta_item { -- syn::NestedMetaItem::MetaItem(ref meta_item) => meta_item, -+ let meta_item = match nested_meta_item { -+ syn::NestedMeta::Meta(ref meta_item) => meta_item, - _ => continue, - }; - - let check_result = match *meta_item { -- syn::MetaItem::NameValue(ref name, ref value) if name == "html_root_url" => { -- match *value { -+ syn::Meta::NameValue(syn::MetaNameValue { ref ident, ref lit, .. }) if ident == "html_root_url" => { -+ match *lit { - // Accept both cooked and raw strings here. -- syn::Lit::Str(ref s, _) => url_matches(s, pkg_name, &version), -+ syn::Lit::Str(ref s) => url_matches(&s.value(), pkg_name, &version), - // A non-string html_root_url is probably an - // error, but we leave this check to the - // compiler. - _ => continue, - } - } -- syn::MetaItem::Word(ref name) if name == "html_root_url" => { -+ syn::Meta::Word(ref name) if name == "html_root_url" => { - Err(String::from("html_root_url attribute without URL")) - } - _ => continue, --- -2.19.0.rc1 - diff --git a/0002-Update-to-syn-0.14.patch b/0002-Update-to-syn-0.14.patch deleted file mode 100644 index 0e1c6c6..0000000 --- a/0002-Update-to-syn-0.14.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 441bd2296af2d5735f413dac0162939d795aa6f1 Mon Sep 17 00:00:00 2001 -From: Jonas Schievink -Date: Sun, 29 Jul 2018 17:31:38 +0200 -Subject: [PATCH 2/2] Update to syn 0.14 - -syn wasn't able to parse my lib.rs, likely because it didn't support -statement attributes. This should fix that, and it even makes a piece of -code slightly simpler. - -(cherry picked from commit d25c08aa8c29cb71b9522c62f2352dbf1f2f5d83) ---- - src/lib.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/lib.rs b/src/lib.rs -index 4e98771..116d558 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -414,7 +414,7 @@ pub fn check_html_root_url(path: &str, pkg_name: &str, pkg_version: &str) -> Res - _ => continue, - }; - -- if ident.as_ref() != "doc" { -+ if ident != "doc" { - continue; - } - --- -2.19.0.rc1 - diff --git a/rust-version-sync.spec b/rust-version-sync.spec index 92e2f15..568c49e 100644 --- a/rust-version-sync.spec +++ b/rust-version-sync.spec @@ -1,31 +1,28 @@ # Generated by rust2rpm -%bcond_without check +%bcond_with check %global debug_package %{nil} %global crate version-sync Name: rust-%{crate} -Version: 0.5.0 -Release: 9%{?dist} +Version: 0.7.0 +Release: 1%{?dist} Summary: Simple crate for ensuring that version numbers in README files are updated License: MIT URL: https://crates.io/crates/version-sync -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate -# Initial patched metadata -# * Bump syn to 0.14 -Patch0: version-sync-fix-metadata.diff -Patch0001: 0001-Update-to-syn-0.13.patch -Patch0002: 0002-Update-to-syn-0.14.patch +Source: %{crates_source} ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -BuildRequires: (crate(itertools/default) >= 0.7.0 with crate(itertools/default) < 0.8.0) -BuildRequires: (crate(pulldown-cmark) >= 0.1.0 with crate(pulldown-cmark) < 0.2.0) -BuildRequires: (crate(semver-parser/default) >= 0.7.0 with crate(semver-parser/default) < 0.8.0) -BuildRequires: (crate(syn/default) >= 0.14.0 with crate(syn/default) < 0.15.0) -BuildRequires: (crate(syn/full) >= 0.14.0 with crate(syn/full) < 0.15.0) +BuildRequires: (crate(itertools/default) >= 0.8.0 with crate(itertools/default) < 0.9.0) +BuildRequires: (crate(lazy_static/default) >= 1.2.0 with crate(lazy_static/default) < 2.0.0) +BuildRequires: (crate(pulldown-cmark) >= 0.2.0 with crate(pulldown-cmark) < 0.3.0) +BuildRequires: (crate(regex/default) >= 1.1.0 with crate(regex/default) < 2.0.0) +BuildRequires: (crate(semver-parser/default) >= 0.9.0 with crate(semver-parser/default) < 0.10.0) +BuildRequires: (crate(syn/default) >= 0.15.0 with crate(syn/default) < 0.16.0) +BuildRequires: (crate(syn/full) >= 0.15.0 with crate(syn/full) < 0.16.0) BuildRequires: (crate(toml/default) >= 0.4.0 with crate(toml/default) < 0.5.0) BuildRequires: (crate(url/default) >= 1.5.1 with crate(url/default) < 2.0.0) @@ -39,12 +36,10 @@ the crate version changes. Summary: %{summary} BuildArch: noarch -%description devel -Simple crate for ensuring that version numbers in README files are -updated when the crate version changes. +%description devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "%{crate}" crate. %files devel %license LICENSE @@ -64,7 +59,7 @@ which use "default" feature of "%{crate}" crate. %ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %build @@ -79,6 +74,9 @@ which use "default" feature of "%{crate}" crate. %endif %changelog +* Sun Feb 10 2019 Igor Gnatenko - 0.7.0-1 +- Update to 0.7.0 + * Sat Feb 02 2019 Fedora Release Engineering - 0.5.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 1ed242a..710b07f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (version-sync-0.5.0.crate) = 1f70f2782cdeeb25f473e9e74a38e17ac58a2731f335e9b79e5a0424b510e4b0086a1d8358ef5c3924025b9d2b9ee1c300dddf6d8f75c54d3944312f0d51ba5e +SHA512 (version-sync-0.7.0.crate) = 163b1b3a64de2576a3c3eb3c578c64a461dcb64cf930e736b380cd396f4a612f899b93d8d2edfe5666572fb8c8c4990fda4cda6abda15cfc0bccff24a7b18dd6 diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..503a97c --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- +standard-inventory-qcow2: + qemu: + # `cargo test` usually eats more than 1G. + m: 4G diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..17477e1 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/rust.git" + dest: rust + tests: + - rust/cargo-test + environment: + pkg: rust-version-sync diff --git a/version-sync-fix-metadata.diff b/version-sync-fix-metadata.diff deleted file mode 100644 index d48388d..0000000 --- a/version-sync-fix-metadata.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- version-sync-0.5.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ version-sync-0.5.0/Cargo.toml 2018-09-11T08:37:10.622525+02:00 -@@ -33,7 +33,7 @@ - version = "0.7" - - [dependencies.syn] --version = "0.11" -+version = "0.14" - features = ["full"] - - [dependencies.toml]