Update to 0.16.0

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

1
.gitignore vendored

@ -1 +1,2 @@
/gimli-0.15.0.crate
/gimli-0.16.0.crate

@ -1,25 +0,0 @@
From 391beaee2397b86480b2e855571a00b4af58b2d2 Mon Sep 17 00:00:00 2001
From: Philip Craig <philipjcraig@gmail.com>
Date: Tue, 2 Jan 2018 12:57:50 +1000
Subject: [PATCH] Fix BigEndian build
---
src/parser.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/parser.rs b/src/parser.rs
index 0df4d94..ed717bb 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -633,7 +633,7 @@ mod tests {
let input = [expected.0, 1, 2, 3, 4];
let input = &mut EndianBuf::new(&input, NativeEndian);
assert_eq!(parse_pointer_encoding(input), Ok(expected));
- assert_eq!(*input, EndianBuf::new(&[1, 2, 3, 4], LittleEndian));
+ assert_eq!(*input, EndianBuf::new(&[1, 2, 3, 4], NativeEndian));
}
#[test]
--
2.15.1

@ -1,151 +0,0 @@
From 31c8914bb530bc89ec8cda045b2e4d6537d6b750 Mon Sep 17 00:00:00 2001
From: Philip Craig <philipjcraig@gmail.com>
Date: Tue, 2 Jan 2018 12:02:46 +1000
Subject: [PATCH] Fix tests for 32 bit builds
---
src/abbrev.rs | 3 ++-
src/cfi.rs | 2 ++
src/op.rs | 7 ++++---
src/parser.rs | 1 +
src/unit.rs | 31 ++++++++++++++++++++++++++++++-
5 files changed, 39 insertions(+), 5 deletions(-)
diff --git a/src/abbrev.rs b/src/abbrev.rs
index 6ecc30d..da493a1 100644
--- a/src/abbrev.rs
+++ b/src/abbrev.rs
@@ -393,7 +393,8 @@ pub mod tests {
use endianity::{EndianBuf, LittleEndian};
use parser::Error;
use self::test_assembler::Section;
- use std::u64;
+ #[cfg(target_pointer_width = "32")]
+ use std::u32;
use test_util::GimliSectionMethods;
pub trait AbbrevSectionMethods {
diff --git a/src/cfi.rs b/src/cfi.rs
index ec2d0b7..4320646 100644
--- a/src/cfi.rs
+++ b/src/cfi.rs
@@ -6048,6 +6048,7 @@ mod tests {
}
#[test]
+ #[cfg(target_pointer_width = "64")]
fn size_of_unwind_ctx() {
use std::mem;
assert_eq!(
@@ -6059,6 +6060,7 @@ mod tests {
}
#[test]
+ #[cfg(target_pointer_width = "64")]
fn size_of_register_rule_map() {
use std::mem;
assert_eq!(
diff --git a/src/op.rs b/src/op.rs
index ab0f711..0eb30ea 100644
--- a/src/op.rs
+++ b/src/op.rs
@@ -1788,8 +1788,9 @@ mod tests {
use leb128;
use parser::{Error, Format, Result};
use self::test_assembler::{Endian, Section};
- use unit::{DebugInfoOffset, UnitOffset};
+ use std::usize;
use test_util::GimliSectionMethods;
+ use unit::{DebugInfoOffset, UnitOffset};
#[test]
fn test_compute_pc() {
@@ -1801,7 +1802,7 @@ mod tests {
assert_eq!(compute_pc(ebuf, ebuf, 0), Ok(*ebuf));
assert_eq!(
compute_pc(ebuf, ebuf, -1),
- Err(Error::BadBranchTarget(-1i64 as u64))
+ Err(Error::BadBranchTarget(usize::MAX as u64))
);
assert_eq!(compute_pc(ebuf, ebuf, 5), Ok(ebuf.range_from(5..)));
assert_eq!(
@@ -2119,7 +2120,7 @@ mod tests {
let input = [opcode.0, 0xfc, 0xff];
check_op_parse_failure(
&input[..],
- Error::BadBranchTarget(!0u64),
+ Error::BadBranchTarget(usize::MAX as u64),
ADDRESS_SIZE,
FORMAT,
);
diff --git a/src/parser.rs b/src/parser.rs
index 2512d1f..0df4d94 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -618,6 +618,7 @@ mod tests {
let section = Section::with_endian(Endian::Little).L64(0x0123456789abcdef);
let buf = section.get_contents().unwrap();
+ let input = &mut EndianBuf::new(&buf, LittleEndian);
match input.read_offset(Format::Dwarf64) {
Err(Error::UnsupportedOffset) => assert!(true),
otherwise => panic!("Unexpected result: {:?}", otherwise),
diff --git a/src/unit.rs b/src/unit.rs
index 50f9bab..6167188 100644
--- a/src/unit.rs
+++ b/src/unit.rs
@@ -3244,6 +3244,35 @@ mod tests {
};
}
+ #[test]
+ fn test_parse_type_unit_header_32_ok() {
+ let expected_rest = &[1, 2, 3, 4, 5, 6, 7, 8, 9];
+ let mut expected_unit = TypeUnitHeader {
+ header: UnitHeader {
+ unit_length: 0,
+ version: 4,
+ debug_abbrev_offset: DebugAbbrevOffset(0x08070605),
+ address_size: 8,
+ format: Format::Dwarf32,
+ entries_buf: EndianBuf::new(expected_rest, LittleEndian),
+ },
+ offset: DebugTypesOffset(0),
+ type_signature: DebugTypeSignature(0xdeadbeefdeadbeef),
+ type_offset: UnitOffset(0x78563412),
+ };
+ let section = Section::with_endian(Endian::Little)
+ .type_unit(&mut expected_unit)
+ .append_bytes(expected_rest);
+ let buf = section.get_contents().unwrap();
+ let rest = &mut EndianBuf::new(&buf, LittleEndian);
+
+ assert_eq!(
+ parse_type_unit_header(rest, DebugTypesOffset(0)),
+ Ok(expected_unit)
+ );
+ assert_eq!(*rest, EndianBuf::new(expected_rest, LittleEndian));
+ }
+
#[test]
#[cfg(target_pointer_width = "64")]
fn test_parse_type_unit_header_64_ok() {
@@ -3284,7 +3313,6 @@ mod tests {
}
#[test]
- #[cfg(target_pointer_width = "64")]
fn test_attribute_value() {
let mut unit = test_parse_attribute_unit_default();
let endian = unit.entries_buf.endian();
@@ -3324,6 +3352,7 @@ mod tests {
AttributeValue::Data4(([4, 3, 2, 1], endian)),
AttributeValue::Udata(0x01020304),
),
+ #[cfg(target_pointer_width = "64")]
(
2,
constants::DW_AT_data_member_location,
--
2.15.1

@ -1,34 +0,0 @@
From 8c4e75bb93a53a97d6ce8bc187cae41432769349 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Sun, 3 Dec 2017 21:40:41 +0100
Subject: [PATCH] bump object to 0.6
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
examples/dwarfdump.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/dwarfdump.rs b/examples/dwarfdump.rs
index e6d2050..f601712 100755
--- a/examples/dwarfdump.rs
+++ b/examples/dwarfdump.rs
@@ -9,6 +9,7 @@ extern crate object;
use fallible_iterator::FallibleIterator;
use gimli::UnwindSection;
+use object::Object;
use std::collections::HashMap;
use std::env;
use std::io;
@@ -217,7 +218,7 @@ where
Endian: gimli::Endianity,
'file: 'input,
{
- let data = file.get_section(S::section_name()).unwrap_or(&[]);
+ let data = file.section_data_by_name(S::section_name()).unwrap_or(&[]);
S::from(gimli::EndianBuf::new(data, endian))
}
--
2.15.1

@ -1,11 +0,0 @@
--- gimli-0.15.0/Cargo.toml 1970-01-01T01:00:00+01:00
+++ gimli-0.15.0/Cargo.toml 2018-01-01T15:38:38.993446+01:00
@@ -36,7 +36,7 @@
version = "0.6"
[dev-dependencies.object]
-version = "0.5.0"
+version = "0.7"
[dev-dependencies.test-assembler]
version = "0.1.3"

@ -0,0 +1,18 @@
--- gimli-0.16.0/Cargo.toml 1970-01-01T01:00:00+01:00
+++ gimli-0.16.0/Cargo.toml 2018-07-28T17:01:26.258634+02:00
@@ -48,13 +48,13 @@
version = "1"
[dev-dependencies.object]
-version = "0.8"
+version = "0.9"
[dev-dependencies.rayon]
version = "1.0"
[dev-dependencies.regex]
-version = "0.2.6"
+version = "1"
[dev-dependencies.test-assembler]
version = "0.1.3"

@ -1,26 +1,21 @@
# Generated by rust2rpm
%bcond_without check
# Tests are run in infrastructure
%bcond_with check
%global debug_package %{nil}
%global crate gimli
Name: rust-%{crate}
Version: 0.15.0
Release: 4%{?dist}
Version: 0.16.0
Release: 1%{?dist}
Summary: Blazing fast DWARF debugging format parser
License: ASL 2.0 or MIT
URL: https://crates.io/crates/gimli
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Bump object to 0.7, https://github.com/gimli-rs/gimli/pull/277
Patch0: gimli-0.15.0-fix-metadata.diff
# Make it work with object-v0.6, https://github.com/gimli-rs/gimli/pull/265
Patch1: 0001-bump-object-to-0.6.patch
# https://github.com/gimli-rs/gimli/commit/31c8914bb530bc89ec8cda045b2e4d6537d6b750
Patch2: 0001-Fix-tests-for-32-bit-builds.patch
# https://github.com/gimli-rs/gimli/commit/391beaee2397b86480b2e855571a00b4af58b2d2
Patch3: 0001-Fix-BigEndian-build.patch
# * Bump object to 0.9, regex to 1, https://github.com/gimli-rs/gimli/pull/312
Patch0: gimli-0.16.0-fix-metadata.diff
ExclusiveArch: %{rust_arches}
@ -28,13 +23,19 @@ BuildRequires: rust-packaging
# [dependencies]
BuildRequires: (crate(arrayvec) >= 0.4.6 with crate(arrayvec) < 0.5.0)
BuildRequires: (crate(byteorder) >= 1.0.0 with crate(byteorder) < 2.0.0)
BuildRequires: (crate(fallible-iterator) >= 0.1.2 with crate(fallible-iterator) < 0.2.0)
BuildRequires: (crate(fallible-iterator) >= 0.1.4 with crate(fallible-iterator) < 0.2.0)
BuildRequires: (crate(stable_deref_trait) >= 1.0.0 with crate(stable_deref_trait) < 2.0.0)
%if %{with check}
# [dev-dependencies]
BuildRequires: (crate(crossbeam) >= 0.3.2 with crate(crossbeam) < 0.4.0)
BuildRequires: (crate(getopts) >= 0.2.0 with crate(getopts) < 0.3.0)
BuildRequires: (crate(memmap) >= 0.6.0 with crate(memmap) < 0.7.0)
BuildRequires: (crate(object) >= 0.7.0 with crate(object) < 0.8.0)
BuildRequires: (crate(num_cpus) >= 1.0.0 with crate(num_cpus) < 2.0.0)
BuildRequires: (crate(object) >= 0.9.0 with crate(object) < 0.10.0)
BuildRequires: (crate(rayon) >= 1.0.0 with crate(rayon) < 2.0.0)
BuildRequires: (crate(regex) >= 1.0.0 with crate(regex) < 2.0.0)
BuildRequires: (crate(test-assembler) >= 0.1.3 with crate(test-assembler) < 0.2.0)
BuildRequires: (crate(typed-arena) >= 1.0.0 with crate(typed-arena) < 2.0.0)
%endif
%description
@ -52,8 +53,7 @@ which use %{crate} from crates.io.
%prep
%autosetup -n %{crate}-%{version} -p1
# https://github.com/gimli-rs/gimli/pull/266
chmod -x benches/bench.rs examples/dwarfdump.rs src/test_util.rs
chmod -x benches/*.rs
%cargo_prep
%build
@ -69,11 +69,14 @@ chmod -x benches/bench.rs examples/dwarfdump.rs src/test_util.rs
%files devel
%license LICENSE-APACHE LICENSE-MIT
%doc CONTRIBUTING.md README.md
%doc CHANGELOG.md CONTRIBUTING.md README.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/{coverage,format,releases}
%exclude %{cargo_registry}/%{crate}-%{version}/{ci,coverage,format,releases}
%changelog
* Sat Jul 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.16.0-1
- Update to 0.16.0
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

@ -1 +1 @@
SHA512 (gimli-0.15.0.crate) = 83ab100dda643110166c5c85f0fed46925971d4993311321c887143a2863c23efc13220852fe234b91cd49d9482d6f299ab2b4c39cba2b8176a0271e3a2975f4
SHA512 (gimli-0.16.0.crate) = c6da7a03ad709bf9f9eea82430a792f4683aa97fd928df23f265507ea4e8d92fe3328d3c5a71e7ba768aa6e3eba1e2c215a887d7557e591346a0f85c0bd41227

@ -0,0 +1,5 @@
---
standard-inventory-qcow2:
qemu:
# `cargo test` usually eats more than 1G.
m: 4G

@ -0,0 +1,13 @@
---
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
repositories:
- repo: "https://src.fedoraproject.org/tests/rust.git"
dest: rust
tests:
- rust/cargo-test
environment:
pkg: rust-gimli
Loading…
Cancel
Save