diff --git a/0001-fix-endianness-in-doctests.patch b/0001-fix-endianness-in-doctests.patch new file mode 100644 index 0000000..92c67e6 --- /dev/null +++ b/0001-fix-endianness-in-doctests.patch @@ -0,0 +1,15 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 154426b..ff9d4fe 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -70,7 +70,10 @@ use std::io::{self, BufRead}; + /// let data = Data { byte: 0x1F, word: 0xABCD, big: !0 }; + /// data.hash(&mut adler); + /// ++/// #[cfg(target_endian = "little")] + /// assert_eq!(adler.checksum(), 0x33410990); ++/// #[cfg(target_endian = "big")] ++/// assert_eq!(adler.checksum(), 0x331F0990); + /// ``` + /// + /// [`new`]: #method.new diff --git a/rust-adler.spec b/rust-adler.spec index 5b034f9..ecb2dd4 100644 --- a/rust-adler.spec +++ b/rust-adler.spec @@ -6,7 +6,7 @@ Name: rust-%{crate} Version: 1.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Simple clean-room implementation of the Adler-32 checksum # Upstream license specification: 0BSD OR MIT OR Apache-2.0 @@ -14,6 +14,10 @@ License: 0BSD or MIT or ASL 2.0 URL: https://crates.io/crates/adler Source: %{crates_source} +# https://github.com/jonas-schievink/adler/issues/8 +# patch a doc test that depends on byte order +Patch1: 0001-fix-endianness-in-doctests.patch + ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} BuildArch: noarch @@ -83,6 +87,9 @@ which use "std" feature of "%{crate}" crate. %endif %changelog +* Thu Feb 25 2021 Fabio Valentini - 1.0.1-2 +- Patch a doc test that depends on byte order. + * Thu Feb 25 2021 Fabio Valentini - 1.0.1-1 - Update to version 1.0.1. - Fixes RHBZ#1895724