virt-manager/virt-manager.spec.in

205 lines
4.9 KiB
Plaintext
Raw Normal View History

2006-03-29 19:40:14 +08:00
# -*- rpm-spec -*-
%define with_guestfs 0
%define stable_defaults 0
%define askpass_package "openssh-askpass"
%define qemu_user "qemu"
%define libvirt_packages "libvirt-daemon-kvm,libvirt-daemon-config-network"
%define preferred_distros "fedora,rhel"
%define kvm_packages "qemu-system-x86"
%if 0%{?rhel}
%define preferred_distros "rhel,fedora"
%define kvm_packages "qemu-kvm"
%define stable_defaults 1
%endif
# End local config
Name: virt-manager
Version: @VERSION@
Release: 1%{?dist}
%define verrel %{version}-%{release}
2006-03-29 19:40:14 +08:00
Summary: Virtual Machine Manager
2006-03-29 19:40:14 +08:00
Group: Applications/Emulators
License: GPLv2+
URL: http://virt-manager.org/
Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
BuildArch: noarch
2006-03-29 19:40:14 +08:00
Requires: virt-manager-common = %{verrel}
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: pygobject3
Requires: gtk3
Requires: libvirt-glib >= 0.0.9
Requires: libxml2-python
2013-05-10 06:24:09 +08:00
Requires: vte3
2013-10-05 04:34:19 +08:00
Requires: dconf
Requires: dbus-x11
# For console widget
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: gtk-vnc2
Requires: spice-gtk3
%if 0%{?rhel} == 7
Requires: gnome-icon-theme
%endif
BuildRequires: python
BuildRequires: intltool
2013-03-02 01:40:48 +08:00
BuildRequires: /usr/bin/pod2man
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
Group: Applications/Emulators
# This version not strictly required: virt-manager should work with older,
# however varying amounts of functionality will not be enabled.
Requires: libvirt-python >= 0.7.0
Requires: libxml2-python
Requires: python-urlgrabber
Requires: python-ipaddr
Requires: libosinfo >= 0.2.10
# Required for gobject-introspection infrastructure
Requires: pygobject3-base
%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}
Provides: virt-install
Provides: virt-clone
Provides: virt-convert
Provides: virt-xml
Obsoletes: python-virtinst
%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
%build
%if %{qemu_user}
%define _qemu_user --qemu-user=%{qemu_user}
%endif
%if %{kvm_packages}
%define _kvm_packages --kvm-package-names=%{kvm_packages}
%endif
%if %{preferred_distros}
%define _preferred_distros --preferred-distros=%{preferred_distros}
%endif
%if %{libvirt_packages}
%define _libvirt_packages --libvirt-package-names=%{libvirt_packages}
%endif
%if %{askpass_package}
%define _askpass_package --askpass-package-names=%{askpass_package}
%endif
%if %{stable_defaults}
%define _stable_defaults --stable-defaults
%endif
python setup.py configure \
%{?_qemu_user} \
%{?_kvm_packages} \
%{?_libvirt_packages} \
%{?_askpass_package} \
%{?_preferred_distros} \
%{?_stable_defaults}
2006-03-29 19:40:14 +08:00
%install
python setup.py install -O1 --root=$RPM_BUILD_ROOT
%find_lang %{name}
2006-03-29 19:40:14 +08:00
%post
2011-08-03 01:19:58 +08:00
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :
%postun
2011-08-03 01:19:58 +08:00
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
2011-08-03 01:19:58 +08:00
fi
/usr/bin/update-desktop-database &> /dev/null || :
2006-09-05 03:19:23 +08:00
2011-08-03 01:19:58 +08:00
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%files
%doc README COPYING NEWS
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_datadir}/%{name}/ui/*.ui
%{_datadir}/%{name}/virt-manager
%{_datadir}/%{name}/virtManager
%{_datadir}/%{name}/icons
%{_datadir}/icons/hicolor/*/apps/*
2010-03-24 02:27:30 +08:00
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/glib-2.0/schemas/org.virt-manager.virt-manager.gschema.xml
2014-09-30 20:41:18 +08:00
%{_datadir}/GConf/gsettings/org.virt-manager.virt-manager.convert
%files common -f %{name}.lang
%dir %{_datadir}/%{name}
2013-04-11 05:13:02 +08:00
%{_datadir}/%{name}/virtcli
%{_datadir}/%{name}/virtconv
%{_datadir}/%{name}/virtinst
%files -n virt-install
%{_mandir}/man1/virt-install.1*
%{_mandir}/man1/virt-clone.1*
%{_mandir}/man1/virt-convert.1*
%{_mandir}/man1/virt-xml.1*
%{_datadir}/%{name}/virt-install
%{_datadir}/%{name}/virt-clone
%{_datadir}/%{name}/virt-convert
%{_datadir}/%{name}/virt-xml
%{_bindir}/virt-install
%{_bindir}/virt-clone
%{_bindir}/virt-convert
%{_bindir}/virt-xml