diff --git a/valgrind.spec b/valgrind.spec index 08aa1fe..e373cb0 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -53,10 +53,13 @@ Patch43: vg_bug270856_r2136.patch Patch44: vg_bug270851_r2148.patch Patch45: valgrind-3.6.1-kernel3.patch Patch46: glibc-2.14.diff +Patch47: valgrind_r12002.diff # hack around stupid rebuilding on openSUSE Factory # during building the major version of glibc is built into the suppression file -# so we do require the exact same version to be installed -Requires: glibc = %(getconf GNU_LIBC_VERSION | cut -d' ' -f2) +%define glibc_main_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f1) +%define glibc_major_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f2) +Requires: glibc >= %glibc_main_version.%glibc_major_version +Requires: glibc < %glibc_main_version.%{lua: print(rpm.expand("%glibc_major_version")+1)} %if %suse_version <= 1100 Provides: valgrind-devel = %version %endif @@ -172,6 +175,7 @@ cd .. %patch44 %patch45 %patch46 +%patch47 %build export CFLAGS="$RPM_OPT_FLAGS" @@ -201,15 +205,30 @@ cp -a README* NEWS AUTHORS COPYING COPYING.DOCS $RPM_BUILD_ROOT/%_defaultdocdir/ %defattr(-,root,root) /usr/bin/* %doc %_defaultdocdir/%name -%_libdir/valgrind %doc %_mandir/*/* +%dir %_libdir/valgrind +%ifarch x86_64 +%_libdir/valgrind/*-amd64-linux +%endif +%ifarch %ix86 x86_64 +%_libdir/valgrind/*-x86-linux +%endif +%ifarch ppc ppc64 +%_libdir/valgrind/*-ppc32-linux +%_libdir/valgrind/*-ppc64-linux +%endif +%ifarch s390 s390x +%libdir/valgrind/*-s390x-linux +%endif +%_libdir/valgrind/*-linux.so +%_libdir/valgrind/*.supp %if %suse_version > 1100 %files devel %defattr(-,root,root) %endif - +%_libdir/valgrind/lib*.a /usr/include/valgrind /usr/%_lib/pkgconfig/valgrind.pc diff --git a/valgrind_r12002.diff b/valgrind_r12002.diff new file mode 100644 index 0000000..2080c1d --- /dev/null +++ b/valgrind_r12002.diff @@ -0,0 +1,59 @@ +------------------------------------------------------------------------ +r12002 | dirk | 2011-08-23 22:29:10 +0200 (Tue, 23 Aug 2011) | 2 lines +Changed paths: + M /trunk/glibc-2.X.supp.in + +fix the suppressions to also match libc-2.XX.y.so + +------------------------------------------------------------------------ +Index: glibc-2.X.supp.in +=================================================================== +--- glibc-2.X.supp.in (revision 12001) ++++ glibc-2.X.supp.in (revision 12002) +@@ -168,9 +168,9 @@ + Memcheck:Param + socketcall.sendto(msg) + fun:__sendto_nocancel +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so + } + { + glibc24-64bit-padding-1c +@@ -180,7 +180,7 @@ + fun:__nscd_get_map_ref + fun:nscd_get*_r + fun:*nscd* +- obj:/*libc-@GLIBC_VERSION@.so ++ obj:/*libc-@GLIBC_VERSION@*.so + } + + +@@ -199,18 +199,18 @@ + Memcheck:Param + socketcall.sendto(msg) + fun:send +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so + } + { + X11-64bit-padding-4b + Memcheck:Param + socketcall.send(msg) + fun:send +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so + } + + ##----------------------------------------------------------------------##