public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/virt-top] rawhide: OCaml 5.5.0 rebuild
@ 2026-07-10 14:51 Jerry James
0 siblings, 0 replies; only message in thread
From: Jerry James @ 2026-07-10 14:51 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/virt-top
Branch : rawhide
Commit : 11655f4771eba7ea116c90a025b00d7547582ace
Author : Jerry James <loganjerry@gmail.com>
Date : 2026-07-10T08:51:41-06:00
Stats : +49/-3 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/virt-top/c/11655f4771eba7ea116c90a025b00d7547582ace?branch=rawhide
Log:
OCaml 5.5.0 rebuild
- Add patch to adapt to ocaml-curses 1.0.12
---
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 <loganjerry@gmail.com> - 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 <rjones@redhat.com> - 1.1.2-7
- OCaml 5.4.1 rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-10 14:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-10 14:51 [rpms/virt-top] rawhide: OCaml 5.5.0 rebuild Jerry James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox