More upstream patches to fix build.
This commit is contained in:
parent
6fe7154d4a
commit
debf164f8f
@ -1,7 +1,7 @@
|
|||||||
From 5294b7d8cc011f8b5e068aad744f612df7414a82 Mon Sep 17 00:00:00 2001
|
From 5294b7d8cc011f8b5e068aad744f612df7414a82 Mon Sep 17 00:00:00 2001
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
Date: Sat, 31 Oct 2015 13:24:52 +0000
|
Date: Sat, 31 Oct 2015 13:24:52 +0000
|
||||||
Subject: [PATCH 1/3] Add mandir to --dump-config output.
|
Subject: [PATCH 1/5] Add mandir to --dump-config output.
|
||||||
|
|
||||||
This is useful for external plugins that want to install
|
This is useful for external plugins that want to install
|
||||||
a man page.
|
a man page.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
From 4b562134c3dad1a84aa92c1658e72046569e1570 Mon Sep 17 00:00:00 2001
|
From 4b562134c3dad1a84aa92c1658e72046569e1570 Mon Sep 17 00:00:00 2001
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
Date: Mon, 11 Jan 2016 15:34:57 +0000
|
Date: Mon, 11 Jan 2016 15:34:57 +0000
|
||||||
Subject: [PATCH 2/3] Update TODO.
|
Subject: [PATCH 2/5] Update TODO.
|
||||||
|
|
||||||
---
|
---
|
||||||
TODO | 5 +++++
|
TODO | 5 +++++
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
From f93807114634d58ca2ef0d64f7637ebd87e48a50 Mon Sep 17 00:00:00 2001
|
From f93807114634d58ca2ef0d64f7637ebd87e48a50 Mon Sep 17 00:00:00 2001
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
Date: Mon, 11 Jan 2016 17:08:51 +0000
|
Date: Mon, 11 Jan 2016 17:08:51 +0000
|
||||||
Subject: [PATCH 3/3] Add support for newstyle NBD protocol (RHBZ#1297100).
|
Subject: [PATCH 3/5] Add support for newstyle NBD protocol (RHBZ#1297100).
|
||||||
|
|
||||||
---
|
---
|
||||||
.gitignore | 1 +
|
.gitignore | 1 +
|
||||||
|
49
0004-xz-Fix-various-printf-warnings-on-32-bit.patch
Normal file
49
0004-xz-Fix-various-printf-warnings-on-32-bit.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 0759d15aa3649d088eeae91fcd174d0b37e1ccde Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
|
Date: Mon, 11 Jan 2016 19:02:53 +0000
|
||||||
|
Subject: [PATCH 4/5] xz: Fix various printf warnings on 32 bit.
|
||||||
|
|
||||||
|
xzfile.c: In function 'xzfile_read_block':
|
||||||
|
xzfile.c:456:19: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
|
||||||
|
nbdkit_error ("malloc (%zu bytes): %m\n"
|
||||||
|
^
|
||||||
|
xz.c: In function 'xz_close':
|
||||||
|
xz.c:191:17: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type 'size_t {aka unsigned int}' [-Wformat=]
|
||||||
|
nbdkit_debug ("cache: hits = %" PRIu64 ", misses = %" PRIu64,
|
||||||
|
^
|
||||||
|
xz.c:191:17: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=]
|
||||||
|
---
|
||||||
|
plugins/xz/xz.c | 3 +--
|
||||||
|
plugins/xz/xzfile.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/xz/xz.c b/plugins/xz/xz.c
|
||||||
|
index 9a1f5e5..437f798 100644
|
||||||
|
--- a/plugins/xz/xz.c
|
||||||
|
+++ b/plugins/xz/xz.c
|
||||||
|
@@ -188,8 +188,7 @@ xz_close (void *handle)
|
||||||
|
|
||||||
|
blkcache_get_stats (h->c, &stats);
|
||||||
|
|
||||||
|
- nbdkit_debug ("cache: hits = %" PRIu64 ", misses = %" PRIu64,
|
||||||
|
- stats.hits, stats.misses);
|
||||||
|
+ nbdkit_debug ("cache: hits = %zu, misses = %zu", stats.hits, stats.misses);
|
||||||
|
|
||||||
|
xzfile_close (h->xz);
|
||||||
|
free_blkcache (h->c);
|
||||||
|
diff --git a/plugins/xz/xzfile.c b/plugins/xz/xzfile.c
|
||||||
|
index fcc2937..3633099 100644
|
||||||
|
--- a/plugins/xz/xzfile.c
|
||||||
|
+++ b/plugins/xz/xzfile.c
|
||||||
|
@@ -453,7 +453,7 @@ xzfile_read_block (xzfile *xz, uint64_t offset,
|
||||||
|
|
||||||
|
data = malloc (*size_rtn);
|
||||||
|
if (data == NULL) {
|
||||||
|
- nbdkit_error ("malloc (%zu bytes): %m\n"
|
||||||
|
+ nbdkit_error ("malloc (%" PRIu64 " bytes): %m\n"
|
||||||
|
"NOTE: If this error occurs, you need to recompress your xz files with a smaller block size. Use: 'xz --block-size=16777216 ...'.",
|
||||||
|
*size_rtn);
|
||||||
|
goto err1;
|
||||||
|
--
|
||||||
|
2.5.0
|
||||||
|
|
28
0005-ocaml-Avoid-race-when-building-NBDKit.cmi.patch
Normal file
28
0005-ocaml-Avoid-race-when-building-NBDKit.cmi.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From b6db2f65596470492f0ad76d1ed63ddb98b17167 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
|
Date: Mon, 11 Jan 2016 19:46:37 +0000
|
||||||
|
Subject: [PATCH 5/5] ocaml: Avoid race when building NBDKit.cmi.
|
||||||
|
|
||||||
|
If both the NBDKit.cmi and NBDKit.cmx builds run in parallel, both
|
||||||
|
will try to build NBDKit.cmi, resulting in a corrupt NBDKit.cmi file.
|
||||||
|
Avoid this by adding an extra dependency.
|
||||||
|
---
|
||||||
|
plugins/ocaml/Makefile.am | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/ocaml/Makefile.am b/plugins/ocaml/Makefile.am
|
||||||
|
index d4776b3..f63ba33 100644
|
||||||
|
--- a/plugins/ocaml/Makefile.am
|
||||||
|
+++ b/plugins/ocaml/Makefile.am
|
||||||
|
@@ -43,7 +43,7 @@ ocamllib_DATA = NBDKit.mli NBDKit.cmi NBDKit.cmx NBDKit.o
|
||||||
|
NBDKit.cmi: NBDKit.mli
|
||||||
|
$(OCAMLC) -c $<
|
||||||
|
|
||||||
|
-NBDKit.cmx: NBDKit.ml
|
||||||
|
+NBDKit.cmx: NBDKit.ml NBDKit.cmi
|
||||||
|
$(OCAMLOPT) $(OCAMLOPTFLAGS) -c $<
|
||||||
|
NBDKit.o: NBDKit.cmx
|
||||||
|
|
||||||
|
--
|
||||||
|
2.5.0
|
||||||
|
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: nbdkit
|
Name: nbdkit
|
||||||
Version: 1.1.11
|
Version: 1.1.11
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: NBD server
|
Summary: NBD server
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -18,7 +18,9 @@ Source0: http://libguestfs.org/download/nbdkit/%{name}-%{version}.tar.gz
|
|||||||
Patch1: 0001-Add-mandir-to-dump-config-output.patch
|
Patch1: 0001-Add-mandir-to-dump-config-output.patch
|
||||||
Patch2: 0002-Update-TODO.patch
|
Patch2: 0002-Update-TODO.patch
|
||||||
Patch3: 0003-Add-support-for-newstyle-NBD-protocol-RHBZ-1297100.patch
|
Patch3: 0003-Add-support-for-newstyle-NBD-protocol-RHBZ-1297100.patch
|
||||||
# Because patch3 patches Makefile.am, we need:
|
Patch4: 0004-xz-Fix-various-printf-warnings-on-32-bit.patch
|
||||||
|
Patch5: 0005-ocaml-Avoid-race-when-building-NBDKit.cmi.patch
|
||||||
|
# Because patch3 & patch5 patches Makefile.am, we need:
|
||||||
BuildRequires: automake, autoconf, libtool
|
BuildRequires: automake, autoconf, libtool
|
||||||
|
|
||||||
BuildRequires: /usr/bin/pod2man
|
BuildRequires: /usr/bin/pod2man
|
||||||
@ -360,7 +362,7 @@ make check
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Jan 11 2016 Richard W.M. Jones <rjones@redhat.com> - 1.1.11-2
|
* Mon Jan 11 2016 Richard W.M. Jones <rjones@redhat.com> - 1.1.11-3
|
||||||
- Add support for newstyle NBD protocol (RHBZ#1297100).
|
- Add support for newstyle NBD protocol (RHBZ#1297100).
|
||||||
|
|
||||||
* Sat Oct 31 2015 Richard W.M. Jones <rjones@redhat.com> - 1.1.11-1
|
* Sat Oct 31 2015 Richard W.M. Jones <rjones@redhat.com> - 1.1.11-1
|
||||||
|
Loading…
Reference in New Issue
Block a user