diff --git a/.gitignore b/.gitignore index db3e9fe..b4fd275 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /tar-0.4.15.crate /tar-0.4.16.crate /tar-0.4.17.crate +/tar-0.4.19.crate diff --git a/0001-Always-write-big-endian-in-numeric_extended_into.patch b/0001-Always-write-big-endian-in-numeric_extended_into.patch deleted file mode 100644 index 9331801..0000000 --- a/0001-Always-write-big-endian-in-numeric_extended_into.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e1a09f57546c9627ca576a39b84e2105d25b1e77 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Thu, 27 Sep 2018 23:03:52 -0700 -Subject: [PATCH] Always write big-endian in numeric_extended_into - -Before, this was transforming the number `to_be()`, then pulling out -least-significant bytes at shr 0, 8, 16, etc. This has the effect of -writing reversed bytes on a little-endian target. But since `to_be()` -does nothing on actual big-endian machines, they end up incorrectly -writing the true least-significant bytes first. - -Instead, we can just reverse the order of the shift indexes, and then -the platform endianness is irrelevant. - -Fixes #161. ---- - src/header.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/header.rs b/src/header.rs -index 124c466d9874..0f2d7bd9c148 100644 ---- a/src/header.rs -+++ b/src/header.rs -@@ -1422,7 +1422,7 @@ fn numeric_extended_into(dst: &mut [u8], src: u64) { - let len: usize = dst.len(); - for (slot, val) in dst.iter_mut().zip( - repeat(0).take(len - 8) // to zero init extra bytes -- .chain((0..8).map(|x| ((src.to_be() >> (8 * x)) & 0xff) as u8)), -+ .chain((0..8).rev().map(|x| ((src >> (8 * x)) & 0xff) as u8)), - ) { - *slot = val; - } --- -2.17.1 - diff --git a/rust-tar.spec b/rust-tar.spec index b09cdde..7143f92 100644 --- a/rust-tar.spec +++ b/rust-tar.spec @@ -5,7 +5,7 @@ %global crate tar Name: rust-%{crate} -Version: 0.4.17 +Version: 0.4.19 Release: 1%{?dist} Summary: Rust implementation of a TAR file reader and writer @@ -17,36 +17,61 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{ # * No redox Patch0: tar-0.4.15-fix-metadata.diff -# https://github.com/alexcrichton/tar-rs/pull/163 -Patch1: 0001-Always-write-big-endian-in-numeric_extended_into.patch - ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -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) +BuildRequires: (crate(filetime/default) >= 0.2.0 with crate(filetime/default) < 0.3.0) +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) +BuildRequires: (crate(xattr/default) >= 0.2.0 with crate(xattr/default) < 0.3.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(tempdir) >= 0.3.0 with crate(tempdir) < 0.4.0) +BuildRequires: (crate(tempdir/default) >= 0.3.0 with crate(tempdir/default) < 0.4.0) %endif -%description -%{summary}. +%global _description \ +A Rust implementation of a TAR file reader and writer. This library does not\ +currently handle compression, but it is abstract over all I/O readers and\ +writers. Additionally, great lengths are taken to ensure that the entire\ +contents are never required to be entirely resident in memory all at once. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -A Rust implementation of a TAR file reader and writer. This library does not -currently handle compression, but it is abstract over all I/O readers and -writers. Additionally, great lengths are taken to ensure that the entire -contents are never required to be entirely resident in memory all at once. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE-MIT LICENSE-APACHE +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+xattr-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+xattr-devel %{_description} + +This package contains library source intended for building other packages +which use "xattr" feature of "%{crate}" crate. + +%files -n %{name}+xattr-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -63,12 +88,11 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Tue Nov 13 2018 Josh Stone - 0.4.19-1 +- Update to 0.4.19 +- Adapt to new packaging + * Fri Sep 28 2018 Josh Stone - 0.4.17-1 - Update to 0.4.17 diff --git a/sources b/sources index 4f5dfd6..f29ceb1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tar-0.4.17.crate) = 3c6962d6c5dd3326ec668afbfa25d9750004f5f2979600322b6032d5d51b608baaae9eca6b2fb6ca6613961523da754eb4bbebd7275670978758d7b8c51b58fd +SHA512 (tar-0.4.19.crate) = 9fc8ecc0ee4776b312918d4a32ac312f5fad0b9df039046e1cf8c36671b6cb72a4fce5ad8e9a8dd35a2e960db33724f1b21047b94392a87f337e74beeddc403d