Add upstream patch so we don't depend on libtool.

This commit is contained in:
Richard W.M. Jones 2011-04-16 15:31:29 +01:00
parent 5eeb3141bc
commit a1f133d388
2 changed files with 37 additions and 2 deletions

View File

@ -0,0 +1,30 @@
From 5d139fa8a4a7f9ff65e7b936fd7376f661c72f48 Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones@redhat.com>
Date: Sat, 16 Apr 2011 15:29:58 +0100
Subject: [PATCH] run script: Don't depend on libtool being installed.
Also use 'exec' to run the program.
---
run | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/run b/run
index 04152b1..7e18edc 100755
--- a/run
+++ b/run
@@ -38,5 +38,11 @@ export LD_LIBRARY_PATH="$b/src/.libs"
export LIBGUESTFS_PATH="$b/appliance"
export PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch"
+# Do we have libtool? If we have it then we can use it to make
+# running valgrind simpler. However don't depend on it.
+if libtool --help >/dev/null 2>&1; then
+ libtool="libtool --mode=execute"
+fi
+
# Run the program.
-libtool --mode=execute "$@"
+exec $libtool "$@"
--
1.7.4.4

View File

@ -30,7 +30,7 @@ Summary: Access and modify virtual machine disk images
Name: libguestfs
Epoch: 1
Version: 1.11.1
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv2+
Group: Development/Libraries
URL: http://libguestfs.org/
@ -40,6 +40,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
# Disable FUSE tests, not supported in Koji at the moment.
Patch0: libguestfs-1.7.13-no-fuse-test.patch
# Upstream patch to fix run depending on libtool.
Patch1: 0001-run-script-Don-t-depend-on-libtool-being-installed.patch
# Basic build requirements:
BuildRequires: /usr/bin/pod2man
BuildRequires: /usr/bin/pod2text
@ -434,6 +437,7 @@ php-%{name} contains PHP bindings for %{name}.
%setup -q
%patch0 -p1
%patch1 -p1
mkdir -p daemon/m4
@ -772,8 +776,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Sat Apr 16 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.1-1
* Sat Apr 16 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.1-2
- New upstream version 1.11.1.
- Add upstream patch so we don't depend on libtool.
* Fri Apr 15 2011 Richard W.M. Jones <rjones@redhat.com> - 1:1.11.0-2
- Bump and rebuild.