diff --git a/0001-Update-object.patch b/0001-Update-object.patch new file mode 100644 index 0000000..297a822 --- /dev/null +++ b/0001-Update-object.patch @@ -0,0 +1,31 @@ +From 203fe1e00d5d751763e0aaec75f4abe670271b81 Mon Sep 17 00:00:00 2001 +From: bjorn3 +Date: Thu, 30 Apr 2020 12:16:46 +0200 +Subject: [PATCH] Update object + +--- + src/lib.rs | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/lib.rs b/src/lib.rs +index c72dffbd036b..0173a26418bc 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -99,9 +99,12 @@ impl Context> { + S: gimli::Section>, + Endian: gimli::Endianity, + { ++ use object::ObjectSection; ++ + let data = file +- .section_data_by_name(S::section_name()) +- .unwrap_or(Cow::Borrowed(&[])); ++ .section_by_name(S::section_name()) ++ .and_then(|section| section.data().ok()) ++ .unwrap_or(&[]); + S::from(gimli::EndianRcSlice::new(Rc::from(&*data), endian)) + } + +-- +2.26.2 + diff --git a/addr2line-fix-metadata.diff b/addr2line-fix-metadata.diff new file mode 100644 index 0000000..bb66b37 --- /dev/null +++ b/addr2line-fix-metadata.diff @@ -0,0 +1,11 @@ +--- addr2line-0.11.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ addr2line-0.11.0/Cargo.toml 2020-05-05T21:44:40.646878+00:00 +@@ -63,7 +63,7 @@ + version = "1" + + [dependencies.object] +-version = "0.17" ++version = "0.18" + features = ["read"] + optional = true + default-features = false diff --git a/rust-addr2line.spec b/rust-addr2line.spec index 0816cba..98c6ddf 100644 --- a/rust-addr2line.spec +++ b/rust-addr2line.spec @@ -6,13 +6,17 @@ Name: rust-%{crate} Version: 0.11.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Cross-platform symbolication library written in Rust, using `gimli` # Upstream license specification: Apache-2.0/MIT License: ASL 2.0 or MIT URL: https://crates.io/crates/addr2line Source: %{crates_source} +# Initial patched metadata +# * Bump to object 0.18, https://github.com/gimli-rs/addr2line/pull/159/commits/203fe1e00d5d751763e0aaec75f4abe670271b81 +Patch0: addr2line-fix-metadata.diff +Patch1: 0001-Update-object.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -132,6 +136,9 @@ which use "std-object" feature of "%{crate}" crate. %endif %changelog +* Tue May 05 2020 Josh Stone - 0.11.0-2 +- Bump to object 0.18 + * Wed Feb 19 2020 Josh Stone - 0.11.0-1 - Update to 0.11.0