Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48b558765e | ||
|
|
46b85c4bcd |
6 changed files with 15 additions and 154 deletions
|
|
@ -1,39 +0,0 @@
|
|||
From 4b15ee2440b0e70e3c1eb5e164ded493e2d8f0c8 Mon Sep 17 00:00:00 2001
|
||||
From: Yuya Higashi <higashi.yuya@fujitsu.com>
|
||||
Date: Tue, 15 Nov 2022 13:56:21 +0900
|
||||
Subject: [PATCH 1/3] virt-top: fix to explicitly disconnect from libvirtd
|
||||
|
||||
To prevent libvirtd from printing virNetSocketReadWire I/O errors when
|
||||
the virt-top command exits, explicitly disconnect from libvirtd.
|
||||
|
||||
Signed-off-by: Yuya Higashi <higashi.yuya@fujitsu.com>
|
||||
---
|
||||
src/top.ml | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/top.ml b/src/top.ml
|
||||
index 75fbcb9..cbe655a 100644
|
||||
--- a/src/top.ml
|
||||
+++ b/src/top.ml
|
||||
@@ -306,7 +306,7 @@ let get_string maxlen =
|
||||
)
|
||||
|
||||
(* Main loop. *)
|
||||
-let rec main_loop ((_, batch_mode, script_mode, csv_enabled, stream_mode, _, _, _)
|
||||
+let rec main_loop ((conn, batch_mode, script_mode, csv_enabled, stream_mode, _, _, _)
|
||||
as setup) =
|
||||
let csv_flags = !csv_cpu, !csv_mem, !csv_block, !csv_net in
|
||||
|
||||
@@ -372,7 +372,8 @@ let rec main_loop ((_, batch_mode, script_mode, csv_enabled, stream_mode, _, _,
|
||||
if not !quit || !end_time <> None then
|
||||
millisleep delay
|
||||
)
|
||||
- done
|
||||
+ done;
|
||||
+ C.close conn
|
||||
|
||||
and get_key_press setup delay =
|
||||
(* Read the next key, waiting up to 'delay' milliseconds. *)
|
||||
--
|
||||
2.42.0
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
From 1d04fdfce6edea685596fbb18920799c70f1d7fa Mon Sep 17 00:00:00 2001
|
||||
From: Yuya Higashi <higashi.yuya@fujitsu.com>
|
||||
Date: Mon, 26 Dec 2022 09:18:15 +0900
|
||||
Subject: [PATCH 2/3] virt-top: fix to parse init-file correctly
|
||||
|
||||
This fixes the following runtime error when parsing init-file.
|
||||
|
||||
$ virt-top --init-file <(echo "sort id")
|
||||
Error: Invalid_argument("String.sub / Bytes.sub")
|
||||
Raised at Stdlib.invalid_arg in file "stdlib.ml", line 30, characters 20-45
|
||||
Called from Stdlib__String.sub in file "string.ml" (inlined), line 50, characters 2-23
|
||||
Called from Utils.split in file "utils.ml", line 82, characters 24-68
|
||||
Called from Utils.read_config_file.(fun) in file "utils.ml", line 114, characters 23-37
|
||||
Called from Stdlib__List.map in file "list.ml", line 92, characters 20-23
|
||||
Called from Top.start_up.try_to_read_init_file in file "top.ml", line 153, characters 17-42
|
||||
Called from Main.script_mode in file "main.ml", line 37, characters 6-17
|
||||
|
||||
Signed-off-by: Yuya Higashi <higashi.yuya@fujitsu.com>
|
||||
---
|
||||
src/utils.ml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/utils.ml b/src/utils.ml
|
||||
index 1f00803..8dfb255 100644
|
||||
--- a/src/utils.ml
|
||||
+++ b/src/utils.ml
|
||||
@@ -79,7 +79,7 @@ let trim ?(test = isspace) str =
|
||||
let split str sep =
|
||||
try
|
||||
let i = String.index str sep in
|
||||
- String.sub str 0 i, String.sub str (i+1) (String.length str - 1)
|
||||
+ String.sub str 0 i, String.sub str (i+1) (String.length str - i - 1)
|
||||
with
|
||||
Not_found -> str, ""
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From dd205eeae9fb06ac113884e4c9e9f3a90eef7554 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 27 Nov 2023 14:09:04 +0000
|
||||
Subject: [PATCH 3/3] src: Include <libxml/parser.h>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
libxml2 2.12.1 failed with this error:
|
||||
|
||||
xml-c.c:92:9: warning: implicit declaration of function ‘xmlReadMemory’; did you mean ‘xmlInitMemory’? [-Wimplicit-function-declaration]
|
||||
92 | doc = xmlReadMemory (String_val (xmlv), caml_string_length (xmlv),
|
||||
| ^~~~~~~~~~~~~
|
||||
| xmlInitMemory
|
||||
---
|
||||
src/xml-c.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/xml-c.c b/src/xml-c.c
|
||||
index 72042bf..6c546b9 100644
|
||||
--- a/src/xml-c.c
|
||||
+++ b/src/xml-c.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <caml/memory.h>
|
||||
#include <caml/mlvalues.h>
|
||||
|
||||
+#include <libxml/parser.h>
|
||||
#include <libxml/xpath.h>
|
||||
#include <libxml/xpathInternals.h>
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
||||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (virt-top-1.1.1.tar.gz) = 4f4c7338f1ce1f82b1a9287c256da4b60d7b2e5163ea4b19eb0257c104303dcecf28177f8034e34d255fec462adc19ab61e6a4b9db857da02f2cdf2b1c818093
|
||||
SHA512 (virt-top-1.1.1.tar.gz.sig) = 6236b7a68492663d743f1ee2e50ea91adafab97654c333d2b92f66a0c7a9cd5d6748fe2467f29db80c65428d804624a42d64f3ee7d0d09f612e95effec0e395e
|
||||
SHA512 (virt-top-1.1.2.tar.gz) = 1dd495daf106601236680b6d028262a217b8b93edb51c3f6c148fef7b452d8d188f1df18d500338377d9becff2174a6e33ccda4eaa913e7a159820d7bfca3a3c
|
||||
SHA512 (virt-top-1.1.2.tar.gz.sig) = db754791923aa30838b5f33bd6a523fda4a34068e9b20cdedc09e56a72de7e894f156e70106c5274f9e8121dde25cfc594e9fcb932dca08af15fe67e0c27990a
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
--- virt-top-1.1.1/configure.orig 2021-11-03 14:18:26.000000000 -0600
|
||||
+++ virt-top-1.1.1/configure 2023-07-10 12:31:15.525435684 -0600
|
||||
@@ -5357,7 +5357,7 @@ else
|
||||
OCAMLOPT="$ac_cv_prog_OCAMLOPT"
|
||||
fi
|
||||
|
||||
- OCAMLBEST=byte
|
||||
+ OCAMLBEST=ocamlc
|
||||
if test "$OCAMLOPT" = "no"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find ocamlopt; bytecode compilation only." >&5
|
||||
$as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2;}
|
||||
--- virt-top-1.1.1/ocaml-link.sh.in.orig 2021-11-03 06:00:07.000000000 -0600
|
||||
+++ virt-top-1.1.1/ocaml-link.sh.in 2023-07-10 12:31:41.012064849 -0600
|
||||
@@ -49,10 +49,12 @@ if [ x"${V:-@AM_DEFAULT_VERBOSITY@}" = x
|
||||
echo "$@" \
|
||||
@OCAML_RUNTIME_VARIANT_PIC_OPTION@ \
|
||||
-linkpkg \
|
||||
- -cclib "'@LDFLAGS@ $cclib'"
|
||||
+ -cclib "'@LDFLAGS@ $cclib'" \
|
||||
+ -output-complete-exe
|
||||
fi
|
||||
# NB -cclib must come last.
|
||||
exec "$@" \
|
||||
@OCAML_RUNTIME_VARIANT_PIC_OPTION@ \
|
||||
-linkpkg \
|
||||
- -cclib "@LDFLAGS@ $cclib"
|
||||
+ -cclib "@LDFLAGS@ $cclib" \
|
||||
+ -output-complete-exe
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
ExcludeArch: %{ix86}
|
||||
|
||||
Name: virt-top
|
||||
Version: 1.1.1
|
||||
Release: 21%{?dist}
|
||||
Version: 1.1.2
|
||||
Release: 1%{?dist}
|
||||
Summary: Utility like top(1) for displaying virtualization stats
|
||||
License: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -27,18 +27,6 @@ Source4: libguestfs.keyring
|
|||
# included in RHEL builds.
|
||||
Patch1: virt-top-1.0.9-processcsv-documentation.patch
|
||||
|
||||
# Fix "Input/output error" in journal (RHBZ#2148798)
|
||||
Patch2: 0001-virt-top-fix-to-explicitly-disconnect-from-libvirtd.patch
|
||||
|
||||
# Fix problem parsing init-file.
|
||||
Patch3: 0002-virt-top-fix-to-parse-init-file-correctly.patch
|
||||
|
||||
# Fix libxml2 2.12.1 build problems.
|
||||
Patch4: 0003-src-Include-libxml-parser.h.patch
|
||||
|
||||
# Fix linking problems on bytecode-only architectures
|
||||
Patch5: virt-top-1.1.1-ocaml-bytecode.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: ocaml >= 3.10.2
|
||||
|
|
@ -48,7 +36,11 @@ BuildRequires: ocaml-findlib-devel
|
|||
BuildRequires: ocaml-curses-devel >= 1.0.3-7
|
||||
BuildRequires: ocaml-calendar-devel
|
||||
BuildRequires: ocaml-libvirt-devel >= 0.6.1.5
|
||||
%if 0%{?fedora} <= 42
|
||||
# Disable ocaml-gettext-devel in Rawhide temporarily.
|
||||
# https://src.fedoraproject.org/rpms/ocaml-gettext/pull-request/3
|
||||
BuildRequires: ocaml-gettext-devel >= 0.3.3
|
||||
%endif
|
||||
BuildRequires: ocaml-fileutils-devel
|
||||
# For msgfmt:
|
||||
BuildRequires: gettext
|
||||
|
|
@ -136,6 +128,13 @@ install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
|||
|
||||
|
||||
%changelog
|
||||
* Fri Feb 28 2025 Richard W.M. Jones <rjones@redhat.com> - 1.1.2-1
|
||||
- New upstream version 1.1.2
|
||||
- Disable gettext support in Fedora Rawhide
|
||||
|
||||
* Wed Jan 29 2025 Jerry James <loganjerry@gmail.com> - 1.1.1-22
|
||||
- OCaml 5.2.1 rebuild for Fedora 41
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-21
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue