2020-02-04 14:52:28 +01:00
|
|
|
#
|
|
|
|
# spec file for package elfutils-debuginfod
|
|
|
|
#
|
2022-02-28 19:43:04 +01:00
|
|
|
# Copyright (c) 2022 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
|
2022-04-30 22:51:54 +02:00
|
|
|
Version: 0.187
|
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
|
|
|
|
Source: https://fedorahosted.org/releases/e/l/elfutils/%{version}/elfutils-%{version}.tar.bz2
|
|
|
|
Source1: https://fedorahosted.org/releases/e/l/elfutils/%{version}/elfutils-%{version}.tar.bz2.sig
|
|
|
|
Source2: elfutils.changes
|
|
|
|
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
|
|
|
|
Patch2: config-Move-the-2-dev-null-inside-the-sh-c-quotes-fo.patch
|
2022-08-18 16:48:43 +02:00
|
|
|
Patch3: PR29474-debuginfod.patch
|
|
|
|
Patch4: support-nullglob-in-profile.-.in-files.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
|
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: sysconfig
|
|
|
|
Requires(post): %fillup_prereq
|
|
|
|
%{?systemd_requires}
|
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
|
2022-08-18 16:48:43 +02:00
|
|
|
Recommends: debuginfod-profile
|
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}
|
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
|
2020-02-04 14:52:28 +01:00
|
|
|
# Change DATE/TIME macros to use last change time of elfutils.changes
|
|
|
|
# See http://lists.opensuse.org/opensuse-factory/2011-05/msg00304.html
|
|
|
|
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
|
|
|
|
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
|
|
|
|
TIME="\"$(date -d "${modified}" "+%%R")\""
|
|
|
|
find . -type f -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
|
|
|
|
# Set modversion used to verify dynamically loaded ebl backend matches to
|
|
|
|
# similarly predictable value [upstream default is hostname + date]
|
|
|
|
MODVERSION="suse-build `eval echo ${DATE} ${TIME}`"
|
|
|
|
sed --in-place "s/^MODVERSION=.*\$/MODVERSION=\"${MODVERSION}\"/" configure.ac
|
|
|
|
export CFLAGS="%optflags"
|
2021-11-15 15:25:59 +01:00
|
|
|
CFLAGS+=" -g" # tests need debug info enabled (boo#1031556)
|
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
|
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
|
|
|
|
%config %{_sysconfdir}/debuginfod/elfutils.urls
|
|
|
|
|
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
|