Rebase on systemtap-0.6.2.

This commit is contained in:
William Eden Cohen 2008-03-27 19:55:02 +00:00
parent e905c5b0e4
commit 9a28b9d038
4 changed files with 69 additions and 253 deletions

View File

@ -1,106 +0,0 @@
Index: Makefile.am
===================================================================
RCS file: /cvs/systemtap/src/Makefile.am,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- Makefile.am 2 Jul 2007 19:40:50 -0000 1.80
+++ Makefile.am 3 Jul 2007 19:49:36 -0000 1.81
@@ -44,16 +44,16 @@
.PHONY: install-elfutils
install-elfutils:
- mkdir -p $(pkglibdir)
+ mkdir -p $(DESTDIR)$(pkglibdir)
for file in lib-elfutils/*.so* lib-elfutils/${PACKAGE_NAME}/*.so*; do \
- $(INSTALL_PROGRAM) $$file $(pkglibdir); \
+ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(pkglibdir); \
done
install-exec-local: install-elfutils
endif
staprun_SOURCES = runtime/staprun/staprun.c runtime/staprun/mainloop.c \
runtime/staprun/symbols.c runtime/staprun/ctl.c \
- runtime/staprun/relay.c runtime/staprun/relay_old.c
+ runtime/staprun/relay.c runtime/staprun/relay_old.c
staprun_CFLAGS = @PROCFLAGS@ $(AM_CFLAGS)
staprun_LDADD = @PROCFLAGS@ -lpthread
@@ -78,7 +78,7 @@
$(CC) -shared -rdynamic $(LDFLAGS) $(CFLAGS) -fPIC -o $@ $<
all-local: $(STAPLOG)
install-exec-local: $(STAPLOG)
- $(INSTALL) $(STAPLOG) $(pkglibdir)
+ $(INSTALL) $(STAPLOG) $(DESTDIR)$(pkglibdir)
else
endif
@@ -153,10 +153,9 @@
SUBDIRS += runtime/lket/b2a
endif
-SRCDIR = $(shell cd $(srcdir); pwd)
-
check:
- $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$(SRCDIR)/runtime SYSTEMTAP_TAPSET=$(SRCDIR)/tapset LD_LIBRARY_PATH=$(PWD)/lib-elfutils:$(PWD)/lib-elfutils/systemtap SYSTEMTAP_PATH=$(PWD) RUNTESTFLAGS="$(RUNTESTFLAGS)"
+ SRCDIR=`cd $(srcdir); pwd`; \
+ $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$$SRCDIR/runtime SYSTEMTAP_TAPSET=$$SRCDIR/tapset LD_LIBRARY_PATH=$(PWD)/lib-elfutils:$(PWD)/lib-elfutils/systemtap SYSTEMTAP_PATH=$(PWD) RUNTESTFLAGS="$(RUNTESTFLAGS)"
installcheck:
$(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)"
Index: Makefile.in
===================================================================
RCS file: /cvs/systemtap/src/Makefile.in,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -r1.89 -r1.90
--- Makefile.in 2 Jul 2007 19:40:50 -0000 1.89
+++ Makefile.in 3 Jul 2007 19:49:36 -0000 1.90
@@ -283,7 +282,7 @@
@BUILD_ELFUTILS_TRUE@stap_DEPENDENCIES = lib-elfutils/libdw.so
staprun_SOURCES = runtime/staprun/staprun.c runtime/staprun/mainloop.c \
runtime/staprun/symbols.c runtime/staprun/ctl.c \
- runtime/staprun/relay.c runtime/staprun/relay_old.c
+ runtime/staprun/relay.c runtime/staprun/relay_old.c
staprun_CFLAGS = @PROCFLAGS@ $(AM_CFLAGS)
staprun_LDADD = @PROCFLAGS@ -lpthread
@@ -317,7 +316,6 @@
TEST_COV_DIR = coverage
# XXX: leaves behind man pages
SUBDIRS = testsuite $(am__append_4)
-SRCDIR = $(shell cd $(srcdir); pwd)
all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -1385,9 +1383,9 @@
@BUILD_ELFUTILS_TRUE@.PHONY: install-elfutils
@BUILD_ELFUTILS_TRUE@install-elfutils:
-@BUILD_ELFUTILS_TRUE@ mkdir -p $(pkglibdir)
+@BUILD_ELFUTILS_TRUE@ mkdir -p $(DESTDIR)$(pkglibdir)
@BUILD_ELFUTILS_TRUE@ for file in lib-elfutils/*.so* lib-elfutils/${PACKAGE_NAME}/*.so*; do \
-@BUILD_ELFUTILS_TRUE@ $(INSTALL_PROGRAM) $$file $(pkglibdir); \
+@BUILD_ELFUTILS_TRUE@ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(pkglibdir); \
@BUILD_ELFUTILS_TRUE@ done
@BUILD_ELFUTILS_TRUE@install-exec-local: install-elfutils
@@ -1395,7 +1393,7 @@
@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@ $(INSTALL) $(STAPLOG) $(pkglibdir)
+@BUILD_CRASHMOD_TRUE@ $(INSTALL) $(STAPLOG) $(DESTDIR)$(pkglibdir)
# Copy some of the testsuite sample scripts to the distdir
# 'examples/samples' directory.
@@ -1443,7 +1441,8 @@
-rm -rf $(DESTDIR)$(localstatedir)/cache/$(PACKAGE)
check:
- $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$(SRCDIR)/runtime SYSTEMTAP_TAPSET=$(SRCDIR)/tapset LD_LIBRARY_PATH=$(PWD)/lib-elfutils:$(PWD)/lib-elfutils/systemtap SYSTEMTAP_PATH=$(PWD) RUNTESTFLAGS="$(RUNTESTFLAGS)"
+ SRCDIR=`cd $(srcdir); pwd`; \
+ $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$$SRCDIR/runtime SYSTEMTAP_TAPSET=$$SRCDIR/tapset LD_LIBRARY_PATH=$(PWD)/lib-elfutils:$(PWD)/lib-elfutils/systemtap SYSTEMTAP_PATH=$(PWD) RUNTESTFLAGS="$(RUNTESTFLAGS)"
installcheck:
$(MAKE) -C testsuite installcheck RUNTESTFLAGS="$(RUNTESTFLAGS)"

View File

@ -1,15 +0,0 @@
Index: runtime/stack-i386.c
===================================================================
RCS file: /cvs/systemtap/src/runtime/stack-i386.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -U2 -u -r1.6 -r1.7
--- runtime/stack-i386.c 18 Jan 2008 08:47:31 -0000 1.6
+++ runtime/stack-i386.c 27 Jan 2008 18:27:40 -0000 1.7
@@ -24,5 +24,5 @@
#ifdef STAPCONF_X86_UNIREGS
unsigned long ebp = regs->bp;
- #elif
+ #else
unsigned long ebp = regs->ebp;
#endif

View File

@ -1,71 +0,0 @@
diff -up systemtap-0.6.1/staptree.cxx.orig systemtap-0.6.1/staptree.cxx
--- systemtap-0.6.1/staptree.cxx.orig 2008-01-17 21:53:20.000000000 -0500
+++ systemtap-0.6.1/staptree.cxx 2008-02-12 11:16:00.000000000 -0500
@@ -2370,3 +2370,30 @@ deep_copy_visitor::deep_copy (expression
require <expression*> (&v, &n, s);
return n;
}
+
+template <> void
+require <indexable *> (deep_copy_visitor* v, indexable** dst, indexable* src)
+{
+ if (src != NULL)
+ {
+ symbol *array_src=NULL, *array_dst=NULL;
+ hist_op *hist_src=NULL, *hist_dst=NULL;
+
+ classify_indexable(src, array_src, hist_src);
+
+ *dst = NULL;
+
+ if (array_src)
+ {
+ require <symbol*> (v, &array_dst, array_src);
+ *dst = array_dst;
+ }
+ else
+ {
+ require <hist_op*> (v, &hist_dst, hist_src);
+ *dst = hist_dst;
+ }
+ assert (*dst);
+ }
+}
+
diff -up systemtap-0.6.1/staptree.h.orig systemtap-0.6.1/staptree.h
--- systemtap-0.6.1/staptree.h.orig 2008-01-17 21:53:20.000000000 -0500
+++ systemtap-0.6.1/staptree.h 2008-02-12 11:16:00.000000000 -0500
@@ -846,31 +846,8 @@ require (deep_copy_visitor* v, T* dst, T
}
}
-template <> static void
-require <indexable *> (deep_copy_visitor* v, indexable** dst, indexable* src)
-{
- if (src != NULL)
- {
- symbol *array_src=NULL, *array_dst=NULL;
- hist_op *hist_src=NULL, *hist_dst=NULL;
-
- classify_indexable(src, array_src, hist_src);
-
- *dst = NULL;
-
- if (array_src)
- {
- require <symbol*> (v, &array_dst, array_src);
- *dst = array_dst;
- }
- else
- {
- require <hist_op*> (v, &hist_dst, hist_src);
- *dst = hist_dst;
- }
- assert (*dst);
- }
-}
+template <> void
+require <indexable *> (deep_copy_visitor* v, indexable** dst, indexable* src);
template <typename T> void
provide (deep_copy_visitor* v, T src)

View File

@ -1,62 +1,39 @@
# Release number for rpm build. Stays at 1 for new PACKAGE_VERSION increases.
%define release 8
%define release 1
# Version number of oldest elfutils release that works with systemtap.
%define elfutils_version 0.131
# Don't build on ppc for RHEL5
ExcludeArch: ppc
# Default options (suitable for fedora)
%define with_sqlite 1
%define with_docs 1
%define with_crash 0
%define with_bundled_elfutils 0
# Set bundled_elfutils to 0 on systems that have %{elfutils_version} or newer.
%if 0%{?fedora}
%define bundled_elfutils 1
%define sqlite 0
%if "%fedora" >= "6"
%define bundled_elfutils 0
%define sqlite 1
%endif
%endif
%if 0%{?rhel}
%define bundled_elfutils 1
%define sqlite 0
%if "%rhel" >= "6"
%define bundled_elfutils 0
%define sqlite 1
%endif
%endif
%if 0%{!?bundled_elfutils:1}
# Yo! DO NOT TOUCH THE FOLLOWING LINE.
# You can use rpmbuild --define "bundled_elfutils 0" for a build of your own.
%define bundled_elfutils 1
%endif
%if 0%{!?sqlite:1}
# Yo! DO NOT TOUCH THE FOLLOWING LINE.
# You can use rpmbuild --define "sqlite 1" for a build of your own.
%define sqlite 0
# Enable these options by default for RHEL
%if 0%{?rhel} >= 5
%define with_crash 1
%define with_bundled_elfutils 1
%endif
Name: systemtap
Version: 0.6.1
Version: 0.6.2
Release: %{release}%{?dist}
Summary: Instrumentation System
Group: Development/System
ExcludeArch: ppc
License: GPLv2+
URL: http://sourceware.org/systemtap/
Source: ftp://sourceware.org/pub/%{name}/releases/%{name}-%{version}.tar.gz
Patch100: systemtap-0.6.1-gcc43.patch
Patch101: systemtap-0.6.1-elfi.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: kernel >= 2.6.9-11
BuildRequires: libcap-devel
%if %{sqlite}
%if %{with_sqlite}
BuildRequires: sqlite-devel
Requires: sqlite
%endif
%if "%rhel" >= "5"
%if %{with_crash}
BuildRequires: crash-devel zlib-devel
%endif
# Requires: kernel-devel
@ -64,15 +41,21 @@ BuildRequires: crash-devel zlib-devel
Requires: gcc make
# Suggest: kernel-debuginfo
Requires: systemtap-runtime = %{version}-%{release}
Requires(pre): shadow-utils
%if %{bundled_elfutils}
%if %{with_bundled_elfutils}
Source1: elfutils-%{elfutils_version}.tar.gz
Patch1: elfutils-portability.patch
%define setup_elfutils -a1
%else
BuildRequires: elfutils-devel >= %{elfutils_version}
%endif
%if %{with_crash}
Requires: crash
%endif
%if %{with_docs}
BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf latex2html
%endif
%description
SystemTap is an instrumentation system for systems running Linux 2.6.
@ -85,6 +68,7 @@ Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: kernel >= 2.6.9-11
Requires(pre): shadow-utils
%description runtime
SystemTap runtime is the runtime component of an instrumentation
@ -104,10 +88,8 @@ without having to rebuild from sources.
%prep
%setup -q %{?setup_elfutils}
%patch100 -p1
%patch101 -p0
%if %{bundled_elfutils}
%if %{with_bundled_elfutils}
cd elfutils-%{elfutils_version}
%patch1 -p1
sleep 1
@ -119,7 +101,7 @@ cd ..
%build
%if %{bundled_elfutils}
%if %{with_bundled_elfutils}
# Build our own copy of elfutils.
%define elfutils_config --with-elfutils=elfutils-%{elfutils_version}
@ -134,12 +116,29 @@ cd ..
%define elfutils_mflags LD_LIBRARY_PATH=`pwd`/lib-elfutils
%endif
%if %{sqlite}
# Include the coverage testing support
%define sqlite_config --enable-sqlitedb
# Enable/disable the sqlite coverage testing support
%if %{with_sqlite}
%define sqlite_config --enable-sqlite
%else
%define sqlite_config --disable-sqlite
%endif
%configure %{?elfutils_config} %{?sqlite_config}
# Enable/disable the crash extension
%if %{with_crash}
%define crash_config --enable-crash
%else
%define crash_config --disable-crash
%endif
%if %{with_docs}
%define docs_config --enable-docs
%else
%define docs_config --disable-docs
%endif
%configure %{?elfutils_config} %{sqlite_config} %{crash_config} %{docs_config}
make %{?_smp_mflags}
# Fix paths in the example & testsuite scripts
@ -160,17 +159,13 @@ 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
mkdir $RPM_BUILD_ROOT%{_datadir}/%{name}/src
cp -rp examples $RPM_BUILD_ROOT%{_datadir}/%{name}/src
%clean
rm -rf ${RPM_BUILD_ROOT}
%pre
%pre runtime
getent group stapdev >/dev/null || groupadd -r stapdev
getent group stapusr >/dev/null || groupadd -r stapusr
exit 0
@ -179,34 +174,47 @@ exit 0
%defattr(-,root,root)
%doc README AUTHORS NEWS COPYING examples
%if %{with_docs}
%doc doc/tutorial.pdf
%doc doc/langref.pdf
%endif
%{_bindir}/stap
%{_mandir}/man1/*
%{_mandir}/man5/*
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/runtime
%{_datadir}/systemtap/tapset
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/runtime
%{_datadir}/%{name}/tapset
%if %{bundled_elfutils}
%if %{with_bundled_elfutils} || %{with_crash}
%dir %{_libdir}/%{name}
%endif
%if %{with_bundled_elfutils}
%{_libdir}/%{name}/lib*.so*
%endif
%if %{with_crash}
%{_libdir}/%{name}/staplog.so*
%endif
%files runtime -f runtime-addl-files.txt
%files runtime
%defattr(-,root,root)
%attr(4111,root,root) %{_bindir}/staprun
%{_libexecdir}/systemtap
%{_libexecdir}/%{name}
%{_mandir}/man8/*
%doc README AUTHORS NEWS COPYING
%files testsuite
%defattr(-,root,root)
%{_datadir}/systemtap/testsuite
%{_datadir}/%{name}/src
%{_datadir}/%{name}/testsuite
%changelog
* Thu Mar 27 2008 Will Cohen <wcohen@redhat.com> - 0.6.2-1
- Rebase.
* Wed Feb 21 2008 Will Cohen <wcohen@redhat.com> - 0.6.1-8
- Bump version.