summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Glondu <steph@glondu.net>2019-08-21 16:38:20 +0200
committerStephane Glondu <steph@glondu.net>2019-08-21 16:38:20 +0200
commit986592563502af3f5fd72139f8e8515cbd5b2c4e (patch)
treebdf89ca8222b989529423693cfa77b18f8781a5c
parentf0b5459db75a9db1b30c417360fe6847ab2fa0b4 (diff)
Refresh patches
-rw-r--r--debian/patches/0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch31
-rw-r--r--debian/patches/10_disable-Werror.patch4
-rw-r--r--debian/patches/20_improve-GCC-hardening.patch8
-rw-r--r--debian/patches/Use-safe-string-and-fix-the-library.patch74
-rw-r--r--debian/patches/series2
5 files changed, 6 insertions, 113 deletions
diff --git a/debian/patches/0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch b/debian/patches/0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch
deleted file mode 100644
index aaac6de..0000000
--- a/debian/patches/0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: "Richard W.M. Jones" <rjones@redhat.com>
-Date: Sat, 30 Aug 2014 19:10:19 +0100
-Subject: [PATCH] Use C99 standard int64_t instead of OCaml defined (and soon
- to go) int64.
-
----
- libvirt/libvirt_c_oneoffs.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libvirt/libvirt_c_oneoffs.c b/libvirt/libvirt_c_oneoffs.c
-index 3bb572f..06b3852 100644
---- a/libvirt/libvirt_c_oneoffs.c
-+++ b/libvirt/libvirt_c_oneoffs.c
-@@ -140,7 +140,7 @@ ocaml_libvirt_connect_node_get_free_memory (value connv)
- NONBLOCKING (r = virNodeGetFreeMemory (conn));
- CHECK_ERROR (r == 0, conn, "virNodeGetFreeMemory");
-
-- rv = caml_copy_int64 ((int64) r);
-+ rv = caml_copy_int64 ((int64_t) r);
- CAMLreturn (rv);
- }
-
-@@ -161,7 +161,7 @@ ocaml_libvirt_connect_node_get_cells_free_memory (value connv,
-
- rv = caml_alloc (r, 0);
- for (i = 0; i < r; ++i) {
-- iv = caml_copy_int64 ((int64) freemems[i]);
-+ iv = caml_copy_int64 ((int64_t) freemems[i]);
- Store_field (rv, i, iv);
- }
-
diff --git a/debian/patches/10_disable-Werror.patch b/debian/patches/10_disable-Werror.patch
index 60798a2..836098c 100644
--- a/debian/patches/10_disable-Werror.patch
+++ b/debian/patches/10_disable-Werror.patch
@@ -10,10 +10,10 @@ Last-Update: 2016-12-18
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 758fcc5..4f131dd 100644
+index a463dba..0405dd6 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -33,7 +33,7 @@ dnl Select some C flags based on the host type.
+@@ -34,7 +34,7 @@ dnl Select some C flags based on the host type.
AC_CANONICAL_HOST
DEBUG="-g"
diff --git a/debian/patches/20_improve-GCC-hardening.patch b/debian/patches/20_improve-GCC-hardening.patch
index c0279aa..e1888ff 100644
--- a/debian/patches/20_improve-GCC-hardening.patch
+++ b/debian/patches/20_improve-GCC-hardening.patch
@@ -10,12 +10,12 @@ Last-Update: 2016-12-18
1 file changed, 1 insertion(+)
diff --git a/libvirt/Makefile.in b/libvirt/Makefile.in
-index f7c04bb..d772c14 100644
+index 77462c7..d0bc51b 100644
--- a/libvirt/Makefile.in
+++ b/libvirt/Makefile.in
-@@ -23,6 +23,7 @@ CFLAGS = @CFLAGS@ \
- @DEBUG@ @WARNINGS@ @CFLAGS_FPIC@
- LDFLAGS = @LDFLAGS@
+@@ -26,6 +26,7 @@ CFLAGS = @CFLAGS@ \
+ LDFLAGS = @LDFLAGS@ \
+ @LIBVIRT_LIBS@
# -L"$(shell ocamlc -where)"
+CPPFLAGS = @CPPFLAGS@ -D_FORTIFY_SOURCE=2
diff --git a/debian/patches/Use-safe-string-and-fix-the-library.patch b/debian/patches/Use-safe-string-and-fix-the-library.patch
deleted file mode 100644
index e40e8a6..0000000
--- a/debian/patches/Use-safe-string-and-fix-the-library.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From: "Richard W.M. Jones" <rjones@redhat.com>
-Date: Wed, 8 Nov 2017 16:52:58 +0000
-Subject: Use -safe-string and fix the library.
-
-Note this changes the type of the cpumap from string to bytes,
-since (by the design of the API) it must be mutated.
-
-Origin: https://libvirt.org/git/?p=libvirt-ocaml.git;a=commitdiff;h=a892fb04a824d5d134bd92a8296e2996ac738287
----
- libvirt/Makefile.in | 4 ++--
- libvirt/libvirt.ml | 10 +++++-----
- libvirt/libvirt.mli | 6 +++---
- 3 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/libvirt/Makefile.in b/libvirt/Makefile.in
-index d772c14..aab48be 100644
---- a/libvirt/Makefile.in
-+++ b/libvirt/Makefile.in
-@@ -32,11 +32,11 @@ OCAMLMKLIB = @OCAMLMKLIB@
-
- ifneq ($(OCAMLFIND),)
- OCAMLCPACKAGES := -package unix
--OCAMLCFLAGS := -g
-+OCAMLCFLAGS := -g -safe-string
- OCAMLCLIBS := -linkpkg
- else
- OCAMLCINCS :=
--OCAMLCFLAGS := -g
-+OCAMLCFLAGS := -g -safe-string
- OCAMLCLIBS := unix.cma
- endif
-
-diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml
-index 9c9368a..6a4e1a5 100644
---- a/libvirt/libvirt.ml
-+++ b/libvirt/libvirt.ml
-@@ -92,13 +92,13 @@ struct
-
- (* See VIR_USE_CPU, VIR_UNUSE_CPU, VIR_CPU_USABLE macros defined in <libvirt.h>. *)
- let use_cpu cpumap cpu =
-- cpumap.[cpu/8] <-
-- Char.chr (Char.code cpumap.[cpu/8] lor (1 lsl (cpu mod 8)))
-+ Bytes.set cpumap (cpu/8)
-+ (Char.chr (Char.code (Bytes.get cpumap (cpu/8)) lor (1 lsl (cpu mod 8))))
- let unuse_cpu cpumap cpu =
-- cpumap.[cpu/8] <-
-- Char.chr (Char.code cpumap.[cpu/8] land (lnot (1 lsl (cpu mod 8))))
-+ Bytes.set cpumap (cpu/8)
-+ (Char.chr (Char.code (Bytes.get cpumap (cpu/8)) land (lnot (1 lsl (cpu mod 8)))))
- let cpu_usable cpumaps maplen vcpu cpu =
-- Char.code cpumaps.[vcpu*maplen + cpu/8] land (1 lsl (cpu mod 8)) <> 0
-+ Char.code (Bytes.get cpumaps (vcpu*maplen + cpu/8)) land (1 lsl (cpu mod 8)) <> 0
-
- external set_keep_alive : [>`R] t -> int -> int -> unit = "ocaml_libvirt_connect_set_keep_alive"
-
-diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli
-index 36cd113..dda24f2 100644
---- a/libvirt/libvirt.mli
-+++ b/libvirt/libvirt.mli
-@@ -376,11 +376,11 @@ sig
- CPU map between a single virtual and all physical CPUs of a domain.
- *)
-
-- val use_cpu : string -> int -> unit
-+ val use_cpu : bytes -> int -> unit
- (** [use_cpu cpumap cpu] marks [cpu] as usable in [cpumap]. *)
-- val unuse_cpu : string -> int -> unit
-+ val unuse_cpu : bytes -> int -> unit
- (** [unuse_cpu cpumap cpu] marks [cpu] as not usable in [cpumap]. *)
-- val cpu_usable : string -> int -> int -> int -> bool
-+ val cpu_usable : bytes -> int -> int -> int -> bool
- (** [cpu_usable cpumaps maplen vcpu cpu] checks returns true iff the
- [cpu] is usable by [vcpu]. *)
-
diff --git a/debian/patches/series b/debian/patches/series
index 15e121a..2d15909 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,2 @@
10_disable-Werror.patch
20_improve-GCC-hardening.patch
-0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch
-Use-safe-string-and-fix-the-library.patch