Rebuild to resolve broken dependency on krb libraries.
- Remove obsolete Obsoletes. - Fix Source URL. - Require java-headless instead of java: https://fedoraproject.org/wiki/Changes/HeadlessJava - Backport upstream patch to fix btrfs.
This commit is contained in:
parent
e36549b484
commit
6c086cccf0
@ -0,0 +1,79 @@
|
|||||||
|
From 59596810b009744316941da8ef18b7e75b503b9f Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
|
Date: Fri, 15 Nov 2013 09:05:43 +0000
|
||||||
|
Subject: [PATCH] daemon: btrfs: Upstream 'btrfs device add' command now needs
|
||||||
|
'--force' option to work.
|
||||||
|
|
||||||
|
However earlier versions didn't have the --force option, so we
|
||||||
|
have to detect it.
|
||||||
|
---
|
||||||
|
daemon/btrfs.c | 35 +++++++++++++++++++++++++++++++----
|
||||||
|
1 file changed, 31 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
|
||||||
|
index 765dec6..0b877f8 100644
|
||||||
|
--- a/daemon/btrfs.c
|
||||||
|
+++ b/daemon/btrfs.c
|
||||||
|
@@ -588,14 +588,29 @@ do_btrfs_filesystem_balance (const char *fs)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* Test if 'btrfs device add' needs the --force option (added
|
||||||
|
+ * c.2013-09) in order to work.
|
||||||
|
+ */
|
||||||
|
+static int
|
||||||
|
+test_btrfs_device_add_needs_force (void)
|
||||||
|
+{
|
||||||
|
+ int r;
|
||||||
|
+ CLEANUP_FREE char *out = NULL, *err = NULL;
|
||||||
|
+
|
||||||
|
+ r = command (&out, &err, "btrfs", "device", "add", "--help", NULL);
|
||||||
|
+ if (r == -1) {
|
||||||
|
+ reply_with_error ("%s: %s", "btrfs device add --help", err);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return strstr (out, "--force") != NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
int
|
||||||
|
do_btrfs_device_add (char *const *devices, const char *fs)
|
||||||
|
{
|
||||||
|
+ static int btrfs_device_add_needs_force = -1;
|
||||||
|
size_t nr_devices = count_strings (devices);
|
||||||
|
-
|
||||||
|
- if (nr_devices == 0)
|
||||||
|
- return 0;
|
||||||
|
-
|
||||||
|
size_t MAX_ARGS = nr_devices + 8;
|
||||||
|
const char *argv[MAX_ARGS];
|
||||||
|
size_t i = 0, j;
|
||||||
|
@@ -603,6 +618,15 @@ do_btrfs_device_add (char *const *devices, const char *fs)
|
||||||
|
CLEANUP_FREE char *err = NULL;
|
||||||
|
int r;
|
||||||
|
|
||||||
|
+ if (nr_devices == 0)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ if (btrfs_device_add_needs_force == -1) {
|
||||||
|
+ btrfs_device_add_needs_force = test_btrfs_device_add_needs_force ();
|
||||||
|
+ if (btrfs_device_add_needs_force == -1)
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
fs_buf = sysroot_path (fs);
|
||||||
|
if (fs_buf == NULL) {
|
||||||
|
reply_with_perror ("malloc");
|
||||||
|
@@ -613,6 +637,9 @@ do_btrfs_device_add (char *const *devices, const char *fs)
|
||||||
|
ADD_ARG (argv, i, "device");
|
||||||
|
ADD_ARG (argv, i, "add");
|
||||||
|
|
||||||
|
+ if (btrfs_device_add_needs_force)
|
||||||
|
+ ADD_ARG (argv, i, "--force");
|
||||||
|
+
|
||||||
|
for (j = 0; j < nr_devices; ++j)
|
||||||
|
ADD_ARG (argv, i, devices[j]);
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -12,13 +12,16 @@ Summary: Access and modify virtual machine disk images
|
|||||||
Name: libguestfs
|
Name: libguestfs
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 1.25.8
|
Version: 1.25.8
|
||||||
Release: 1%{?dist}
|
Release: 2%{?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.25-development/%{name}-%{version}.tar.gz
|
Source0: http://libguestfs.org/download/1.25-development/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# Upstream patch to fix btrfs tests.
|
||||||
|
Patch1: 0001-daemon-btrfs-Upstream-btrfs-device-add-command-now-n.patch
|
||||||
|
|
||||||
# Basic build requirements:
|
# Basic build requirements:
|
||||||
BuildRequires: perl(Pod::Simple)
|
BuildRequires: perl(Pod::Simple)
|
||||||
BuildRequires: perl(Pod::Man)
|
BuildRequires: perl(Pod::Man)
|
||||||
@ -567,6 +570,8 @@ for %{name}.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
|
%patch1 -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.
|
||||||
@ -974,6 +979,14 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 20 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.25.8-2
|
||||||
|
- Rebuild to resolve broken dependency on krb libraries.
|
||||||
|
- Remove obsolete Obsoletes.
|
||||||
|
- Fix Source URL.
|
||||||
|
- Require java-headless instead of java:
|
||||||
|
https://fedoraproject.org/wiki/Changes/HeadlessJava
|
||||||
|
- Backport upstream patch to fix btrfs.
|
||||||
|
|
||||||
* Thu Nov 14 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.25.8-1
|
* Thu Nov 14 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.25.8-1
|
||||||
- New upstream version 1.25.8.
|
- New upstream version 1.25.8.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user