--- mutrace-0.2.0.orig/Makefile.am +++ mutrace-0.2.0/Makefile.am @@ -67,7 +67,7 @@ libmatrace_la_LIBADD = \ $(PTHREAD_LIBS) \ -lrt \ - -ldl + -ldl libmatrace_la_CFLAGS = \ $(PTHREAD_CFLAGS) \ -DSONAME=\"libmatrace.so\" @@ -79,21 +79,25 @@ -module \ -export-dynamic \ -shared \ - -prefer-pic + -prefer-pic \ libmutrace_backtrace_symbols_la_LIBADD = \ $(PTHREAD_LIBS) \ -lrt \ - -ldl + -ldl \ + "-static -lbfd" libmutrace_backtrace_symbols_la_CFLAGS = \ - $(PTHREAD_CFLAGS) + $(PTHREAD_CFLAGS) \ + -I/usr/include/libiberty mutrace: mutrace.in Makefile sed -e 's,@PACKAGE_STRING\@,$(PACKAGE_STRING),g' \ + -e 's,@LIBDIR\@,$(libdir),g' \ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' < $< > $@ chmod +x mutrace matrace: matrace.in Makefile sed -e 's,@PACKAGE_STRING\@,$(PACKAGE_STRING),g' \ + -e 's,@LIBDIR\@,$(libdir),g' \ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' < $< > $@ chmod +x matrace --- mutrace-0.2.0.orig/backtrace-symbols.c +++ mutrace-0.2.0/backtrace-symbols.c @@ -127,14 +127,14 @@ if (found) return; - if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0) + if ((bfd_section_flags(section) & SEC_ALLOC) == 0) return; - vma = bfd_get_section_vma(abfd, section); + vma = bfd_section_vma(section); if (pc < vma) return; - size = bfd_section_size(abfd, section); + size = bfd_section_size(section); if (pc >= vma + size) return; --- mutrace-0.2.0.orig/configure.ac +++ mutrace-0.2.0/configure.ac @@ -72,7 +72,6 @@ AC_CHECK_HEADERS([sys/ioctl.h]) AC_CHECK_HEADERS([byteswap.h]) -AC_SEARCH_LIBS([bfd_init], [bfd], [], [AC_MSG_ERROR([*** libbfd not found])]) AC_CHECK_HEADERS([bfd.h], [], [AC_MSG_ERROR([*** libbfd headers not found])]) #### Typdefs, structures, etc. #### --- mutrace-0.2.0.orig/debian/changelog +++ mutrace-0.2.0/debian/changelog @@ -0,0 +1,54 @@ +mutrace (0.2.0-3.4) unstable; urgency=medium + + * Non-maintainer upload. + * Fix b-d problem with binutils introduced in 0.2.0-3.3. + - All the builds in buildd failed due to this. + + -- Sudip Mukherjee Fri, 24 Jul 2020 23:42:15 +0100 + +mutrace (0.2.0-3.3) unstable; urgency=medium + + * Non-maintainer upload. + * Used static library and marked with Built-Using. (Closes: #964536) + + -- Sudip Mukherjee Wed, 22 Jul 2020 19:49:30 +0100 + +mutrace (0.2.0-3.2) unstable; urgency=medium + + * Non-maintainer upload. + * Fix error with undefined symbol. (Closes: #731846) + + -- Sudip Mukherjee Thu, 12 Mar 2020 22:01:21 +0000 + +mutrace (0.2.0-3.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS with binutils. (Closes: #951887) + + -- Sudip Mukherjee Thu, 05 Mar 2020 20:25:10 +0000 + +mutrace (0.2.0-3) unstable; urgency=medium + + [ Fernando Seiti Furusato ] + * Non-maintainer upload. + * debian/control: include libiberty-dev to build-depends + * debian/patches/libiberty.patch: includes -I/usr/include/libiberty to + Makefile.am + + [ Riku Voipio ] + * Upload to unstable, closes #730903 + + -- Riku Voipio Thu, 12 May 2016 09:40:17 -0400 + +mutrace (0.2.0-2) unstable; urgency=low + + * Link statically against bfd, LP: #875928 + + -- Riku Voipio Mon, 17 Oct 2011 11:48:16 +0300 + +mutrace (0.2.0-1) unstable; urgency=low + + * Initial upload to debian + * include changes from upstream git since 0.2 + + -- Riku Voipio Mon, 23 May 2011 11:50:52 +0300 --- mutrace-0.2.0.orig/debian/compat +++ mutrace-0.2.0/debian/compat @@ -0,0 +1 @@ +8 --- mutrace-0.2.0.orig/debian/control +++ mutrace-0.2.0/debian/control @@ -0,0 +1,18 @@ +Source: mutrace +Section: utils +Priority: optional +Maintainer: Riku Voipio +Standards-Version: 3.9.1 +Homepage: http://0pointer.de/blog/projects/mutrace.html +Build-Depends: + debhelper (>=8), automake, autoconf, libtool, binutils-dev, libiberty-dev + +Package: mutrace +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Built-Using: ${Built-Using} +Description: mutex and realtime memory allocation profiling tools + Two tools are included in this package: + . + mutrace - for profiling lock contention. + matrace - for profiling memory allocations in realtime threads. --- mutrace-0.2.0.orig/debian/copyright +++ mutrace-0.2.0/debian/copyright @@ -0,0 +1,33 @@ +This package is derived from sources obtained at: + http://git.0pointer.de/?p=mutrace.git + +Copyright: + Copyright (c) 2009 Lennart Poettering + backtrace-symbols.c: Copyright: 2007 Jeff Muizelaar / 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc + +License: + + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU Lesser General +Public License can be found in `/usr/share/common-licenses/LGPL-3'. + +backtrace-symbols.c is GPL-2+. + +On Debian systems, the complete text of the GNU Lesser General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + +The Debian packaging is: + Copyright (c) 2011 Riku Voipio --- mutrace-0.2.0.orig/debian/rules +++ mutrace-0.2.0/debian/rules @@ -0,0 +1,20 @@ +#!/usr/bin/make -f + +export LIBS = -l:libbfd.a + +override_dh_auto_clean: + dh_auto_clean + rm -f Makefile.in aclocal.m4 compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 missing + +override_dh_auto_configure: + NOCONFIGURE=yes ./bootstrap.sh + dh_auto_configure -- --libdir=/usr/lib/mutrace/ + +override_dh_makeshlibs: + true + +%: + dh $@ + +override_dh_gencontrol: + dh_gencontrol -- -VBuilt-Using="`dpkg-query -f'$${source:Package} (= $${source:Version})' -W binutils-dev`" --- mutrace-0.2.0.orig/matrace.in +++ mutrace-0.2.0/matrace.in @@ -72,13 +72,13 @@ fi if [ x"$LD_PRELOAD" = x ] ; then - export LD_PRELOAD="libmatrace.so" + export LD_PRELOAD="@LIBDIR@/libmatrace.so" else - export LD_PRELOAD="$LD_PRELOAD:libmatrace.so" + export LD_PRELOAD="$LD_PRELOAD:@LIBDIR@/libmatrace.so" fi if [ x"$debug_info" = x1 ] ; then - export LD_PRELOAD="$LD_PRELOAD:libmutrace-backtrace-symbols.so" + export LD_PRELOAD="$LD_PRELOAD:@LIBDIR@/libmutrace-backtrace-symbols.so" fi exec "$@" --- mutrace-0.2.0.orig/mutrace.in +++ mutrace-0.2.0/mutrace.in @@ -132,13 +132,13 @@ fi if [ x"$LD_PRELOAD" = x ] ; then - export LD_PRELOAD="libmutrace.so" + export LD_PRELOAD="@LIBDIR@/libmutrace.so" else - export LD_PRELOAD="$LD_PRELOAD:libmutrace.so" + export LD_PRELOAD="$LD_PRELOAD:@LIBDIR@/libmutrace.so" fi if [ x"$debug_info" = x1 ] ; then - export LD_PRELOAD="$LD_PRELOAD:libmutrace-backtrace-symbols.so" + export LD_PRELOAD="$LD_PRELOAD:@LIBDIR@/libmutrace-backtrace-symbols.so" fi exec "$@" --- mutrace-0.2.0.orig/patches/libiberty.patch +++ mutrace-0.2.0/patches/libiberty.patch @@ -0,0 +1,14 @@ +Index: mutrace-0.2.0/Makefile.am +=================================================================== +--- mutrace-0.2.0.orig/Makefile.am ++++ mutrace-0.2.0/Makefile.am +@@ -86,7 +86,8 @@ libmutrace_backtrace_symbols_la_LIBADD = + -ldl \ + "-static -lbfd" + libmutrace_backtrace_symbols_la_CFLAGS = \ +- $(PTHREAD_CFLAGS) ++ $(PTHREAD_CFLAGS) \ ++ -I/usr/include/libiberty + + mutrace: mutrace.in Makefile + sed -e 's,@PACKAGE_STRING\@,$(PACKAGE_STRING),g' \ --- mutrace-0.2.0.orig/patches/series +++ mutrace-0.2.0/patches/series @@ -0,0 +1 @@ +libiberty.patch