Update to 0.4.19

Adapt to new packaging
epel9
Josh Stone 6 years ago
parent b0b90b257c
commit 1a8fa74dd3

1
.gitignore vendored

@ -2,3 +2,4 @@
/tar-0.4.15.crate /tar-0.4.15.crate
/tar-0.4.16.crate /tar-0.4.16.crate
/tar-0.4.17.crate /tar-0.4.17.crate
/tar-0.4.19.crate

@ -1,35 +0,0 @@
From e1a09f57546c9627ca576a39b84e2105d25b1e77 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
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

@ -5,7 +5,7 @@
%global crate tar %global crate tar
Name: rust-%{crate} Name: rust-%{crate}
Version: 0.4.17 Version: 0.4.19
Release: 1%{?dist} Release: 1%{?dist}
Summary: Rust implementation of a TAR file reader and writer 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 # * No redox
Patch0: tar-0.4.15-fix-metadata.diff 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} ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging BuildRequires: rust-packaging
# [dependencies] BuildRequires: (crate(filetime/default) >= 0.2.0 with crate(filetime/default) < 0.3.0)
BuildRequires: (crate(filetime) >= 0.2.0 with crate(filetime) < 0.3.0) BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0)
BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) BuildRequires: (crate(xattr/default) >= 0.2.0 with crate(xattr/default) < 0.3.0)
BuildRequires: (crate(xattr) >= 0.2.0 with crate(xattr) < 0.3.0)
%if %{with check} %if %{with check}
# [dev-dependencies] BuildRequires: (crate(tempdir/default) >= 0.3.0 with crate(tempdir/default) < 0.4.0)
BuildRequires: (crate(tempdir) >= 0.3.0 with crate(tempdir) < 0.4.0)
%endif %endif
%description %global _description \
%{summary}. 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 %package devel
Summary: %{summary} Summary: %{summary}
BuildArch: noarch BuildArch: noarch
%description devel %description devel %{_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 This package contains library source intended for building other packages
writers. Additionally, great lengths are taken to ensure that the entire which use "%{crate}" crate.
contents are never required to be entirely resident in memory all at once.
%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 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 %prep
%autosetup -n %{crate}-%{version} -p1 %autosetup -n %{crate}-%{version} -p1
@ -63,12 +88,11 @@ which use %{crate} from crates.io.
%cargo_test %cargo_test
%endif %endif
%files devel
%license LICENSE-MIT LICENSE-APACHE
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%changelog %changelog
* Tue Nov 13 2018 Josh Stone <jistone@redhat.com> - 0.4.19-1
- Update to 0.4.19
- Adapt to new packaging
* Fri Sep 28 2018 Josh Stone <jistone@redhat.com> - 0.4.17-1 * Fri Sep 28 2018 Josh Stone <jistone@redhat.com> - 0.4.17-1
- Update to 0.4.17 - Update to 0.4.17

@ -1 +1 @@
SHA512 (tar-0.4.17.crate) = 3c6962d6c5dd3326ec668afbfa25d9750004f5f2979600322b6032d5d51b608baaae9eca6b2fb6ca6613961523da754eb4bbebd7275670978758d7b8c51b58fd SHA512 (tar-0.4.19.crate) = 9fc8ecc0ee4776b312918d4a32ac312f5fad0b9df039046e1cf8c36671b6cb72a4fce5ad8e9a8dd35a2e960db33724f1b21047b94392a87f337e74beeddc403d

Loading…
Cancel
Save