From f79b7210302d6ff244730c9620078edd81e8af5b Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Mar 14 2024 19:08:09 +0000 Subject: Add feature flag to reenable elfutils-libelf-devel-static and elfutils-devel-static This reverts commit ec548c1605c3f672001b4eae3f52a1c20bcdbbbb. Signed-off-by: Michel Lind --- diff --git a/elfutils.spec b/elfutils.spec index 68e0e5c..fed58cd 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,6 +1,10 @@ +# Rebuild --with static to enable static subpackages +# This is *not* supported by elfutils maintainers +%bcond_with static + Name: elfutils Version: 0.190 -%global baserelease 2 +%global baserelease 3 Release: %{baserelease}%{?dist} URL: http://elfutils.org/ %global source_url ftp://sourceware.org/pub/elfutils/%{version}/ @@ -116,7 +120,6 @@ Provides: elfutils-devel%{depsuffix} = %{version}-%{release} %endif Requires: elfutils-libs%{depsuffix} = %{version}-%{release} Requires: elfutils-libelf-devel%{depsuffix} = %{version}-%{release} -Obsoletes: elfutils-devel-static < 0.180-5 %description devel The elfutils-devel package contains the libraries to create @@ -124,6 +127,21 @@ applications for handling compiled objects. libdw provides access to the DWARF debugging information. libasm provides a programmable assembler interface. +%if %{with static} +%package devel-static +Summary: Static archives to handle compiled objects +License: GPL-2.0-or-later or LGPL-3.0-or-later +%if 0%{!?_isa:1} +Provides: elfutils-devel-static%{depsuffix} = %{version}-%{release} +%endif +Requires: elfutils-devel%{depsuffix} = %{version}-%{release} +Requires: elfutils-libelf-devel-static%{depsuffix} = %{version}-%{release} + +%description devel-static +The elfutils-devel-static package contains the static archives +with the code to handle compiled objects. +%endif + %package libelf Summary: Library to read and write ELF files License: GPLv2+ or LGPLv3+ @@ -146,7 +164,6 @@ Provides: elfutils-libelf-devel%{depsuffix} = %{version}-%{release} %endif Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} Obsoletes: libelf-devel <= 0.8.2-2 -Obsoletes: elfutils-libelf-devel-static < 0.180-5 %description libelf-devel The elfutils-libelf-devel package contains the libraries to create @@ -154,6 +171,20 @@ applications for handling compiled objects. libelf allows you to access the internals of the ELF object file format, so you can see the different sections of an ELF file. +%if %{with static} +%package libelf-devel-static +Summary: Static archive of libelf +License: GPL-2.0-or-later or LGPL-3.0-or-later +%if 0%{!?_isa:1} +Provides: elfutils-libelf-devel-static%{depsuffix} = %{version}-%{release} +%endif +Requires: elfutils-libelf-devel%{depsuffix} = %{version}-%{release} + +%description libelf-devel-static +The elfutils-libelf-static package contains the static archive +for libelf. +%endif + %if %{provide_yama_scope} %package default-yama-scope Summary: Default yama attach scope sysctl setting @@ -288,8 +319,10 @@ trap '' EXIT %make_install chmod +x ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/lib*.so* +%if %{without static} # We don't want the static libraries rm ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/lib{elf,dw,asm}.a +%endif # We don't have standard DEBUGINFOD_URLS necessarily, but still ship # the profile.d/debuginfod* files, in case of a site specific server. @@ -387,6 +420,12 @@ fi %{_libdir}/libdw.so %{_libdir}/pkgconfig/libdw.pc +%if %{with static} +%files devel-static +%{_libdir}/libdw.a +%{_libdir}/libasm.a +%endif + %files -f %{name}.lang libelf %license COPYING-GPLV2 COPYING-LGPLV3 %{_libdir}/libelf-%{version}.so @@ -400,6 +439,11 @@ fi %{_libdir}/pkgconfig/libelf.pc %{_mandir}/man3/elf_*.3* +%if %{with static} +%files libelf-devel-static +%{_libdir}/libelf.a +%endif + %if %{provide_yama_scope} %files default-yama-scope %{_sysctldir}/10-default-yama-scope.conf @@ -453,6 +497,9 @@ exit 0 %systemd_postun_with_restart debuginfod.service %changelog +* Thu Mar 14 2024 Michel Lind - 0.190-3 +- Add feature flag for reenabling elfutils-libelf-devel-static and elfutils-devel-static + * Fri Dec 8 2023 Aaron Merey - 0.190-2 - Add elfutils-0.190-fix-core-noncontig.patch