Sync from SUSE:SLFO:Main virt-top revision 5c8d2564920de314648943ba0893afe0
This commit is contained in:
commit
02ba948096
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
17
_service
Normal file
17
_service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<services>
|
||||||
|
<service name="tar_scm" mode="disabled">
|
||||||
|
<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>
|
||||||
|
<param name="compression">xz</param>
|
||||||
|
</service>
|
||||||
|
<service name="set_version" mode="disabled"/>
|
||||||
|
</services>
|
BIN
virt-top-1.1.1.tar.xz
(Stored with Git LFS)
Normal file
BIN
virt-top-1.1.1.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
67
virt-top.changes
Normal file
67
virt-top.changes
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 3 03:03:03 UTC 2023 - ohering@suse.de
|
||||||
|
|
||||||
|
- Require OCaml 4.8 or later for building
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 4 04:04:04 UTC 2022 - olaf@aepfle.de
|
||||||
|
|
||||||
|
- New upstream version 1.1.1
|
||||||
|
- Use virt-top.patch to build with dune
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 2 01:23:45 UTC 2019 - olaf@aepfle.de
|
||||||
|
|
||||||
|
- calendar, csv and xml-light are not optional
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 1 12:34:56 UTC 2019 - olaf@aepfle.de
|
||||||
|
|
||||||
|
- Require current dune macros
|
||||||
|
- Update to version 1.0.9, via _service file
|
||||||
|
- Remove virt-top-aarch64.patch
|
||||||
|
- Remove virt-top-no-immutable-warning.patch
|
||||||
|
- Remove virt-top.bytecode.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 9 15:50:45 UTC 2017 - olaf@aepfle.de
|
||||||
|
|
||||||
|
- Install also bytecode with virt-top.bytecode.patch (bsc#1031359)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 3 13:32:48 UTC 2017 - olaf@aepfle.de
|
||||||
|
|
||||||
|
- Remove usage of ExcludeArch (bsc#1031359)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 16 19:14:49 UTC 2016 - mlatimer@suse.com
|
||||||
|
|
||||||
|
- Updated source code location and format to match upstream
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 23 11:08:03 UTC 2016 - olaf@aepfle.de
|
||||||
|
|
||||||
|
- Ignore also Warning: 52 to fix build with ocaml 4.03 (fate#320836)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 3 14:37:44 UTC 2015 - mlatimer@suse.com
|
||||||
|
|
||||||
|
- Add ia64 and s390/s390x to ExcludeArch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 24 14:07:06 UTC 2015 - olaf@aepfle.de
|
||||||
|
|
||||||
|
- Remove ppc specific noexec stack code from spec file
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 8 21:30:30 UTC 2014 - mlatimer@suse.com
|
||||||
|
|
||||||
|
- Update spec file to use ocaml-rpm-macros, remove
|
||||||
|
ExclusiveArch, and ensure bytecode is built
|
||||||
|
- Convert to source code to .bz2
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 5 20:05:46 UTC 2014 - mlatimer@suse.com
|
||||||
|
|
||||||
|
- Initial commit using upstream version 1.0.8
|
||||||
|
|
203
virt-top.patch
Normal file
203
virt-top.patch
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
--- /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 <rjones@redhat.com>")
|
||||||
|
+
|
||||||
|
+(maintainers "Richard W.M. Jones <rjones@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
|
66
virt-top.spec
Normal file
66
virt-top.spec
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
#
|
||||||
|
# spec file for package virt-top
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: virt-top
|
||||||
|
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
|
||||||
|
Patch0: %name.patch
|
||||||
|
BuildRequires: ocaml(ocaml_base_version) >= 4.08
|
||||||
|
BuildRequires: ocaml-dune
|
||||||
|
BuildRequires: ocaml-rpm-macros >= 20230101
|
||||||
|
BuildRequires: ocamlfind(calendar)
|
||||||
|
BuildRequires: ocamlfind(curses)
|
||||||
|
BuildRequires: ocamlfind(dune.configurator)
|
||||||
|
BuildRequires: ocamlfind(gettext)
|
||||||
|
BuildRequires: ocamlfind(gettext-stub)
|
||||||
|
BuildRequires: ocamlfind(libvirt)
|
||||||
|
BuildRequires: ocamlfind(str)
|
||||||
|
BuildRequires: pkgconfig(libxml-2.0)
|
||||||
|
|
||||||
|
%description
|
||||||
|
virt-top is a 'top(1)'-like utility for showing stats of virtualized
|
||||||
|
domains. Many keys and command line options are the same as for
|
||||||
|
ordinary 'top'.
|
||||||
|
|
||||||
|
It uses libvirt so it is capable of showing stats across a variety of
|
||||||
|
different virtualization systems.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
dune_release_pkgs='virt-top'
|
||||||
|
%ocaml_dune_setup
|
||||||
|
%ocaml_dune_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%ocaml_dune_install
|
||||||
|
%ocaml_create_file_list
|
||||||
|
tee -a %name.files < %name.files.devel
|
||||||
|
|
||||||
|
%files -f %name.files
|
||||||
|
%_bindir/*
|
||||||
|
%_mandir/man1/*
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user