summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfche <fche>2007-10-05 19:01:32 +0000
committerfche <fche>2007-10-05 19:01:32 +0000
commit8f3c45cc3da3ce3a325acbc593ed434580a1bb71 (patch)
tree374015c0f1693e1c9491836b1dc43401c54d9f08
parentc488dee487f25763b3d4dba2400356dc83a3f11e (diff)
downloadsystemtap-steved-8f3c45cc3da3ce3a325acbc593ed434580a1bb71.tar.gz
systemtap-steved-8f3c45cc3da3ce3a325acbc593ed434580a1bb71.tar.xz
systemtap-steved-8f3c45cc3da3ce3a325acbc593ed434580a1bb71.zip
pr5036: systemtap-testsuite RPM
2007-10-05 Frank Ch. Eigler <fche@elastic.org> PR 5036 * systemtap.spec.in: Create new systemtap-testsuite sub-rpm. Install crash(8)'s staplog.so into -runtime sub-rpm if built. * Makefile.am (rpm): New target. * Makefile.in: Regenerated.
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.am4
-rw-r--r--Makefile.in4
-rw-r--r--systemtap.spec.in32
4 files changed, 45 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c2b1535..56783eec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-10-05 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 5036
+ * systemtap.spec.in: Create new systemtap-testsuite sub-rpm.
+ Install crash(8)'s staplog.so into -runtime sub-rpm if built.
+ * Makefile.am (rpm): New target.
+ * Makefile.in: Regenerated.
+
2007-10-04 Frank Ch. Eigler <fche@elastic.org>
* stapfuncs.5.in: Document inet.stp tapset functions.
diff --git a/Makefile.am b/Makefile.am
index 1f558741..f9939685 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -91,6 +91,7 @@ $(STAPLOG): staplog.c
$(CC) -shared -rdynamic $(LDFLAGS) $(CFLAGS) -fPIC -o $@ $<
all-local: $(STAPLOG)
install-exec-local: $(STAPLOG)
+ -$(MKDIR_P) $(DESTDIR)$(pkglibdir)
$(INSTALL) $(STAPLOG) $(DESTDIR)$(pkglibdir)
else
endif
@@ -171,3 +172,6 @@ check:
installcheck:
$(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)"
+
+rpm: systemtap.spec dist
+ rpmbuild --define "_sourcedir $(PWD)/" -ba systemtap.spec
diff --git a/Makefile.in b/Makefile.in
index 47509606..2951f717 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1476,6 +1476,7 @@ install-exec-hook:
@BUILD_CRASHMOD_TRUE@ $(CC) -shared -rdynamic $(LDFLAGS) $(CFLAGS) -fPIC -o $@ $<
@BUILD_CRASHMOD_TRUE@all-local: $(STAPLOG)
@BUILD_CRASHMOD_TRUE@install-exec-local: $(STAPLOG)
+@BUILD_CRASHMOD_TRUE@ -$(MKDIR_P) $(DESTDIR)$(pkglibdir)
@BUILD_CRASHMOD_TRUE@ $(INSTALL) $(STAPLOG) $(DESTDIR)$(pkglibdir)
# Copy some of the testsuite sample scripts to the distdir
@@ -1531,6 +1532,9 @@ check:
installcheck:
$(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)"
+
+rpm: systemtap.spec dist
+ rpmbuild --define "_sourcedir $(PWD)/" -ba systemtap.spec
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/systemtap.spec.in b/systemtap.spec.in
index 1b66c068..aeb8f99a 100644
--- a/systemtap.spec.in
+++ b/systemtap.spec.in
@@ -85,6 +85,17 @@ SystemTap runtime is the runtime component of an instrumentation
system for systems running Linux 2.6. Developers can write
instrumentation to collect data on the operation of the system.
+%package testsuite
+Summary: Instrumentation System Testsuite
+Group: Development/System
+License: GPLv2+
+URL: http://sourceware.org/systemtap/
+Requires: systemtap
+
+%description testsuite
+The testsuite allows testing of the entire SystemTap toolchain
+without having to rebuild from sources.
+
%prep
%setup -q %{?setup_elfutils}
@@ -133,12 +144,22 @@ chmod -x examples/samples/kmalloc-top
rm -rf ${RPM_BUILD_ROOT}
make DESTDIR=$RPM_BUILD_ROOT install
-# Because "make install" installs staprun with mode 04111, the
+# Because "make install" may install staprun with mode 04111, the
# post-processing programs rpmbuild runs won't be able to read it.
# So, we change permissions so that they can read it. We'll set the
# permissions back to 04111 in the %files section below.
chmod 755 $RPM_BUILD_ROOT%{_bindir}/staprun
+# Copy over the testsuite
+cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap
+
+if [ -f $RPM_BUILD_ROOT%{_libdir}/%{name}/staplog.so ]; then
+ echo %{_libdir}/%{name}/staplog.so > runtime-addl-files.txt
+else
+ touch runtime-addl-files.txt
+fi
+
+
%check
make check %{?elfutils_mflags} || :
@@ -165,10 +186,10 @@ exit 0
%if %{bundled_elfutils}
%dir %{_libdir}/%{name}
-%{_libdir}/%{name}/*.so*
+%{_libdir}/%{name}/lib*.so*
%endif
-%files runtime
+%files runtime -f runtime-addl-files.txt
%defattr(-,root,root)
%attr(4111,root,root) %{_bindir}/staprun
%{_libexecdir}/systemtap
@@ -176,6 +197,11 @@ exit 0
%doc README AUTHORS NEWS COPYING
+%files testsuite
+%defattr(-,root,root)
+%{_datadir}/systemtap/testsuite
+
+
%changelog
* Thu Aug 9 2007 David Smith <dsmith@redhat.com> - 0.6-1
- Bumped version, added libcap-devel BuildRequires.