virt-manager/virt-manager.spec

167 lines
4.4 KiB
Plaintext
Raw Normal View History

2006-03-29 19:40:14 +08:00
# -*- rpm-spec -*-
2015-12-30 01:00:40 +08:00
%global with_guestfs 0
%global default_hvs "qemu,xen,lxc"
# End local config
Name: virt-manager
Version: 2.2.1
Release: 1%{?dist}
2015-12-30 01:00:40 +08:00
%global verrel %{version}-%{release}
2006-03-29 19:40:14 +08:00
Summary: Desktop tool for managing virtual machines via libvirt
License: GPLv2+
BuildArch: noarch
URL: https://virt-manager.org/
Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
2006-03-29 19:40:14 +08:00
Requires: virt-manager-common = %{verrel}
Requires: python3-gobject
Convert to use GTK3 and GObject Introspection bindings Switch over to use GObject introspection bindings for all python modules related to GObject/GTK3/etc. It is not possible to mix and match old pyggtk/pygobject manual bindings with new introspection based bindings so it must be all changed in one go. Imports like import gtk Change to from gi.repository import Gtk The vmmGObject class is changed to always inherit from GObject.GObject There is no compelling reason to avoid a GObject dep for the virt-manager TUI & it horribly messed up the code. Signal declarations are changed from vmmChooseCD.signal_new(vmmChooseCD, "cdrom-chosen", [object, str]) To __gsignals__ = { "cdrom-chosen": (GObject.SignalFlags.RUN_FIRST, None, [object, str]) } which is required by new GObject bindings Most of the rest of the change is simply dealing with renamed constants / classes. Alot of legacy compat code was removed - ie helpers which check to see if certain GTK2 methods are available are no longer required since we're mandating GTK3 only. The event loop is replaced with LibvirtGLib's event loop. Still todo - Rip out all DBus stuff & make vmmEngine class inherit GtkApplication which provides unique support & DBus method handling - Switch to use LibvirtGConfig & LibvirtGObject for libvirt interaction - Possibly switch to Python 3 too ? - Figure out why GNOME keyring is missing Introspection support My suggestion is that the standalone GIT repo for virt-install only live on as a support branch for legacy platforms. A stable-0.9 branch of virt-manager can be kept for legacy PyGtk2 based virt-manager releases. The virt-manager master branch should exclusively use GObject inspection and ideally Python3 and contain both the virt-manager and virt-install codebases in one since they are intimately related to each other & using separate GIT repos has needlessly complicated life for everyone. crobinso: Some locking fixes Misc cleanups and dropping now-useless code Fix dbus usage Fix graph cell renderer regression Fix a couple tooltip issues
2012-05-14 21:24:56 +08:00
Requires: gtk3
Requires: libvirt-glib >= 0.0.9
Requires: gtk-vnc2
Requires: spice-gtk3
2018-03-22 05:10:30 +08:00
# We can work with gtksourceview 3 or gtksourceview4, pick the latest one
Requires: gtksourceview4
2018-03-22 05:10:30 +08:00
# virt-manager is one of those apps that people will often install onto
# a headless machine for use over SSH. This means the virt-manager dep
# chain needs to provide everything we need to get a usable app experience.
# Unfortunately nothing in our chain has an explicit dep on some kind
# of usable gsettings backend, so we explicitly depend on dconf so that
# user settings actually persist across app runs.
2013-10-05 04:34:19 +08:00
Requires: dconf
# The vte291 package is actually the latest vte with API version 2.91, while
# the vte3 package is effectively a compat package with API version 2.90.
# virt-manager works fine with either, so pull the latest bits so there's
# no ambiguity.
Requires: vte291
# Weak dependencies for the common virt-manager usecase
Recommends: (libvirt-daemon-kvm or libvirt-daemon-qemu)
Recommends: libvirt-daemon-config-network
# Optional inspection of guests
Suggests: python3-libguestfs
BuildRequires: gettext
2013-03-02 01:40:48 +08:00
BuildRequires: /usr/bin/pod2man
BuildRequires: python3-devel
2006-03-29 19:40:14 +08:00
2006-03-29 19:40:14 +08:00
%description
2008-09-10 23:18:06 +08:00
Virtual Machine Manager provides a graphical tool for administering virtual
machines for KVM, Xen, and LXC. Start, stop, add or remove virtual devices,
2008-09-10 23:18:06 +08:00
connect to a graphical or serial console, and see resource usage statistics
for existing VMs on local or remote machines. Uses libvirt as the backend
management API.
2006-03-29 19:40:14 +08:00
%package common
Summary: Common files used by the different Virtual Machine Manager interfaces
2018-12-19 00:59:42 +08:00
Requires: python3-argcomplete
Requires: python3-libvirt
Requires: python3-libxml2
Requires: python3-requests
Requires: libosinfo >= 0.2.10
# Required for gobject-introspection infrastructure
Requires: python3-gobject-base
# Required for pulling files from iso media with isoinfo
Requires: genisoimage
%description common
Common files used by the different virt-manager interfaces, as well as
virt-install related tools.
%package -n virt-install
Summary: Utilities for installing virtual machines
Requires: virt-manager-common = %{verrel}
# For 'virsh console'
Requires: libvirt-client
Provides: virt-install
Provides: virt-clone
Provides: virt-xml
%description -n virt-install
Package includes several command line utilities, including virt-install
(build and install new VMs) and virt-clone (clone an existing virtual
machine).
2006-03-29 19:40:14 +08:00
%prep
%setup -q
2006-03-29 19:40:14 +08:00
%build
%if %{default_hvs}
2015-12-30 01:00:40 +08:00
%global _default_hvs --default-hvs %{default_hvs}
%endif
./setup.py configure \
%{?_default_hvs}
2006-03-29 19:40:14 +08:00
%install
./setup.py \
--no-update-icon-cache --no-compile-schemas \
install -O1 --root=%{buildroot}
%find_lang %{name}
2006-03-29 19:40:14 +08:00
%if 0%{?py_byte_compile:1}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#manual-bytecompilation
%py_byte_compile %{python3} %{buildroot}%{_datadir}/virt-manager/
%endif
# Replace '#!/usr/bin/env python3' with '#!/usr/bin/python3'
# The format is ideal for upstream, but not a distro. See:
# https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython
for f in $(find %{buildroot} -type f -executable -print); do
sed -i "1 s|^#!/usr/bin/env python3|#!%{__python3}|" $f || :
done
%files
2016-12-26 19:52:26 +08:00
%doc README.md COPYING NEWS.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_datadir}/%{name}/ui/*.ui
%{_datadir}/%{name}/virtManager
%{_datadir}/%{name}/icons
%{_datadir}/icons/hicolor/*/apps/*
2010-03-24 02:27:30 +08:00
%{_datadir}/applications/%{name}.desktop
%{_datadir}/glib-2.0/schemas/org.virt-manager.virt-manager.gschema.xml
%{_datadir}/metainfo/%{name}.appdata.xml
%files common -f %{name}.lang
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/virtinst
%files -n virt-install
%{_mandir}/man1/virt-install.1*
%{_mandir}/man1/virt-clone.1*
%{_mandir}/man1/virt-xml.1*
2018-12-19 00:59:42 +08:00
%{_datadir}/bash-completion/completions/virt-install
%{_datadir}/bash-completion/completions/virt-clone
%{_datadir}/bash-completion/completions/virt-xml
%{_bindir}/virt-install
%{_bindir}/virt-clone
%{_bindir}/virt-xml