#9 Allow building without default debuginfod_url
Merged a year ago by mjw. Opened a year ago by amitshah.
rpms/ amitshah/elfutils without_debuginfod_url  into  rawhide

file modified
+12 -1
@@ -1,6 +1,6 @@ 

  Name: elfutils

  Version: 0.187

- %global baserelease 6

+ %global baserelease 7

  Release: %{baserelease}%{?dist}

  URL: http://elfutils.org/

  %global source_url ftp://sourceware.org/pub/elfutils/%{version}/
@@ -68,6 +68,8 @@ 

  %global with_sysusers		1

  %endif

  

+ %bcond with_debuginfod_url 1

+ 

  # Patches

  

  # For s390x... FDO package notes are bogus.
@@ -271,7 +273,11 @@ 

  

  

  trap 'cat config.log' EXIT

+ %if %{with with_debuginfod_url}

  %configure CFLAGS="$RPM_OPT_FLAGS" --enable-debuginfod-urls=https://debuginfod.fedoraproject.org/

This would be better written as:
Shouldn't this reference %{debuginfo_url} rather than the actual URL?

mjw commented a year ago

Yes, or %{debuginfod_urls} or how we might call this global variable. But I believe that is a followup patch because at the moment we don't have such a global variable and it probably should be set at the distro config level.

+ %else

+ %configure CFLAGS="$RPM_OPT_FLAGS"

+ %endif

  trap '' EXIT

  %make_build

  
@@ -395,7 +401,9 @@ 

  %{_mandir}/man1/debuginfod-find.1*

  %{_mandir}/man7/debuginfod*.7*

  %config(noreplace) %{_sysconfdir}/profile.d/*

+ %if %{with with_debuginfod_url}

  %config(noreplace) %{_sysconfdir}/debuginfod/*

+ %endif

  

  %files debuginfod-client-devel

  %{_libdir}/pkgconfig/libdebuginfod.pc
@@ -434,6 +442,9 @@ 

  %systemd_postun_with_restart debuginfod.service

  

  %changelog

+ * Wed Jul 27 2022 Amit Shah <amitshah@fedoraproject.org> - 0.187-7

+ - Allow building without default debuginfod URL

+ 

  * Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.187-6

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

  

Building with --without=with_debuginfod_url will not
configure a debuginfod_url by default. This is useful
for downstreams like Amazon Linux that do not (yet)
provide a debuginfod server.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

This looks OK.
But it would be nice if there was a way to provide an alternative debuginfod url.
For CentOS we just update the spec file setting https://debuginfod.centos.org/ instead of https://debuginfod.fedoraproject.org/

Pull-Request has been merged by mjw

a year ago

I agree having a distro-customized URL would be nice. I was wondering if a debuginfod_url will also fit within the new macros being introduced in https://src.fedoraproject.org/rpms/fedora-release/pull-request/223 -- and you've brought up a nice usecase.

I'll take a stab at it next week.

I've created https://src.fedoraproject.org/rpms/fedora-release/pull-request/224

Once that's merged, I will send a new PR against elfutils to use that macro.

Of course - RHEL and CentOS need to be handled separately. I'm working on C8s and C9s PRs; but I can't influence RHEL sources - someone needs to push them separately.

For CentOS we are currently using a slightly forked version of the elfutils.spec with:

%if 0%{?centos} >= 8
%configure CFLAGS="$RPM_OPT_FLAGS -fexceptions" --enable-debuginfod-urls=https://debuginfod.centos.org/
%else
%configure CFLAGS="$RPM_OPT_FLAGS -fexceptions"
%endif

So it only sets the debuginfod URL when build for centos, but not rhel.

It would indeed be nice if we could merge the spec files again.

This would be better written as:
Shouldn't this reference %{debuginfo_url} rather than the actual URL?

Yes, or %{debuginfod_urls} or how we might call this global variable. But I believe that is a followup patch because at the moment we don't have such a global variable and it probably should be set at the distro config level.

These spec files already function fine for the distros they are used on. If the developers value sharing their own forks (rhel vs fedora vs centos), and wish to simplify/parametrize, that's cool. But helping out other distros to reuse unmodified spec files is not a priority.

Metadata