-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlttng-ust.spec
289 lines (255 loc) · 10.3 KB
/
lttng-ust.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
#
# Conditional build:
%bcond_without java # JNI interface [builds with java-sun 1.6, but not gcj 4.9]
%bcond_without python # Python agent
%bcond_without systemtap # SystemTap integration
%bcond_without static_libs # static libraries
#
Summary: LTTng Userspace Tracer
Summary(pl.UTF-8): LTTng Userspace Tracer - narzędzia LTTng do śledzenia przestrzeni użytkownika
Name: lttng-ust
Version: 2.13.9
Release: 1
License: LGPL v2.1 (library), MIT (headers), GPL v2 (programs)
Group: Libraries
Source0: https://lttng.org/files/lttng-ust/%{name}-%{version}.tar.bz2
# Source0-md5: ab3bc006eb182bccd94aa0ead99c7201
Patch0: %{name}-link.patch
Patch2: %{name}-python.patch
URL: https://lttng.org/
BuildRequires: autoconf >= 2.69
BuildRequires: automake >= 1:1.12
# for examples build
BuildRequires: cmake >= 2.8.11
BuildRequires: libstdc++-devel >= 6:4.7
BuildRequires: libtool >= 2:2
BuildRequires: numactl-devel
BuildRequires: pkgconfig
%{?with_python:BuildRequires: python >= 1:2.7}
%{?with_python:BuildRequires: python-modules >= 1:2.7}
BuildRequires: rpmbuild(macros) >= 1.294
BuildRequires: sed >= 4.0
%{?with_systemtap:BuildRequires: systemtap-sdt-devel}
BuildRequires: userspace-rcu-devel >= 0.13
%if %{with java}
BuildRequires: java-log4j
BuildRequires: jdk
BuildRequires: jpackage-utils
%endif
Requires: userspace-rcu >= 0.13
ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 mips ppc ppc64 s390 s390x tile
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# non-function rcu_reader_bp symbol
%define skip_post_check_so_1 liblttng-ust\.so.* liblttng-ust-cyg-profile\.so.* liblttng-ust-cyg-profile-fast\.so.* liblttng-ust-dl\.so.* liblttng-ust-java\.so.* liblttng-ust-python-agent\.so.* liblttng-ust-tracepoint\.so.*
# non-function lttng_ust_context_info_tls symbol
%define skip_post_check_so_2 liblttng-ust-jul-jni\.so.* liblttng-ust-log4j-jni\.so.*
# lttng_ust_sigbus_state symbol must be defined in executable
%define skip_post_check_so_3 liblttng-ust-ctl\.so.*
%define skip_post_check_so %{skip_post_check_so_1} %{skip_post_check_so_2} %{skip_post_check_so_3}
%description
The LTTng Userspace Tracer (UST) is a library accompanied by a set of
tools to trace userspace code.
%description -l pl.UTF-8
LTTng Userspace Tracer (UST) to biblioteka, której towarzyszą
narzędzia do śledzenia kodu w przestrzeni użytkownika.
%package devel
Summary: Header files for LTTNG-UST libraries
Summary(pl.UTF-8): Pliki nagłówkowe bibliotek LTTNG-UST
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: userspace-rcu-devel >= 0.13
%{?with_systemtap:Requires: systemtap-sdt-devel}
%description devel
Header files for LTTNG-UST libraries.
%description devel -l pl.UTF-8
Pliki nagłówkowe bibliotek LTTNG-UST.
%package static
Summary: Static LTTNG-UST libraries
Summary(pl.UTF-8): Statyczne biblioteki LTTNG-UST
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description static
Static LTTNG-UST libraries.
%description static -l pl.UTF-8
Statyczne biblioteki LTTNG-UST.
%package -n java-lttng-ust
Summary: JNI interface for LTTng Userspace Tracer library
Summary(pl.UTF-8): Interfejs JNI do biblioteki LTTng Userspace Tracer
Group: Libraries/Java
Requires: %{name} = %{version}-%{release}
%description -n java-lttng-ust
JNI interface for LTTng Userspace Tracer library.
%description -n java-lttng-ust -l pl.UTF-8
Interfejs JNI do biblioteki LTTng Userspace Tracer.
%package -n python-lttng-ust
Summary: Python agent for LTTng Userspace Tracer library
Summary(pl.UTF-8): Agent Pythona do biblioteki LTTng Userspace Tracer
Group: Libraries/Python
Requires: %{name} = %{version}-%{release}
%description -n python-lttng-ust
Python agent for LTTng Userspace Tracer library.
%description -n python-lttng-ust -l pl.UTF-8
Agent Pythona do biblioteki LTTng Userspace Tracer.
%prep
%setup -q
%patch -P0 -p1
%patch -P2 -p1
%{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' tools/lttng-gen-tp
%build
%{__libtoolize}
%{__aclocal} -I config
%{__autoconf}
%{__autoheader}
%{__automake}
export CLASSPATH=.:%{_javadir}/log4j.jar
%configure \
PYTHON=%{__python} \
%{?with_java:JAVA_HOME="%{java_home}" JAVAC=javac} \
--disable-silent-rules \
%{?with_java:--enable-jni-interface --enable-java-agent-all} \
%{?with_python:--enable-python-agent} \
%{?with_systemtap:--with-sdt} \
%{?with_static_libs:--enable-static}
%{__make} -j1
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
lttnglibjavadir=%{_javadir}
# *.la kept - no .pc files for individual libraries
install -d $RPM_BUILD_ROOT%{_examplesdir}
%{__mv} $RPM_BUILD_ROOT%{_docdir}/lttng-ust/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
# packaged as %doc
%{__rm} $RPM_BUILD_ROOT%{_docdir}/lttng-ust/{ChangeLog,README.md,java-agent.txt}
%if %{with java}
%{__rm} $RPM_BUILD_ROOT%{_libdir}/liblttng-ust-{context-jni,java,jul-jni,log4j-jni}.la \
%{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/liblttng-ust-{context-jni,java,jul-jni,log4j-jni}.a}
%endif
%if %{with python}
%{__rm} $RPM_BUILD_ROOT%{_libdir}/liblttng-ust-python-agent.la \
%{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/liblttng-ust-python-agent.a}
%py_postclean
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n java-lttng-ust -p /sbin/ldconfig
%postun -n java-lttng-ust -p /sbin/ldconfig
%post -n python-lttng-ust -p /sbin/ldconfig
%postun -n python-lttng-ust -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
%doc ChangeLog LICENSE README.md
%attr(755,root,root) %{_libdir}/liblttng-ust.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust.so.1
%attr(755,root,root) %{_libdir}/liblttng-ust-common.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-common.so.1
%attr(755,root,root) %{_libdir}/liblttng-ust-ctl.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-ctl.so.5
%attr(755,root,root) %{_libdir}/liblttng-ust-cyg-profile.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-cyg-profile.so.1
%attr(755,root,root) %{_libdir}/liblttng-ust-cyg-profile-fast.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-cyg-profile-fast.so.1
%attr(755,root,root) %{_libdir}/liblttng-ust-dl.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-dl.so.1
%attr(755,root,root) %{_libdir}/liblttng-ust-fd.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-fd.so.1
%attr(755,root,root) %{_libdir}/liblttng-ust-fork.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-fork.so.1
%attr(755,root,root) %{_libdir}/liblttng-ust-libc-wrapper.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-libc-wrapper.so.1
%attr(755,root,root) %{_libdir}/liblttng-ust-pthread-wrapper.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-pthread-wrapper.so.1
%attr(755,root,root) %{_libdir}/liblttng-ust-tracepoint.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-tracepoint.so.1
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/lttng-gen-tp
%attr(755,root,root) %{_libdir}/liblttng-ust.so
%attr(755,root,root) %{_libdir}/liblttng-ust-common.so
%attr(755,root,root) %{_libdir}/liblttng-ust-ctl.so
%attr(755,root,root) %{_libdir}/liblttng-ust-cyg-profile.so
%attr(755,root,root) %{_libdir}/liblttng-ust-cyg-profile-fast.so
%attr(755,root,root) %{_libdir}/liblttng-ust-dl.so
%attr(755,root,root) %{_libdir}/liblttng-ust-fd.so
%attr(755,root,root) %{_libdir}/liblttng-ust-fork.so
%attr(755,root,root) %{_libdir}/liblttng-ust-libc-wrapper.so
%attr(755,root,root) %{_libdir}/liblttng-ust-pthread-wrapper.so
%attr(755,root,root) %{_libdir}/liblttng-ust-tracepoint.so
%{_libdir}/liblttng-ust.la
%{_libdir}/liblttng-ust-common.la
%{_libdir}/liblttng-ust-ctl.la
%{_libdir}/liblttng-ust-cyg-profile.la
%{_libdir}/liblttng-ust-cyg-profile-fast.la
%{_libdir}/liblttng-ust-dl.la
%{_libdir}/liblttng-ust-fd.la
%{_libdir}/liblttng-ust-fork.la
%{_libdir}/liblttng-ust-libc-wrapper.la
%{_libdir}/liblttng-ust-pthread-wrapper.la
%{_libdir}/liblttng-ust-tracepoint.la
%{_includedir}/lttng
%{_pkgconfigdir}/lttng-ust.pc
%{_pkgconfigdir}/lttng-ust-ctl.pc
%{_mandir}/man1/lttng-gen-tp.1*
%{_mandir}/man3/do_tracepoint.3*
%{_mandir}/man3/lttng-ust.3*
%{_mandir}/man3/lttng-ust-cyg-profile.3*
%{_mandir}/man3/lttng-ust-dl.3*
%{_mandir}/man3/lttng_ust_*.3*
%{_mandir}/man3/tracef.3*
%{_mandir}/man3/tracelog.3*
%{_mandir}/man3/tracepoint.3*
%{_mandir}/man3/tracepoint_enabled.3*
%{_examplesdir}/%{name}-%{version}
%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/liblttng-ust.a
%{_libdir}/liblttng-ust-common.a
%{_libdir}/liblttng-ust-ctl.a
%{_libdir}/liblttng-ust-cyg-profile.a
%{_libdir}/liblttng-ust-cyg-profile-fast.a
%{_libdir}/liblttng-ust-dl.a
%{_libdir}/liblttng-ust-fd.a
%{_libdir}/liblttng-ust-fork.a
%{_libdir}/liblttng-ust-libc-wrapper.a
%{_libdir}/liblttng-ust-pthread-wrapper.a
%{_libdir}/liblttng-ust-tracepoint.a
%endif
%if %{with java}
%files -n java-lttng-ust
%defattr(644,root,root,755)
%doc doc/java-agent.txt
%attr(755,root,root) %{_libdir}/liblttng-ust-context-jni.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-context-jni.so.0
%attr(755,root,root) %{_libdir}/liblttng-ust-context-jni.so
%attr(755,root,root) %{_libdir}/liblttng-ust-java.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-java.so.0
%attr(755,root,root) %{_libdir}/liblttng-ust-java.so
%attr(755,root,root) %{_libdir}/liblttng-ust-jul-jni.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-jul-jni.so.0
%attr(755,root,root) %{_libdir}/liblttng-ust-jul-jni.so
%attr(755,root,root) %{_libdir}/liblttng-ust-log4j-jni.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-log4j-jni.so.0
%attr(755,root,root) %{_libdir}/liblttng-ust-log4j-jni.so
%{_javadir}/liblttng-ust-agent.jar
%{_javadir}/liblttng-ust-java.jar
%{_javadir}/lttng-ust-agent-all-1.0.0.jar
%{_javadir}/lttng-ust-agent-all.jar
%{_javadir}/lttng-ust-agent-common-1.0.0.jar
%{_javadir}/lttng-ust-agent-common.jar
%{_javadir}/lttng-ust-agent-jul-1.0.0.jar
%{_javadir}/lttng-ust-agent-jul.jar
%{_javadir}/lttng-ust-agent-log4j-1.0.0.jar
%{_javadir}/lttng-ust-agent-log4j.jar
%endif
%if %{with python}
%files -n python-lttng-ust
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/liblttng-ust-python-agent.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblttng-ust-python-agent.so.1
%attr(755,root,root) %{_libdir}/liblttng-ust-python-agent.so
%{py_sitescriptdir}/lttngust
%{py_sitescriptdir}/lttngust-%{version}-py*.egg-info
%endif