Alexei Sorokin 2018-04-09 18:00:07 +00:00 committed by Git OBS Bridge
parent e4016d0844
commit c9f51d3dd2
2 changed files with 49 additions and 5 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Apr 8 15:47:49 UTC 2018 - sor.alexei@meowr.ru
- Build the Python agent and add new subpackages: python3-lttngust
and liblttng-ust-python-agent0.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jan 19 11:50:18 UTC 2018 - tchvatal@suse.com Fri Jan 19 11:50:18 UTC 2018 - tchvatal@suse.com

View File

@ -22,9 +22,9 @@ Name: lttng-ust
Version: 2.10.1 Version: 2.10.1
Release: 0 Release: 0
Summary: Linux Trace Toolkit Userspace Tracer library Summary: Linux Trace Toolkit Userspace Tracer library
License: GPL-2.0 License: GPL-2.0-only
Group: Development/Languages/C and C++ Group: Development/Languages/C and C++
Url: https://lttng.org/ URL: https://lttng.org/
Source: https://lttng.org/files/lttng-ust/lttng-ust-%{version}.tar.bz2 Source: https://lttng.org/files/lttng-ust/lttng-ust-%{version}.tar.bz2
Source1: https://lttng.org/files/lttng-ust/lttng-ust-%{version}.tar.bz2.asc Source1: https://lttng.org/files/lttng-ust/lttng-ust-%{version}.tar.bz2.asc
Source2: %{name}.keyring Source2: %{name}.keyring
@ -33,6 +33,7 @@ Patch0: lttng-ust-copying.patch
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: liburcu-devel BuildRequires: liburcu-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: python3
BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(uuid)
ExclusiveArch: %{ix86} x86_64 aarch64 ppc64 ppc64le ExclusiveArch: %{ix86} x86_64 aarch64 ppc64 ppc64le
@ -56,11 +57,31 @@ Group: System/Libraries
This library may be used by user space applications to generate This library may be used by user space applications to generate
tracepoints within the kernel LTT subsystem. tracepoints within the kernel LTT subsystem.
%package -n liblttng-ust-python-agent%{sover}
Summary: Linux Trace Toolkit Userspace Tracer Python agent library
Group: System/Libraries
%description -n liblttng-ust-python-agent%{sover}
This library may be used by user space applications to generate
tracepoints within the kernel LTT subsystem.
%package -n python3-lttngust
Summary: Linux Trace Toolkit Userspace Tracer Python 3 agent
Group: Development/Languages/Python
Requires: liblttng-ust-python-agent%{sover} = %{version}
%description -n python3-lttngust
This library may be used by user space applications to generate
tracepoints within the kernel LTT subsystem.
This package provides the LLTng-UST Python 3 agent.
%package -n %{name}-devel %package -n %{name}-devel
Summary: Linux Trace Toolkit Userspace Tracer library Summary: Linux Trace Toolkit Userspace Tracer library
Group: Development/Languages/C and C++ Group: Development/Languages/C and C++
Requires: liblttng-ust%{sover} = %{version} Requires: liblttng-ust%{sover} = %{version}
Requires: liblttng-ust-ctl%{sover_ctl} = %{version} Requires: liblttng-ust-ctl%{sover_ctl} = %{version}
Requires: liblttng-ust-python-agent%{sover} = %{version}
# lttng-ust was last used in openSUSE Leap 42.3. # lttng-ust was last used in openSUSE Leap 42.3.
Provides: %{name} = %{version} Provides: %{name} = %{version}
Obsoletes: %{name} < %{version} Obsoletes: %{name} < %{version}
@ -74,6 +95,7 @@ Summary: Linux Trace Toolkit Userspace Tracer Documentation
Group: Documentation/Other Group: Documentation/Other
Requires: liblttng-ust%{sover} = %{version} Requires: liblttng-ust%{sover} = %{version}
Requires: liblttng-ust-ctl%{sover_ctl} = %{version} Requires: liblttng-ust-ctl%{sover_ctl} = %{version}
Requires: liblttng-ust-python-agent%{sover} = %{version}
# lttng-ust-docs was last used in openSUSE Leap 42.3. # lttng-ust-docs was last used in openSUSE Leap 42.3.
Provides: %{name}-docs = %{version} Provides: %{name}-docs = %{version}
Obsoletes: %{name}-docs < %{version} Obsoletes: %{name}-docs < %{version}
@ -86,16 +108,18 @@ applications using LTTng userspace tracing.
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
# Fix env shebang # Fix Python shebang.
sed -i -e "1s|^#!.*$|#!%{_bindir}/python3|" tools/lttng-gen-tp sed -i -e "1s|^#!.*$|#!%{_bindir}/python3|" tools/lttng-gen-tp
%build %build
export PYTHON=python3
%configure \ %configure \
--disable-silent-rules \ --disable-silent-rules \
--docdir=%{_docdir}/%{name} \ --docdir=%{_docdir}/%{name} \
--disable-static \ --disable-static \
--disable-maintainer-mode --disable-maintainer-mode \
make %{?_smp_mflags} --enable-python-agent
make %{?_smp_mflags} V=1
%install %install
%make_install %make_install
@ -103,10 +127,17 @@ find %{buildroot} -type f -name "*.la" -delete -print
rm -rf %{buildroot}/tmp/lttng-ust-divert rm -rf %{buildroot}/tmp/lttng-ust-divert
%post -n liblttng-ust%{sover} -p /sbin/ldconfig %post -n liblttng-ust%{sover} -p /sbin/ldconfig
%postun -nliblttng-ust%{sover} -p /sbin/ldconfig %postun -nliblttng-ust%{sover} -p /sbin/ldconfig
%post -n liblttng-ust-ctl%{sover_ctl} -p /sbin/ldconfig %post -n liblttng-ust-ctl%{sover_ctl} -p /sbin/ldconfig
%postun -nliblttng-ust-ctl%{sover_ctl} -p /sbin/ldconfig %postun -nliblttng-ust-ctl%{sover_ctl} -p /sbin/ldconfig
%post -n liblttng-ust-python-agent%{sover} -p /sbin/ldconfig
%postun -n liblttng-ust-python-agent%{sover} -p /sbin/ldconfig
%files -n liblttng-ust%{sover} %files -n liblttng-ust%{sover}
%{_libdir}/liblttng-ust.so.%{sover}* %{_libdir}/liblttng-ust.so.%{sover}*
%{_libdir}/liblttng-ust-cyg-profile*.so.%{sover}* %{_libdir}/liblttng-ust-cyg-profile*.so.%{sover}*
@ -120,6 +151,13 @@ rm -rf %{buildroot}/tmp/lttng-ust-divert
%files -n liblttng-ust-ctl%{sover_ctl} %files -n liblttng-ust-ctl%{sover_ctl}
%{_libdir}/liblttng-ust-ctl.so.%{sover_ctl}* %{_libdir}/liblttng-ust-ctl.so.%{sover_ctl}*
%files -n liblttng-ust-python-agent%{sover}
%{_libdir}/liblttng-ust-python-agent.so.%{sover}*
%files -n python3-lttngust
%{python3_sitelib}/lttngust/
%{python3_sitelib}/lttngust-*
%files -n %{name}-devel %files -n %{name}-devel
%{_includedir}/lttng/ %{_includedir}/lttng/
%{_bindir}/lttng-gen-tp %{_bindir}/lttng-gen-tp