From b1c8205fb0cf9e86534102f00fc16db56fe3dc73 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 7 May 2019 14:23:42 +0200 Subject: [PATCH] Update glob to 0.3 Signed-off-by: Igor Gnatenko --- .rust2rpm.conf | 2 ++ 0001-chore-Update-glob-to-0.3.patch | 35 +++++++++++++++++++++++++++++ clang-sys-fix-metadata.diff | 20 +++++++++++++---- rust-clang-sys.spec | 11 +++++---- tests/.fmf/version | 1 + tests/provision.fmf | 5 +++++ tests/tests.yml | 13 +++++++++++ 7 files changed, 79 insertions(+), 8 deletions(-) create mode 100644 0001-chore-Update-glob-to-0.3.patch create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/.rust2rpm.conf b/.rust2rpm.conf index e7c2ade..f9bad4c 100644 --- a/.rust2rpm.conf +++ b/.rust2rpm.conf @@ -21,3 +21,5 @@ lib+gte_clang_6_0.requires = clang-devel >= 6.0 lib+gte_clang_7_0.requires = clang-devel >= 7.0 +lib+gte_clang_8_0.requires = + clang-devel >= 8.0 diff --git a/0001-chore-Update-glob-to-0.3.patch b/0001-chore-Update-glob-to-0.3.patch new file mode 100644 index 0000000..c4ffbfb --- /dev/null +++ b/0001-chore-Update-glob-to-0.3.patch @@ -0,0 +1,35 @@ +From 7a6a33fc6290dbb712f6c2682f6054ec467d718d Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Tue, 7 May 2019 14:06:40 +0200 +Subject: [PATCH] chore: Update glob to 0.3 + +Signed-off-by: Igor Gnatenko +--- + build/common.rs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/build/common.rs b/build/common.rs +index 44e58e0..ed69d4b 100644 +--- a/build/common.rs ++++ b/build/common.rs +@@ -77,7 +77,7 @@ fn search_directory(directory: &Path, filenames: &[String]) -> Vec<(PathBuf, Str + options.require_literal_separator = true; + + paths.flat_map(|p| { +- if let Ok(paths) = glob::glob_with(&p, &options) { ++ if let Ok(paths) = glob::glob_with(&p, options) { + paths.filter_map(Result::ok).collect() + } else { + vec![] +@@ -155,7 +155,7 @@ pub fn search_libclang_directories(files: &[String], variable: &str) -> Vec<(Pat + options.case_sensitive = false; + options.require_literal_separator = true; + for directory in directories.iter().rev() { +- if let Ok(directories) = glob::glob_with(directory, &options) { ++ if let Ok(directories) = glob::glob_with(directory, options) { + for directory in directories.filter_map(Result::ok).filter(|p| p.is_dir()) { + found.extend(search_directories(&directory, files)); + } +-- +2.21.0 + diff --git a/clang-sys-fix-metadata.diff b/clang-sys-fix-metadata.diff index cd4e62f..232dcf3 100644 --- a/clang-sys-fix-metadata.diff +++ b/clang-sys-fix-metadata.diff @@ -1,10 +1,22 @@ ---- clang-sys-0.28.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ clang-sys-0.28.0/Cargo.toml 2019-03-16T22:51:08.284446+01:00 -@@ -21,6 +21,7 @@ +--- clang-sys-0.28.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ clang-sys-0.28.0/Cargo.toml 2019-05-07T12:25:04.096136+00:00 +@@ -21,8 +21,9 @@ readme = "README.md" license = "Apache-2.0" repository = "https://github.com/KyleMayes/clang-sys" +exclude = ["/appveyor.yml", "/ci/*", "/clippy.toml"] [dependencies.glob] - version = "0.2.11" +-version = "0.2.11" ++version = "0.3" + [dependencies.libc] + version = "0.2.39" +@@ -32,7 +33,7 @@ + version = "0.5.0" + optional = true + [build-dependencies.glob] +-version = "0.2.11" ++version = "0.3" + + [features] + clang_3_5 = [] diff --git a/rust-clang-sys.spec b/rust-clang-sys.spec index bb2b662..e27d8b5 100644 --- a/rust-clang-sys.spec +++ b/rust-clang-sys.spec @@ -1,5 +1,5 @@ -# Generated by rust2rpm -%bcond_without check +# Generated by rust2rpm-9-1.fc31 +%bcond_with check %global debug_package %{nil} %global crate clang-sys @@ -15,14 +15,14 @@ URL: https://crates.io/crates/clang-sys Source: %{crates_source} # Initial patched metadata # * Exclude unneeded files +# * Update glob to 0.3, https://github.com/KyleMayes/clang-sys/pull/90 Patch0: clang-sys-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -BuildRequires: (crate(glob/default) >= 0.2.11 with crate(glob/default) < 0.3.0) +BuildRequires: (crate(glob/default) >= 0.3.0 with crate(glob/default) < 0.4.0) BuildRequires: (crate(libc) >= 0.2.39 with crate(libc) < 0.3.0) -BuildRequires: (crate(libloading/default) >= 0.5.0 with crate(libloading/default) < 0.6.0) BuildRequires: clang-devel >= 3.5 %global _description \ @@ -347,6 +347,9 @@ which use "static" feature of "%{crate}" crate. %endif %changelog +* Tue May 07 14:21:57 CEST 2019 Igor Gnatenko - 0.28.0-2 +- Update glob to 0.3 + * Sat Mar 16 2019 Robert-André Mauchin - 0.28.0-1 - Update to 0.28.0 (#1678018) 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..346e933 --- /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-clang-sys