New upstream version 1.23.9.
- Remove 5 x patches which are all upstream.
This commit is contained in:
parent
72eb7a3fcc
commit
cd6f5bc540
@ -1,72 +0,0 @@
|
|||||||
From 745e507c2fd06f9349212efe86f8143a1f0c5a0e Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Thu, 11 Jul 2013 12:53:28 +0100
|
|
||||||
Subject: [PATCH 1/2] ./run: Add a better comment describing --test mode.
|
|
||||||
|
|
||||||
This is just code motion, there is no functional change.
|
|
||||||
---
|
|
||||||
run.in | 49 ++++++++++++++++++++++++++-----------------------
|
|
||||||
1 file changed, 26 insertions(+), 23 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/run.in b/run.in
|
|
||||||
index 5d9ad75..f49df8e 100755
|
|
||||||
--- a/run.in
|
|
||||||
+++ b/run.in
|
|
||||||
@@ -214,28 +214,31 @@ export GNOME_KEYRING_PID=
|
|
||||||
# Run the program.
|
|
||||||
if [ -z "$test_mode" ]; then
|
|
||||||
exec $libtool "$@"
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+# For tests (./run --test):
|
|
||||||
+# - redirect all output to a file, and only print the file if the
|
|
||||||
+# test fails
|
|
||||||
+# - print how long it takes to run the test
|
|
||||||
+
|
|
||||||
+pid=$$
|
|
||||||
+tmpout=$b/tmp/run-$pid
|
|
||||||
+rm -f $tmpout
|
|
||||||
+start_t="$(date +'%s')"
|
|
||||||
+$libtool "$@" > $tmpout 2>&1
|
|
||||||
+fail=$?
|
|
||||||
+end_t="$(date +'%s')"
|
|
||||||
+if [ "$fail" -eq 0 ]; then
|
|
||||||
+ # Test successful.
|
|
||||||
+ echo $(($end_t - $start_t)) seconds: "$@"
|
|
||||||
+elif [ "$fail" -eq 77 ]; then
|
|
||||||
+ # Tests return 77 to mean skipped.
|
|
||||||
+ cat $tmpout
|
|
||||||
else
|
|
||||||
- # For tests (./run --test), redirect all output to a file, and
|
|
||||||
- # only print the file if the test fails.
|
|
||||||
- pid=$$
|
|
||||||
- tmpout=$b/tmp/run-$pid
|
|
||||||
- rm -f $tmpout
|
|
||||||
- start_t="$(date +'%s')"
|
|
||||||
- $libtool "$@" > $tmpout 2>&1
|
|
||||||
- fail=$?
|
|
||||||
- end_t="$(date +'%s')"
|
|
||||||
- if [ "$fail" -eq 0 ]; then
|
|
||||||
- # Test successful.
|
|
||||||
- echo $(($end_t - $start_t)) seconds: "$@"
|
|
||||||
- elif [ "$fail" -eq 77 ]; then
|
|
||||||
- # Tests return 77 to mean skipped.
|
|
||||||
- cat $tmpout
|
|
||||||
- else
|
|
||||||
- # Test failed.
|
|
||||||
- echo "$b/run --test" "$@"
|
|
||||||
- cat $tmpout
|
|
||||||
- echo "$b/run: command failed with exit code $fail"
|
|
||||||
- fi
|
|
||||||
- rm -f $tmpout
|
|
||||||
- exit $fail
|
|
||||||
+ # Test failed.
|
|
||||||
+ echo "$b/run --test" "$@"
|
|
||||||
+ cat $tmpout
|
|
||||||
+ echo "$b/run: command failed with exit code $fail"
|
|
||||||
fi
|
|
||||||
+rm -f $tmpout
|
|
||||||
+exit $fail
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
From a7b9d61cde63020686afe769ca8265a01fce208f Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Thu, 11 Jul 2013 21:05:56 +0100
|
|
||||||
Subject: [PATCH] ./run: Increase default timeout from 1h -> 4h.
|
|
||||||
|
|
||||||
1 hour was not long enough for the C API tests when run in Koji.
|
|
||||||
|
|
||||||
This update commit caab9f1e6f7ac0d8d5209c31854d640b807519ce.
|
|
||||||
---
|
|
||||||
run.in | 10 +++++++---
|
|
||||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/run.in b/run.in
|
|
||||||
index d8b2e03..e132055 100755
|
|
||||||
--- a/run.in
|
|
||||||
+++ b/run.in
|
|
||||||
@@ -222,11 +222,15 @@ fi
|
|
||||||
# - print how long it takes to run the test
|
|
||||||
# - timeout if the test takes too long to run
|
|
||||||
|
|
||||||
+# Originally 1h, but that is not long enough to run the C API
|
|
||||||
+# tests on Koji.
|
|
||||||
+timeout_period=4h
|
|
||||||
+
|
|
||||||
# Do we have Padraig's timeout utility (from coreutils)?
|
|
||||||
if timeout --help >/dev/null 2>&1; then
|
|
||||||
- # Timeout (SIGTERM) after 1 hour.
|
|
||||||
+ # Timeout (SIGTERM) after $timeout_period.
|
|
||||||
# Then send a second SIGKILL 30 seconds later.
|
|
||||||
- timeout="timeout -k 30s 1h"
|
|
||||||
+ timeout="timeout -k 30s $timeout_period"
|
|
||||||
fi
|
|
||||||
|
|
||||||
pid=$$
|
|
||||||
@@ -246,7 +250,7 @@ elif [ "$fail" -eq 124 ]; then
|
|
||||||
# Timed out.
|
|
||||||
echo "$b/run --test" "$@"
|
|
||||||
cat $tmpout
|
|
||||||
- echo "$b/run: command timed out after 1 hour"
|
|
||||||
+ echo "$b/run: command timed out after $timeout_period"
|
|
||||||
else
|
|
||||||
# Test failed.
|
|
||||||
echo "$b/run --test" "$@"
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
|||||||
From 0bc729e85b11262e5c1a38aff1602c960277c2b4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Tue, 9 Jul 2013 13:59:52 +0100
|
|
||||||
Subject: [PATCH] golang: Fix it so it builds if libguestfs is not installed.
|
|
||||||
|
|
||||||
It was using the installed copy of libguestfs not the local copy.
|
|
||||||
|
|
||||||
We can't encode the paths in guestfs.go, since this source file gets
|
|
||||||
copied into the install directory where those paths would not make
|
|
||||||
sense. Instead we have to use CGO_CFLAGS and CGO_LDFLAGS to
|
|
||||||
communicate the right flags to go when doing the local build and test.
|
|
||||||
---
|
|
||||||
generator/golang.ml | 6 +++---
|
|
||||||
run.in | 12 ++++++++++++
|
|
||||||
2 files changed, 15 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/generator/golang.ml b/generator/golang.ml
|
|
||||||
index f7010bc..82c1a0d 100644
|
|
||||||
--- a/generator/golang.ml
|
|
||||||
+++ b/generator/golang.ml
|
|
||||||
@@ -37,11 +37,11 @@ let generate_golang_go () =
|
|
||||||
package guestfs
|
|
||||||
|
|
||||||
/*
|
|
||||||
-#cgo CFLAGS: -I../src -DGUESTFS_PRIVATE=1
|
|
||||||
-#cgo LDFLAGS: -L../src/.libs -lguestfs
|
|
||||||
+#cgo CFLAGS: -DGUESTFS_PRIVATE=1
|
|
||||||
+#cgo LDFLAGS: -lguestfs
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
-#include <guestfs.h>
|
|
||||||
+#include \"guestfs.h\"
|
|
||||||
|
|
||||||
// cgo can't deal with variable argument functions.
|
|
||||||
static guestfs_h *
|
|
||||||
diff --git a/run.in b/run.in
|
|
||||||
index 46cd71f..5d9ad75 100755
|
|
||||||
--- a/run.in
|
|
||||||
+++ b/run.in
|
|
||||||
@@ -171,6 +171,18 @@ else
|
|
||||||
GOPATH="$b/golang:$GOPATH"
|
|
||||||
fi
|
|
||||||
export GOPATH
|
|
||||||
+if [ -z "$CGO_CFLAGS" ]; then
|
|
||||||
+ CGO_CFLAGS="-I$s/src"
|
|
||||||
+else
|
|
||||||
+ CGO_CFLAGS="$CGO_CFLAGS -I$s/src"
|
|
||||||
+fi
|
|
||||||
+export CGO_CFLAGS
|
|
||||||
+if [ -z "$CGO_LDFLAGS" ]; then
|
|
||||||
+ CGO_LDFLAGS="-L$b/src/.libs"
|
|
||||||
+else
|
|
||||||
+ CGO_LDFLAGS="$CGO_LDFLAGS -L$b/src/.libs"
|
|
||||||
+fi
|
|
||||||
+export CGO_LDFLAGS
|
|
||||||
|
|
||||||
# For GObject, Javascript and friends.
|
|
||||||
export GJS=@GJS@
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,144 +0,0 @@
|
|||||||
From ae78381287771a781f939f26a414fc8cfdc05fd6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Thu, 11 Jul 2013 19:09:05 +0100
|
|
||||||
Subject: [PATCH] launch: appliance: Fix a double-free if kernel linking fails
|
|
||||||
(RHBZ#983218).
|
|
||||||
|
|
||||||
This also simplifies the code which takes the building_lock around
|
|
||||||
guestfs___build_appliance.
|
|
||||||
|
|
||||||
Thanks Attila Fazekas for the detailed bug report.
|
|
||||||
---
|
|
||||||
src/appliance.c | 59 ++++++++++++++++++++++++++++++++++-----------------------
|
|
||||||
1 file changed, 35 insertions(+), 24 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/appliance.c b/src/appliance.c
|
|
||||||
index a05e966..5481e79 100644
|
|
||||||
--- a/src/appliance.c
|
|
||||||
+++ b/src/appliance.c
|
|
||||||
@@ -45,6 +45,7 @@
|
|
||||||
static const char *kernel_name = "vmlinuz." host_cpu;
|
|
||||||
static const char *initrd_name = "initramfs." host_cpu ".img";
|
|
||||||
|
|
||||||
+static int build_appliance (guestfs_h *g, char **kernel, char **initrd, char **appliance);
|
|
||||||
static int find_path (guestfs_h *g, int (*pred) (guestfs_h *g, const char *pelem, void *data), void *data, char **pelem);
|
|
||||||
static int dir_contains_file (const char *dir, const char *file);
|
|
||||||
static int dir_contains_files (const char *dir, ...);
|
|
||||||
@@ -137,21 +138,44 @@ gl_lock_define_initialized (static, building_lock);
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
guestfs___build_appliance (guestfs_h *g,
|
|
||||||
- char **kernel, char **initrd, char **appliance)
|
|
||||||
+ char **kernel_rtn,
|
|
||||||
+ char **initrd_rtn,
|
|
||||||
+ char **appliance_rtn)
|
|
||||||
+{
|
|
||||||
+ int r;
|
|
||||||
+ char *kernel, *initrd, *appliance;
|
|
||||||
+
|
|
||||||
+ gl_lock_lock (building_lock);
|
|
||||||
+ r = build_appliance (g, &kernel, &initrd, &appliance);
|
|
||||||
+ gl_lock_unlock (building_lock);
|
|
||||||
+
|
|
||||||
+ if (r == -1)
|
|
||||||
+ return -1;
|
|
||||||
+
|
|
||||||
+ /* Don't assign these until we know we're going to succeed, to avoid
|
|
||||||
+ * the caller double-freeing (RHBZ#983218).
|
|
||||||
+ */
|
|
||||||
+ *kernel_rtn = kernel;
|
|
||||||
+ *initrd_rtn = initrd;
|
|
||||||
+ *appliance_rtn = appliance;
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+build_appliance (guestfs_h *g,
|
|
||||||
+ char **kernel,
|
|
||||||
+ char **initrd,
|
|
||||||
+ char **appliance)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
uid_t uid = geteuid ();
|
|
||||||
CLEANUP_FREE char *supermin_path = NULL;
|
|
||||||
CLEANUP_FREE char *path = NULL;
|
|
||||||
|
|
||||||
- gl_lock_lock (building_lock);
|
|
||||||
-
|
|
||||||
/* Step (1). */
|
|
||||||
r = find_path (g, contains_supermin_appliance, NULL, &supermin_path);
|
|
||||||
- if (r == -1) {
|
|
||||||
- gl_lock_unlock (building_lock);
|
|
||||||
+ if (r == -1)
|
|
||||||
return -1;
|
|
||||||
- }
|
|
||||||
|
|
||||||
if (r == 1) {
|
|
||||||
/* Step (2): calculate checksum. */
|
|
||||||
@@ -161,25 +185,19 @@ guestfs___build_appliance (guestfs_h *g,
|
|
||||||
/* Step (3): cached appliance exists? */
|
|
||||||
r = check_for_cached_appliance (g, supermin_path, checksum, uid,
|
|
||||||
kernel, initrd, appliance);
|
|
||||||
- if (r != 0) {
|
|
||||||
- gl_lock_unlock (building_lock);
|
|
||||||
+ if (r != 0)
|
|
||||||
return r == 1 ? 0 : -1;
|
|
||||||
- }
|
|
||||||
|
|
||||||
/* Step (4): build supermin appliance. */
|
|
||||||
- r = build_supermin_appliance (g, supermin_path, checksum, uid,
|
|
||||||
- kernel, initrd, appliance);
|
|
||||||
- gl_lock_unlock (building_lock);
|
|
||||||
- return r;
|
|
||||||
+ return build_supermin_appliance (g, supermin_path, checksum, uid,
|
|
||||||
+ kernel, initrd, appliance);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Step (5). */
|
|
||||||
r = find_path (g, contains_fixed_appliance, NULL, &path);
|
|
||||||
- if (r == -1) {
|
|
||||||
- gl_lock_unlock (building_lock);
|
|
||||||
+ if (r == -1)
|
|
||||||
return -1;
|
|
||||||
- }
|
|
||||||
|
|
||||||
if (r == 1) {
|
|
||||||
size_t len = strlen (path);
|
|
||||||
@@ -189,17 +207,13 @@ guestfs___build_appliance (guestfs_h *g,
|
|
||||||
sprintf (*kernel, "%s/kernel", path);
|
|
||||||
sprintf (*initrd, "%s/initrd", path);
|
|
||||||
sprintf (*appliance, "%s/root", path);
|
|
||||||
-
|
|
||||||
- gl_lock_unlock (building_lock);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Step (6). */
|
|
||||||
r = find_path (g, contains_old_style_appliance, NULL, &path);
|
|
||||||
- if (r == -1) {
|
|
||||||
- gl_lock_unlock (building_lock);
|
|
||||||
+ if (r == -1)
|
|
||||||
return -1;
|
|
||||||
- }
|
|
||||||
|
|
||||||
if (r == 1) {
|
|
||||||
size_t len = strlen (path);
|
|
||||||
@@ -208,14 +222,11 @@ guestfs___build_appliance (guestfs_h *g,
|
|
||||||
sprintf (*kernel, "%s/%s", path, kernel_name);
|
|
||||||
sprintf (*initrd, "%s/%s", path, initrd_name);
|
|
||||||
*appliance = NULL;
|
|
||||||
-
|
|
||||||
- gl_lock_unlock (building_lock);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
error (g, _("cannot find any suitable libguestfs supermin, fixed or old-style appliance on LIBGUESTFS_PATH (search path: %s)"),
|
|
||||||
g->path);
|
|
||||||
- gl_lock_unlock (building_lock);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
|||||||
From caab9f1e6f7ac0d8d5209c31854d640b807519ce Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Thu, 11 Jul 2013 12:58:45 +0100
|
|
||||||
Subject: [PATCH 2/2] ./run: Timeout tests after 1 hour.
|
|
||||||
|
|
||||||
No single test should run longer than 1 hour even on the slowest of
|
|
||||||
hardware. We are having a problem in Koji where a test hangs and then
|
|
||||||
we end up losing the output completely, so a timeout + print the log
|
|
||||||
to that point is much better.
|
|
||||||
---
|
|
||||||
run.in | 15 ++++++++++++++-
|
|
||||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/run.in b/run.in
|
|
||||||
index f49df8e..d8b2e03 100755
|
|
||||||
--- a/run.in
|
|
||||||
+++ b/run.in
|
|
||||||
@@ -220,12 +220,20 @@ fi
|
|
||||||
# - redirect all output to a file, and only print the file if the
|
|
||||||
# test fails
|
|
||||||
# - print how long it takes to run the test
|
|
||||||
+# - timeout if the test takes too long to run
|
|
||||||
+
|
|
||||||
+# Do we have Padraig's timeout utility (from coreutils)?
|
|
||||||
+if timeout --help >/dev/null 2>&1; then
|
|
||||||
+ # Timeout (SIGTERM) after 1 hour.
|
|
||||||
+ # Then send a second SIGKILL 30 seconds later.
|
|
||||||
+ timeout="timeout -k 30s 1h"
|
|
||||||
+fi
|
|
||||||
|
|
||||||
pid=$$
|
|
||||||
tmpout=$b/tmp/run-$pid
|
|
||||||
rm -f $tmpout
|
|
||||||
start_t="$(date +'%s')"
|
|
||||||
-$libtool "$@" > $tmpout 2>&1
|
|
||||||
+$timeout $libtool "$@" > $tmpout 2>&1
|
|
||||||
fail=$?
|
|
||||||
end_t="$(date +'%s')"
|
|
||||||
if [ "$fail" -eq 0 ]; then
|
|
||||||
@@ -234,6 +242,11 @@ if [ "$fail" -eq 0 ]; then
|
|
||||||
elif [ "$fail" -eq 77 ]; then
|
|
||||||
# Tests return 77 to mean skipped.
|
|
||||||
cat $tmpout
|
|
||||||
+elif [ "$fail" -eq 124 ]; then
|
|
||||||
+ # Timed out.
|
|
||||||
+ echo "$b/run --test" "$@"
|
|
||||||
+ cat $tmpout
|
|
||||||
+ echo "$b/run: command timed out after 1 hour"
|
|
||||||
else
|
|
||||||
# Test failed.
|
|
||||||
echo "$b/run --test" "$@"
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -11,20 +11,14 @@
|
|||||||
Summary: Access and modify virtual machine disk images
|
Summary: Access and modify virtual machine disk images
|
||||||
Name: libguestfs
|
Name: libguestfs
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 1.23.8
|
Version: 1.23.9
|
||||||
Release: 5%{?dist}
|
Release: 1%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
|
|
||||||
# Source and patches.
|
# Source and patches.
|
||||||
URL: http://libguestfs.org/
|
URL: http://libguestfs.org/
|
||||||
Source0: http://libguestfs.org/download/1.23-development/%{name}-%{version}.tar.gz
|
Source0: http://libguestfs.org/download/1.23-development/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch1: 0001-golang-Fix-it-so-it-builds-if-libguestfs-is-not-inst.patch
|
|
||||||
Patch2: 0001-.-run-Add-a-better-comment-describing-test-mode.patch
|
|
||||||
Patch3: 0002-.-run-Timeout-tests-after-1-hour.patch
|
|
||||||
Patch4: 0001-.-run-Increase-default-timeout-from-1h-4h.patch
|
|
||||||
Patch5: 0001-launch-appliance-Fix-a-double-free-if-kernel-linking.patch
|
|
||||||
|
|
||||||
# Basic build requirements:
|
# Basic build requirements:
|
||||||
BuildRequires: perl(Pod::Simple)
|
BuildRequires: perl(Pod::Simple)
|
||||||
BuildRequires: perl(Pod::Man)
|
BuildRequires: perl(Pod::Man)
|
||||||
@ -540,12 +534,6 @@ for %{name}.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
|
|
||||||
if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then
|
if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then
|
||||||
# For sVirt to work, the local temporary directory we use in the
|
# For sVirt to work, the local temporary directory we use in the
|
||||||
# tests must be labelled the same way as /tmp.
|
# tests must be labelled the same way as /tmp.
|
||||||
@ -918,6 +906,10 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 19 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.23.9-1
|
||||||
|
- New upstream version 1.23.9.
|
||||||
|
- Remove 5 x patches which are all upstream.
|
||||||
|
|
||||||
* Thu Jul 11 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.23.8-5
|
* Thu Jul 11 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.23.8-5
|
||||||
- Add patches to ./run so we capture errors when i686 tests time out.
|
- Add patches to ./run so we capture errors when i686 tests time out.
|
||||||
- Include upstream patch to fix double-free if appliance
|
- Include upstream patch to fix double-free if appliance
|
||||||
|
Loading…
Reference in New Issue
Block a user