diff --git a/0001-Revert-Revert-Dependencies-updated.patch b/0001-Revert-Revert-Dependencies-updated.patch new file mode 100644 index 0000000..27ffb50 --- /dev/null +++ b/0001-Revert-Revert-Dependencies-updated.patch @@ -0,0 +1,31 @@ +From 5df806acf77bca5cf6e530c7a04710dce0f854f1 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Sat, 22 Jun 2019 12:33:25 +0200 +Subject: [PATCH] Revert "Revert "Dependencies updated."" + +This reverts commit da04eca990b011f26d6c67efa8d02569ed05b320. +--- + src/main.rs | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/src/main.rs b/src/main.rs +index 2a68ce1..e2f0680 100644 +--- a/src/main.rs ++++ b/src/main.rs +@@ -707,12 +707,7 @@ fn collect_self_data(path: &path::Path) -> Result { + let mut total_size = 0; + let mut list = Vec::new(); + for symbol in file.symbol_map().symbols() { +- match symbol.kind() { +- object::SymbolKind::Section | object::SymbolKind::File => continue, +- _ => {} +- } +- +- if symbol.section_kind() != Some(object::SectionKind::Text) { ++ if symbol.is_undefined() || symbol.kind() != object::SymbolKind::Text { + continue; + } + +-- +2.22.0 + diff --git a/cargo-bloat-fix-metadata.diff b/cargo-bloat-fix-metadata.diff new file mode 100644 index 0000000..dfcbf93 --- /dev/null +++ b/cargo-bloat-fix-metadata.diff @@ -0,0 +1,20 @@ +--- cargo-bloat-0.7.1/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ cargo-bloat-0.7.1/Cargo.toml 2019-06-22T10:33:00.042341+00:00 +@@ -21,7 +21,7 @@ + license = "MIT" + repository = "https://github.com/RazrFalcon/cargo-bloat" + [dependencies.goblin] +-version = "0.0.19" ++version = "0.0.22" + + [dependencies.memmap] + version = "0.7" +@@ -30,7 +30,7 @@ + version = "0.5" + + [dependencies.object] +-version = "0.11" ++version = "0.12" + features = ["std", "compression"] + default-features = false + diff --git a/rust-cargo-bloat.spec b/rust-cargo-bloat.spec index 8a4a686..a94f08f 100644 --- a/rust-cargo-bloat.spec +++ b/rust-cargo-bloat.spec @@ -13,6 +13,11 @@ Summary: Find out what takes most of the space in your executable License: MIT URL: https://crates.io/crates/cargo-bloat Source: %{crates_source} +# Initial patched metadata +# * Update goblin and object +Patch0: cargo-bloat-fix-metadata.diff +# Revert of https://github.com/RazrFalcon/cargo-bloat/commit/da04eca990b011f26d6c67efa8d02569ed05b320 +Patch0001: 0001-Revert-Revert-Dependencies-updated.patch ExclusiveArch: %{rust_arches}