diff --git a/pore-fix-metadata.diff b/pore-fix-metadata.diff index 7f38987..ed487bd 100644 --- a/pore-fix-metadata.diff +++ b/pore-fix-metadata.diff @@ -1,16 +1,17 @@ --- pore-0.1.6/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ pore-0.1.6/Cargo.toml 2022-12-28T21:24:29.408792+00:00 -@@ -31,9 +31,6 @@ ++++ pore-0.1.6/Cargo.toml 2023-01-13T18:22:27.318872+00:00 +@@ -31,8 +31,8 @@ [dependencies.console] version = "0.15.0" -[dependencies.copy_dir] -version = "0.1.2" -- ++[dependencies.fs_extra] ++version = "1.2.0" + [dependencies.dirs] version = "4.0.0" - -@@ -50,11 +47,11 @@ +@@ -50,11 +50,11 @@ [dependencies.indoc] version = "1.0" diff --git a/pore-remove-copy_dir.diff b/pore-remove-copy_dir.diff deleted file mode 100644 index 5478007..0000000 --- a/pore-remove-copy_dir.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/depot.rs -+++ b/src/depot.rs -@@ -104,7 +104,7 @@ impl Depot { - ) - .context(format!("failed to create directory {:?}", dst))?; - -- copy_dir::copy_dir(&src, &dst).context(format!("failed to copy directory {:?} to {:?}", src, dst))?; -+ std::process::Command::new("cp").arg("-pr").arg(&src).arg(&dst).spawn().context(format!("failed to copy directory {:?} to {:?}", src, dst))?; - Ok(()) - } - diff --git a/pore-replace-copy_dir.diff b/pore-replace-copy_dir.diff new file mode 100644 index 0000000..a9010f5 --- /dev/null +++ b/pore-replace-copy_dir.diff @@ -0,0 +1,13 @@ +--- a/src/depot.rs ++++ b/src/depot.rs +@@ -104,7 +104,9 @@ impl Depot { + ) + .context(format!("failed to create directory {:?}", dst))?; + +- copy_dir::copy_dir(&src, &dst).context(format!("failed to copy directory {:?} to {:?}", src, dst))?; ++ let mut options = fs_extra::dir::CopyOptions::new(); ++ options.copy_inside = true; ++ fs_extra::dir::copy(src, dst, &options).context(format!("failed to copy directory {:?} to {:?}", src, dst))?; + Ok(()) + } + diff --git a/rust-pore.spec b/rust-pore.spec index 838c50b..77f3f10 100644 --- a/rust-pore.spec +++ b/rust-pore.spec @@ -12,14 +12,14 @@ License: Apache-2.0 URL: https://crates.io/crates/pore Source: %{crates_source} # Manually created patch for downstream crate metadata changes -# - drop copy_dir +# - replace copy_dir with fs_extra # - replace isatty with atty # - bump joinery to 3.0 Patch: pore-fix-metadata.diff -# Based on merged https://github.com/jmgao/pore/pull/98 +# Based on merged https://github.com/jmgao/pore/pull/102 +Patch: pore-replace-copy_dir.diff +# Based on merged https://github.com/jmT142411827gao/pore/pull/98 Patch: pore-replace-isatty.diff -# Not upstreamed yet as the current patch is POSIX only -Patch: pore-remove-copy_dir.diff BuildRequires: rust-packaging >= 21