From 95a41e67df1f5424d6e2a7bd21902e8a89c138ed Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 14 Feb 2013 22:18:47 +0000 Subject: [PATCH] New upstream version 1.21.11. - Add experimental patch to capture stack trace of segfaults in the appliance. --- ...glibc-trick-to-try-to-display-a-stac.patch | 34 +++++++++++++++++++ libguestfs.spec | 9 +++-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 0001-appliance-Use-a-glibc-trick-to-try-to-display-a-stac.patch diff --git a/0001-appliance-Use-a-glibc-trick-to-try-to-display-a-stac.patch b/0001-appliance-Use-a-glibc-trick-to-try-to-display-a-stac.patch new file mode 100644 index 0000000..13b29a3 --- /dev/null +++ b/0001-appliance-Use-a-glibc-trick-to-try-to-display-a-stac.patch @@ -0,0 +1,34 @@ +From c598e14052399f19d36d7874d7133cba779bd3c2 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 14 Feb 2013 22:15:25 +0000 +Subject: [PATCH] appliance: Use a glibc trick to try to display a stack trace + if a program in the appliance segfaults. + +--- + appliance/init | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/appliance/init b/appliance/init +index dee4efc..e7e59da 100755 +--- a/appliance/init ++++ b/appliance/init +@@ -10,6 +10,16 @@ RUNLEVEL=S + PREVLEVEL=N + export RUNLEVEL PREVLEVEL + ++# Try to print a stack trace for segfaults inside the appliance. ++for d in /lib64 /lib; do ++ f=$d/libSegFault.so ++ if [ -f "$f" ]; then ++ LD_PRELOAD=$f ++ export LD_PRELOAD ++ break ++ fi ++done ++ + mkdir -p /sysroot + + if [ ! -d /proc ]; then rm -f /proc; fi +-- +1.8.1.2 + diff --git a/libguestfs.spec b/libguestfs.spec index 36dde15..043b054 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -22,7 +22,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.21.11 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: Development/Libraries URL: http://libguestfs.org/ @@ -33,6 +33,8 @@ Patch1: ruby-1.9-vendor-not-site.patch BuildRequires: autoconf, automake, libtool, gettext-devel %endif +Patch2: 0001-appliance-Use-a-glibc-trick-to-try-to-display-a-stac.patch + # Basic build requirements: BuildRequires: perl(Pod::Simple) BuildRequires: perl(Pod::Man) @@ -684,6 +686,8 @@ fi autoreconf -i %endif +%patch2 -p1 + mkdir -p daemon/m4 # Replace developer-centric README that ships with libguestfs, with @@ -1032,8 +1036,9 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs %changelog -* Thu Feb 14 2013 Richard W.M. Jones - 1:1.21.11-1 +* Thu Feb 14 2013 Richard W.M. Jones - 1:1.21.11-2 - New upstream version 1.21.11. +- Add experimental patch to capture stack trace of segfaults in the appliance. * Mon Feb 11 2013 Richard W.M. Jones - 1:1.21.10-1 - New upstream version 1.21.10.