Blame SPECS/dyninst.spec

8da253
%{?scl:%scl_package dyninst}
8da253
8da253
Summary: An API for Run-time Code Generation
8da253
License: LGPLv2+
8da253
Name: %{?scl_prefix}dyninst
8da253
Group: Development/Libraries
8da253
Release: 1%{?dist}
8da253
URL: http://www.dyninst.org
8da253
Version: 9.3.2
8da253
Exclusiveos: linux
8da253
# Dyninst only has full support for a few architectures.
8da253
# It has some preliminary support for aarch64 and ppc64le,
8da253
# but we're waiting for those to be feature-complete.
8da253
ExclusiveArch: %{ix86} x86_64 ppc ppc64
8da253
8da253
Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz
8da253
# Explicit version since it does not match the source version
8da253
Source1: https://github.com/dyninst/testsuite/archive/v9.3.0/testsuite-9.3.0.tar.gz
8da253
8da253
Patch1: testsuite-9.3.0-junit-nullptr.patch
8da253
8da253
%global dyninst_base dyninst-%{version}
8da253
# Explicit version since it does not match the source version
8da253
%global testsuite_base testsuite-9.3.0
8da253
8da253
8da253
Source3: https://www.prevanders.net/libdwarf-20170416.tar.gz
8da253
BuildRequires: zlib-devel
8da253
# XXX: temporarily bundled
8da253
# BuildRequires: %{scl_prefix}libdwarf-devel >= 20111030
8da253
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
8da253
BuildRequires: elfutils-libelf-devel
8da253
BuildRequires: boost-devel
8da253
BuildRequires: binutils-devel
8da253
BuildRequires: cmake
8da253
%{?scl:Requires: %scl_runtime}
8da253
8da253
# Extra requires just for the testsuite
8da253
# NB, there's no separate libstdc++-static for <=el6
8da253
%if 0%{?rhel} >= 7
8da253
BuildRequires: libstdc++-static
8da253
%endif
8da253
BuildRequires: gcc-gfortran glibc-static nasm
8da253
8da253
# Testsuite files should not provide/require anything
8da253
%{?filter_setup:
8da253
%filter_provides_in %{_libdir}/dyninst/testsuite/
8da253
%filter_requires_in %{_libdir}/dyninst/testsuite/
8da253
%filter_setup
8da253
}
8da253
8da253
%description
8da253
8da253
Dyninst is an Application Program Interface (API) to permit the insertion of
8da253
code into a running program. The API also permits changing or removing
8da253
subroutine calls from the application program. Run-time code changes are
8da253
useful to support a variety of applications including debugging, performance
8da253
monitoring, and to support composing applications out of existing packages.
8da253
The goal of this API is to provide a machine independent interface to permit
8da253
the creation of tools and applications that use run-time code patching.
8da253
8da253
%package doc
8da253
Summary: Documentation for using the Dyninst API
8da253
Group: Documentation
8da253
%description doc
8da253
dyninst-doc contains API documentation for the Dyninst libraries.
8da253
8da253
%package devel
8da253
Summary: Header files for the compiling programs with Dyninst
8da253
Group: Development/System
8da253
Requires: %{?scl_prefix}dyninst = %{version}-%{release}
8da253
Requires: boost-devel
8da253
8da253
%description devel
8da253
dyninst-devel includes the C header files that specify the Dyninst user-space
8da253
libraries and interfaces. This is required for rebuilding any program
8da253
that uses Dyninst.
8da253
8da253
%package static
8da253
Summary: Static libraries for the compiling programs with Dyninst
8da253
Group: Development/System
8da253
Requires: %{?scl_prefix}dyninst-devel = %{version}-%{release}
8da253
%description static
8da253
dyninst-static includes the static versions of the library files for
8da253
the dyninst user-space libraries and interfaces.
8da253
8da253
%package testsuite
8da253
Summary: Programs for testing Dyninst
8da253
Group: Development/System
8da253
Requires: %{?scl_prefix}dyninst = %{version}-%{release}
8da253
Requires: %{?scl_prefix}dyninst-devel = %{version}-%{release}
8da253
Requires: %{?scl_prefix}dyninst-static = %{version}-%{release}
8da253
Requires: glibc-static
8da253
%description testsuite
8da253
dyninst-testsuite includes the test harness and target programs for
8da253
making sure that dyninst works properly.
8da253
8da253
%prep
8da253
%setup -q -n %{name}-%{version} -c
8da253
%setup -q -T -D -a 1
8da253
8da253
%patch1 -p0 -b .template-export
8da253
8da253
# XXX: bundled libdwarf
8da253
%setup -q -T -D -b 3
8da253
8da253
# cotire seems to cause non-deterministic gcc errors
8da253
# https://bugzilla.redhat.com/show_bug.cgi?id=1420551
8da253
sed -i.cotire -e 's/USE_COTIRE true/USE_COTIRE false/' \
8da253
  %{dyninst_base}/cmake/shared.cmake
8da253
8da253
%build
8da253
8da253
# bundled libdwarf build - assemble an .a archive, but built with -fPIC
8da253
pushd ../dwarf-20170416/libdwarf
8da253
libdwarf_builddir=`pwd`
8da253
%configure --disable-shared
8da253
make %{?_smp_mflags} dwfpic=-fPIC
8da253
popd
8da253
8da253
cd %{dyninst_base}
8da253
8da253
%cmake \
8da253
 -DENABLE_STATIC_LIBS=1 \
8da253
 -DCMAKE_BUILD_TYPE:STRING=None \
8da253
 -DINSTALL_LIB_DIR:PATH=%{_libdir}/dyninst \
8da253
 -DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \
8da253
 -DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \
8da253
 -DLIBDWARF_LIBRARIES:FILEPATH="$libdwarf_builddir/libdwarf.a;-lz" \
8da253
 -DLIBDWARF_INCLUDE_DIR:PATH=$libdwarf_builddir \
8da253
 -DBoost_NO_BOOST_CMAKE=ON \
8da253
 -DCMAKE_SKIP_RPATH:BOOL=YES
8da253
make %{?_smp_mflags}
8da253
8da253
# Hack to install dyninst nearby, so the testsuite can use it
8da253
make DESTDIR=../install install
8da253
find ../install -name '*.cmake' -execdir \
8da253
  sed -i -e 's!%{_prefix}!../install&!' '{}' '+'
8da253
8da253
cd ../%{testsuite_base}
8da253
%cmake \
8da253
 -DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \
8da253
 -DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \
8da253
 -DCMAKE_BUILD_TYPE:STRING=Debug \
8da253
 -DBoost_NO_BOOST_CMAKE=ON \
8da253
 -DCMAKE_SKIP_RPATH:BOOL=YES
