Update to 0.4.15

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
epel9
Igor Gnatenko 7 years ago
parent ffafc848fc
commit 58490a5a70
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

1
.gitignore vendored

@ -1 +1,2 @@
/tar-0.4.14.crate
/tar-0.4.15.crate

@ -1,55 +0,0 @@
From 2fdfdff070920cfc087e3dfb1624c199d1daab84 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Date: Sat, 13 Jan 2018 19:01:15 +0100
Subject: [PATCH] deps: Update xattr to 0.2
get() used to return Result<Vec<u8>> which was indicating problem
either with getting attributes or those attributes being empty.
Now it returns Result<Option<Vec<u8>>> where Result is for reporting
problems with getting attrs and Option for showing whether attrs are
empty.
Then make sure that no_xattrs test is really trying to test something.
And also make indent to be consistent.
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
---
tests/all.rs | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/tests/all.rs b/tests/all.rs
index 6ecd440..1977362 100644
--- a/tests/all.rs
+++ b/tests/all.rs
@@ -201,19 +201,21 @@ fn xattrs() {
t!(ar.unpack(td.path()));
let val = xattr::get(td.path().join("a/b"), "user.pax.flags").unwrap();
- assert_eq!(val, "epm".as_bytes());
+ assert_eq!(val.unwrap(), "epm".as_bytes());
}
#[test]
#[cfg(all(unix, feature = "xattr"))]
fn no_xattrs() {
- let td = t!(TempDir::new("tar-rs"));
- let rdr = Cursor::new(tar!("xattrs.tar"));
- let mut ar = Archive::new(rdr);
+ // If /tmp is a tmpfs, xattr will fail
+ // The xattr crate's unit tests also use /var/tmp for this reason
+ let td = t!(TempDir::new_in("/var/tmp", "tar-rs"));
+ let rdr = Cursor::new(tar!("xattrs.tar"));
+ let mut ar = Archive::new(rdr);
ar.set_unpack_xattrs(false);
- t!(ar.unpack(td.path()));
+ t!(ar.unpack(td.path()));
- xattr::get(td.path().join("a/b"), "user.pax.flags").unwrap_err();
+ assert_eq!(xattr::get(td.path().join("a/b"), "user.pax.flags").unwrap(), None);
}
#[test]
--
2.15.1

@ -5,8 +5,8 @@
%global crate tar
Name: rust-%{crate}
Version: 0.4.14
Release: 2%{?dist}
Version: 0.4.15
Release: 1%{?dist}
Summary: Rust implementation of a TAR file reader and writer
License: MIT or ASL 2.0
@ -14,16 +14,13 @@ URL: https://crates.io/crates/tar
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * No redox
# * Bump xattr to 0.2, https://github.com/alexcrichton/tar-rs/pull/145
Patch0: tar-0.4.14-fix-metadata.diff
# Make it work with xattr v0.2
Patch1: 0001-deps-Update-xattr-to-0.2.patch
Patch0: tar-0.4.15-fix-metadata.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
# [dependencies]
BuildRequires: (crate(filetime) >= 0.1.5 with crate(filetime) < 0.2.0)
BuildRequires: (crate(filetime) >= 0.2.0 with crate(filetime) < 0.3.0)
BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0)
BuildRequires: (crate(xattr) >= 0.2.0 with crate(xattr) < 0.3.0)
%if %{with check}
@ -68,6 +65,9 @@ which use %{crate} from crates.io.
%{cargo_registry}/%{crate}-%{version}/
%changelog
* Wed Apr 25 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.15-1
- Update to 0.4.15
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

@ -1 +1 @@
SHA512 (tar-0.4.14.crate) = b46685caadf335ec296a6d7ff5c2bae31a50395a3681a733998dbdf6295a4a55e7b094340b4679f9468f430f5c92734e08b75123de935dc5636b36d06c498b96
SHA512 (tar-0.4.15.crate) = b5e95534836e99ef749dc4d517e60f799ca6a88a246b30b7bf9731afa3fe5f207ad14ecd11435da43f7d634ca16bd3766dfb94fe7ee0cbb1611773aecc46b060

@ -1,15 +0,0 @@
--- tar-0.4.14/Cargo.toml 1970-01-01T01:00:00+01:00
+++ tar-0.4.14/Cargo.toml 2018-01-13T18:37:52.043131+01:00
@@ -28,11 +28,9 @@
[features]
default = ["xattr"]
-[target."cfg(target_os = \"redox\")".dependencies.redox_syscall]
-version = "0.1"
[target."cfg(unix)".dependencies.libc]
version = "0.2"
[target."cfg(unix)".dependencies.xattr]
-version = "0.1.7"
+version = "0.2"
optional = true

@ -0,0 +1,11 @@
--- tar-0.4.15/Cargo.toml 1970-01-01T01:00:00+01:00
+++ tar-0.4.15/Cargo.toml 2018-04-25T13:31:34.104704+02:00
@@ -28,8 +28,6 @@
[features]
default = ["xattr"]
-[target."cfg(target_os = \"redox\")".dependencies.redox_syscall]
-version = "0.1"
[target."cfg(unix)".dependencies.libc]
version = "0.2"
Loading…
Cancel
Save