# git tag %global git_commit 93f4d523856710929c715f8124b219e17da735df %global git_commitdate 20220922.152943 %global git_shortcommit 93f4d52 # too many weird issues with dependencies, turning this off for now - Aug 20, 2021 -JAH %undefine _smp_mflags # LTO causes linking issues randomly like # lto1: internal compiler error: resolution sub id 0x7136344381f3059f not in object file # So disabling LTO at this moment. %global _lto_cflags %nil Name: libtracefs Version: 1.5.0 Release: 202209281627%{?dist} License: LGPLv2+ and GPLv2+ Summary: Library for access kernel tracefs URL: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ # If upstream does not provide tarballs, to generate: # git clone git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git # cd libtracefs # git archive --prefix=libtracefs-%%{version}/ -o libtracefs-%%{version}.tar.gz %%{git_commit} #Source0: libtracefs-%%{version}.tar.gz #Source0: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-%%{commit}.tar.gz Source0: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-%{version}.tar.gz #Patch0: 0001-libtracefs-allow-pthread-inclusion-overrideable-in-M.patch BuildRequires: gcc BuildRequires: make BuildRequires: valgrind BuildRequires: valgrind-devel BuildRequires: pkgconfig(libtraceevent) >= 1.2 BuildRequires: bison BuildRequires: flex BuildRequires: glibc BuildRequires: glibc-devel # The libtracefs is meant to be used by perf, trace-cmd etc. in the future, before it's ready in perf, let's add a conflict Conflicts: trace-cmd < 2.9.1-6 %if 0%{?is_opensuse} == 1 Obsoletes: libtracefs1 %endif %description libtracefs is a library for accessing kernel tracefs %package devel Summary: Development headers for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %package static Summary: Static variant of %{name} Requires: %{name}-devel = %{version}-%{release} %description devel Development headers for %{name} %description static Static variant of %{name} %prep %autosetup -p1 %build %set_build_flags rpm --showrc #define ccbase %( basename %%{__cc} ) #echo "ccbase: " %{ccbase} #echo "CC: " %{__cc} #echo "CC2: ${CC}" ccbase=$( basename "${CC}" ) if [[ "${ccbase}" == "clang" ]] then clangver=$( ${CC} --version | head -n 1 | tr " " "\n" | grep -A 1 "version" | tail -n 1 | cut -f 1 -d '.' ) echo "clangver: " ${clangver} if (( ${clangver} < 14 )) then echo "clangver < 14" LPTHREAD="" export LPTHREAD fi fi %make_build prefix=%{_prefix} libdir=%{_libdir} all %install %make_install prefix=%{_prefix} libdir=%{_libdir} %files %license LICENSES/LGPL-2.1 %license LICENSES/GPL-2.0 %{_libdir}/%{name}.so.* %files devel %{_includedir}/tracefs/ %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/%{name}.so %files static %{_libdir}/libtracefs.a %changelog * Sat Jun 25 2022 John 'Warthog9' Hawley (VMware) 1.4.1-1 - Updating to 1.4.1 * Tue Jul 27 2021 John 'Warthog9' Hawley (VMware) 1.2.3-4 - Reverting the include path "fix" * Mon Jul 26 2021 John 'Warthog9' Hawley (VMware) 1.2.3-4 - Adding back patch to set the include path * Mon Jul 26 2021 John 'Warthog9' Hawley (VMware) 1.2.3-2 - Switching out patches for upstream one that resolves the location issue * Mon Jul 19 2021 John 'Warthog9' Hawley (VMware) 1.2.3-1 - Updating to 1.2.3 * Mon Jul 12 2021 John 'Warthog9' Hawley (VMware) 1.2.2-1 - Updating to 1.2.2 - Adding static package - Adding valgrind-devel to make sure all build dependencies are present before compilation * Mon Apr 19 2021 Zamir SUN - 1.1.1-1 - Update to 1.1.1 * Wed Mar 24 2021 Jerome Marchand - 1.0.2-2 - Remove conflict for latest trace-cmd * Mon Feb 08 2021 Zamir SUN - 1.0.2-1 - Update to 1.0.2 * Mon Nov 23 2020 Zamir SUN - 0-0.1.20201120git4f24f98 - Initial libtracefs