From 4f111212f375df8d415a18946aa526977ce6620c Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Wed, 8 Feb 2023 21:15:41 +0530 Subject: [PATCH] Resolves: #2167217 - enable debuginfo Signed-off-by: Lokesh Mandvekar --- netavark.spec | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/netavark.spec b/netavark.spec index aba33e3..991973d 100644 --- a/netavark.spec +++ b/netavark.spec @@ -2,7 +2,14 @@ # Latest upstream rtnetlink frequently required # sha2, zbus, zvariant are currently out of date +%global with_debug 1 + +%if 0%{?with_debug} +%global _find_debuginfo_dwz_opts %{nil} +%global _dwz_low_mem_die_limit 0 +%else %global debug_package %{nil} +%endif %global built_tag v1.5.0 %global built_tag_strip %(b=%{built_tag}; echo ${b:1}) @@ -27,6 +34,7 @@ Provides: container-network-stack = 2 BuildRequires: make BuildRequires: protobuf-c BuildRequires: protobuf-compiler +BuildRequires: rust-packaging BuildRequires: rust-srpm-macros BuildRequires: git-core # Generated using: @@ -279,20 +287,15 @@ directory = "vendor" EOF %build -%{__make} build +%{__cargo} build --release +mkdir -p bin +cp target/release/%{name} bin/ -%ifarch %{golang_arches} cd docs go-md2man -in %{name}.1.md -out %{name}.1 -%endif %install -%ifarch %{golang_arches} %{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install -%else -# no manpage, install only the binary -install -D -m0755 bin/netavark %{buildroot}%{_libexecdir}/podman/%{name} -%endif %files %license LICENSE