From b1dc2e66f1f969feccbfd25719f556086a0a3969 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 20 Feb 2026 23:46:49 +0000 Subject: [PATCH 1/4] OCaml 5.4.1 rebuild --- virt-top.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-top.spec b/virt-top.spec index 387f7e3..5bfa009 100644 --- a/virt-top.spec +++ b/virt-top.spec @@ -3,7 +3,7 @@ ExcludeArch: %{ix86} Name: virt-top Version: 1.1.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Utility like top(1) for displaying virtualization stats License: GPL-2.0-or-later @@ -118,6 +118,9 @@ install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/ %changelog +* Fri Feb 20 2026 Richard W.M. Jones - 1.1.2-7 +- OCaml 5.4.1 rebuild + * Sat Jan 17 2026 Fedora Release Engineering - 1.1.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 11655f4771eba7ea116c90a025b00d7547582ace Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 10 Jul 2026 08:51:41 -0600 Subject: [PATCH 2/4] OCaml 5.5.0 rebuild - Add patch to adapt to ocaml-curses 1.0.12 --- virt-top-1.1.2-curses.patch | 38 +++++++++++++++++++++++++++++++++++++ virt-top.spec | 14 +++++++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 virt-top-1.1.2-curses.patch diff --git a/virt-top-1.1.2-curses.patch b/virt-top-1.1.2-curses.patch new file mode 100644 index 0000000..5524bbf --- /dev/null +++ b/virt-top-1.1.2-curses.patch @@ -0,0 +1,38 @@ +--- virt-top-1.1.2/src/top.ml.orig 2022-11-23 07:10:48.000000000 -0700 ++++ virt-top-1.1.2/src/top.ml 2026-07-09 14:32:11.943607218 -0600 +@@ -284,26 +284,18 @@ let sleep = Unix.sleep + let millisleep n = + ignore (Unix.select [] [] [] (float n /. 1000.)) + +-(* The curses getstr/getnstr functions are just weird. +- * This helper function also enables echo temporarily. +- *) ++(* This helper function enables echo temporarily. *) + let get_string maxlen = + ignore (echo ()); +- let str = Bytes.create maxlen in +- (* Safe because binding calls getnstr. However the unsafe cast +- * to string is required because ocaml-curses needs to be fixed. +- *) +- let ok = getstr (Obj.magic str) in ++ let ret = match getstr() with ++ | Error _ -> "" ++ | Ok str -> (* Chop at first `\0'. *) ++ match String.index_opt str '\000' with ++ | Some(index) -> String.sub str 0 index ++ | None -> str (* it is full maxlen bytes *) ++ in + ignore (noecho ()); +- if not ok then "" +- else ( +- (* Chop at first '\0'. *) +- try +- let i = Bytes.index str '\000' in +- Bytes.sub_string str 0 i +- with +- Not_found -> Bytes.to_string str (* it is full maxlen bytes *) +- ) ++ ret + + (* Main loop. *) + let rec main_loop ((conn, batch_mode, script_mode, csv_enabled, stream_mode, _, _, _) diff --git a/virt-top.spec b/virt-top.spec index 5bfa009..49fedce 100644 --- a/virt-top.spec +++ b/virt-top.spec @@ -3,7 +3,7 @@ ExcludeArch: %{ix86} Name: virt-top Version: 1.1.2 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Utility like top(1) for displaying virtualization stats License: GPL-2.0-or-later @@ -27,11 +27,13 @@ Source4: libguestfs.keyring # included in RHEL builds. Patch1: virt-top-1.0.9-processcsv-documentation.patch +# Adapt to ocaml-curses 1.0.12, which fixed the getstr/getnstr weirdness +Patch2: virt-top-1.1.2-curses.patch + BuildRequires: gcc BuildRequires: make BuildRequires: ocaml >= 3.10.2 -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-findlib # Need the ncurses / ncursesw (--enable-widec) fix. BuildRequires: ocaml-curses-devel >= 1.0.3-7 BuildRequires: ocaml-calendar-devel @@ -67,6 +69,8 @@ different virtualization systems. %patch -P1 -p1 %endif +%patch -P2 -p1 + # "ocamlfind byte" has been removed as an alias sed -i 's/\(OCAMLBEST=\)byte/\1ocamlc/' configure @@ -118,6 +122,10 @@ install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/ %changelog +* Thu Jul 09 2026 Jerry James - 1.1.2-8 +- OCaml 5.5.0 rebuild +- Add patch to adapt to ocaml-curses 1.0.12 + * Fri Feb 20 2026 Richard W.M. Jones - 1.1.2-7 - OCaml 5.4.1 rebuild From 6c6b26968f09e8e785ec8f16c47845395575a39f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 13 Jul 2026 16:28:03 +0100 Subject: [PATCH 3/4] New upstream version 1.1.3 Includes ocaml-curses 1.0.12 patch, so drop it. New upstream URLs. --- sources | 4 ++-- virt-top-1.1.2-curses.patch | 38 ------------------------------------- virt-top.spec | 18 +++++++++--------- 3 files changed, 11 insertions(+), 49 deletions(-) delete mode 100644 virt-top-1.1.2-curses.patch diff --git a/sources b/sources index ddae418..71024c4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-top-1.1.2.tar.gz) = 1dd495daf106601236680b6d028262a217b8b93edb51c3f6c148fef7b452d8d188f1df18d500338377d9becff2174a6e33ccda4eaa913e7a159820d7bfca3a3c -SHA512 (virt-top-1.1.2.tar.gz.sig) = db754791923aa30838b5f33bd6a523fda4a34068e9b20cdedc09e56a72de7e894f156e70106c5274f9e8121dde25cfc594e9fcb932dca08af15fe67e0c27990a +SHA512 (virt-top-1.1.3.tar.gz) = 1ba34155e2ff24801df997289f980068704b196dc0a45593730be25a6f6024249ae7d3d46e9a8b00561b6306d27ff5810c175e89dd256e47d78ab9397221b42f +SHA512 (virt-top-1.1.3.tar.gz.sig) = ce982ca6837711917090dcd2e4fea83571f48e385be55274522344d0b511ecb78abb5984c3d2e12deea7f6f6169a24d756d1780765c9c7bf9b52e3ee339e8a03 diff --git a/virt-top-1.1.2-curses.patch b/virt-top-1.1.2-curses.patch deleted file mode 100644 index 5524bbf..0000000 --- a/virt-top-1.1.2-curses.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- virt-top-1.1.2/src/top.ml.orig 2022-11-23 07:10:48.000000000 -0700 -+++ virt-top-1.1.2/src/top.ml 2026-07-09 14:32:11.943607218 -0600 -@@ -284,26 +284,18 @@ let sleep = Unix.sleep - let millisleep n = - ignore (Unix.select [] [] [] (float n /. 1000.)) - --(* The curses getstr/getnstr functions are just weird. -- * This helper function also enables echo temporarily. -- *) -+(* This helper function enables echo temporarily. *) - let get_string maxlen = - ignore (echo ()); -- let str = Bytes.create maxlen in -- (* Safe because binding calls getnstr. However the unsafe cast -- * to string is required because ocaml-curses needs to be fixed. -- *) -- let ok = getstr (Obj.magic str) in -+ let ret = match getstr() with -+ | Error _ -> "" -+ | Ok str -> (* Chop at first `\0'. *) -+ match String.index_opt str '\000' with -+ | Some(index) -> String.sub str 0 index -+ | None -> str (* it is full maxlen bytes *) -+ in - ignore (noecho ()); -- if not ok then "" -- else ( -- (* Chop at first '\0'. *) -- try -- let i = Bytes.index str '\000' in -- Bytes.sub_string str 0 i -- with -- Not_found -> Bytes.to_string str (* it is full maxlen bytes *) -- ) -+ ret - - (* Main loop. *) - let rec main_loop ((conn, batch_mode, script_mode, csv_enabled, stream_mode, _, _, _) diff --git a/virt-top.spec b/virt-top.spec index 49fedce..7afd374 100644 --- a/virt-top.spec +++ b/virt-top.spec @@ -2,8 +2,8 @@ ExcludeArch: %{ix86} Name: virt-top -Version: 1.1.2 -Release: 8%{?dist} +Version: 1.1.3 +Release: 1%{?dist} Summary: Utility like top(1) for displaying virtualization stats License: GPL-2.0-or-later @@ -12,6 +12,7 @@ License: GPL-2.0-or-later ExcludeArch: %{power64} %endif +VCS: https://github.com/rwmjones/virt-top URL: https://people.redhat.com/~rjones/virt-top/ Source0: https://people.redhat.com/~rjones/virt-top/files/%{name}-%{version}.tar.gz Source1: https://people.redhat.com/~rjones/virt-top/files/%{name}-%{version}.tar.gz.sig @@ -27,15 +28,11 @@ Source4: libguestfs.keyring # included in RHEL builds. Patch1: virt-top-1.0.9-processcsv-documentation.patch -# Adapt to ocaml-curses 1.0.12, which fixed the getstr/getnstr weirdness -Patch2: virt-top-1.1.2-curses.patch - BuildRequires: gcc BuildRequires: make BuildRequires: ocaml >= 3.10.2 BuildRequires: ocaml-findlib -# Need the ncurses / ncursesw (--enable-widec) fix. -BuildRequires: ocaml-curses-devel >= 1.0.3-7 +BuildRequires: ocaml-curses-devel >= 1.0.12 BuildRequires: ocaml-calendar-devel BuildRequires: ocaml-libvirt-devel >= 0.6.1.5 BuildRequires: ocaml-gettext-devel >= 0.3.3 @@ -69,8 +66,6 @@ different virtualization systems. %patch -P1 -p1 %endif -%patch -P2 -p1 - # "ocamlfind byte" has been removed as an alias sed -i 's/\(OCAMLBEST=\)byte/\1ocamlc/' configure @@ -122,6 +117,11 @@ install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/ %changelog +* Mon Jul 13 2026 Richard W.M. Jones - 1.1.3-1 +- New upstream version 1.1.3 +- Includes ocaml-curses 1.0.12 patch, so drop it. +- New upstream URLs. + * Thu Jul 09 2026 Jerry James - 1.1.2-8 - OCaml 5.5.0 rebuild - Add patch to adapt to ocaml-curses 1.0.12 From 9e62c15c0a7bf1af117ae8bdb021ed63d4de14af Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 08:32:41 +0000 Subject: [PATCH 4/4] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- virt-top.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-top.spec b/virt-top.spec index 7afd374..1fa99f4 100644 --- a/virt-top.spec +++ b/virt-top.spec @@ -3,7 +3,7 @@ ExcludeArch: %{ix86} Name: virt-top Version: 1.1.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Utility like top(1) for displaying virtualization stats License: GPL-2.0-or-later @@ -117,6 +117,9 @@ install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/ %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 1.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Mon Jul 13 2026 Richard W.M. Jones - 1.1.3-1 - New upstream version 1.1.3 - Includes ocaml-curses 1.0.12 patch, so drop it.