263533
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
263533
%global debug_package %{nil}
263533
263533
Name:           virt-top
263533
Version:        1.0.8
056839
Release:        37%{?dist}
263533
Summary:        Utility like top(1) for displaying virtualization stats
263533
License:        GPLv2+
263533
263533
URL:            http://people.redhat.com/~rjones/virt-top/
263533
Source0:        http://people.redhat.com/~rjones/virt-top/files/%{name}-%{version}.tar.gz
263533
263533
# Post-process output of CSV file (RHBZ#665817, RHBZ#912020).
263533
Source1:        processcsv.py
263533
Source2:        processcsv.py.pod
263533
056839
# Patches are stored here:
056839
# http://git.annexia.org/?p=virt-top.git;a=shortlog;h=refs/heads/rhel-8.8
056839
Patch0001:      0001-virt-top-1.0.4-processcsv-documentation.patch
056839
Patch0002:      0002-Disable-warning-about-immutable-strings-for-OCaml-4..patch
056839
Patch0003:      0003-Move-upstream-translations-from-Tranifex-to-Zanata.patch
056839
Patch0004:      0004-Update-translations-from-Zanata.patch
056839
Patch0005:      0005-build-Add-g-flag-to-ocamlopt.patch
056839
Patch0006:      0006-Rename-source-directory-and-files.patch
056839
Patch0007:      0007-Enable-same-warnings-as-libguestfs.patch
056839
Patch0008:      0008-Remove-x-executable-permission-on-several-source-fil.patch
056839
Patch0009:      0009-Refresh-HACKING-file.patch
056839
Patch0010:      0010-Fix-po-POTFILES-for-new-location-of-source-files.patch
056839
Patch0011:      0011-Update-PO-files.patch
056839
Patch0012:      0012-Remove-support-for-OCaml-Calendar-v1.patch
056839
Patch0013:      0013-src-Fix-some-comments-which-referred-to-the-old-file.patch
056839
Patch0014:      0014-Split-up-huge-Top-module-into-smaller-modules.patch
056839
Patch0015:      0015-Move-block_in_bytes-entirely-to-the-presentation-lay.patch
056839
Patch0016:      0016-Remove-unused-variable-is_calendar2.patch
056839
Patch0017:      0017-Use-virConnectGetAllDomainStats-API-to-collect-domai.patch
056839
Patch0018:      0018-chmod-x-COPYING-files.patch
056839
Patch0019:      0019-Fixes-for-safe-string-in-OCaml-4.06.patch
056839
Patch0020:      0020-Link-with-fPIC-runtime.patch
056839
Patch0021:      0021-build-Pass-through-CFLAGS-and-LDFLAGS-to-ocaml-compi.patch
056839
Patch0022:      0022-Update-configure-for-aarch64-bz-926701.patch
056839
Patch0023:      0023-virt-top-fix-to-explicitly-disconnect-from-libvirtd.patch
263533
263533
# The patches touch configure.ac:
263533
BuildRequires:  autoconf
263533
263533
BuildRequires:  ocaml >= 3.10.2
263533
BuildRequires:  ocaml-ocamldoc
263533
BuildRequires:  ocaml-findlib-devel
263533
# Need the ncurses / ncursesw (--enable-widec) fix.
263533
BuildRequires:  ocaml-curses-devel >= 1.0.3-7
263533
BuildRequires:  ocaml-extlib-devel
263533
BuildRequires:  ocaml-xml-light-devel
263533
BuildRequires:  ocaml-csv-devel
263533
BuildRequires:  ocaml-calendar-devel
263533
# Need support for virDomainGetCPUStats (fixed in 0.6.1.2)
263533
# and virConnectGetAllDomainStats (post-0.6.1.4).
263533
BuildRequires:  ocaml-libvirt-devel >= 0.6.1.4-15
263533
263533
# Tortuous list of BRs for gettext.
263533
BuildRequires:  ocaml-gettext-devel >= 0.3.3
263533
BuildRequires:  ocaml-fileutils-devel
263533
# For msgfmt:
263533
BuildRequires:  gettext
263533
263533
# Non-OCaml BRs.
263533
BuildRequires:  libvirt-devel
263533
BuildRequires:  perl-interpreter
263533
BuildRequires:  perl(Pod::Perldoc)
263533
BuildRequires:  gawk
263533
263533
263533
%description
263533
virt-top is a 'top(1)'-like utility for showing stats of virtualized
263533
domains.  Many keys and command line options are the same as for
263533
ordinary 'top'.
263533
263533
It uses libvirt so it is capable of showing stats across a variety of
263533
different virtualization systems.
263533
263533
263533
%prep
263533
%setup -q
263533
263533
%if 0%{?rhel} >= 6
056839
%patch0001 -p1
263533
%endif
263533
263533
%patch0002 -p1
263533
%patch0003 -p1
263533
%patch0004 -p1
263533
%patch0005 -p1
263533
%patch0006 -p1
263533
%patch0007 -p1
263533
%patch0008 -p1
263533
%patch0009 -p1
263533
%patch0010 -p1
263533
%patch0011 -p1
263533
%patch0012 -p1
263533
%patch0013 -p1
263533
%patch0014 -p1
263533
%patch0015 -p1
263533
%patch0016 -p1
263533
%patch0017 -p1
263533
%patch0018 -p1
263533
%patch0019 -p1
263533
%patch0020 -p1
056839
%patch0021 -p1
056839
%patch0022 -p1
056839
%patch0023 -p1
263533
263533
autoconf
263533
263533
263533
%build
263533
%configure
263533
make all
263533
%if %opt
263533
make opt
263533
strip src/virt-top.opt
263533
%endif
263533
263533
# Build translations.
263533
make -C po
263533
263533
# Force rebuild of man page.
263533
rm -f src/virt-top.1
263533
make -C src virt-top.1
263533
263533
%if 0%{?rhel} >= 6
263533
# Build processcsv.py.1.
263533
pod2man -c "Virtualization Support" --release "%{name}-%{version}" \
263533
  %{SOURCE2} > processcsv.py.1
263533
%endif
263533
263533
263533
%install
263533
make DESTDIR=$RPM_BUILD_ROOT install
263533
263533
# Install translations.
263533
mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale
263533
make -C po install PODIR="$RPM_BUILD_ROOT%{_datadir}/locale"
263533
%find_lang %{name}
263533
263533
# Install virt-top manpage by hand for now.
263533
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
263533
install -m 0644 src/virt-top.1 $RPM_BUILD_ROOT%{_mandir}/man1
263533
263533
%if 0%{?rhel} >= 6
263533
# Install processcsv.py.
263533
install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
263533
263533
# Install processcsv.py(1).
263533
install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/
263533
%endif
263533
263533
263533
%files -f %{name}.lang
263533
%doc COPYING README TODO ChangeLog
263533
%{_bindir}/virt-top
263533
%{_mandir}/man1/virt-top.1*
263533
%if 0%{?rhel} >= 6
263533
%{_bindir}/processcsv.py
263533
%{_mandir}/man1/processcsv.py.1*
263533
%endif
263533
263533
263533
%changelog
056839
* Tue Nov 29 2022 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-37
056839
- Fix "Input/output error" in journal
056839
  resolves: rhbz#2149139
056839
- Store the patches in an upstream branch in git.
056839
056839
* Thu Jul 04 2019 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-36
056839
- Try installing KVM
056839
  related: rhbz#1682780
056839
056839
* Thu Jul 04 2019 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-35
056839
- Try starting libvirtd
056839
  related: rhbz#1682780
056839
056839
* Wed Jul 03 2019 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-34
056839
- Build and rebuild to rerun gating tests.
056839
  related: rhbz#1682780
056839
056839
* Thu Mar 21 2019 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-33
056839
- Add gating tests resolves: rhbz#1682780
056839
263533
* Tue Oct 16 2018 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-32
263533
- Add upstream patch to pass CFLAGS/LDFLAGS to final binary
263533
  resolves: rhbz#1630636
