From ef8df5bc13ff2aea2ed51be487f26f417e4f4016 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 2 Dec 2017 17:39:47 +0100 Subject: [PATCH] bump quickcheck to 0.5 Signed-off-by: Igor Gnatenko --- 0001-bump-quickcheck-to-0.5.patch | 28 ++++++++++++++++++++++++++++ regex-syntax-0.4.1-fix-metadata.diff | 9 +++++++++ rust-regex-syntax.spec | 16 +++++++++++++--- 3 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 0001-bump-quickcheck-to-0.5.patch create mode 100644 regex-syntax-0.4.1-fix-metadata.diff diff --git a/0001-bump-quickcheck-to-0.5.patch b/0001-bump-quickcheck-to-0.5.patch new file mode 100644 index 0000000..52b0e27 --- /dev/null +++ b/0001-bump-quickcheck-to-0.5.patch @@ -0,0 +1,28 @@ +From f2ced64455d7e19555ec5bb1456fc073730c3aac Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Wed, 29 Nov 2017 11:06:48 +0100 +Subject: [PATCH] bump quickcheck to 0.5 + +Signed-off-by: Igor Gnatenko +--- + regex-syntax/src/properties.rs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/regex-syntax/src/properties.rs b/regex-syntax/src/properties.rs +index 9e75f99..c1da573 100644 +--- a/regex-syntax/src/properties.rs ++++ b/regex-syntax/src/properties.rs +@@ -188,8 +188,8 @@ impl Arbitrary for Expr { + ClassBytes(ref cls) => Box::new(cls.shrink().map(ClassBytes)), + Group { ref e, ref i, ref name } => { + let (i, name) = (i.clone(), name.clone()); +- Box::new(e.clone().shrink() +- .chain(e.clone().shrink() ++ Box::new((*e.clone()).shrink() ++ .chain((*e.clone()).shrink() + .map(move |e| Group { + e: Box::new(e), + i: i.clone(), +-- +2.15.1 + diff --git a/regex-syntax-0.4.1-fix-metadata.diff b/regex-syntax-0.4.1-fix-metadata.diff new file mode 100644 index 0000000..2d8caae --- /dev/null +++ b/regex-syntax-0.4.1-fix-metadata.diff @@ -0,0 +1,9 @@ +--- regex-syntax-0.4.1/Cargo.toml 2017-05-21T18:24:14+02:00 ++++ regex-syntax-0.4.1/Cargo.toml 2017-12-02T17:40:02.434555+01:00 +@@ -9,5 +9,5 @@ + description = "A regular expression parser." + + [dev-dependencies] +-quickcheck = { version = "0.4.1", default-features = false } ++quickcheck = { version = "0.5", default-features = false } + rand = "0.3.15" diff --git a/rust-regex-syntax.spec b/rust-regex-syntax.spec index e82de62..3046858 100644 --- a/rust-regex-syntax.spec +++ b/rust-regex-syntax.spec @@ -7,20 +7,25 @@ Name: rust-%{crate} Version: 0.4.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Regular expression parser # https://github.com/rust-lang/regex/issues/342 License: MIT or ASL 2.0 URL: https://crates.io/crates/regex-syntax Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Bump quickcheck to 0.5, https://github.com/rust-lang/regex/commit/f2ced64455d7e19555ec5bb1456fc073730c3aac +Patch0: regex-syntax-0.4.1-fix-metadata.diff +# Make it work with quickcheck v0.5 +Patch1: 0001-bump-quickcheck-to-0.5.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging %if %{with check} # [dev-dependencies] -BuildRequires: (crate(quickcheck) >= 0.4.1 with crate(quickcheck) < 0.5.0) +BuildRequires: (crate(quickcheck) >= 0.5.0 with crate(quickcheck) < 0.6.0) BuildRequires: (crate(rand) >= 0.3.15 with crate(rand) < 0.4.0) %endif @@ -38,7 +43,9 @@ This package contains library source intended for building other packages which use %{crate} from crates.io. %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version} -N +%patch0 -p1 +%patch1 -p2 %cargo_prep %build @@ -56,6 +63,9 @@ which use %{crate} from crates.io. %{cargo_registry}/%{crate}-%{version}/ %changelog +* Sat Dec 02 2017 Igor Gnatenko - 0.4.1-3 +- Bump quickcheck to 0.5 + * Wed Nov 29 2017 Igor Gnatenko - 0.4.1-2 - Enable tests