From c3b38983c0582c49cb517d676f263d3e3a8eb2ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Sun, 13 Nov 2016 17:32:05 -0300 Subject: virt-install: add new package to [libre] - Freedom issue #1130 -> https://labs.parabola.nu/issues/1130 --- libre/virt-manager/PKGBUILD | 44 +++++++ libre/virt-manager/libre.patch | 252 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 296 insertions(+) create mode 100644 libre/virt-manager/PKGBUILD create mode 100644 libre/virt-manager/libre.patch diff --git a/libre/virt-manager/PKGBUILD b/libre/virt-manager/PKGBUILD new file mode 100644 index 000000000..f0598dd04 --- /dev/null +++ b/libre/virt-manager/PKGBUILD @@ -0,0 +1,44 @@ +# $Id: PKGBUILD 188575 2016-09-05 12:59:33Z spupykin $ +# Maintainer (Arch): Sergej Pupykin +# Contributor (Arch): Daniel Micay +# Contributor (Arch): Jonathan Wiersma +# Maintainer: André Silva + +pkgbase=virt-manager +pkgname=virt-install +pkgver=1.4.0 +pkgrel=2.parabola1 +pkgdesc="Console user interface for managing virtual machines, without support for nonfree systems" +arch=('any') +url="http://virt-manager.org/" +license=('GPL') +depends=('python2' 'libvirt-python' 'libxml2' 'libvirt' + 'libosinfo' 'python2-ipaddr' 'python2-gobject' 'python2-requests') +makedepends=('intltool>=0.35.0' + 'dbus-python' 'gtk-vnc' 'rarian' + 'yajl' 'librsvg' 'libuser' 'python2-cairo' + 'python2-ipy' 'newt-syrup' 'openbsd-netcat' 'x11-ssh-askpass' + 'graphite' 'spice-gtk3' + 'libvirt-glib' 'vte3') +source=("http://virt-manager.org/download/sources/virt-manager/virt-manager-$pkgver.tar.gz" + 'libre.patch') +md5sums=('3cb69f1d108ae6d16bab2fce7ec639ea' + '0b7eeb9879e33e11cee146a7cdc162b2') + +prepare() { + cd "$srcdir/$pkgbase-$pkgver" + patch -p1 -i ../libre.patch +} + +build() { + cd "$srcdir/$pkgbase-$pkgver" + python2 setup.py build +} + +package() { + cd "$srcdir/$pkgbase-$pkgver" + python2 setup.py --no-update-icon-cache --no-compile-schemas install --root "$pkgdir" + python2 -m compileall "${pkgdir}/usr/share/virt-manager" + python2 -O -m compileall "${pkgdir}/usr/share/virt-manager" + rm "${pkgdir}/usr/bin/virt-manager" +} diff --git a/libre/virt-manager/libre.patch b/libre/virt-manager/libre.patch new file mode 100644 index 000000000..524ad05f4 --- /dev/null +++ b/libre/virt-manager/libre.patch @@ -0,0 +1,252 @@ +diff --git a/man/virt-install.pod b/man/virt-install.pod +index a1229c8..7177ab2 100644 +--- a/man/virt-install.pod ++++ b/man/virt-install.pod +@@ -357,36 +357,6 @@ Mount the ISO and probe the directory. This requires running virt-install as roo + + =back + +-Some distro specific url samples: +- +-=over 4 +- +-=item Fedora/Red Hat Based +- +-http://download.fedoraproject.org/pub/fedora/linux/releases/21/Server/x86_64/os +- +-=item Debian +- +-http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/ +- +-=item Ubuntu +- +-http://us.archive.ubuntu.com/ubuntu/dists/wily/main/installer-amd64/ +- +-=item Suse +- +-http://download.opensuse.org/distribution/11.0/repo/oss/ +- +-=item Mandriva +- +-ftp://ftp.uwsg.indiana.edu/linux/mandrake/official/2009.0/i586/ +- +-=item Mageia +- +-ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/1 +- +-=back +- + =item B<--pxe> + + Use the PXE boot protocol to load the initial ramdisk and kernel for starting +diff --git a/virtinst/osdict.py b/virtinst/osdict.py +index e8c1487..74edbff 100644 +--- a/virtinst/osdict.py ++++ b/virtinst/osdict.py +@@ -61,12 +61,6 @@ def _remove_older_point_releases(distro_list): + if latest_os: + ret.insert(first_id, latest_os) + +- _find_latest("rhel4") +- _find_latest("rhel5") +- _find_latest("rhel6") +- _find_latest("rhel7") +- _find_latest("freebsd9") +- _find_latest("freebsd10") + return ret + + +@@ -134,49 +128,8 @@ class _OSDB(object): + # This is only for back compatibility with pre-libosinfo support. + # This should never change. + _aliases = { +- "altlinux" : "altlinux1.0", +- "debianetch" : "debian4", +- "debianlenny" : "debian5", +- "debiansqueeze" : "debian6", +- "debianwheezy" : "debian7", +- "freebsd10" : "freebsd10.0", +- "freebsd6" : "freebsd6.0", +- "freebsd7" : "freebsd7.0", +- "freebsd8" : "freebsd8.0", +- "freebsd9" : "freebsd9.0", +- "mandriva2009" : "mandriva2009.0", +- "mandriva2010" : "mandriva2010.0", +- "mbs1" : "mbs1.0", +- "msdos" : "msdos6.22", +- "openbsd4" : "openbsd4.2", +- "opensolaris" : "opensolaris2009.06", +- "opensuse11" : "opensuse11.4", +- "opensuse12" : "opensuse12.3", +- "rhel4" : "rhel4.0", +- "rhel5" : "rhel5.0", +- "rhel6" : "rhel6.0", +- "rhel7" : "rhel7.0", +- "ubuntuhardy" : "ubuntu8.04", +- "ubuntuintrepid" : "ubuntu8.10", +- "ubuntujaunty" : "ubuntu9.04", +- "ubuntukarmic" : "ubuntu9.10", +- "ubuntulucid" : "ubuntu10.04", +- "ubuntumaverick" : "ubuntu10.10", +- "ubuntunatty" : "ubuntu11.04", +- "ubuntuoneiric" : "ubuntu11.10", +- "ubuntuprecise" : "ubuntu12.04", +- "ubuntuquantal" : "ubuntu12.10", +- "ubunturaring" : "ubuntu13.04", +- "ubuntusaucy" : "ubuntu13.10", +- "virtio26": "fedora10", +- "vista" : "winvista", +- "winxp64" : "winxp", +- + # Old --os-type values + "linux" : "generic", +- "windows" : "winxp", +- "solaris" : "solaris10", +- "unix": "freebsd9.0", + "other": "generic", + } + +@@ -232,17 +185,11 @@ class _OSDB(object): + return None + + osname = ret[0].get_short_id() +- if osname == "fedora-unknown": +- osname = self.latest_fedora_version() +- logging.debug("Detected location=%s as os=fedora-unknown. " +- "Converting that to the latest fedora OS version=%s", +- location, osname) + + return osname + + def list_types(self): +- approved_types = ["linux", "windows", "unix", +- "solaris", "other", "generic"] ++ approved_types = ["linux", "generic"] + return approved_types + + def list_os(self, typename=None, only_supported=False, sortpref=None): +@@ -265,13 +212,6 @@ class _OSDB(object): + return _sort(sortmap, sortpref=sortpref, + limit_point_releases=only_supported) + +- def latest_fedora_version(self): +- for osinfo in self.list_os(): +- if (osinfo.name.startswith("fedora") and +- "unknown" not in osinfo.name): +- # First fedora* occurrence should be the newest +- return osinfo.name +- + + ##################### + # OsVariant classes # +@@ -363,34 +303,6 @@ class _OsVariant(object): + return (datetime.datetime.strptime(eol_date, "%Y-%m-%d") > + datetime.datetime.now()) + +- if self.name == "fedora-unknown": +- return False +- +- # As of libosinfo 2.11, many clearly EOL distros don't have an +- # EOL date. So assume None == EOL, add some manual work arounds. +- # We should fix this in a new libosinfo version, and then drop +- # this hack +- if self._is_related_to(["fedora20", "rhel7.0", "debian6", +- "ubuntu13.04", "win8", "win2k12"], +- check_clones=False, check_derives=False): +- return True +- return False +- +- def _get_urldistro(self): +- if not self._os: +- return None +- urldistro = self._os.get_distro() +- remap = { +- "opensuse" : "suse", +- "sles" : "suse", +- "mes" : "mandriva" +- } +- +- if remap.get(urldistro): +- return remap[urldistro] +- +- return urldistro +- + + ############### + # Public APIs # +@@ -411,36 +323,13 @@ class _OsVariant(object): + if self._family in ['linux']: + return "linux" + +- if self._family in ['win9x', 'winnt', 'win16']: +- return "windows" +- +- if self._family in ['solaris']: +- return "solaris" +- +- if self._family in ['openbsd', 'freebsd', 'netbsd']: +- return "unix" +- +- return "other" +- +- def is_windows(self): +- return self.get_typename() == "windows" +- +- def need_old_xen_disable_acpi(self): +- return self._is_related_to(["winxp", "win2k"], check_upgrades=False) +- +- def broken_x2apic(self): +- # x2apic breaks networking in solaris10 +- # https://bugs.launchpad.net/bugs/1395217 +- return self.name in ('solaris10', 'solaris11') ++ return None + + def get_clock(self): + if self.is_windows() or self._family in ['solaris']: + return "localtime" + return "utc" + +- def supports_virtiommio(self): +- return self._is_related_to(["fedora19"]) +- + def default_netmodel(self): + """ + Default non-virtio net-model, since we check for that separately +@@ -499,37 +388,16 @@ class _OsVariant(object): + + return False + +- def supports_qemu_ga(self): +- return self._is_related_to(["fedora18", "rhel6.0", "sles11sp4"]) +- + def default_videomodel(self, guest): + if guest.os.is_pseries(): + return "vga" + +- # Marc Deslauriers of canonical had previously patched us +- # to use vmvga for ubuntu, see fb76c4e5. And Fedora users report +- # issues with ubuntu + qxl for as late as 14.04, so carry the vmvga +- # default forward until someone says otherwise. In 2014-09 I contacted +- # Marc offlist and he said this was fine for now. +- # +- # But in my testing ubuntu-15.04 works _better_ with qxl (installer +- # resolution is huge with vmvga but reasonable with qxl), and given +- # that the qemu vmvga code is not supposed to be of high quality, +- # let's use qxl for newer ubuntu +- if (self._os and +- self._os.get_distro() == "ubuntu" and +- not self._is_related_to("ubuntu15.04")): +- return "vmvga" +- + if guest.has_spice() and guest.os.is_x86(): + if guest.has_gl(): + return "virtio" + else: + return "qxl" + +- if self.is_windows(): +- return "vga" +- + return None + + def get_recommended_resources(self, guest): -- cgit v1.1-4-g5e80