263533
263533
* Wed Aug 01 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.0.8-31
263533
- Rebuild for platform-python
263533
263533
* Wed Mar 28 2018 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-30
263533
- Modify processcsv.py for Python 3.
263533
263533
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.8-29
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
263533
263533
* Sat Nov 18 2017 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-28
263533
- OCaml 4.06.0 rebuild.
263533
263533
* Wed Aug 09 2017 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-27
263533
- OCaml 4.05.0 rebuild.
263533
263533
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.8-26
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
263533
263533
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.8-25
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
263533
263533
* Tue Jun 27 2017 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-24
263533
- OCaml 4.04.2 rebuild.
263533
263533
* Sat May 13 2017 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-23
263533
- OCaml 4.04.1 rebuild.
263533
263533
* Tue Mar 28 2017 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-22
263533
- Include all upstream patches since 1.0.8 was released.
263533
- BR ocaml-libvirt with virConnectGetAllDomainStats API.
263533
- Remove execstack hack, no longer needed on any arch.
263533
263533
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.8-21
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
263533
263533
* Wed Nov 09 2016 Dan Horák <dan@danny.cz> - 1.0.8-20
263533
- remove ExcludeArch
263533
263533
* Sat Nov 05 2016 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-19
263533
- Rebuild for OCaml 4.04.0.
263533
- Kill further instances of -warn-error.
263533
263533
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.8-18
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
263533
263533
* Tue Jul 28 2015 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-17
263533
- OCaml 4.02.3 rebuild.
263533
263533
* Wed Jun 24 2015 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-16
263533
- ocaml-4.02.2 final rebuild.
263533
263533
* Thu Jun 18 2015 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-15
263533
- ocaml-4.02.2 rebuild.
263533
263533
* Tue Feb 17 2015 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-14
263533
- ocaml-4.02.1 rebuild.
263533
263533
* Sun Aug 31 2014 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-13
263533
- ocaml-4.02.0 final rebuild.
263533
263533
* Sat Aug 23 2014 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-12
263533
- ocaml-4.02.0+rc1 rebuild.
263533
263533
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-11
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
263533
263533
* Sat Aug 02 2014 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-10
263533
- ocaml-4.02.0-0.8.git10e45753.fc22 rebuild.
263533
263533
* Sat Aug 02 2014 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-9
263533
- Do not warn about immutable strings.
263533
263533
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-8
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
263533
263533
* Mon Aug 05 2013 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-7
263533
- Bump and rebuild.
263533
263533
* Mon Jul 29 2013 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-6
263533
- Include processcsv.py script and man page, but on RHEL only
263533
  (RHBZ#665817, RHBZ#912020)
263533
- Clear executable stack flag on PPC, PPC64 (RHBZ#605124).
263533
263533
* Fri Jun 28 2013 Cole Robinson <crobinso@redhat.com> - 1.0.8-5
263533
- Update configure for aarch64 (bz #926701)
263533
263533
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-4
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
263533
263533
* Fri Dec 14 2012 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-3
263533
- Rebuild for OCaml 4.00.1.
263533
263533
* Fri Oct 12 2012 Richard W.M. Jones <rjones@redhat.com> - 1.0.8-2
263533
- New upstream version 1.0.8.
263533
- Requires tiny change to ocaml-libvirt, hence dep bump.
263533
- Clean up the spec file.
263533
- Remove explicit BR ocaml-camomile (not used AFAIK).
263533
263533
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-3
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
263533
263533
* Fri Mar 23 2012 Richard W.M. Jones <rjones@redhat.com> - 1.0.7-2
263533
- Require fixed ocaml-libvirt.
263533
263533
* Tue Mar  6 2012 Richard W.M. Jones <rjones@redhat.com> - 1.0.7-1
263533
- New upstream version 1.0.7.
263533
- Includes true physical CPU reporting (when libvirt supports this).
263533
263533
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-2
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
263533
263533
* Fri Aug 12 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0.6-1
263533
- New upstream version 1.0.6.
263533
263533
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-2
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
263533
263533
* Thu Jan  6 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0.5-1
263533
- New upstream version 1.0.5.
263533
- Rebuild against OCaml 3.12.0.
263533
- Project website moved to people.redhat.com.
263533
- Remove upstream patches.
263533
263533
* Wed Dec 30 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-3
263533
- Force rebuild against latest ocaml-gettext 0.3.3 (RHBZ#508197#c10).
263533
263533
* Mon Oct  5 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.4-2
263533
- New upstream release 1.0.4.
263533
- Includes new translations (RHBZ#493799).
263533
- Overall hardware memory is now displayed in CSV file (RHBZ#521785).
263533
- Several fixes to Japanese support (RHBZ#508197).
263533
- Japanese PO file also has bogus plural forms.
263533
- Additional BR on gettext (for msgfmt).
263533
263533
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-5
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
263533
263533
* Thu Apr 16 2009 S390x secondary arch maintainer <fedora-s390x@lists.fedoraproject.org>
263533
- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs
263533
  (added sparc64 per request from the sparc maintainer)
263533
263533
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-4
263533
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
263533
263533
* Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-3
263533
- Rebuild for OCaml 3.11.0+rc1.
263533
263533
* Tue Oct 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-2
263533
- Fix incorrect sources file.
263533
- Remove bogus Plural-Forms line from zh_CN PO file.
263533
263533
* Tue Oct 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.3-1
263533
- New upstream version 1.0.3.
263533
263533
* Mon May 19 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-2
263533
- Use RPM percent-configure.
263533
- Add list of BRs for gettext.
263533
- Use find_lang to find PO files.
263533
- Comment out the OCaml dependency generator.  Not a library so not
263533
  needed.
263533
263533
* Thu May  1 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-1
263533
- New upstream release 1.0.1.
263533
- Don't BR ocaml-gettext-devel, it's not used at the moment.
263533
- Don't gzip the manpage, it happens automatically.
263533
- Add BR libvirt-devel.
263533
- Remove spurious executable bit on COPYING.
263533
263533
* Thu Apr 17 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0.0-2
263533
- New upstream release 1.0.0.
263533
- Force rebuild of manpage.
263533
263533
* Tue Mar 18 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.1.1-1
263533
- New upstream release 0.4.1.1.
263533
- Move configure to build section.
263533
- Pass RPM_OPT_FLAGS.
263533
263533
* Tue Mar  4 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.1.0-2
263533
- Fix source URL.
263533
- Install virt-df manpage.
263533
263533
* Tue Mar  4 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.1.0-1
263533
- New upstream release 0.4.1.0.
263533
- Upstream now requires ocaml-dbus >= 0.06, ocaml-lablgtk >= 2.10.0,
263533
  ocaml-dbus-devel.
263533
- Enable virt-df.
263533
263533
* Sat Mar  1 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.0.3-3
263533
- Rebuild for ppc64.
263533
263533
* Wed Feb 13 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.0.3-2
263533
- Add BR gtk2-devel
263533
263533
* Tue Feb 12 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.0.3-1
263533
- New upstream version 0.4.0.3.
263533
- Rebuild for OCaml 3.10.1.
263533
263533
* Tue Nov 20 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.3.4-1
263533
- New upstream release 0.3.3.4.
263533
- Upstream website is now http://libvirt.org/ocaml/
263533
263533
* Fri Oct 19 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.3.0-2
263533
- Mistake: BR is ocaml-calendar-devel.
263533
263533
* Fri Oct 19 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.3.0-1
263533
- New upstream release 0.3.3.0.
263533
- Added support for virt-df, but disabled it by default.
263533
- +BR ocaml-calendar.
263533
263533
* Mon Sep 24 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.8-1
263533
- New upstream release 0.3.2.8.
263533
263533
* Thu Sep 20 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.7-1
263533
- New upstream release 0.3.2.7.
263533
- Ship the upstream ChangeLog file.
263533
263533
* Thu Sep  6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.6-2
263533
- Force dependency on ocaml >= 3.10.0-7 which has fixed requires/provides
263533
  scripts.
263533
263533
* Thu Sep  6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.6-1
263533
- New upstream version 0.3.2.6.
263533
263533
* Wed Aug 29 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.5-1
263533
- New upstream version 0.3.2.5.
263533
- Keep TODO out of the main package, but add (renamed) TODO.libvirt and
263533
  TODO.virt-top to the devel and virt-top packages respectively.
263533
- Add BR gawk.
263533
263533
* Thu Aug 23 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.4-1
263533
- New upstream version 0.3.2.4.
263533
263533
* Thu Aug 23 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.3-2
263533
- build_* macros so we can choose what subpackages to build.
263533
263533
* Thu Aug 23 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.3-1
263533
- Upstream version 0.3.2.3.
263533
- Add missing BR libvirt-devel.
263533
263533
* Wed Aug 22 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.2-1
263533
- Upstream version 0.3.2.2.
263533
263533
* Wed Aug 22 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.1-2
263533
- Fix unclosed if-statement in spec file.
263533
263533
* Wed Aug 22 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.2.1-1
263533
- Upstream version 0.3.2.1.
263533
- Put HTML documentation in -devel package.
263533
263533
* Mon Aug  6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.3.1.2-1
263533
- Initial RPM release.