diff --git a/debian/10_virt-manager.gschema.override b/debian/10_virt-manager.gschema.override new file mode 100644 index 00000000..dc87dd51 --- /dev/null +++ b/debian/10_virt-manager.gschema.override @@ -0,0 +1,2 @@ +[org.virt-manager.virt-manager.console] +auto-redirect=false diff --git a/debian/README b/debian/README new file mode 100644 index 00000000..68b6db9e --- /dev/null +++ b/debian/README @@ -0,0 +1,9 @@ +Access Control +============== +Access to the libvirt socket is controlled by membership in the "libvirt" +group. If you want to manage virtual machines as non root you need to add your +user to that group or you have to use the session uris like qemu:///session. + +See also /usr/share/doc/libvirt-bin/README.Debian. + + -- Guido Guenther Thu, 04 Jun 2010 11:46:03 +0100 diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 00000000..44e61493 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,9 @@ +Access Control +============== +Access to the libvirt socket is controlled by membership in the "libvirt" +group. If you want to manage virtual machines as non root you need to add your +user to that group or you have to use the session uris like qemu:///session. + +See also /usr/share/doc/libvirt-daemon-system/README.Debian.gz. + + -- Guido Guenther Thu, 04 Jun 2010 11:46:03 +0100 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 00000000..f640c865 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,29 @@ +This package is maintained with git-buildpackage(1). It follows DEP-14 +for branch naming (e.g. using debian/sid for the current version +in Debian unstable). + +It uses pristine-tar(1) to store enough information in git to generate +bit identical tarballs when building the package without having +downloaded an upstream tarball first. + +When working with patches it is recommended to use "gbp pq import" to +import the patches, modify the source and then use "gbp pq export +--commit" to commit the modifications. + +The changelog is generated using "gbp dch" so if you submit any +changes don't bother to add changelog entries but rather provide +a nice git commit message that can then end up in the changelog. + +It is recommended to build the package with pbuilder using: + + gbp builpackage --git-pbuilder + +For information on how to set up a pbuilder environment see the +git-pbuilder(1) manpage. In short: + + DIST=sid git-pbuilder create + gbp clone + cd + gbp buildpackage --git-pbuilder + + -- Guido Günther , Wed, 2 Dec 2015 18:51:15 +0100 diff --git a/debian/bug-presubj b/debian/bug-presubj new file mode 100644 index 00000000..f2ec73e7 --- /dev/null +++ b/debian/bug-presubj @@ -0,0 +1,8 @@ +When reporting issues regarding virt-manager please run the program using the +--debug --no-fork command line options and provide the output. + +Often the problem isn't related to virt-manager at all. Please also check the +libvirt and VM logfiles and try to reproduce with virsh or virt-install. + +http://wiki.debian.org/libvirt/Debugging has more information on howto provide +debugging information for the virt-* tools. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..a4ffb4ec --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +virt-manager (1:2.2.1-ok1) yangtze; urgency=medium + + * rebuild source for openKylin + + -- Cong Liu Fri, 11 Nov 2022 16:29:42 +0800 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..48082f72 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +12 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..81c20a32 --- /dev/null +++ b/debian/control @@ -0,0 +1,90 @@ +Source: virt-manager +Section: admin +Priority: optional +Maintainer: OpenKylin Virtualization SIG +Uploaders: Cong Liu +Standards-Version: 4.4.0 +Vcs-Git: https://gitee.com/openkylin/virt-manager.git +Vcs-Browser: https://gitee.com/openkylin/virt-manager +Homepage: http://virt-manager.org/ +Build-Depends: + debhelper (>= 12~), + dh-python, + intltool, + libglib2.0-bin, + python3-all, +# for the tests + cpio, + gir1.2-libosinfo-1.0, + gir1.2-libvirt-glib-1.0, + libvirt-daemon, + python3-gi, + python3-libvirt, + python3-libxml2, + python3-requests, + unzip, + +Package: virt-manager +Architecture: all +Depends: + gir1.2-appindicator3-0.1, + gir1.2-gtk-3.0 (>= 3.10), + gir1.2-gtk-vnc-2.0, + gir1.2-gtksource-4, + gir1.2-libosinfo-1.0, + gir1.2-libvirt-glib-1.0, + gir1.2-vte-2.91, + librsvg2-common, + python3-dbus, + python3-gi, + python3-gi-cairo, + python3-libvirt (>= 0.7.1), + virtinst (>= ${binary:Version}), + ${misc:Depends}, + ${python3:Depends}, +Recommends: + gir1.2-spiceclientglib-2.0, + gir1.2-spiceclientgtk-3.0, + libvirt-daemon-system (>= 1.2.7), +Suggests: + gir1.2-secret-1, + gnome-keyring, + python3-guestfs, + ssh-askpass, + virt-viewer, +Description: desktop application for managing virtual machines + It presents a summary view of running domains and their live performance & + resource utilization statistics. A detailed view presents graphs showing + performance & utilization over time. Ultimately it will allow creation of new + domains, and configuration & adjustment of a domain's resource allocation & + virtual hardware. Finally an embedded VNC client viewer presents a full + graphical console to the guest domain. + . + NOTE: the GUI is still considered experimental. + +Package: virtinst +Architecture: all +Depends: + e2fsprogs, + genisoimage, + gir1.2-libosinfo-1.0, + python3, + python3-distutils, + python3-gi, + python3-libvirt (>= 0.4.6), + python3-libxml2, + python3-requests, + ${misc:Depends}, + ${python3:Depends}, + ${shlibs:Depends}, +Recommends: + qemu-utils, + virt-viewer, +Description: Programs to create and clone virtual machines + Virtinst is a set of commandline tools to create virtual machines using + libvirt: + . + virt-install: provision new virtual machines + virt-clone: clone existing virtual machines + virt-xml: edit libvirt XML using command line options. + virt-convert: convert virtual machines between formats diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..9baaf197 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,67 @@ +This is the Ubuntu / Debian GNU/Linux prepackaged version of the +Virtual Machine Manger. + +Packaged by Marcelo Boveto Shima + and Guido Guenther + +Downloaded from http://virt-manager.et.redhat.com/download.html + +Upstream Author: + + Daniel Berrange + Hugh O. Brock + Jeremy Katz + +Copyright: + + Daniel Berrange + Red Hat, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 dated June, 1991. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to the Free Software Foundation, Inc., 51 Franklin +St, Fifth Floor, Boston, MA 02110-1301, USA. + +On Ubuntu / Debian GNU/Linux systems, the complete text of the GNU +General Public License can be found in `/usr/share/common-licenses/GPL'. + +src/graphWidgets: + + Copyright (C) 2005-2006 Red Hat, Inc., David Malcolm + Copyright (C) 2006 Daniel P. Berrange + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +You should have received a copy of the GNU Library General Public License with +this program; if not, write to the Free Software Foundation, Inc., 51 Franklin +St, Fifth Floor, Boston, MA 02110-1301, USA. + +On Ubuntu / Debian GNU/Linux systems, the complete text of the GNU +General Library Public License can be found in +`/usr/share/common-licenses/LGPL-2'. + +help/: + + Copyright 2007 Red Hat Inc., and Hugh Brock + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License (GFDL), Version 1.1 or any later version published + by the Free Software Foundation with no Invariant Sections, + no Front-Cover Texts, and no Back-Cover Texts. + +On Ubuntu / Debian GNU/Linux systems, the complete text of the GNU Free +Documentation License can be found in `/usr/share/common-licenses/GFDL'. + + diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 00000000..760033d6 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,6 @@ +[DEFAULT] +upstream-branch=upstream/latest +debian-branch=debian/sid + +[pq] +patch-numbers = False diff --git a/debian/patches/Use-usr-bin-python.patch b/debian/patches/Use-usr-bin-python.patch new file mode 100644 index 00000000..c0a89d9f --- /dev/null +++ b/debian/patches/Use-usr-bin-python.patch @@ -0,0 +1,79 @@ +From: =?utf-8?q?Guido_G=C3=BCnther?= +Date: Sat, 24 Dec 2016 01:18:30 +0100 +Subject: Use /usr/bin/python3 + +so we don't have to worry about picking up the wrong version +--- + setup.py | 3 +-- + virt-clone | 2 +- + virt-convert | 2 +- + virt-install | 2 +- + virt-manager | 2 +- + virt-xml | 2 +- + 6 files changed, 6 insertions(+), 7 deletions(-) + +diff --git a/setup.py b/setup.py +index 275087b..1f7aa98 100755 +--- a/setup.py ++++ b/setup.py +@@ -1,9 +1,8 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/python3 + # + # This work is licensed under the GNU GPLv2 or later. + # See the COPYING file in the top-level directory. + +- + import sys + if sys.version_info.major < 3: + print("virt-manager is python3 only. Run this as ./setup.py") +diff --git a/virt-clone b/virt-clone +index 472bd3e..79355da 100755 +--- a/virt-clone ++++ b/virt-clone +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/python3 + # + # Copyright(c) FUJITSU Limited 2007. + # +diff --git a/virt-convert b/virt-convert +index df7fa84..ca4f212 100755 +--- a/virt-convert ++++ b/virt-convert +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/python3 + # + # Copyright 2008, 2013, 2014 Red Hat, Inc. + # +diff --git a/virt-install b/virt-install +index af6c75b..0cd5da7 100755 +--- a/virt-install ++++ b/virt-install +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/python3 + # + # Copyright 2005-2014 Red Hat, Inc. + # +diff --git a/virt-manager b/virt-manager +index ca6a593..b4b7eb2 100755 +--- a/virt-manager ++++ b/virt-manager +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/python3 + # + # Copyright (C) 2006, 2014 Red Hat, Inc. + # Copyright (C) 2006 Daniel P. Berrange +diff --git a/virt-xml b/virt-xml +index 71445c9..de5cd2d 100755 +--- a/virt-xml ++++ b/virt-xml +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/python3 + # + # Copyright 2013-2014 Red Hat, Inc. + # diff --git a/debian/patches/legacy-images.patch b/debian/patches/legacy-images.patch new file mode 100644 index 00000000..0f6b65c4 --- /dev/null +++ b/debian/patches/legacy-images.patch @@ -0,0 +1,28 @@ +Description: Fix legacy-images path for focal. +Author: Dimitri John Ledkov +Bug-Ubuntu: https://launchpad.net/bugs/1872941 + + +Index: virt-manager-2.2.1/virtinst/install/urldetect.py +=================================================================== +--- virt-manager-2.2.1.orig/virtinst/install/urldetect.py ++++ virt-manager-2.2.1/virtinst/install/urldetect.py +@@ -640,6 +640,8 @@ class _DebianDistro(_DistroTree): + media_type = None + if check_manifest("current/images/MANIFEST"): + media_type = "url" ++ elif check_manifest("current/legacy-images/MANIFEST"): ++ media_type = "url" + elif check_manifest("daily/MANIFEST"): + media_type = "daily" + elif cache.content_regex(".disk/info", +@@ -693,6 +695,9 @@ class _DebianDistro(_DistroTree): + + def _set_url_paths(self): + url_prefix = "current/images" ++ if self._debname == "ubuntu" and self._os_variant >= 'ubuntu20.04': ++ url_prefix = "current/legacy-images" ++ log.warn("Using legacy d-i based installer, that has been deprecated and will be removed in the future. https://discourse.ubuntu.com/c/server") + if self.cache.debian_media_type == "daily": + url_prefix = "daily" + elif self.cache.debian_media_type == "mounted_iso_url": diff --git a/debian/patches/mark-libvirt-lxc.patch b/debian/patches/mark-libvirt-lxc.patch new file mode 100644 index 00000000..cd978eda --- /dev/null +++ b/debian/patches/mark-libvirt-lxc.patch @@ -0,0 +1,29 @@ +Description: Clearly mark the LXC connections as being libvirt-lxc, to + avoid confusion due to differing features and configurations. +Written: 2015-08-22 +Author: Serge Hallyn +Updated: 2019-12-06 +Forwarded: https://github.com/virt-manager/virt-manager/pull/67 + +--- a/virtManager/createconn.py ++++ b/virtManager/createconn.py +@@ -171,7 +171,7 @@ class vmmConnect(vmmGObjectUI): + _add_hv_row(HV_QEMU, "qemu", "QEMU/KVM") + _add_hv_row(HV_QEMU_SESSION, "qemu", "QEMU/KVM " + _("user session")) + _add_hv_row(HV_XEN, "xen", "Xen") +- _add_hv_row(HV_LXC, "lxc", "LXC (" + _("Linux Containers") + ")") ++ _add_hv_row(HV_LXC, "lxc", "Libvirt-LXC (Linux Containers)") + _add_hv_row(HV_BHYVE, "bhyve", "Bhyve") + _add_hv_row(HV_VZ, "vz", "Virtuozzo") + _add_hv_row(-1, None, "") +--- a/virtManager/connection.py ++++ b/virtManager/connection.py +@@ -433,7 +433,7 @@ class vmmConnection(vmmGObject): + "esx": "ESX", + "gsx": "GSX", + "libxl": "libxl", +- "lxc": "LXC", ++ "lxc": "Libvirt-LXC", + "openvz": "OpenVZ", + "phyp": "phyp", + "qemu": "QEMU/KVM", diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..06e24c92 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +Use-usr-bin-python.patch +mark-libvirt-lxc.patch +legacy-images.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..30121263 --- /dev/null +++ b/debian/rules @@ -0,0 +1,24 @@ +#!/usr/bin/make -f + +%: + dh $@ --with python3 --buildsystem=pybuild + +override_dh_python2: + dh_python3 -O--buildsystem=python_distutils + dh_python3 -p virtinst usr/share/virt-manager + +override_dh_auto_test: +ifneq (,$(filter check,$(DEB_BUILD_OPTIONS))) + python3 setup.py test +else + @echo "Checks disabled atm" +endif + +override_dh_auto_install: + python3 setup.py --no-update-icon-cache --no-compile-schemas install --force --root=debian/tmp --no-compile -O0 + dh_install debian/10_virt-manager.gschema.override \ + /usr/share/glib-2.0/schemas/ + +override_dh_auto_clean: + dh_auto_clean + rm -f data/gschemas.compiled diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml new file mode 100644 index 00000000..5e6658de --- /dev/null +++ b/debian/salsa-ci.yml @@ -0,0 +1,5 @@ +--- +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 00000000..8d84dc8a --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,9 @@ +Tests: help.sh +Restrictions: superficial +Depends: virtinst, + +Tests: virt-manager.sh +Restrictions: superficial +Depends: virt-manager, + xvfb, + xauth, diff --git a/debian/tests/help.sh b/debian/tests/help.sh new file mode 100755 index 00000000..8079efdf --- /dev/null +++ b/debian/tests/help.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# At least check we can execute the main binary +# to catch missing python dependenies +for p in install xml convert clone; do + virt-$p --help +done diff --git a/debian/tests/virt-manager.sh b/debian/tests/virt-manager.sh new file mode 100755 index 00000000..3c07ecee --- /dev/null +++ b/debian/tests/virt-manager.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# At least check we can execute the main binary +# to catch missing python dependenies + +set -e + +xvfb-run virt-manager --help diff --git a/debian/virt-manager.install b/debian/virt-manager.install new file mode 100644 index 00000000..eef02bd6 --- /dev/null +++ b/debian/virt-manager.install @@ -0,0 +1,11 @@ +usr/bin/virt-manager +usr/share/man/man1/virt-manager.1 +usr/share/icons/ +usr/share/appdata/virt-manager.appdata.xml +usr/share/applications +usr/share/glib-2.0 +usr/share/locale +usr/share/virt-manager/icons +usr/share/virt-manager/ui +usr/share/virt-manager/virt-manager +usr/share/virt-manager/virtManager diff --git a/debian/virtinst.install b/debian/virtinst.install new file mode 100644 index 00000000..97fb3b8b --- /dev/null +++ b/debian/virtinst.install @@ -0,0 +1,15 @@ +usr/bin/virt-clone +usr/bin/virt-convert +usr/bin/virt-install +usr/bin/virt-xml +usr/share/bash-completion/completions/ +usr/share/man/man1/virt-install.1 +usr/share/man/man1/virt-convert.1 +usr/share/man/man1/virt-clone.1 +usr/share/man/man1/virt-xml.1 +usr/share/virt-manager/virt-clone +usr/share/virt-manager/virt-convert +usr/share/virt-manager/virt-install +usr/share/virt-manager/virt-xml +usr/share/virt-manager/virtconv +usr/share/virt-manager/virtinst diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..cc014da5 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 + +https://releases.pagure.org/virt-manager/virt-manager-(.*)\.tar\.gz