Blame SPECS/oprofile.spec

1e930f
%{?scl:%scl_package oprofile}
1e930f
1e930f
Summary: System wide profiler
1e930f
Name: %{?scl_prefix}oprofile
1e930f
Version: 1.2.0
1e930f
Release: 1%{?dist}
1e930f
License: GPLv2+ and LGPLv2+
1e930f
Group: Development/System
1e930f
#
1e930f
Source0: http://downloads.sourceforge.net/oprofile/oprofile-%{version}.tar.gz
1e930f
#FIXME a workaround until java-1.6.0-openjdk-devel is available on all archs
1e930f
Source1: openjdk-include.tar.gz
1e930f
Requires: binutils
1e930f
Requires: which
1e930f
Requires(pre): shadow-utils
1e930f
Requires(postun): shadow-utils
1e930f
%{?scl:Requires:%scl_runtime}
1e930f
1e930f
URL: http://oprofile.sf.net
1e930f
1e930f
#If oprofile doesn't build on an arch, report it and will add ExcludeArch tag.
1e930f
BuildRequires: qt-devel
1e930f
BuildRequires: libxslt
1e930f
BuildRequires: docbook-style-xsl
1e930f
BuildRequires: docbook-utils
1e930f
BuildRequires: elinks
1e930f
BuildRequires: gtk2-devel
1e930f
BuildRequires: automake
1e930f
BuildRequires: libtool
1e930f
%if 0%{?rhel} >= 7 || 0%{?fedora} >= 15
1e930f
BuildRequires: binutils-static
1e930f
BuildRequires: libpfm-devel >= 4.3.0
1e930f
%else
1e930f
BuildRequires: %{?scl_prefix}binutils-devel
1e930f
BuildRequires: binutils-devel
1e930f
%endif
1e930f
%if 0%{?rhel} == 6
1e930f
%ifnarch s390x s390
1e930f
BuildRequires: papi-devel
1e930f
%endif
1e930f
%endif
1e930f
%if 0%{?rhel} >= 6
1e930f
BuildRequires: popt-devel
1e930f
%else
1e930f
BuildRequires: popt
1e930f
%endif
1e930f
1e930f
#BuildRequires: java-devel
1e930f
#BuildRequires: jpackage-utils
1e930f
#BuildRequires: java-1.6.0-openjdk-devel
1e930f
1e930f
BuildRoot: %{_tmppath}/%{name}-root
1e930f
1e930f
%description
1e930f
OProfile is a profiling system for systems running Linux. The
1e930f
profiling runs transparently during the background, and profile data
1e930f
can be collected at any time. OProfile makes use of the hardware performance
1e930f
counters provided on Intel P6, and AMD Athlon family processors, and can use
1e930f
the RTC for profiling on other x86 processor types.
1e930f
1e930f
See the HTML documentation for further details.
1e930f
1e930f
%package devel
1e930f
Summary: Header files and libraries for developing apps which will use oprofile
1e930f
Group: Development/Libraries
1e930f
Requires: %{?scl_prefix}oprofile = %{version}-%{release}
1e930f
Provides: %{?scl_prefix}oprofile-static = %{version}-%{release}
1e930f
1e930f
%description devel
1e930f
1e930f
Header files and libraries for developing apps which will use oprofile.
1e930f
1e930f
%package jit
1e930f
Summary: Libraries required for profiling Java and other JITed code
1e930f
Group: Development/System
1e930f
Requires: %{?scl_prefix}oprofile = %{version}-%{release}
1e930f
#Requires: java >= 1.6
1e930f
#Requires: jpackage-utils
1e930f
Requires(post): /sbin/ldconfig
1e930f
Requires(postun): /sbin/ldconfig
1e930f
Requires: /etc/ld.so.conf.d
1e930f
1e930f
%description jit
1e930f
This package includes a base JIT support library, as well as a Java
1e930f
agent library.
1e930f
1e930f
%prep
1e930f
%setup -q -n oprofile-%{version} -a1
1e930f
1e930f
./autogen.sh
1e930f
1e930f
%build
1e930f
1e930f
%configure \
1e930f
--with-java=`pwd`/java-1.6.0-openjdk-1.6.0.0
1e930f
1e930f
make CFLAGS="$RPM_OPT_FLAGS"
1e930f
1e930f
#tweak the manual pages
1e930f
find -path "*/doc/*.1" -exec \
1e930f
    sed -i -e \
1e930f
     's,/doc/oprofile/,/doc/oprofile-%{version}/,g' {} \;
