Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package virt-top for openSUSE:Factory checked in at 2022-04-08 22:45:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/virt-top (Old) and /work/SRC/openSUSE:Factory/.virt-top.new.1900 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "virt-top" Fri Apr 8 22:45:54 2022 rev:5 rq:967744 version:1.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/virt-top/virt-top.changes 2019-12-09 21:35:53.706082280 +0100 +++ /work/SRC/openSUSE:Factory/.virt-top.new.1900/virt-top.changes 2022-04-08 22:46:03.702910743 +0200 @@ -1,0 +2,6 @@ +Mon Apr 4 04:04:04 UTC 2022 - o...@aepfle.de + +- New upstream version 1.1.1 +- Use virt-top.patch to build with dune + +------------------------------------------------------------------- Old: ---- virt-top-1.0.9.tar.xz New: ---- virt-top-1.1.1.tar.xz virt-top.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ virt-top.spec ++++++ --- /var/tmp/diff_new_pack.NknErL/_old 2022-04-08 22:46:04.210905105 +0200 +++ /var/tmp/diff_new_pack.NknErL/_new 2022-04-08 22:46:04.218905017 +0200 @@ -1,7 +1,7 @@ # # spec file for package virt-top # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,26 +17,26 @@ Name: virt-top -Version: 1.0.9 +Version: 1.1.1 Release: 0 %{?ocaml_preserve_bytecode} Summary: Utility like top(1) for displaying virtualization stats License: GPL-2.0+ Group: System/Management Url: http://people.redhat.com/~rjones/virt-top/ -Source0: %{name}-%{version}.tar.xz +Source0: %name-%version.tar.xz +Patch0: %name.patch BuildRequires: ocaml BuildRequires: ocaml-dune -BuildRequires: ocaml-rpm-macros >= 20191101 +BuildRequires: ocaml-rpm-macros >= 20220222 BuildRequires: ocamlfind(calendar) -BuildRequires: ocamlfind(csv) BuildRequires: ocamlfind(curses) -BuildRequires: ocamlfind(extlib) +BuildRequires: ocamlfind(dune.configurator) BuildRequires: ocamlfind(gettext) BuildRequires: ocamlfind(gettext-stub) BuildRequires: ocamlfind(libvirt) BuildRequires: ocamlfind(str) -BuildRequires: ocamlfind(xml-light) +BuildRequires: pkgconfig(libxml-2.0) %description virt-top is a 'top(1)'-like utility for showing stats of virtualized @@ -57,9 +57,10 @@ %install %ocaml_dune_install %ocaml_create_file_list -tee -a %{name}.files < %{name}.files.devel +tee -a %name.files < %name.files.devel -%files -f %{name}.files -%{_bindir}/* +%files -f %name.files +%_bindir/* +%_mandir/man1/* %changelog ++++++ _service ++++++ --- /var/tmp/diff_new_pack.NknErL/_old 2022-04-08 22:46:04.270904439 +0200 +++ /var/tmp/diff_new_pack.NknErL/_new 2022-04-08 22:46:04.278904350 +0200 @@ -1,10 +1,13 @@ <services> <service name="tar_scm" mode="disabled"> - <param name="url">https://github.com/olafhering/virt-top.git</param> - <param name="scm">git</param> - <param name="versionformat">1.0.9</param> - <param name="revision">dune-wip</param> <param name="filename">virt-top</param> + <param name="revision">6a45c04e27b942555e79f96f52e452e56d1aca97</param> + <param name="scm">git</param> + <param name="submodules">disable</param> + <param name="url">git://git.annexia.org/virt-top.git</param> + <param name="versionformat">@PARENT_TAG@</param> + <param name="versionrewrite-pattern">[v]?([^+]+)(.*)</param> + <param name="versionrewrite-replacement">\1</param> </service> <service name="recompress" mode="disabled"> <param name="file">*.tar</param> ++++++ virt-top-1.0.9.tar.xz -> virt-top-1.1.1.tar.xz ++++++ ++++ 12918 lines of diff (skipped) ++++++ virt-top.patch ++++++ --- /dev/null +++ b/build.sh @@ -0,0 +1,6 @@ +set -ex +pkg=virt-top +DESTDIR=/dev/shm/$PPID +dune build --verbose --for-release-of-packages=${pkg} @install +dune install --verbose --for-release-of-packages=${pkg} --prefix=/usr --libdir=$(ocamlc -where) --destdir=${DESTDIR} ${pkg} +find ${DESTDIR} -ls --- /dev/null +++ b/dune-project @@ -0,0 +1,31 @@ +(lang dune 1.11) + +(version 1.1.1) + +(generate_opam_files false) + +(license "GPL-2.0-or-later") + +(authors "Richard W.M. Jones <rjo...@redhat.com>") + +(maintainers "Richard W.M. Jones <rjo...@redhat.com>") + +(homepage "http://people.redhat.com/~rjones/virt-top/") + +(source + (uri "git://git.annexia.org/virt-top.git")) + +(package + (name virt-top) + (synopsis "top-like utility") + (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 + curses + dune.configurator + gettext)) --- /dev/null +++ b/src/config/discover.ml @@ -0,0 +1,25 @@ +module C = Configurator.V1 + +let () = + C.main ~name:"virt-top" (fun c -> + let no_pkgconfig : C.Pkg_config.package_conf = + { libs = [ "-lxml" ]; cflags = [] } + in + + let conf = + match C.Pkg_config.get c with + | None -> no_pkgconfig + | Some pc -> ( + match + C.Pkg_config.query_expr_err pc ~package:"libxml-2.0" + ~expr:"libxml-2.0" + with + | Ok c -> c + | Error err -> C.die "%s" err) + in + + let config_h = [] in + + C.C_define.gen_header_file c ~fname:"config.h" config_h; + C.Flags.write_sexp "c_flags.sexp" (List.rev_append [ "-I." ] conf.cflags); + C.Flags.write_sexp "c_library_flags.sexp" conf.libs) --- /dev/null +++ b/src/config/dune @@ -0,0 +1,3 @@ +(executable + (name discover) + (libraries dune.configurator)) --- /dev/null +++ b/src/dune @@ -0,0 +1,51 @@ +(library + (name xml) + (modules xml) + (libraries libvirt) + (c_names xml-c) + (c_flags + (:include c_flags.sexp)) + (c_library_flags + (:include c_library_flags.sexp))) + +(executable + (name main) + (public_name virt-top) + (modules + collect + csv_output + main + opt_calendar + opt_gettext + redraw + screen + stream_output + top + types + utils + version) + (libraries calendar curses gettext gettext-stub libvirt str xml)) + +(rule + (target version.ml) + (action + (write-file %{target} "let version = \"%{version:virt-top}\""))) + +(rule + (targets c_flags.sexp c_library_flags.sexp config.h) + (deps + (:discover config/discover.exe)) + (action + (run %{discover}))) + +(install + (files virt-top.1) + (section man) + (package virt-top)) + +(rule + (target virt-top.1) + (deps virt-top.pod) + (action + (system + "pod2man -u -s 1 -c 'Virtualization Support' -r '%{version:virt-top}' %{deps} %{target}"))) --- a/src/opt_calendar.ml +++ b/src/opt_calendar.ml @@ -25,7 +25,8 @@ open Printf open Opt_gettext.Gettext ;; -Top.parse_date_time := +(* this is not optional *) +let parse_date_time = fun time -> let cal : Calendar.t = (* time is "+something" *) --- /dev/null +++ b/src/opt_calendar.mli @@ -0,0 +1 @@ +val parse_date_time : (string -> float) --- /dev/null +++ b/src/opt_gettext.ml @@ -0,0 +1,9 @@ +module Gettext = + Gettext.Program + (struct + let textdomain = "virt-top" + let codeset = None + let dir = None + let dependencies = Gettext.init + end) + (GettextStub.Native) --- a/src/top.ml +++ b/src/top.ml @@ -20,6 +20,7 @@ open Printf open Curses +open Opt_calendar open Opt_gettext.Gettext open Utils open Types @@ -32,13 +33,6 @@ module N = Libvirt.Network let rcfile = ".virt-toprc" -(* 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 @@ -81,7 +75,7 @@ let start_up () = 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; --- a/src/top.mli +++ b/src/top.mli @@ -17,8 +17,5 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *) -(* 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