2020-02-04 14:52:28 +01:00
|
|
|
#
|
|
|
|
# spec file for package elfutils-debuginfod
|
|
|
|
#
|
2024-01-17 22:14:11 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2020-02-04 14:52:28 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: elfutils-debuginfod
|
2024-03-20 21:09:36 +01:00
|
|
|
Version: 0.191
|
2020-02-04 14:52:28 +01:00
|
|
|
Release: 0
|
2020-12-21 10:21:56 +01:00
|
|
|
Summary: Debuginfod server provided by elfutils
|
2020-02-04 14:52:28 +01:00
|
|
|
License: GPL-3.0-or-later
|
|
|
|
Group: Development/Tools/Building
|
|
|
|
URL: https://sourceware.org/elfutils/
|
|
|
|
#Git-Clone: git://sourceware.org/git/elfutils
|
2024-01-17 22:14:11 +01:00
|
|
|
Source: https://sourceware.org/elfutils/ftp/%{version}/elfutils-%{version}.tar.bz2
|
|
|
|
Source1: https://sourceware.org/elfutils/ftp/%{version}/elfutils-%{version}.tar.bz2.sig
|
2020-02-04 14:52:28 +01:00
|
|
|
Source3: elfutils.keyring
|
2022-04-19 09:57:51 +02:00
|
|
|
Source4: %{name}.sysusers
|
2022-05-19 22:48:55 +02:00
|
|
|
Patch1: harden_debuginfod.service.patch
|
2020-02-04 14:52:28 +01:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: bison
|
2021-05-15 23:14:50 +02:00
|
|
|
BuildRequires: bsdtar
|
|
|
|
BuildRequires: procps
|
2022-04-30 22:51:54 +02:00
|
|
|
BuildRequires: sysuser-tools
|
2020-12-21 10:21:56 +01:00
|
|
|
# For the run-debuginfod-find.sh test case in %%check for /usr/sbin/ss
|
2020-09-09 10:00:06 +02:00
|
|
|
BuildRequires: curl
|
2020-02-04 14:52:28 +01:00
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: gcc-c++
|
2020-09-09 10:00:06 +02:00
|
|
|
BuildRequires: iproute
|
2020-02-04 14:52:28 +01:00
|
|
|
BuildRequires: libbz2-devel
|
2022-02-28 19:43:04 +01:00
|
|
|
BuildRequires: libzstd-devel
|
2020-09-09 10:00:06 +02:00
|
|
|
BuildRequires: pkgconfig
|
2020-02-04 14:52:28 +01:00
|
|
|
BuildRequires: xz-devel
|
|
|
|
BuildRequires: zlib-devel
|
2023-03-05 20:07:54 +01:00
|
|
|
BuildRequires: zstd
|
2022-02-28 19:43:04 +01:00
|
|
|
|
2020-02-04 14:52:28 +01:00
|
|
|
# For debuginfod
|
|
|
|
BuildRequires: pkgconfig(libarchive) >= 3.1.2
|
|
|
|
BuildRequires: pkgconfig(libcurl) >= 7.29.0
|
|
|
|
BuildRequires: pkgconfig(libmicrohttpd) >= 0.9.33
|
|
|
|
BuildRequires: pkgconfig(sqlite3) >= 3.7.17
|
2020-09-09 10:00:06 +02:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2020-02-04 14:52:28 +01:00
|
|
|
Requires: debuginfod-client = %{version}
|
|
|
|
Requires: elfutils = %{version}
|
|
|
|
Requires(post): %fillup_prereq
|
2022-12-15 19:23:27 +01:00
|
|
|
%{?systemd_ordering}
|
2022-04-19 09:57:51 +02:00
|
|
|
%sysusers_requires
|
2020-02-04 14:52:28 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
The elfutils-debuginfod package contains the debuginfod binary
|
|
|
|
and control files for a service that can provide ELF/DWARF
|
|
|
|
files to remote clients, based on build-id identification.
|
|
|
|
The ELF/DWARF file searching functions in libdwfl can query
|
|
|
|
such servers to download those files on demand.
|
|
|
|
|
|
|
|
%package -n libdebuginfod1
|
|
|
|
Summary: Library for build-id HTTP ELF/DWARF server
|
|
|
|
Group: System/Libraries
|
2020-12-03 18:39:20 +01:00
|
|
|
Conflicts: libdebuginfod1-dummy = %{version}
|
2021-10-08 22:04:38 +02:00
|
|
|
License: GPL-2.0-or-later OR LGPL-3.0-or-later
|
2020-02-04 14:52:28 +01:00
|
|
|
|
|
|
|
%description -n libdebuginfod1
|
|
|
|
The libdebuginfod1 package contains shared libraries
|
|
|
|
dynamically loaded from -ldw, which use a debuginfod service
|
|
|
|
to look up debuginfo and associated data. Also includes a
|
|
|
|
command-line frontend.
|
|
|
|
|
|
|
|
%package -n libdebuginfod-devel
|
|
|
|
Summary: Libraries and headers to build debuginfod client applications
|
|
|
|
Group: Development/Libraries/C and C++
|
2020-12-03 18:39:20 +01:00
|
|
|
Conflicts: libdebuginfod-dummy-devel = %{version}
|
2021-10-08 22:04:38 +02:00
|
|
|
License: GPL-2.0-or-later OR LGPL-3.0-or-later
|
2021-11-15 15:25:59 +01:00
|
|
|
Requires: libdebuginfod1 = %{version}
|
2020-02-04 14:52:28 +01:00
|
|
|
|
|
|
|
%description -n libdebuginfod-devel
|
|
|
|
The libdebuginfod-devel package contains the libraries
|
|
|
|
to create applications to use the debuginfod service.
|
|
|
|
|
|
|
|
%package -n debuginfod-client
|
|
|
|
Summary: Command line client for build-id HTTP ELF/DWARF server
|
|
|
|
Group: Development/Tools/Building
|
2020-12-03 18:39:20 +01:00
|
|
|
Conflicts: debuginfod-dummy-client = %{version}
|
2023-09-06 18:56:28 +02:00
|
|
|
# Without DEBUGINFOD_URLS being set debuginfod-find won't work out of the box,
|
|
|
|
# on openSUSE Tumbleweed. Provide it, by default, so even general users benefit
|
|
|
|
# from automatic debuginfo installation. However, only on Tumbleweed, the only
|
|
|
|
# available platform supported by debuginfod.opensuse.org, for now.
|
|
|
|
%if !0%{?sle_version}
|
2023-07-24 18:11:41 +02:00
|
|
|
Requires: config(debuginfod-profile)
|
2023-09-06 18:56:28 +02:00
|
|
|
%endif
|
2023-07-24 18:11:41 +02:00
|
|
|
#
|
|
|
|
# Client-side supported tools, based on:
|
|
|
|
# https://sourceware.org/elfutils/Debuginfod.html
|
|
|
|
#
|
|
|
|
Supplements: binutils
|
|
|
|
Supplements: bpftrace-tools
|
|
|
|
Supplements: elfutils
|
|
|
|
Supplements: gdb
|
|
|
|
Supplements: perf
|
|
|
|
Supplements: systemd-coredump
|
|
|
|
Supplements: valgrind
|
2020-02-04 14:52:28 +01:00
|
|
|
|
|
|
|
%description -n debuginfod-client
|
|
|
|
The elfutils-debuginfod-client package contains a command-line frontend.
|
|
|
|
|
2022-06-17 21:19:55 +02:00
|
|
|
%package -n debuginfod-profile
|
|
|
|
Summary: Profile files for build-id HTTP ELF/DWARF server
|
|
|
|
Group: Development/Tools/Building
|
|
|
|
|
|
|
|
%description -n debuginfod-profile
|
|
|
|
The debuginfod-profile package contains a profile files that set default
|
|
|
|
URL for a distribution.
|
|
|
|
|
2020-02-04 14:52:28 +01:00
|
|
|
%lang_package
|
|
|
|
|
|
|
|
%prep
|
2020-06-17 08:56:07 +02:00
|
|
|
%autosetup -n elfutils-%version -p1
|
2020-02-04 14:52:28 +01:00
|
|
|
|
|
|
|
%build
|
2022-04-19 09:57:51 +02:00
|
|
|
%sysusers_generate_pre %{SOURCE4} %{name} %{name}.conf
|
2024-05-31 22:15:15 +02:00
|
|
|
# tests need debug info enabled (boo#1031556) but some repos don't
|
|
|
|
# do that by default. Some others do (when debuginfo is globally enabled)
|
|
|
|
# so just enable this always, for all compilations
|
|
|
|
%global optflags %{optflags} -g
|
2023-03-05 20:07:54 +01:00
|
|
|
export CFLAGS="%optflags -Werror=date-time"
|
2020-02-04 14:52:28 +01:00
|
|
|
%ifarch %sparc
|
|
|
|
# Small PIC model not sufficient
|
|
|
|
CFLAGS+=" -fPIC"
|
|
|
|
%endif
|
|
|
|
autoreconf -fi
|
|
|
|
# some patches create new test scripts, which are created 644 by default
|
|
|
|
chmod a+x tests/run*.sh
|
2022-05-05 23:04:24 +02:00
|
|
|
%configure \
|
|
|
|
%if %{suse_version} > 1500
|
|
|
|
--enable-debuginfod-urls=https://debuginfod.opensuse.org/ \
|
|
|
|
%endif
|
2021-03-24 16:09:20 +01:00
|
|
|
--program-prefix=eu-
|
2020-02-04 14:52:28 +01:00
|
|
|
%make_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
|
|
|
# remove unneeded files
|
|
|
|
rm -f %{buildroot}/%{_libdir}/*.la
|
|
|
|
ls -lR %{buildroot}/%{_libdir}/libelf*
|
|
|
|
|
|
|
|
rm -f %{buildroot}/%{_bindir}/eu*
|
|
|
|
rm -f %{buildroot}/%{_libdir}/libasm*
|
|
|
|
rm -f %{buildroot}/%{_includedir}/elfutils/lib*.h
|
|
|
|
rm -f %{buildroot}/%{_includedir}/elfutils/elf-knowledge.h
|
|
|
|
rm -f %{buildroot}/%{_includedir}/elfutils/known-dwarf.h
|
|
|
|
rm -f %{buildroot}/%{_includedir}/elfutils/version.h
|
|
|
|
rm -f %{buildroot}/%{_libdir}/libelf*
|
|
|
|
rm -f %{buildroot}/%{_includedir}/libelf.h
|
|
|
|
rm -f %{buildroot}/%{_includedir}/gelf.h
|
|
|
|
rm -f %{buildroot}/%{_includedir}/nlist.h
|
|
|
|
rm -f %{buildroot}/%{_includedir}/dwarf.h
|
|
|
|
rm -f %{buildroot}/%{_libdir}/libdw*
|
|
|
|
rm -f %{buildroot}/%{_mandir}/man3/elf_*.3*
|
|
|
|
rm -f %{buildroot}/%{_mandir}/man1/eu-*.1*
|
2020-09-09 10:00:06 +02:00
|
|
|
rm -rf %{buildroot}%{_datadir}/locale/
|
2020-02-04 14:52:28 +01:00
|
|
|
rm -f %{buildroot}/%{_libdir}/pkgconfig/libdw.pc
|
|
|
|
rm -f %{buildroot}/%{_libdir}/pkgconfig/libelf.pc
|
|
|
|
|
|
|
|
install -Dm0644 config/debuginfod.service %{buildroot}%{_unitdir}/debuginfod.service
|
|
|
|
install -d -m 755 %{buildroot}%{_fillupdir}
|
|
|
|
cp config/debuginfod.sysconfig %{buildroot}%{_fillupdir}/sysconfig.debuginfod
|
|
|
|
|
2022-04-19 09:57:51 +02:00
|
|
|
install -Dm0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/%{name}.conf
|
|
|
|
|
2020-02-04 14:52:28 +01:00
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/cache/debuginfod
|
|
|
|
touch %{buildroot}%{_localstatedir}/cache/debuginfod/debuginfod.sqlite
|
|
|
|
|
|
|
|
%post -n libdebuginfod1 -p /sbin/ldconfig
|
|
|
|
%postun -n libdebuginfod1 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%check
|
|
|
|
%if 0%{?qemu_user_space_build}
|
|
|
|
# qemu-linux-user does not support ptrace and a few other process details
|
|
|
|
export XFAIL_TESTS="dwfl-proc-attach run-backtrace-dwarf.sh run-backtrace-native.sh run-deleted.sh"
|
|
|
|
%endif
|
|
|
|
%make_build check
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license COPYING
|
|
|
|
%doc AUTHORS ChangeLog NEWS NOTES README THANKS TODO
|
|
|
|
%{_bindir}/debuginfod
|
|
|
|
%{_unitdir}/debuginfod.service
|
|
|
|
%{_mandir}/man8/debuginfod.8*
|
|
|
|
%{_fillupdir}/sysconfig.debuginfod
|
2022-04-19 09:57:51 +02:00
|
|
|
%{_sysusersdir}/%{name}.conf
|
2022-11-09 12:55:52 +01:00
|
|
|
%{_mandir}/man8/debuginfod.service.8.*
|
2020-02-04 14:52:28 +01:00
|
|
|
|
|
|
|
%dir %attr(0700,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod
|
2022-08-18 16:48:43 +02:00
|
|
|
%ghost %attr(0600,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod/debuginfod.sqlite
|
2020-02-04 14:52:28 +01:00
|
|
|
|
|
|
|
%files -n libdebuginfod1
|
|
|
|
%{_libdir}/libdebuginfod.so.*
|
|
|
|
%{_libdir}/libdebuginfod-%{version}.so
|
|
|
|
|
|
|
|
%files -n libdebuginfod-devel
|
|
|
|
%{_libdir}/pkgconfig/libdebuginfod.pc
|
|
|
|
%{_mandir}/man3/debuginfod_*.3*
|
|
|
|
%dir %{_includedir}/elfutils
|
|
|
|
%{_includedir}/elfutils/debuginfod.h
|
|
|
|
%{_libdir}/libdebuginfod.so
|
|
|
|
|
|
|
|
%files -n debuginfod-client
|
|
|
|
%{_bindir}/debuginfod-find
|
|
|
|
%{_mandir}/man1/debuginfod-find.1*
|
2021-11-15 15:25:59 +01:00
|
|
|
%{_mandir}/man7/debuginfod-client-config.7*
|
2020-02-04 14:52:28 +01:00
|
|
|
|
2022-06-17 21:19:55 +02:00
|
|
|
%files -n debuginfod-profile
|
|
|
|
%config %{_sysconfdir}/profile.d/debuginfod.sh
|
|
|
|
%config %{_sysconfdir}/profile.d/debuginfod.csh
|
|
|
|
%dir %{_sysconfdir}/debuginfod
|
2023-03-08 16:50:09 +01:00
|
|
|
%if %{suse_version} > 1500
|
2022-06-17 21:19:55 +02:00
|
|
|
%config %{_sysconfdir}/debuginfod/elfutils.urls
|
2023-03-08 16:50:09 +01:00
|
|
|
%endif
|
2022-06-17 21:19:55 +02:00
|
|
|
|
2022-04-19 09:57:51 +02:00
|
|
|
%pre -f %{name}.pre
|
2020-02-04 14:52:28 +01:00
|
|
|
%service_add_pre debuginfod.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post debuginfod.service
|
|
|
|
%{fillup_only -n debuginfod}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun debuginfod.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun debuginfod.service
|
|
|
|
|
|
|
|
%changelog
|