File elfutils.spec of Package elfutils-debuginfod
xxxxxxxxxx
1
#
2
# spec file for package elfutils
3
#
4
# Copyright (c) 2021 SUSE LLC
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
19
Name: elfutils
20
Version: 0.185
21
Release: 0
22
Summary: Higher-level library to access ELF files
23
License: GPL-3.0-or-later
24
Group: Development/Tools/Building
25
URL: https://sourceware.org/elfutils/
26
#Git-Clone: git://sourceware.org/git/elfutils
27
Source: https://fedorahosted.org/releases/e/l/%{name}/%{version}/%{name}-%{version}.tar.bz2
28
Source1: README-BEFORE-ADDING-PATCHES
29
Source2: baselibs.conf
30
Source3: %{name}.changes
31
Source4: https://fedorahosted.org/releases/e/l/%{name}/%{version}/%{name}-%{version}.tar.bz2.sig
32
Source5: %{name}.keyring
33
Source6: elfutils-rpmlintrc
34
Patch0: disable-run-readelf-self-test.patch
35
Patch1: disable-run-deleted-test.patch
36
BuildRequires: autoconf
37
BuildRequires: automake
38
BuildRequires: bison
39
BuildRequires: flex
40
BuildRequires: libbz2-devel
41
BuildRequires: libzstd-devel
42
BuildRequires: xz-devel
43
BuildRequires: zlib-devel
44
45
%description
46
elfutils is a collection of utilities and libraries to read, create
47
and modify ELF binary files, find and handle DWARF debug data,
48
symbols, thread state and stacktraces for processes and core files.
49
50
%package -n libasm1
51
Summary: A collection of utilities and DSOs to handle compiled objects
52
Group: System/Libraries
53
License: GPL-2.0-or-later OR LGPL-3.0-or-later
54
55
%description -n libasm1
56
libasm contains the "asm" and "disasm" functions to assemble and
57
disassamble instructions. (There is only partial support for i686 and
58
BPF instructions.) This is part of the elfutils package.
59
60
%package -n libasm-devel
61
Summary: A collection of utilities and DSOs to handle compiled objects
62
Group: Development/Libraries/C and C++
63
Requires: glibc-devel
64
Requires: libasm1 = %{version}
65
License: GPL-2.0-or-later OR LGPL-3.0-or-later
66
67
%description -n libasm-devel
68
This package contains the headers and libraries needed to build
69
applications that require libasm.
70
71
%package -n libelf1
72
Summary: Library to read and write ELF files
73
Group: System/Libraries
74
License: GPL-2.0-or-later OR LGPL-3.0-or-later
75
76
%description -n libelf1
77
This package provides a high-level library to read and write ELF files.
78
This is part of the elfutils package.
79
80
%package -n libelf-devel
81
Summary: Development files for libelf
82
Group: Development/Libraries/C and C++
83
Requires: glibc-devel
84
Requires: libelf1 = %{version}
85
Conflicts: libelf0-devel
86
License: GPL-2.0-or-later OR LGPL-3.0-or-later
87
88
%description -n libelf-devel
89
This package contains the headers and libraries needed to build
90
applications that require libelf.
91
92
%package -n libdw1
93
Summary: Library to access DWARF debugging information
94
Group: System/Libraries
95
License: GPL-2.0-or-later OR LGPL-3.0-or-later
96
97
%description -n libdw1
98
This package provides a high-level library to access the DWARF debugging
99
information. This is part of the elfutils package.
100
101
%package -n libdw-devel
102
Summary: Development files for libdw
103
Group: Development/Libraries/C and C++
104
Requires: glibc-devel
105
Requires: libdw1 = %{version}
106
Requires: libelf-devel = %{version}
107
License: GPL-2.0-or-later OR LGPL-3.0-or-later
108
109
%description -n libdw-devel
110
This package contains the headers and libraries needed to build
111
applications that require libdw.
112
113
%package -n libdebuginfod1-dummy
114
Summary: Library for build-id HTTP ELF/DWARF server
115
Group: System/Libraries
116
Provides: libdebuginfod1 = %{version}
117
License: GPL-2.0-or-later OR LGPL-3.0-or-later
118
119
%description -n libdebuginfod1-dummy
120
The libdebuginfod1 package contains shared libraries
121
dynamically loaded from -ldw, which use a debuginfod service
122
to look up debuginfo and associated data. Also includes a
123
command-line frontend.
124
The package is dummy.
125
126
%package -n libdebuginfod-dummy-devel
127
Summary: Libraries and headers to build debuginfod client applications
128
Group: Development/Libraries/C and C++
129
Provides: libdebuginfod-devel = %{version}
130
License: GPL-2.0-or-later OR LGPL-3.0-or-later
131
132
%description -n libdebuginfod-dummy-devel
133
The libdebuginfod-devel package contains the libraries
134
to create applications to use the debuginfod service.
135
The package is dummy.
136
137
%package -n debuginfod-dummy-client
138
Summary: Command line client for build-id HTTP ELF/DWARF server
139
Group: Development/Tools/Building
140
Provides: debuginfod-client = %{version}
141
142
%description -n debuginfod-dummy-client
143
The elfutils-debuginfod-client package contains a command-line frontend.
144
The package is dummy.
145
146
%lang_package
147
148
%prep
149
%autosetup -p1
150
151
%build
152
%global _lto_cflags %{_lto_cflags} -flto-partition=none -Wno-error=stack-usage= -ffat-lto-objects
153
# Change DATE/TIME macros to use last change time of elfutils.changes
154
# See http://lists.opensuse.org/opensuse-factory/2011-05/msg00304.html
155
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
156
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
157
TIME="\"$(date -d "${modified}" "+%%R")\""
158
find . -type f -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
159
# Set modversion used to verify dynamically loaded ebl backend matches to
160
# similarly predictable value [upstream default is hostname + date]
161
MODVERSION="suse-build `eval echo ${DATE} ${TIME}`"
162
sed --in-place "s/^MODVERSION=.*\$/MODVERSION=\"${MODVERSION}\"/" configure.ac
163
export CFLAGS="%optflags"
164
CFLAGS+=" -g" # make tests pass when user does not want debuginfo (boo#1031556)
165
%ifarch %sparc
166
# Small PIC model not sufficient
167
CFLAGS+=" -fPIC"
168
%endif
169
autoreconf -fi
170
# some patches create new test scripts, which are created 644 by default
171
chmod a+x tests/run*.sh
172
%configure --program-prefix=eu- --disable-debuginfod --enable-libdebuginfod=dummy
173
%make_build
174
175
%install
176
%make_install
177
# remove unneeded files
178
rm -f %{buildroot}/%{_libdir}/*.la
179
rm -f %{buildroot}/%{_sysconfdir}/profile.d/debuginfod.*sh
180
rm -f %{buildroot}/%{_libdir}/pkgconfig/libdebuginfod.pc
181
ls -lR %{buildroot}/%{_libdir}/libelf*
182
%find_lang %{name}
183
184
%post -n libasm1 -p /sbin/ldconfig
185
%post -n libelf1 -p /sbin/ldconfig
186
%post -n libdw1 -p /sbin/ldconfig
187
%postun -n libasm1 -p /sbin/ldconfig
188
%postun -n libelf1 -p /sbin/ldconfig
189
%postun -n libdw1 -p /sbin/ldconfig
190
%post -n libdebuginfod1-dummy -p /sbin/ldconfig
191
%postun -n libdebuginfod1-dummy -p /sbin/ldconfig
192
193
%check
194
%if 0%{?qemu_user_space_build}
195
# qemu-linux-user does not support ptrace and a few other process details
196
export XFAIL_TESTS="dwfl-proc-attach run-backtrace-dwarf.sh run-backtrace-native.sh run-deleted.sh"
197
%endif
198
%make_build check
199
200
%files
201
%license COPYING
202
%doc AUTHORS ChangeLog NEWS NOTES README THANKS TODO
203
%{_bindir}/eu-addr2line
204
%{_bindir}/eu-ar
205
%{_bindir}/eu-elfclassify
206
%{_bindir}/eu-elfcmp
207
%{_bindir}/eu-elfcompress
208
%{_bindir}/eu-elflint
209
%{_bindir}/eu-findtextrel
210
%{_bindir}/eu-make-debug-archive
211
%{_bindir}/eu-nm
212
%{_bindir}/eu-objdump
213
%{_bindir}/eu-ranlib
214
%{_bindir}/eu-readelf
215
%{_bindir}/eu-size
216
%{_bindir}/eu-stack
217
%{_bindir}/eu-strings
218
%{_bindir}/eu-strip
219
%{_bindir}/eu-unstrip
220
%{_mandir}/man1/eu-*.1*
221
222
%files -n libasm1
223
%{_libdir}/libasm.so.*
224
%{_libdir}/libasm-%{version}.so
225
226
%files -n libasm-devel
227
%{_libdir}/libasm.so
228
%{_libdir}/libasm.a
229
%dir %{_includedir}/elfutils
230
%{_includedir}/elfutils/libasm.h
231
232
%files -n libelf1
233
%{_libdir}/libelf.so.*
234
%{_libdir}/libelf-%{version}.so
235
236
%files -n libelf-devel
237
%{_libdir}/libelf.so
238
%{_libdir}/libelf.a
239
%{_includedir}/libelf.h
240
%{_includedir}/gelf.h
241
%{_includedir}/nlist.h
242
%dir %{_includedir}/elfutils
243
%{_includedir}/elfutils/elf-knowledge.h
244
%{_includedir}/elfutils/version.h
245
%{_libdir}/pkgconfig/libelf.pc
246
%{_mandir}/man3/elf_*.3*
247
248
%files -n libdw1
249
%{_libdir}/libdw.so.*
250
%{_libdir}/libdw-%{version}.so
251
252
%files -n libdw-devel
253
%{_libdir}/libdw.a
254
%{_libdir}/libdw.so
255
%{_includedir}/dwarf.h
256
%dir %{_includedir}/elfutils
257
%{_includedir}/elfutils/libdw.h
258
%{_includedir}/elfutils/libdwelf.h
259
%{_includedir}/elfutils/libdwfl.h
260
%{_includedir}/elfutils/known-dwarf.h
261
%{_libdir}/pkgconfig/libdw.pc
262
263
%files -n libdebuginfod1-dummy
264
%{_libdir}/libdebuginfod.so.*
265
%{_libdir}/libdebuginfod-%{version}.so
266
267
%files -n libdebuginfod-dummy-devel
268
%{_mandir}/man3/debuginfod_*.3*
269
%dir %{_includedir}/elfutils
270
%{_includedir}/elfutils/debuginfod.h
271
%{_libdir}/libdebuginfod.so
272
273
%files -n debuginfod-dummy-client
274
%{_bindir}/debuginfod-find
275
%{_mandir}/man1/debuginfod-find.1*
276
277
%files lang -f %{name}.lang
278
279
%changelog
280