From 768ee57091b82eb224483d3f53054eb24cf11c12 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 11 May 2018 08:52:49 +0200 Subject: [PATCH] Bump tempfile to 3 Signed-off-by: Igor Gnatenko --- 0001-deps-update-tempfile-to-3.patch | 55 ++++++++++++++++++++++++++++ nix-0.10.0-fix-metadata.diff | 12 ++++-- rust-nix.spec | 11 ++++-- 3 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 0001-deps-update-tempfile-to-3.patch diff --git a/0001-deps-update-tempfile-to-3.patch b/0001-deps-update-tempfile-to-3.patch new file mode 100644 index 0000000..8c9363b --- /dev/null +++ b/0001-deps-update-tempfile-to-3.patch @@ -0,0 +1,55 @@ +From b3ca1a7dd13b1ffbd768a5677b8d12346f6bf07c Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Thu, 10 May 2018 11:45:33 +0200 +Subject: [PATCH] deps: update tempfile to 3 + +Signed-off-by: Igor Gnatenko +--- + src/unistd.rs | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/unistd.rs b/src/unistd.rs +index 8022aa0..756a4d6 100644 +--- a/src/unistd.rs ++++ b/src/unistd.rs +@@ -421,15 +421,15 @@ pub fn fchdir(dirfd: RawFd) -> Result<()> { + /// # Example + /// + /// ```rust +-/// extern crate tempdir; ++/// extern crate tempfile; + /// extern crate nix; + /// + /// use nix::unistd; + /// use nix::sys::stat; +-/// use tempdir::TempDir; ++/// use tempfile::TempDir; + /// + /// fn main() { +-/// let tmp_dir1 = TempDir::new("test_mkdir").unwrap(); ++/// let tmp_dir1 = TempDir::new().unwrap(); + /// let tmp_dir2 = tmp_dir1.path().join("new_dir"); + /// + /// // create new directory and give read, write and execute rights to the owner +@@ -464,15 +464,15 @@ pub fn mkdir(path: &P, mode: Mode) -> Result<()> { + /// # Example + /// + /// ```rust +-/// extern crate tempdir; ++/// extern crate tempfile; + /// extern crate nix; + /// + /// use nix::unistd; + /// use nix::sys::stat; +-/// use tempdir::TempDir; ++/// use tempfile::TempDir; + /// + /// fn main() { +-/// let tmp_dir = TempDir::new("test_fifo").unwrap(); ++/// let tmp_dir = TempDir::new().unwrap(); + /// let fifo_path = tmp_dir.path().join("foo.pipe"); + /// + /// // create new fifo and give read, write and execute rights to the owner +-- +2.17.0 + diff --git a/nix-0.10.0-fix-metadata.diff b/nix-0.10.0-fix-metadata.diff index 95b9eb0..0aa7d03 100644 --- a/nix-0.10.0-fix-metadata.diff +++ b/nix-0.10.0-fix-metadata.diff @@ -1,8 +1,14 @@ --- nix-0.10.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ nix-0.10.0/Cargo.toml 2018-03-08T21:00:01.679343+01:00 -@@ -62,5 +62,3 @@ ++++ nix-0.10.0/Cargo.toml 2018-05-11T08:54:48.559521+02:00 +@@ -57,10 +57,5 @@ + [dev-dependencies.rand] + version = "0.4" +-[dev-dependencies.tempdir] +-version = "0.3" +- [dev-dependencies.tempfile] - version = "2" +-version = "2" -[target."cfg(target_os = \"dragonfly\")".build-dependencies.gcc] -version = "0.3" ++version = "3" diff --git a/rust-nix.spec b/rust-nix.spec index 27e5566..d2c35a7 100644 --- a/rust-nix.spec +++ b/rust-nix.spec @@ -6,7 +6,7 @@ Name: rust-%{crate} Version: 0.10.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Rust friendly bindings to *nix APIs License: MIT @@ -14,9 +14,12 @@ URL: https://crates.io/crates/nix Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * No dragonfly +# * Bump tempfile to 3, https://github.com/nix-rust/nix/pull/900 Patch0: nix-0.10.0-fix-metadata.diff # https://github.com/nix-rust/nix/commit/08624d0a5c3649fea6463836690ae9b7f01093ac Patch1: 0001-make-statfs-statvfs-to-be-available-wherever-they-ar.patch +# Make it work with new tempdir +Patch2: 0001-deps-update-tempfile-to-3.patch ExclusiveArch: %{rust_arches} @@ -31,8 +34,7 @@ BuildRequires: (crate(void) >= 1.0.2 with crate(void) < 2.0.0) # [dev-dependencies] BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0) BuildRequires: (crate(rand) >= 0.4.0 with crate(rand) < 0.5.0) -BuildRequires: (crate(tempdir) >= 0.3.0 with crate(tempdir) < 0.4.0) -BuildRequires: (crate(tempfile) >= 2.0.0 with crate(tempfile) < 3.0.0) +BuildRequires: (crate(tempfile) >= 3.0.0 with crate(tempfile) < 4.0.0) %endif %description @@ -71,6 +73,9 @@ which use %{crate} from crates.io. %exclude %{cargo_registry}/%{crate}-%{version}/{Cross.toml,RELEASE_PROCEDURE.md,bors.toml,ci} %changelog +* Fri May 11 2018 Igor Gnatenko - 0.10.0-3 +- Bump tempfile to 3 + * Thu Mar 08 2018 Igor Gnatenko - 0.10.0-2 - Re-apply statvfs patch