Group :: Development/Other
RPM: valgrind
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Name: valgrind
Version: 3.2.3
#define cvsdate 20040522
Release: alt1
Summary: Valgrind, an open-source memory debugger for GNU/Linux
License: GPL
Group: Development/Other
URL: http://www.valgrind.org/
Packager: Sergey Vlasov <vsu at altlinux.ru>
%def_enable check
%ifdef cvsdate
Source: %name-%cvsdate.tar
%else
Source: http://www.valgrind.org/downloads/%name-%version.tar
%endif
Patch1: valgrind-3.2.0-svn-r5966-detect-only64bit.patch
Patch2: valgrind-3.2.0-svn-r5967-sendto-display-fix.patch
Patch502: valgrind-3.2.1-rh-openat.patch
Patch1001: valgrind-3.2.0-alt-fix-only64bit.patch
Patch1002: valgrind-3.1.0-alt-xorg-7.0-suppressions.patch
Patch1003: valgrind-3.1.0-alt-glibc-suppressions.patch
Patch1004: valgrind-3.2.3-alt-pkgconfig.patch
Patch1005: valgrind-3.2.1-alt-regtest.patch
%if_enabled check
BuildRequires: /proc
%endif
# Automatically added by buildreq on Thu Jan 19 2006
BuildRequires: gcc-c++ gdb libX11-devel libXt-devel xorg-x11-proto-devel
%description
Valgrind is a GPL'd tool to help you find memory-management problems in
your programs. When a program is run under Valgrind's supervision, all
reads and writes of memory are checked, and calls to
malloc/new/free/delete are intercepted. As a result, Valgrind can
detect problems such as:
* Use of uninitialised memory
* Reading/writing memory after it has been free'd
* Reading/writing off the end of malloc'd blocks
* Reading/writing inappropriate areas on the stack
* Memory leaks -- where pointers to malloc'd blocks are lost forever
* Passing of uninitialised and/or unaddressible memory to system calls
* Mismatched use of malloc/new/new [] vs free/delete/delete []
* Overlaps of arguments to strcpy() and related functions
* Some abuses of the POSIX pthread API
%package devel
Summary: Header files for embedding Valgrind calls into other applications
License: BSD
Group: Development/Other
Requires: %name = %version-%release
%description devel
The valgrind-devel subpackage contains header files with macros to
manipulate and query Valgrind's execution from within the client
program. The resulting executables will still run without Valgrind,
just a little bit more slowly than they otherwise would, but otherwise
unchanged.
When run on Valgrind with --client-perms=yes, Valgrind observes these
macro calls and takes appropriate action. When run on Valgrind with
--client-perms=no (the default), Valgrind observes these macro calls
but does not take any action as a result.
%package tool-devel
Summary: Header files and libraries for compiling Valgrind tools
Group: Development/Other
Requires: %name-devel = %version-%release
%description tool-devel
The valgrind-tool-devel subpackage contains header files and libraries
needed to compile Valgrind tools separately from the Valgrind core.
%prep
%setup -q %{?cvsdate:-n %name}
%patch1 -p1
%patch2 -p1
%patch502 -p1
%patch1001 -p1
%patch1002 -p1 -b .xorg-7.0-suppressions
%patch1003 -p1 -b .glibc-suppressions
%patch1004 -p1
%patch1005 -p1
%build
#%{?cvsdate:./autogen.sh}
autoreconf -vi
# Currently there is no usable MPI implementation in Sisyphus.
# -fstack-protector does not work because Valgrind is not linked with glibc.
%configure \
--without-mpicc \
CC="gcc -fno-stack-protector"
%make_build
%if_enabled check
if [ -r /proc/self/exe ]; then
%make_build check ||:
# Ensure there are no unexpected file descriptors open,
# the testsuite otherwise fails.
cat > close_fds.c <<EOF
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv)
{
int i, j = sysconf(_SC_OPEN_MAX);
if (j < 0)
exit(1);
for (i = 3; i < j; ++i)
close(i);
execvp(argv[1], argv + 1);
return 1;
}
EOF
gcc $RPM_OPT_FLAGS -o close_fds close_fds.c
echo "===============TESTING==================="
./close_fds make regtest ||:
echo "===============END TESTING==============="
# Show diffs in the build log.
# memcheck/tests/x86/scalar diffs are too big for this.
find */tests -name '*.diff*' -print0 | \
grep -zv 'memcheck/tests/x86/scalar\.' | \
sort -z | \
xargs -r0 grep '^' --
else
echo "/proc/self/exe not available - regression test skipped" >&2
fi
%endif #check
%install
%make_install install DESTDIR=%buildroot
mv %buildroot%_docdir/%name{,-%version}
install -m644 -p AUTHORS ACKNOWLEDGEMENTS FAQ.txt NEWS \
%buildroot%_docdir/%name-%version/
# Valgrind shared libraries should not be stripped - see README_PACKAGERS
%set_strip_method executable
%files
%_bindir/*
%_libdir/%name/
%exclude %_libdir/%name/*/lib*.a
%_docdir/%name-%version/
%exclude %_docdir/%name-%version/valgrind_manual.ps
%_mandir/*/*
%files devel
%dir %_includedir/%name/
%_includedir/%name/valgrind.h
%_includedir/%name/callgrind.h
%_includedir/%name/helgrind.h
%_includedir/%name/memcheck.h
%_libdir/pkgconfig/%name.pc
%files tool-devel
%_includedir/%name/*
%exclude %_includedir/%name/valgrind.h
%exclude %_includedir/%name/callgrind.h
%exclude %_includedir/%name/helgrind.h
%exclude %_includedir/%name/memcheck.h
%_libdir/%name/*/lib*.a
%changelog
…
Full changelog you can see here
Version: 3.2.3
#define cvsdate 20040522
Release: alt1
Summary: Valgrind, an open-source memory debugger for GNU/Linux
License: GPL
Group: Development/Other
URL: http://www.valgrind.org/
Packager: Sergey Vlasov <vsu at altlinux.ru>
%def_enable check
%ifdef cvsdate
Source: %name-%cvsdate.tar
%else
Source: http://www.valgrind.org/downloads/%name-%version.tar
%endif
Patch1: valgrind-3.2.0-svn-r5966-detect-only64bit.patch
Patch2: valgrind-3.2.0-svn-r5967-sendto-display-fix.patch
Patch502: valgrind-3.2.1-rh-openat.patch
Patch1001: valgrind-3.2.0-alt-fix-only64bit.patch
Patch1002: valgrind-3.1.0-alt-xorg-7.0-suppressions.patch
Patch1003: valgrind-3.1.0-alt-glibc-suppressions.patch
Patch1004: valgrind-3.2.3-alt-pkgconfig.patch
Patch1005: valgrind-3.2.1-alt-regtest.patch
%if_enabled check
BuildRequires: /proc
%endif
# Automatically added by buildreq on Thu Jan 19 2006
BuildRequires: gcc-c++ gdb libX11-devel libXt-devel xorg-x11-proto-devel
%description
Valgrind is a GPL'd tool to help you find memory-management problems in
your programs. When a program is run under Valgrind's supervision, all
reads and writes of memory are checked, and calls to
malloc/new/free/delete are intercepted. As a result, Valgrind can
detect problems such as:
* Use of uninitialised memory
* Reading/writing memory after it has been free'd
* Reading/writing off the end of malloc'd blocks
* Reading/writing inappropriate areas on the stack
* Memory leaks -- where pointers to malloc'd blocks are lost forever
* Passing of uninitialised and/or unaddressible memory to system calls
* Mismatched use of malloc/new/new [] vs free/delete/delete []
* Overlaps of arguments to strcpy() and related functions
* Some abuses of the POSIX pthread API
%package devel
Summary: Header files for embedding Valgrind calls into other applications
License: BSD
Group: Development/Other
Requires: %name = %version-%release
%description devel
The valgrind-devel subpackage contains header files with macros to
manipulate and query Valgrind's execution from within the client
program. The resulting executables will still run without Valgrind,
just a little bit more slowly than they otherwise would, but otherwise
unchanged.
When run on Valgrind with --client-perms=yes, Valgrind observes these
macro calls and takes appropriate action. When run on Valgrind with
--client-perms=no (the default), Valgrind observes these macro calls
but does not take any action as a result.
%package tool-devel
Summary: Header files and libraries for compiling Valgrind tools
Group: Development/Other
Requires: %name-devel = %version-%release
%description tool-devel
The valgrind-tool-devel subpackage contains header files and libraries
needed to compile Valgrind tools separately from the Valgrind core.
%prep
%setup -q %{?cvsdate:-n %name}
%patch1 -p1
%patch2 -p1
%patch502 -p1
%patch1001 -p1
%patch1002 -p1 -b .xorg-7.0-suppressions
%patch1003 -p1 -b .glibc-suppressions
%patch1004 -p1
%patch1005 -p1
%build
#%{?cvsdate:./autogen.sh}
autoreconf -vi
# Currently there is no usable MPI implementation in Sisyphus.
# -fstack-protector does not work because Valgrind is not linked with glibc.
%configure \
--without-mpicc \
CC="gcc -fno-stack-protector"
%make_build
%if_enabled check
if [ -r /proc/self/exe ]; then
%make_build check ||:
# Ensure there are no unexpected file descriptors open,
# the testsuite otherwise fails.
cat > close_fds.c <<EOF
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv)
{
int i, j = sysconf(_SC_OPEN_MAX);
if (j < 0)
exit(1);
for (i = 3; i < j; ++i)
close(i);
execvp(argv[1], argv + 1);
return 1;
}
EOF
gcc $RPM_OPT_FLAGS -o close_fds close_fds.c
echo "===============TESTING==================="
./close_fds make regtest ||:
echo "===============END TESTING==============="
# Show diffs in the build log.
# memcheck/tests/x86/scalar diffs are too big for this.
find */tests -name '*.diff*' -print0 | \
grep -zv 'memcheck/tests/x86/scalar\.' | \
sort -z | \
xargs -r0 grep '^' --
else
echo "/proc/self/exe not available - regression test skipped" >&2
fi
%endif #check
%install
%make_install install DESTDIR=%buildroot
mv %buildroot%_docdir/%name{,-%version}
install -m644 -p AUTHORS ACKNOWLEDGEMENTS FAQ.txt NEWS \
%buildroot%_docdir/%name-%version/
# Valgrind shared libraries should not be stripped - see README_PACKAGERS
%set_strip_method executable
%files
%_bindir/*
%_libdir/%name/
%exclude %_libdir/%name/*/lib*.a
%_docdir/%name-%version/
%exclude %_docdir/%name-%version/valgrind_manual.ps
%_mandir/*/*
%files devel
%dir %_includedir/%name/
%_includedir/%name/valgrind.h
%_includedir/%name/callgrind.h
%_includedir/%name/helgrind.h
%_includedir/%name/memcheck.h
%_libdir/pkgconfig/%name.pc
%files tool-devel
%_includedir/%name/*
%exclude %_includedir/%name/valgrind.h
%exclude %_includedir/%name/callgrind.h
%exclude %_includedir/%name/helgrind.h
%exclude %_includedir/%name/memcheck.h
%_libdir/%name/*/lib*.a
%changelog
…
Full changelog you can see here