Hello community, here is the log from the commit of package virt-top for openSUSE:Factory checked in at 2019-12-09 21:35:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/virt-top (Old) and /work/SRC/openSUSE:Factory/.virt-top.new.4691 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "virt-top" Mon Dec 9 21:35:38 2019 rev:4 rq:755158 version:1.0.9 Changes: -------- --- /work/SRC/openSUSE:Factory/virt-top/virt-top.changes 2019-11-13 13:24:57.503487151 +0100 +++ /work/SRC/openSUSE:Factory/.virt-top.new.4691/virt-top.changes 2019-12-09 21:35:53.706082280 +0100 @@ -1,0 +2,5 @@ +Mon Dec 2 01:23:45 UTC 2019 - o...@aepfle.de + +- calendar, csv and xml-light are not optional + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ virt-top.spec ++++++ --- /var/tmp/diff_new_pack.Bq7ZEx/_old 2019-12-09 21:35:56.002081376 +0100 +++ /var/tmp/diff_new_pack.Bq7ZEx/_new 2019-12-09 21:35:56.006081375 +0100 @@ -28,12 +28,15 @@ BuildRequires: ocaml BuildRequires: ocaml-dune BuildRequires: ocaml-rpm-macros >= 20191101 +BuildRequires: ocamlfind(calendar) +BuildRequires: ocamlfind(csv) BuildRequires: ocamlfind(curses) BuildRequires: ocamlfind(extlib) BuildRequires: ocamlfind(gettext) BuildRequires: ocamlfind(gettext-stub) BuildRequires: ocamlfind(libvirt) BuildRequires: ocamlfind(str) +BuildRequires: ocamlfind(xml-light) %description virt-top is a 'top(1)'-like utility for showing stats of virtualized ++++++ virt-top-1.0.9.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/dune-project new/virt-top-1.0.9/dune-project --- old/virt-top-1.0.9/dune-project 2019-11-05 12:14:34.000000000 +0100 +++ new/virt-top-1.0.9/dune-project 2019-12-02 09:37:33.000000000 +0100 @@ -21,8 +21,12 @@ (description "virt-top is a top-like utility for showing stats of virtualized domains. Many keys and command line options are the same as for ordinary top. .") (depends + (ocaml + (>= 4.02.0)) (dune (>= 1.11)) + calendar + csv dune.configurator - (ocaml - (>= 4.02.0)))) + gettext + xml-light)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/collect.ml new/virt-top-1.0.9/src/collect.ml --- old/virt-top-1.0.9/src/collect.ml 2019-11-05 12:14:34.000000000 +0100 +++ new/virt-top-1.0.9/src/collect.ml 2019-12-02 09:37:33.000000000 +0100 @@ -25,12 +25,7 @@ open Utils open Types - -(* Hook for XML support (see [opt_xml.ml]). *) -let parse_device_xml : (int -> [>`R] D.t -> string list * string list) ref = - ref ( - fun _ _ -> [], [] - ) +open Opt_xml (* Intermediate "domain + stats" structure that we use to collect * everything we know about a domain within the collect function. @@ -95,7 +90,7 @@ let get_devices id dom = try Hashtbl.find devices id with Not_found -> - let blkdevs, netifs = (!parse_device_xml) id dom in + let blkdevs, netifs = parse_device_xml id dom in Hashtbl.replace devices id (blkdevs, netifs); blkdevs, netifs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/collect.mli new/virt-top-1.0.9/src/collect.mli --- old/virt-top-1.0.9/src/collect.mli 2019-11-05 12:14:34.000000000 +0100 +++ new/virt-top-1.0.9/src/collect.mli 2019-12-02 09:37:33.000000000 +0100 @@ -17,10 +17,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -(* Hook for [Opt_xml] to override (if present). *) -val parse_device_xml : - (int -> [ `R ] Libvirt.Domain.t -> string list * string list) ref - (* Intermediate "domain + stats" structure that we use to collect * everything we know about a domain within the collect function. *) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/csv_output.ml new/virt-top-1.0.9/src/csv_output.ml --- old/virt-top-1.0.9/src/csv_output.ml 2019-11-05 12:14:34.000000000 +0100 +++ new/virt-top-1.0.9/src/csv_output.ml 2019-12-02 09:37:33.000000000 +0100 @@ -23,18 +23,13 @@ open ExtList open Collect +open Opt_csv module C = Libvirt.Connect -(* Hook for CSV support (see [opt_csv.ml]). *) -let csv_write : (string list -> unit) ref = - ref ( - fun _ -> () - ) - (* Write CSV header row. *) let write_csv_header (csv_cpu, csv_mem, csv_block, csv_net) block_in_bytes = - (!csv_write) ( + Opt_csv.csv_write ( [ "Hostname"; "Time"; "Arch"; "Physical CPUs"; "Count"; "Running"; "Blocked"; "Paused"; "Shutdown"; "Shutoff"; "Crashed"; "Active"; "Inactive"; @@ -121,4 +116,4 @@ ) doms in let domain_fields = List.flatten domain_fields in - (!csv_write) (summary_fields @ domain_fields) + Opt_csv.csv_write (summary_fields @ domain_fields) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/csv_output.mli new/virt-top-1.0.9/src/csv_output.mli --- old/virt-top-1.0.9/src/csv_output.mli 2019-11-05 12:14:34.000000000 +0100 +++ new/virt-top-1.0.9/src/csv_output.mli 2019-12-02 09:37:33.000000000 +0100 @@ -19,9 +19,6 @@ (** CSV output functions. *) -(* Hook for [Opt_csv] to override (if present). *) -val csv_write : (string list -> unit) ref - val write_csv_header : bool * bool * bool * bool -> bool -> unit val append_csv : Types.setup -> bool * bool * bool * bool -> bool -> Collect.stats -> unit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/dune new/virt-top-1.0.9/src/dune --- old/virt-top-1.0.9/src/dune 2019-11-05 12:14:34.000000000 +0100 +++ new/virt-top-1.0.9/src/dune 2019-12-02 09:37:33.000000000 +0100 @@ -1,7 +1,10 @@ (executable (name main) (public_name virt-top) - (libraries curses extlib gettext gettext-stub libvirt str) + (modules collect csv_output main opt_calendar opt_csv opt_gettext opt_xml + redraw screen stream_output top types utils version) + (libraries calendar csv curses extlib gettext gettext-stub libvirt str + xml-light) (flags -w -50-27-9-32)) (rule diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/opt_calendar.ml new/virt-top-1.0.9/src/opt_calendar.ml --- old/virt-top-1.0.9/src/opt_calendar.ml 2019-11-05 12:14:34.000000000 +0100 +++ new/virt-top-1.0.9/src/opt_calendar.ml 2019-12-02 09:37:33.000000000 +0100 @@ -26,7 +26,7 @@ open Opt_gettext.Gettext ;; -Top.parse_date_time := +let parse_date_time = fun time -> let cal : Calendar.t = if String.starts_with time "+" then ( (* +something *) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/opt_calendar.mli new/virt-top-1.0.9/src/opt_calendar.mli --- old/virt-top-1.0.9/src/opt_calendar.mli 1970-01-01 01:00:00.000000000 +0100 +++ new/virt-top-1.0.9/src/opt_calendar.mli 2019-12-02 09:37:33.000000000 +0100 @@ -0,0 +1 @@ +val parse_date_time : (string -> float) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/opt_csv.ml new/virt-top-1.0.9/src/opt_csv.ml --- old/virt-top-1.0.9/src/opt_csv.ml 2019-11-05 12:14:34.000000000 +0100 +++ new/virt-top-1.0.9/src/opt_csv.ml 2019-12-02 09:37:33.000000000 +0100 @@ -24,11 +24,11 @@ (* Output channel, or None if CSV output not enabled. *) let chan = ref None ;; -Top.csv_start := +let csv_start = fun filename -> chan := Some (open_out filename) ;; -Csv_output.csv_write := +let csv_write = fun row -> match !chan with | None -> () (* CSV output not enabled. *) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/opt_csv.mli new/virt-top-1.0.9/src/opt_csv.mli --- old/virt-top-1.0.9/src/opt_csv.mli 1970-01-01 01:00:00.000000000 +0100 +++ new/virt-top-1.0.9/src/opt_csv.mli 2019-12-02 09:37:33.000000000 +0100 @@ -0,0 +1,2 @@ +val csv_start : (string -> unit) +val csv_write : (string list -> unit) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/opt_xml.ml new/virt-top-1.0.9/src/opt_xml.ml --- old/virt-top-1.0.9/src/opt_xml.ml 2019-11-05 12:14:34.000000000 +0100 +++ new/virt-top-1.0.9/src/opt_xml.ml 2019-12-02 09:37:33.000000000 +0100 @@ -27,7 +27,7 @@ module D = Libvirt.Domain module N = Libvirt.Network ;; -Collect.parse_device_xml := +let parse_device_xml = fun id dom -> try let xml = D.get_xml_desc dom in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/opt_xml.mli new/virt-top-1.0.9/src/opt_xml.mli --- old/virt-top-1.0.9/src/opt_xml.mli 1970-01-01 01:00:00.000000000 +0100 +++ new/virt-top-1.0.9/src/opt_xml.mli 2019-12-02 09:37:33.000000000 +0100 @@ -0,0 +1,2 @@ +val parse_device_xml : + (int -> [ `R ] Libvirt.Domain.t -> string list * string list) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/top.ml new/virt-top-1.0.9/src/top.ml --- old/virt-top-1.0.9/src/top.ml 2019-11-05 12:14:34.000000000 +0100 +++ new/virt-top-1.0.9/src/top.ml 2019-12-02 09:37:33.000000000 +0100 @@ -22,6 +22,8 @@ open Curses open Opt_gettext.Gettext +open Opt_calendar +open Opt_csv open Utils open Types open Collect @@ -39,13 +41,6 @@ fun _ -> failwith (s_"virt-top was compiled without support for CSV files") ) -(* Hook for calendar support (see [opt_calendar.ml]). *) -let parse_date_time : (string -> float) ref = - ref ( - fun _ -> - failwith (s_"virt-top was compiled without support for dates and times") - ) - (* Init file. *) type init_file = NoInitFile | DefaultInitFile | InitFile of string @@ -84,11 +79,11 @@ and set_net_mode () = display_mode := NetDisplay and set_block_mode () = display_mode := BlockDisplay and set_csv filename = - (!csv_start) filename; + Opt_csv.csv_start filename; csv_enabled := true and no_init_file () = init_file := NoInitFile and set_init_file filename = init_file := InitFile filename - and set_end_time time = end_time := Some ((!parse_date_time) time) + and set_end_time time = end_time := Some (Opt_calendar.parse_date_time time) and display_version () = printf "virt-top %s ocaml-libvirt %s\n" Version.version Libvirt_version.version; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/virt-top-1.0.9/src/top.mli new/virt-top-1.0.9/src/top.mli --- old/virt-top-1.0.9/src/top.mli 2019-11-05 12:14:34.000000000 +0100 +++ new/virt-top-1.0.9/src/top.mli 2019-12-02 09:37:33.000000000 +0100 @@ -17,11 +17,5 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -(* Hook for [Opt_csv] to override (if present). *) -val csv_start : (string -> unit) ref - -(* Hook for [Opt_calendar] to override (if present). *) -val parse_date_time : (string -> float) ref - val start_up : unit -> Types.setup val main_loop : Types.setup -> unit