Blame SPECS/dyninst.spec

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