From a0b7fd13def194b9108ecf89e6ab69c9f6054e14 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Wed, 24 Jul 2024 17:06:35 -0500 Subject: [PATCH] Update to version 0.24.0; Fixes RHBZ#2274488 Signed-off-by: Michel Lind --- .gitignore | 1 + addr2line-fix-metadata.diff | 51 +++++++++++++++++++++++++------ rust-addr2line.spec | 60 +++++++++++++++++-------------------- rust2rpm.toml | 11 +++++++ sources | 2 +- 5 files changed, 83 insertions(+), 42 deletions(-) diff --git a/.gitignore b/.gitignore index 2847aa5..8fe084a 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /addr2line-0.18.0.crate /addr2line-0.19.0.crate /addr2line-0.21.0.crate +/addr2line-0.24.0.crate diff --git a/addr2line-fix-metadata.diff b/addr2line-fix-metadata.diff index eaebc46..09d74c6 100644 --- a/addr2line-fix-metadata.diff +++ b/addr2line-fix-metadata.diff @@ -1,13 +1,46 @@ ---- addr2line-0.21.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ addr2line-0.21.0/Cargo.toml 2023-11-29T18:39:59.278241+00:00 -@@ -18,6 +18,10 @@ - "/benches/*", - "/fixtures/*", +--- addr2line-0.24.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ addr2line-0.24.0/Cargo.toml 2024-07-24T22:00:45.238984+00:00 +@@ -20,6 +20,7 @@ ".github", -+ "/bench.plot.r", -+ "/benchmark.sh", -+ "/coverage.sh", -+ "/rustfmt.toml", + "*.sh", + "*.r", ++ "rustfmt.toml", ] description = "A cross-platform symbolication library written in Rust, using `gimli`" documentation = "https://docs.rs/addr2line" +@@ -42,15 +43,6 @@ + [profile.release] + debug = 2 + +-[[bin]] +-name = "addr2line" +-required-features = ["bin"] +- +-[[test]] +-name = "output_equivalence" +-harness = false +-required-features = ["bin"] +- + [[test]] + name = "correctness" + required-features = [ +@@ -66,11 +58,6 @@ + version = "1.0.0" + optional = true + package = "rustc-std-workspace-alloc" +- +-[dependencies.clap] +-version = "4.3.21" +-features = ["wrap_help"] +-optional = true + + [dependencies.compiler_builtins] + version = "0.1.2" +@@ -139,7 +126,6 @@ + "rustc-demangle", + "cpp_demangle", + "smallvec", +- "dep:clap", + ] + cargo-all = [] + default = [ diff --git a/rust-addr2line.spec b/rust-addr2line.spec index 36c1dd2..da55c68 100644 --- a/rust-addr2line.spec +++ b/rust-addr2line.spec @@ -1,12 +1,15 @@ -# Generated by rust2rpm 25 +# Generated by rust2rpm 26 # * resolve circular dependency with backtrace %bcond_with check %global debug_package %{nil} +# prevent executables from being installed +%global cargo_install_bin 0 + %global crate addr2line Name: rust-addr2line -Version: 0.21.0 +Version: 0.24.0 Release: %autorelease Summary: Cross-platform symbolication library written in Rust, using gimli @@ -14,10 +17,13 @@ License: Apache-2.0 OR MIT URL: https://crates.io/crates/addr2line Source: %{crates_source} # Manually created patch for downstream crate metadata changes -# * exclude files that are only useful for upstream development +# * exclude rustfmt.toml, only useful for upstream development +# https://github.com/gimli-rs/addr2line/pull/312 +# * drop binary and test that requires bin +# * drop clap dependency, only used by bin Patch: addr2line-fix-metadata.diff -BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: cargo-rpm-macros >= 26 %global _description %{expand: A cross-platform symbolication library written in Rust, using `gimli`.} @@ -52,52 +58,52 @@ use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+cpp_demangle-devel +%package -n %{name}+cargo-all-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+cpp_demangle-devel %{_description} +%description -n %{name}+cargo-all-devel %{_description} This package contains library source intended for building other packages which -use the "cpp_demangle" feature of the "%{crate}" crate. +use the "cargo-all" feature of the "%{crate}" crate. -%files -n %{name}+cpp_demangle-devel +%files -n %{name}+cargo-all-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+fallible-iterator-devel +%package -n %{name}+cpp_demangle-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+fallible-iterator-devel %{_description} +%description -n %{name}+cpp_demangle-devel %{_description} This package contains library source intended for building other packages which -use the "fallible-iterator" feature of the "%{crate}" crate. +use the "cpp_demangle" feature of the "%{crate}" crate. -%files -n %{name}+fallible-iterator-devel +%files -n %{name}+cpp_demangle-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+memmap2-devel +%package -n %{name}+fallible-iterator-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+memmap2-devel %{_description} +%description -n %{name}+fallible-iterator-devel %{_description} This package contains library source intended for building other packages which -use the "memmap2" feature of the "%{crate}" crate. +use the "fallible-iterator" feature of the "%{crate}" crate. -%files -n %{name}+memmap2-devel +%files -n %{name}+fallible-iterator-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+object-devel +%package -n %{name}+loader-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+object-devel %{_description} +%description -n %{name}+loader-devel %{_description} This package contains library source intended for building other packages which -use the "object" feature of the "%{crate}" crate. +use the "loader" feature of the "%{crate}" crate. -%files -n %{name}+object-devel +%files -n %{name}+loader-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+rustc-demangle-devel @@ -136,21 +142,11 @@ use the "std" feature of the "%{crate}" crate. %files -n %{name}+std-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+std-object-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+std-object-devel %{_description} - -This package contains library source intended for building other packages which -use the "std-object" feature of the "%{crate}" crate. - -%files -n %{name}+std-object-devel -%ghost %{crate_instdir}/Cargo.toml - %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep +# remove source code for the binary we're not shipping +rm src/bin/addr2line.rs %generate_buildrequires %cargo_generate_buildrequires diff --git a/rust2rpm.toml b/rust2rpm.toml index e618580..903c928 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -1,11 +1,22 @@ +[package] +cargo-install-bin = false + [features] hide = [ + "all", # only contains bin "alloc", + "bin", # only needed by the binary which we don't ship "compiler_builtins", "core", "rustc-dep-of-std", ] +[scripts] +prep.post = [ + "# remove source code for the binary we're not shipping", + "rm src/bin/addr2line.rs", +] + [tests] run = ["none"] comments = ["resolve circular dependency with backtrace"] diff --git a/sources b/sources index f1dfc95..d52f53c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (addr2line-0.21.0.crate) = afde7660dda30dee240e79df1fb5b92d4572520bf17a134ef3765e2a077af9e13713952d52e27fae420109b40f6e24dbce1056687dbcbead858ffc21cc7dc69b +SHA512 (addr2line-0.24.0.crate) = c23eec35359c3389ef18cd6134417b2afe4adce8b8938c3c53deed0eb4f84d3a2c958d6038895298596f8ed380203a1175e4650573ac61bf2e1b6669fa20789f