8da253
make %{?_smp_mflags}
8da253
8da253
%install
8da253
8da253
cd %{dyninst_base}
8da253
make DESTDIR=$RPM_BUILD_ROOT install
8da253
8da253
# It doesn't install docs the way we want, so remove them.
8da253
# We'll just grab the pdfs later, directly from the build dir.
8da253
rm -v %{buildroot}%{_docdir}/*-%{version}.pdf
8da253
8da253
cd ../%{testsuite_base}
8da253
make DESTDIR=$RPM_BUILD_ROOT install
8da253
8da253
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
8da253
echo "%{_libdir}/dyninst" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
8da253
8da253
# Ugly hack to mask testsuite files from debuginfo extraction.  Running the
8da253
# testsuite requires debuginfo, so extraction is useless.  However, debuginfo
8da253
# extraction is still nice for the main libraries, so we don't want to disable
8da253
# it package-wide.  The permissions are restored by attr(755,-,-) in files.
8da253
find %{buildroot}%{_libdir}/dyninst/testsuite/ \
8da253
  -type f '!' -name '*.a' -execdir chmod 644 '{}' '+'
8da253
8da253
%post -p /sbin/ldconfig
8da253
%postun -p /sbin/ldconfig
8da253
8da253
%files
8da253
%defattr(-,root,root,-)
8da253
8da253
%dir %{_libdir}/dyninst
8da253
%{_libdir}/dyninst/*.so.*
8da253
8da253
%doc %{dyninst_base}/COPYRIGHT
8da253
%doc %{dyninst_base}/LGPL
8da253
8da253
%config(noreplace) /etc/ld.so.conf.d/*
8da253
8da253
%files doc
8da253
%defattr(-,root,root,-)
8da253
%doc %{dyninst_base}/dataflowAPI/doc/dataflowAPI.pdf
8da253
%doc %{dyninst_base}/dynC_API/doc/dynC_API.pdf
8da253
%doc %{dyninst_base}/dyninstAPI/doc/dyninstAPI.pdf
8da253
%doc %{dyninst_base}/instructionAPI/doc/instructionAPI.pdf
8da253
%doc %{dyninst_base}/parseAPI/doc/parseAPI.pdf
8da253
%doc %{dyninst_base}/patchAPI/doc/patchAPI.pdf
8da253
%doc %{dyninst_base}/proccontrol/doc/proccontrol.pdf
8da253
%doc %{dyninst_base}/stackwalk/doc/stackwalk.pdf
8da253
%doc %{dyninst_base}/symtabAPI/doc/symtabAPI.pdf
8da253
8da253
%files devel
8da253
%defattr(-,root,root,-)
8da253
%{_includedir}/dyninst
8da253
%{_libdir}/dyninst/*.so
8da253
%dir %{_libdir}/cmake
8da253
%{_libdir}/cmake/Dyninst
8da253
8da253
%files static
8da253
%defattr(-,root,root,-)
8da253
%{_libdir}/dyninst/*.a
8da253
8da253
%files testsuite
8da253
%defattr(-,root,root,-)
8da253
%{_bindir}/parseThat
8da253
%dir %{_libdir}/dyninst/testsuite/
8da253
# Restore the permissions that were hacked out above, during install.
8da253
%attr(755,root,root) %{_libdir}/dyninst/testsuite/*[!a]
8da253
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
8da253
8da253
%changelog
8da253
* Fri Jun 09 2017 Stan Cox <scox@redhat.com> - 9.3.2
8da253
- Rebase to 9.3.2
8da253
8da253
* Thu Sep 15 2016 Josh Stone <jistone@redhat.com> - 9.2.0-4
8da253
- rhbz1366656: fix ppc64 relocation rewriting
8da253
- rhbz1366726: check mmap constrains for locality
8da253
- rhbz1367225: fix x86 codegen for 64-bit offsets
8da253
8da253
* Tue Aug 09 2016 Josh Stone <jistone@redhat.com> - 9.2.0-3
8da253
- rhbz1363794: fix proccontrol attach without an exe.
8da253
8da253
* Tue Jul 26 2016 Josh Stone <jistone@redhat.com> - 9.2.0-2
8da253
- Patch a template '>>' in stackanalysis.h for pre-C++11 users.
8da253
8da253
* Thu Jul 21 2016 Josh Stone <jistone@redhat.com> - 9.2.0-1
8da253
- Update to 9.2.0
8da253
8da253
* Fri Mar 11 2016 Frank Ch. Eigler <fche@redhat.com> - 9.1.0-3
8da253
- Export libdyninstAPI_RT_init_maxthreads (ref rhbz1315841/1316956)
8da253
8da253
* Thu Feb 25 2016 Frank Ch. Eigler <fche@redhat.com> - 9.1.0-2
8da253
- buildroot bump respin
8da253
8da253
* Wed Jan 13 2016 Josh Stone <jistone@redhat.com> - 9.1.0-1
8da253
- Update to 9.1.0
8da253
8da253
* Mon Sep 21 2015 Josh Stone <jistone@redhat.com> - 8.2.1-5
8da253
- Rebuild for x86_64 only.
8da253
8da253
* Mon Sep 21 2015 Josh Stone <jistone@redhat.com> - 8.2.1-4
8da253
- rhbz1261061: Make sure the system's Boost.cmake is not used.
8da253
8da253
* Wed Jan 07 2015 Josh Stone <jistone@redhat.com> - 8.2.1-3
8da253
- Rebuild for x86_64 only.
8da253
8da253
* Wed Jan 07 2015 Josh Stone <jistone@redhat.com> - 8.2.1-2
8da253
- Rebuild for releng updates.
8da253
8da253
* Wed Dec 17 2014 Josh Stone <jistone@redhat.com> - 8.2.1-1
8da253
- Update to point release 8.2.1.
8da253
8da253
* Tue Aug 19 2014 Josh Stone <jistone@redhat.com> - 8.2.0-1
8da253
- final rebase to 8.2.0, using upstream tag "v8.2.0.1"
8da253
8da253
* Thu Jul 24 2014 Josh Stone <jistone@redhat.com> - 8.2.0-0.440.gde280f74f40e
8da253
- update to a newer pre-8.2.0 snapshot
8da253
8da253
* Wed May 21 2014 Josh Stone <jistone@redhat.com> - 8.2.0-0.374.g593fb2773a48
8da253
- more libdyninstAPI_RT symbols, and add testsuite requires
8da253
8da253
* Wed May 21 2014 Josh Stone <jistone@redhat.com> - 8.2.0-0.373.geaba204a72a3
8da253
- fix libdyninstAPI_RT.so symbol visibility
8da253
8da253
* Tue May 20 2014 Josh Stone <jistone@redhat.com> - 8.2.0-0.372.gdfd4a8842f4c
8da253
- prerelease build of dyninst 8.2.0
8da253
8da253
* Tue Nov 26 2013 Josh Stone <jistone@redhat.com> 8.0-6dw
8da253
- rhbz987096: backported upstream patches for mid-syscall PTRACE_EVENTs
8da253
8da253
* Wed Apr 17 2013 Josh Stone <jistone@redhat.com> 8.0-5dw
8da253
- rhbz855981: backported upstream patch to remove missing-dwarf asserts
8da253
8da253
* Tue Feb 26 2013 Frank Ch. Eigler <fche@redhat.com> 8.0-4dw
8da253
- fix %attr() of testsuite files
8da253
8da253
* Tue Feb 26 2013 Josh Stone <jistone@redhat.com> 8.0-3dw
8da253
- rhbz915820: Add a dyninst-testsuite package.
8da253
8da253
* Thu Jan 31 2013 Frank Ch. Eigler <fche@redhat.com> - 8.0-2dw
8da253
- convert to scl
8da253
- bundle libdwarf temporarily
8da253
8da253
* Tue Nov 20 2012 Josh Stone <jistone@redhat.com>
8da253
- Tweak the configure/make commands
8da253
- Disable the testsuite via configure.
8da253
- Set the private includedir and libdir via configure.
8da253
- Set VERBOSE_COMPILATION for make.
8da253
- Use DESTDIR for make install.
8da253
8da253
* Mon Nov 19 2012 Josh Stone <jistone@redhat.com> 8.0-1
8da253
- Update to release 8.0.
8da253
- Updated "%files doc" to reflect renames.
8da253
- Drop the unused BuildRequires libxml2-devel.
8da253
- Drop the 7.99.x version-munging patch.
8da253
8da253
* Fri Nov 09 2012 Josh Stone <jistone@redhat.com> 7.99.2-0.29
8da253
- Rebase to git e99d7070bbc39c76d6d528db530046c22681c17e
8da253
8da253
* Mon Oct 29 2012 Josh Stone <jistone@redhat.com> 7.99.2-0.28
8da253
- Bump to 7.99.2 per abi-compliance-checker results
8da253
8da253
* Fri Oct 26 2012 Josh Stone <jistone@redhat.com> 7.99.1-0.27
8da253
- Rebase to git dd8f40b7b4742ad97098613876efeef46d3d9e65
8da253
- Use _smp_mflags to enable building in parallel.
8da253
8da253
* Wed Oct 03 2012 Josh Stone <jistone@redhat.com> 7.99.1-0.26
8da253
- Rebase to git 557599ad7417610f179720ad88366c32a0557127
8da253
8da253
* Thu Sep 20 2012 Josh Stone <jistone@redhat.com> 7.99.1-0.25
8da253
- Rebase on newer git tree.
8da253
- Bump the fake version to 7.99.1 to account for ABI differences.
8da253
- Enforce the minimum libdwarf version.
8da253
- Drop the upstreamed R_PPC_NUM patch.
8da253
8da253
* Wed Aug 15 2012 Karsten Hopp <karsten@redhat.com> 7.99-0.24
8da253
- check if R_PPC_NUM is defined before using it, similar to R_PPC64_NUM
8da253
8da253
* Mon Jul 30 2012 Josh Stone <jistone@redhat.com> 7.99-0.23
8da253
- Rebase on newer git tree.
8da253
- Update license files with upstream additions.
8da253
- Split documentation into -doc subpackage.
8da253
- Claim ownership of %{_libdir}/dyninst.
8da253
8da253
* Fri Jul 27 2012 William Cohen <wcohen@redhat.com> - 7.99-0.22
8da253
- Correct requires for dyninst-devel.
8da253
8da253
* Wed Jul 25 2012 Josh Stone <jistone@redhat.com> - 7.99-0.21
8da253
- Rebase on newer git tree
8da253
- Update context in dyninst-git.patch
8da253
- Drop dyninst-delete_array.patch
8da253
- Drop dyninst-common-makefile.patch
8da253
8da253
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.99-0.20
8da253
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8da253
8da253
* Mon Jul 16 2012 William Cohen <wcohen@redhat.com> - 7.99-0.19
8da253
- Patch common/i386-unknown-linux2.4/Makefile to build.
8da253
8da253
* Fri Jul 13 2012 William Cohen <wcohen@redhat.com> - 7.99-0.18
8da253
- Rebase on newer git tree the has a number of merges into it.
8da253
- Adjust spec file to allow direct use of git patches
8da253
- Fix to eliminate unused varables.
8da253
- Proper delete for array.
8da253
8da253
* Thu Jun 28 2012 William Cohen <wcohen@redhat.com> - 7.99-0.17
8da253
- Rebase on newer git repo.
8da253
8da253
* Thu Jun 28 2012 William Cohen <wcohen@redhat.com> - 7.99-0.16
8da253
- Eliminate dynptr.h file use with rebase on newer git repo.
8da253
8da253
* Mon Jun 25 2012 William Cohen <wcohen@redhat.com> - 7.99-0.14
8da253
- Rebase on newer git repo.
8da253
8da253
* Tue Jun 19 2012 William Cohen <wcohen@redhat.com> - 7.99-0.12
8da253
- Fix static library and header file permissions.
8da253
- Use sources from the dyninst git repositories.
8da253
- Fix 32-bit library versioning for libdyninstAPI_RT_m32.so.
8da253
8da253
* Wed Jun 13 2012 William Cohen <wcohen@redhat.com> - 7.99-0.11
8da253
- Fix library versioning.
8da253
- Move .so links to dyninst-devel.
8da253
- Remove unneded clean section.
8da253
8da253
* Fri May 11 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.9
8da253
- Clean up Makefile rules.
8da253
8da253
* Sat May 5 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.8
8da253
- Clean up spec file.
8da253
8da253
* Wed May 2 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.7
8da253
- Use "make install" and do staged build.
8da253
- Use rpm configure macro.
8da253
8da253
* Thu Mar 15 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.5
8da253
- Nuke the bundled boost files and use the boost-devel rpm instead.
8da253
8da253
* Mon Mar 12 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.4
8da253
- Initial submission of dyninst spec file.