From a87d23e30f0f84f1d3ecd87ccafd6bfcec2f404f Mon Sep 17 00:00:00 2001 From: dsmith Date: Wed, 30 Jan 2008 22:55:53 +0000 Subject: 2008-01-30 David Smith PR 5650 * systemtap.spec.in: Simplified and explicitly specifies configure options. --- systemtap.spec.in | 86 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 40 deletions(-) (limited to 'systemtap.spec.in') diff --git a/systemtap.spec.in b/systemtap.spec.in index e2f93056..a9fe018a 100644 --- a/systemtap.spec.in +++ b/systemtap.spec.in @@ -3,37 +3,34 @@ # Version number of oldest elfutils release that works with systemtap. %define elfutils_version 0.127 -# 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 +# The following build options are enabled by default. Use either +# '--without ' in your rpmbuild command or force values to 0 in +# here to disable them. + +# Build with sqlite support +%define with_sqlite %{?_without_sqlite: 0} %{?!_without_sqlite: 1} + +# The following build options are disabled by default. Use either +# '--with ' in your rpmbuild command or force values to 1 in here +# to enable them. + +# Build with crash extension. +%define with_crash %{?_with_crash: 1} %{?!_with_crash: 0} +# Use the bundled version of elfutils (vs. the system's version). Use +# the system's version of elfutils on systems that have +# %{elfutils_version} or higher. +%define with_bundled_elfutils %{?_with_bundled_elfutils: 1} %{?!_with_bundled_elfutils: 0} +# Set up OS specific defaults. %if 0%{?rhel} -%define bundled_elfutils 1 -%define sqlite 0 %if "%rhel" >= "5" -%define bundled_elfutils 0 -%define sqlite 1 +# Enable these options by default for RHEL (unless the user has +# specified them on the command line). +%define with_crash %{?_without_crash: 0} %{?!_without_crash: 1} +%define with_bundled_elfutils %{?_without_bundled_elfutils: 0} %{?!_without_bundled_elfutils: 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 -%endif - Name: systemtap Version: @VERSION@ Release: %{release}%{?dist} @@ -47,11 +44,11 @@ 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 %endif # Requires: kernel-devel @@ -61,13 +58,16 @@ Requires: gcc make 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 %description SystemTap is an instrumentation system for systems running Linux 2.6. @@ -100,7 +100,7 @@ without having to rebuild from sources. %prep %setup -q %{?setup_elfutils} -%if %{bundled_elfutils} +%if %{with_bundled_elfutils} cd elfutils-%{elfutils_version} %patch1 -p1 sleep 1 @@ -112,7 +112,7 @@ cd .. %build -%if %{bundled_elfutils} +%if %{with_bundled_elfutils} # Build our own copy of elfutils. %define elfutils_config --with-elfutils=elfutils-%{elfutils_version} @@ -128,13 +128,20 @@ cd .. %endif # Enable/disable the sqlite coverage testing support -%if %{sqlite} +%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 + +%configure %{?elfutils_config} %{sqlite_config} %{crash_config} make %{?_smp_mflags} # Fix paths in the example scripts @@ -156,12 +163,6 @@ 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 - %clean rm -rf ${RPM_BUILD_ROOT} @@ -183,12 +184,17 @@ exit 0 %{_datadir}/systemtap/runtime %{_datadir}/systemtap/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 -- cgit From d2995e6f6ec8475e1c6c0bb603da4244921ddec7 Mon Sep 17 00:00:00 2001 From: fche Date: Sat, 2 Feb 2008 16:22:32 +0000 Subject: * rhel-inspired build fixes * Fri Feb 1 2008 Frank Ch. Eigler - 0.6.1-3 - Add zlib-devel to buildreq; missing from crash-devel - Process testsuite .stp files for #!stap->#!/usr/bin/stap --- systemtap.spec.in | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'systemtap.spec.in') diff --git a/systemtap.spec.in b/systemtap.spec.in index a9fe018a..2bc14bc1 100644 --- a/systemtap.spec.in +++ b/systemtap.spec.in @@ -1,5 +1,5 @@ # Release number for rpm build. Stays at 1 for new PACKAGE_VERSION increases. -%define release 1 +%define release 3 # Version number of oldest elfutils release that works with systemtap. %define elfutils_version 0.127 @@ -49,7 +49,7 @@ BuildRequires: sqlite-devel Requires: sqlite %endif %if %{with_crash} -BuildRequires: crash-devel +BuildRequires: crash-devel zlib-devel %endif # Requires: kernel-devel # or is that kernel-smp-devel? kernel-hugemem-devel? @@ -144,8 +144,8 @@ cd .. %configure %{?elfutils_config} %{sqlite_config} %{crash_config} make %{?_smp_mflags} -# Fix paths in the example scripts -find examples -type f -name '*.stp' -print0 | xargs -0 sed -i -r -e '1s@^#!.+stap@#!%{_bindir}/stap@' +# Fix paths in the example & testsuite scripts +find examples testsuite -type f -name '*.stp' -print0 | xargs -0 sed -i -r -e '1s@^#!.+stap@#!%{_bindir}/stap@' # To avoid perl dependency, make perl sample script non-executable chmod -x examples/samples/kmalloc-top @@ -208,6 +208,10 @@ exit 0 %changelog +* Fri Feb 1 2008 Frank Ch. Eigler - 0.6.1-3 +- Add zlib-devel to buildreq; missing from crash-devel +- Process testsuite .stp files for #!stap->#!/usr/bin/stap + * Fri Jan 18 2008 Frank Ch. Eigler - 0.6.1-1 - Add crash-devel buildreq to build staplog.so crash(8) module. - Many robustness & functionality improvements: -- cgit From 378a5245c3087adc2b7be909cee5a7bdad67f88b Mon Sep 17 00:00:00 2001 From: dsmith Date: Mon, 4 Feb 2008 15:02:05 +0000 Subject: 2008-02-04 David Smith PR 5670 (parital) * systemtap.spec.in: Moved %pre section to the systemtap-runtime rpm. --- systemtap.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'systemtap.spec.in') diff --git a/systemtap.spec.in b/systemtap.spec.in index 2bc14bc1..96de2284 100644 --- a/systemtap.spec.in +++ b/systemtap.spec.in @@ -56,7 +56,6 @@ BuildRequires: crash-devel zlib-devel Requires: gcc make # Suggest: kernel-debuginfo Requires: systemtap-runtime = %{version}-%{release} -Requires(pre): shadow-utils %if %{with_bundled_elfutils} Source1: elfutils-%{elfutils_version}.tar.gz @@ -80,6 +79,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 @@ -166,7 +166,7 @@ cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap %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 -- cgit From eef71d9c1b897fb9b40d54da02b0c83daa975fd1 Mon Sep 17 00:00:00 2001 From: dsmith Date: Fri, 8 Feb 2008 20:14:58 +0000 Subject: 2008-02-08 David Smith PR 5670 * systemtap.spec.in: Further simplification. --- systemtap.spec.in | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) (limited to 'systemtap.spec.in') diff --git a/systemtap.spec.in b/systemtap.spec.in index 96de2284..789f219f 100644 --- a/systemtap.spec.in +++ b/systemtap.spec.in @@ -3,32 +3,15 @@ # Version number of oldest elfutils release that works with systemtap. %define elfutils_version 0.127 -# The following build options are enabled by default. Use either -# '--without ' in your rpmbuild command or force values to 0 in -# here to disable them. - -# Build with sqlite support -%define with_sqlite %{?_without_sqlite: 0} %{?!_without_sqlite: 1} - -# The following build options are disabled by default. Use either -# '--with ' in your rpmbuild command or force values to 1 in here -# to enable them. - -# Build with crash extension. -%define with_crash %{?_with_crash: 1} %{?!_with_crash: 0} -# Use the bundled version of elfutils (vs. the system's version). Use -# the system's version of elfutils on systems that have -# %{elfutils_version} or higher. -%define with_bundled_elfutils %{?_with_bundled_elfutils: 1} %{?!_with_bundled_elfutils: 0} - -# Set up OS specific defaults. -%if 0%{?rhel} -%if "%rhel" >= "5" -# Enable these options by default for RHEL (unless the user has -# specified them on the command line). -%define with_crash %{?_without_crash: 0} %{?!_without_crash: 1} -%define with_bundled_elfutils %{?_without_bundled_elfutils: 0} %{?!_without_bundled_elfutils: 1} -%endif +# Default options (suitable for fedora) +%define with_sqlite 1 +%define with_crash 0 +%define with_bundled_elfutils 0 + +# Enable these options by default for RHEL +%if 0%{?rhel} >= 5 +%define with_crash 1 +%define with_bundled_elfutils 1 %endif Name: systemtap -- cgit