# git tag %global git_commit 160a35f5795e1106b861fac6ad931a6b6011973a %global git_commitdate 20220929.044456 %global git_shortcommit 160a35f %global git_organization vmware %global srcversion %{git_commitdate}.%{git_shortcommit} # So we want to make sure we can pull the source from upstream %global _disable_source_fetch 0 # This is slightly obnoxious, but need a way to redefine what CFLAGS # get passed to change flto=auto to flto %global _lto_cflags -flto -ffat-lto-objects -flto-partition=one Name: trace-cruncher Version: %{srcversion} Release: 202210051912%{?dist} License: LGPLv2 Summary: NumPy based tracing interface Requires: libtracefs Requires: libtraceevent Requires: libtracecmd-1 Requires: libkshark Requires: python3-numpy Requires: json-c URL: https://github.com/vmware/trace-cruncher # If upstream does not provide tarballs, to generate: # git clone https://github.com/vmware/trace-cruncher.git # cd trace-cruncher # git archive --prefix=trace-cruncher-%%{version}/ -o trace-cruncher-%%{version}.tar.gz %%{git_commit} #Source0: https://github.com/vmware/trace-cruncher.git Source0: trace-cruncher-%{git_commit}.tar.gz #Patch0: trace-cruncher-cythonize.patch BuildRequires: gcc BuildRequires: python3-devel BuildRequires: libtracefs-devel BuildRequires: libtraceevent-devel BuildRequires: libtracecmd-1-devel BuildRequires: libkshark-devel BuildRequires: python3-Cython BuildRequires: python3-numpy BuildRequires: python3-pkgconfig BuildRequires: strace BuildRequires: python3-pip BuildRequires: json-c-devel BuildRequires: python3-setuptools BuildRequires: chrpath BuildRequires: binutils-devel %description Trace-Cruncher provides an interface between the existing instrumentation for collection and visualization of Linux kernel tracing data and the ecosystem of instruments for data analysis available in Python. The interface is based on NumPy. %prep %autosetup -p1 -n %{name}-%{git_commit} #mv %{_builddir}/%{git_organization}-%{name}-%{git_commit}/tests %{_builddir}/%{git_organization}-%{name}-%{git_commit}/tracecruncher/ %build %make_build %py3_build %install %py3_install chrpath --delete $RPM_BUILD_ROOT%{python3_sitearch}/tracecruncher/*.so %files #doc COPYING COPYING.LIB README #{_bindir}/trace-cmd #{_mandir}/man1/%{name}* #{_mandir}/man5/%{name}* #{_sysconfdir}/bash_completion.d/trace-cmd.bash %{python3_sitearch}/tracecruncher* %changelog * Fri Mar 25 2022 John 'Warthog9' Hawley (VMware) 0.2.0-1 - Updating to 0.2.0 - Adding the _lto_cflags - chrpathing the .so's - this is effectively a requirement of Fedora * Mon Jul 12 2021 John 'Warthog9' Hawley (VMware) 0.01-1 - Initial build at 0.01-1 @ 3fc44e4d189f18ece905c2668aadc27765a73574