1e930f
1e930f
%install
1e930f
rm -rf %{buildroot}
1e930f
1e930f
mkdir -p %{buildroot}%{_bindir}
1e930f
mkdir -p %{buildroot}%{_mandir}/man1
1e930f
1e930f
make DESTDIR=%{buildroot} INSTALL="install -p" install
1e930f
1e930f
# We want the manuals in the special doc dir, not the generic doc install dir.
1e930f
# We build it in place and then move it away so it doesn't get installed
1e930f
# twice. rpm can specify itself where the (versioned) docs go with the
1e930f
# %%doc directive.
1e930f
mkdir docs.installed
1e930f
mv %{buildroot}%{_datadir}/doc/oprofile/* docs.installed/
1e930f
1e930f
%if 0%{?scl:1}
1e930f
# if developer tools set need to put the agentlib in an appropriate place
1e930f
mv %{buildroot}%{_libdir}/oprofile/* %{buildroot}%{_libdir}
1e930f
rmdir %{buildroot}%{_libdir}/oprofile
1e930f
%else
1e930f
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
1e930f
echo "%{_libdir}/oprofile" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/oprofile-%{_arch}.conf
1e930f
%endif
1e930f
1e930f
1e930f
%pre
1e930f
getent group oprofile >/dev/null || groupadd -r -g 16 oprofile
1e930f
getent passwd oprofile >/dev/null || \
1e930f
useradd -g oprofile -d /var/lib/oprofile -M -r -u 16 -s /sbin/nologin \
1e930f
    -c "Special user account to be used by OProfile" oprofile
1e930f
exit 0
1e930f
1e930f
%postun
1e930f
# do not try to remove existing oprofile user or group
1e930f
1e930f
%files
1e930f
%defattr(-,root,root)
1e930f
%doc  docs.installed/*
1e930f
%doc COPYING
1e930f
1e930f
%{_bindir}/*
1e930f
1e930f
%{_mandir}/man1/*
1e930f
1e930f
%{_datadir}/oprofile
1e930f
1e930f
%files devel
1e930f
%defattr(-,root,root)
1e930f
1e930f
%{_includedir}/opagent.h
1e930f
1e930f
%post jit -p /sbin/ldconfig
1e930f
1e930f
%postun jit -p /sbin/ldconfig
1e930f
1e930f
%files jit
1e930f
%defattr(-,root,root)
1e930f
1e930f
%if 0%{?scl:1}
1e930f
%{_libdir}/*
1e930f
%else
1e930f
%{_libdir}/oprofile
1e930f
%{_sysconfdir}/ld.so.conf.d/*
1e930f
%endif
1e930f
1e930f
%changelog
1e930f
* Wed Jul 26 2017 William Cohen <wcohen@redhat.com> - 1.2.0-1
1e930f
- Rebase to oprofile-1.2.0.
1e930f
1e930f
* Fri Jun 16 2017 Will Cohen <wcohen@redhat.com> - 1.2.0-0.20170616git647ca9d0
1e930f
- Rebuild on oprofile git snapshot.
1e930f
1e930f
* Wed Oct 12 2016 Will Cohen <wcohen@redhat.com> - 1.1.0-4
1e930f
- Update events non-x86 architectures (aarch64, power, zseries)
1e930f
- Add support for newer Intel processors.
1e930f
1e930f
* Thu Sep 15 2016 Will Cohen <wcohen@redhat.com> - 1.1.0-3
1e930f
- Avoid duplicate event names for Nehalem and Westmere processors.
1e930f
1e930f
* Thu Aug 13 2015 Will Cohen <wcohen@redhat.com> - 1.1.0-2
1e930f
- Locate jvm agent libjvmti in a LD_LIBRARY_PATH directory.
1e930f
1e930f
* Tue Jul 21 2015 Will Cohen <wcohen@redhat.com> - 1.1.0-1
1e930f
- Rebase to oprofile-1.1.0.
1e930f
1e930f
* Thu Apr 23 2015 Will Cohen <wcohen@redhat.com> - 0.9.9-7
1e930f
- LLC_REFS and LLC_MISSES do not work on some CPUs.
1e930f
- incorrect handling of default unit masks longer than 11 characters
1e930f
- Oprofile updates for Avoton
1e930f
- Unable to profile jited JVM code when using static huge pages
1e930f
- operf causes rpmbuild to fail
1e930f
1e930f
* Wed Sep 17 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-6
1e930f
- Update support for Intel Silvermont (Avoton).
1e930f
- Enable configure for ppc64le.
1e930f
1e930f
* Mon Aug 18 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-5
1e930f
- Update Intel Haswell events.
1e930f
- Add support for Intel Silvermont (Avoton).
1e930f
- Add support for Intel Broadwell.
1e930f
- Add support for aarch64.
1e930f
- Update IBM power8 events.
1e930f
1e930f
* Wed May 28 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-2.1
1e930f
- Correct xml output.
1e930f
1e930f
* Fri May 16 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-1.1
1e930f
- Rebase on oprofile-0.9.9.