diff --git a/lttng-ust.changes b/lttng-ust.changes index 3f2ee91..adfa3dc 100644 --- a/lttng-ust.changes +++ b/lttng-ust.changes @@ -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 diff --git a/lttng-ust.spec b/lttng-ust.spec index f8bbba6..280e017 100644 --- a/lttng-ust.spec +++ b/lttng-ust.spec @@ -22,9 +22,9 @@ Name: lttng-ust Version: 2.10.1 Release: 0 Summary: Linux Trace Toolkit Userspace Tracer library -License: GPL-2.0 +License: GPL-2.0-only 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 Source1: https://lttng.org/files/lttng-ust/lttng-ust-%{version}.tar.bz2.asc Source2: %{name}.keyring @@ -33,6 +33,7 @@ Patch0: lttng-ust-copying.patch BuildRequires: gcc-c++ BuildRequires: liburcu-devel BuildRequires: pkgconfig +BuildRequires: python3 BuildRequires: pkgconfig(uuid) 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 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 Summary: Linux Trace Toolkit Userspace Tracer library Group: Development/Languages/C and C++ Requires: liblttng-ust%{sover} = %{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. Provides: %{name} = %{version} Obsoletes: %{name} < %{version} @@ -74,6 +95,7 @@ Summary: Linux Trace Toolkit Userspace Tracer Documentation Group: Documentation/Other Requires: liblttng-ust%{sover} = %{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. Provides: %{name}-docs = %{version} Obsoletes: %{name}-docs < %{version} @@ -86,16 +108,18 @@ applications using LTTng userspace tracing. %setup -q %patch0 -p1 -# Fix env shebang +# Fix Python shebang. sed -i -e "1s|^#!.*$|#!%{_bindir}/python3|" tools/lttng-gen-tp %build +export PYTHON=python3 %configure \ --disable-silent-rules \ --docdir=%{_docdir}/%{name} \ --disable-static \ - --disable-maintainer-mode -make %{?_smp_mflags} + --disable-maintainer-mode \ + --enable-python-agent +make %{?_smp_mflags} V=1 %install %make_install @@ -103,10 +127,17 @@ find %{buildroot} -type f -name "*.la" -delete -print rm -rf %{buildroot}/tmp/lttng-ust-divert %post -n liblttng-ust%{sover} -p /sbin/ldconfig + %postun -nliblttng-ust%{sover} -p /sbin/ldconfig + %post -n liblttng-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} %{_libdir}/liblttng-ust.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} %{_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 %{_includedir}/lttng/ %{_bindir}/lttng-gen-tp