#12 Restore elfutils-libelf-devel-static and elfutils-devel-static
Merged 2 months ago by mjw. Opened 2 months ago by salimma.
rpms/ salimma/elfutils reenable-static  into  rawhide

file modified
+50 -3
@@ -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.191

- %global baserelease 2

+ %global baserelease 3

  Release: %{baserelease}%{?dist}

  URL: http://elfutils.org/

  %global source_url ftp://sourceware.org/pub/elfutils/%{version}/
@@ -119,7 +123,6 @@ 

  %else

  Requires: elfutils-debuginfod-client-devel%{depsuffix} = %{version}-%{release}

  %endif

- Obsoletes: elfutils-devel-static < 0.180-5

  

  %description devel

  The elfutils-devel package contains the libraries to create
@@ -127,6 +130,21 @@ 

  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: GPL-2.0-or-later OR LGPL-3.0-or-later
@@ -149,7 +167,6 @@ 

  %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
@@ -157,6 +174,20 @@ 

  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
@@ -284,8 +315,10 @@ 

  %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

  

  %find_lang %{name}

  
@@ -376,6 +409,12 @@ 

  %{_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
@@ -389,6 +428,11 @@ 

  %{_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
@@ -442,6 +486,9 @@ 

  %systemd_postun_with_restart debuginfod.service

  

  %changelog

+ * Mon Mar 11 2024 Michel Lind <salimma@fedoraproject.org> - 0.191-3

+ - Add feature flag for reenabling elfutils-libelf-devel-static and elfutils-devel-static

+ 

  * Mon Mar  4 2024 Aaron Merey <amerey@fedoraproject.org> - 0.191-2

  - Update SPDX license.

  

This reverts commit ec548c1.

Context:
We have a usecase when working on retsnoop (https://src.fedoraproject.org/rpms/retsnoop) where changes need to be tested on systems with older glibc; right now everything else it depends on are available as static libraries, with the exception of libelf (since 2020, in the commit mentioned).

Can we get these two subpackages restored? If we can get this in Fedora, the next step is I plan to propose a MR doing the same for CentOS Stream 9 and Stream 10 - since our development servers at work run Stream.

Thanks!

Signed-off-by: Michel Lind salimma@fedoraproject.org

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/994bc81f24334f9896cdc082b8aaa731

@mjw ack. per discussion in the bug report I'll update this to gate this behind a feature flag and make it off by default. It will make it easier to maintain a fork.

rebased onto f5ae9e9

2 months ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/a820f9384c91481dbfaca3dc13d69078

Pull-Request has been merged by mjw

2 months ago
Metadata