summaryrefslogtreecommitdiff
path: root/libre/virt-manager/libre.patch
diff options
context:
space:
mode:
Diffstat (limited to 'libre/virt-manager/libre.patch')
-rw-r--r--libre/virt-manager/libre.patch238
1 files changed, 103 insertions, 135 deletions
diff --git a/libre/virt-manager/libre.patch b/libre/virt-manager/libre.patch
index d897336c7..300037400 100644
--- a/libre/virt-manager/libre.patch
+++ b/libre/virt-manager/libre.patch
@@ -1,7 +1,25 @@
diff -Naur virt-manager-2.0.0.orig/man/virt-install.pod virt-manager-2.0.0/man/virt-install.pod
--- virt-manager-2.0.0.orig/man/virt-install.pod 2018-10-13 13:26:55.000000000 -0500
+++ virt-manager-2.0.0/man/virt-install.pod 2018-10-19 17:18:38.584887172 -0500
-@@ -408,36 +408,6 @@
+@@ -10,7 +10,7 @@ B<virt-install> [OPTION]...
+
+ =head1 DESCRIPTION
+
+-B<virt-install> is a command line tool for creating new KVM, Xen, or Linux
++B<virt-install> is a command line tool for creating new KVM, Xen, or GNU/Linux
+ container guests using the C<libvirt> hypervisor management library.
+ See the EXAMPLES section at the end of this document to quickly get started.
+
+@@ -67,7 +67,7 @@ For connecting to Xen.
+
+ =item lxc:///
+
+-For creating linux containers
++For creating GNU/Linux containers
+
+ =back
+
+@@ -396,36 +396,6 @@ Path to a local directory containing an
=back
@@ -11,7 +29,7 @@ diff -Naur virt-manager-2.0.0.orig/man/virt-install.pod virt-manager-2.0.0/man/v
-
-=item Fedora/Red Hat Based
-
--https://download.fedoraproject.org/pub/fedora/linux/releases/25/Server/x86_64/os
+-https://download.fedoraproject.org/pub/fedora/linux/releases/29/Server/x86_64/os
-
-=item Debian
-
@@ -35,32 +53,24 @@ diff -Naur virt-manager-2.0.0.orig/man/virt-install.pod virt-manager-2.0.0/man/v
-
-=back
-
- =item B<--pxe>
-
- Use the PXE boot protocol to load the initial ramdisk and kernel for starting
-@@ -472,21 +442,6 @@
+ Additionally, --location can take 'kernel' and 'initrd' sub options. These paths
+ relative to the specified location URL/ISO that allow selecting specific files
+ for kernel/initrd within the install tree. This can be useful if virt-install/
+@@ -563,10 +533,9 @@ Use --idmap=? to see a list of all avail
- --initrd-inject=/path/to/my.ks --extra-args "ks=file:/my.ks"
+ =item B<--os-variant> OS_VARIANT
--=item B<--os-variant> OS_VARIANT
--
-Optimize the guest configuration for a specific operating system (ex.
--'fedora18', 'rhel7', 'winxp'). While not required, specifying this
+-'fedora29', 'rhel7', 'win10'). While not required, specifying this
-options is HIGHLY RECOMMENDED, as it can greatly increase performance
-by specifying virtio among other guest tweaks.
--
--By default, virt-install will attempt to auto detect this value from
--the install media (currently only supported for URL installs). Autodetection
--can be disabled with the special value 'none'. Autodetection can be
--forced with the special value 'auto'.
--
--Use the command "osinfo-query os" to get the list of the accepted OS
--variants.
--
- =item B<--boot> BOOTOPTS
++Optimize the guest configuration for a specific operating system. While not
++required, specifying this options is HIGHLY RECOMMENDED, as it can greatly
++increase performance by specifying virtio among other guest tweaks.
- Optionally specify the post-install VM boot configuration. This option allows
-@@ -644,7 +599,7 @@
+ By default, virt-install will attempt to auto detect this value from
+ the install media (currently only supported for URL installs). Autodetection
+@@ -651,7 +620,7 @@ bus types.
=item B<removable>
@@ -69,7 +79,7 @@ diff -Naur virt-manager-2.0.0.orig/man/virt-install.pod virt-manager-2.0.0/man/v
used with QEMU and bus=usb. Value can be 'on' or 'off'.
=item B<readonly>
-@@ -724,7 +679,7 @@
+@@ -731,7 +700,7 @@ How guest should react if a write error
=item B<serial>
@@ -78,20 +88,20 @@ diff -Naur virt-manager-2.0.0.orig/man/virt-install.pod virt-manager-2.0.0/man/v
to set /dev/disk/by-id symlinks. An example serial number might be:
WD-WMAP9A966149
-@@ -753,7 +708,7 @@
+@@ -760,7 +729,7 @@ invocation is:
--filesystem /source/on/host,/target/point/in/guest
-Which will work for recent QEMU and linux guest OS or LXC containers. For
-+Which will work for recent QEMU and GNU/Linux guest OS or LXC Linux containers. For
++Which will work for recent QEMU and GNU/Linux guest OS or LXC containers. For
QEMU, the target point is just a mounting hint in sysfs, so will not be
automatically mounted.
-@@ -1721,45 +1676,6 @@
+@@ -1728,46 +1697,7 @@ C<~/.cache/virt-manager/virt-install.log
=head1 EXAMPLES
--Install a Fedora 20 KVM guest with virtio accelerated disk/network,
+-Install a Fedora 29 KVM guest with virtio accelerated disk/network,
-creating a new 10GiB qcow2 file, installing from media in the hosts
-CDROM drive. This will use Spice graphics by default, and launch autolaunch
-a graphical client.
@@ -103,7 +113,7 @@ diff -Naur virt-manager-2.0.0.orig/man/virt-install.pod virt-manager-2.0.0/man/v
- --memory 500 \
- --disk size=10 \
- --cdrom /dev/cdrom \
-- --os-variant fedora13
+- --os-variant fedora29
-
-Install a Fedora 9 plain QEMU guest, using LVM partition, virtual networking,
-booting from PXE, using VNC server/viewer, with virtio-scsi disk
@@ -130,19 +140,30 @@ diff -Naur virt-manager-2.0.0.orig/man/virt-install.pod virt-manager-2.0.0/man/v
- --graphics vnc \
- --cdrom /root/fedora7live.iso
-
- Run /usr/bin/httpd in a linux container guest (LXC). Resource usage is capped
+-Run /usr/bin/httpd in a linux container guest (LXC). Resource usage is capped
++Run /usr/bin/httpd in a GNU/Linux container guest (LXC). Resource usage is capped
at 512 MiB of ram and 2 host cpus:
-@@ -1785,7 +1701,7 @@
+ # virt-install \
+@@ -1777,7 +1707,7 @@ at 512 MiB of ram and 2 host cpus:
+ --vcpus 2 \
+ --init /usr/bin/httpd
+
+-Start a linux container guest(LXC) with a private root filesystem,
++Start a GNU/Linux container guest(LXC) with a private root filesystem,
+ using /bin/sh as init.
+ Container's root will be under host dir /home/LXC.
+ The host dir "/home/test" will be mounted at
+@@ -1792,7 +1722,7 @@ The host dir "/home/test" will be mounte
--init /bin/sh
Install a paravirtualized Xen guest, 500 MiB of RAM, a 5 GiB of disk, and
-Fedora Core 6 from a web server, in text-only mode, with old style --file
-+Parabola from a web server, in text-only mode, with old style --file
++Parabola GNU/Linux-libre from a web server, in text-only mode, with old style --file
options:
# virt-install \
-@@ -1794,7 +1710,7 @@
+@@ -1801,7 +1731,7 @@ options:
--memory 500 \
--disk /var/lib/xen/images/demo.img,size=6 \
--graphics none \
@@ -154,7 +175,7 @@ diff -Naur virt-manager-2.0.0.orig/man/virt-install.pod virt-manager-2.0.0/man/v
diff -Naur virt-manager-2.0.0.orig/man/virt-xml.pod virt-manager-2.0.0/man/virt-xml.pod
--- virt-manager-2.0.0.orig/man/virt-xml.pod 2018-10-13 13:26:55.000000000 -0500
+++ virt-manager-2.0.0/man/virt-xml.pod 2018-10-19 18:35:08.954722971 -0500
-@@ -292,53 +292,10 @@
+@@ -316,59 +316,10 @@
# virt-xml winxp --edit --cpu host-model,clearxml=yes --confirm
@@ -197,6 +218,12 @@ diff -Naur virt-manager-2.0.0.orig/man/virt-xml.pod virt-manager-2.0.0/man/virt-
- # virt-xml fedora18 --add-device \
- --disk /var/lib/libvirt/images/newimage.qcow2,format=qcow2,size=10
-
+-Same as above, but ensure the disk is attached to the most appropriate bus
+-for the guest OS by providing information about it on the command line:
+-
+- # virt-xml fedora18 --os-variant fedora18 --add-device \
+- --disk /var/lib/libvirt/images/newimage.qcow2,format=qcow2,size=10
+-
-Hotunplug the disk vdb from the running domain 'rhel7':
-
- # virt-xml rhel7 --update --remove-device --disk target=vdb
@@ -211,7 +238,7 @@ diff -Naur virt-manager-2.0.0.orig/man/virt-xml.pod virt-manager-2.0.0/man/virt-
diff -Naur virt-manager-2.0.0.orig/virtinst/osdict.py virt-manager-2.0.0/virtinst/osdict.py
--- virt-manager-2.0.0.orig/virtinst/osdict.py 2018-10-13 13:59:42.000000000 -0500
+++ virt-manager-2.0.0/virtinst/osdict.py 2018-10-19 19:37:17.687104677 -0500
-@@ -99,49 +99,7 @@
+@@ -98,49 +98,7 @@
# This is only for back compatibility with pre-libosinfo support.
# This should never change.
_aliases = {
@@ -261,33 +288,11 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/osdict.py virt-manager-2.0.0/virtins
"other": "generic",
}
-@@ -208,11 +166,6 @@
- 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
-
-@@ -236,9 +189,6 @@
- return None
- return oses[0]
-
-- def latest_fedora_version(self):
-- return self.latest_regex("fedora[0-9]+")
--
-
- #####################
- # OsVariant classes #
diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virtinst/urldetect.py
--- virt-manager-2.0.0.orig/virtinst/urldetect.py 2018-10-13 13:26:55.000000000 -0500
+++ virt-manager-2.0.0/virtinst/urldetect.py 2018-10-19 19:44:14.306556502 -0500
-@@ -134,110 +134,6 @@
- return version, update
+@@ -157,110 +157,6 @@
+ return True
-class _SUSEContent(object):
@@ -394,47 +399,14 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- return distro_version
-
-
- def getDistroStore(guest, fetcher):
+ def getDistroStore(guest, fetcher, skip_error):
logging.debug("Finding distro store for location=%s", fetcher.location)
-@@ -369,455 +265,6 @@
- return None
+@@ -386,418 +282,6 @@ class _DistroTree(object):
+ return self._os_variant
--class RedHatDistro(Distro):
-- """
-- Baseclass for Red Hat based distros
-- """
-- @classmethod
-- def is_valid(cls, cache):
-- raise NotImplementedError
--
-- def __init__(self, *args, **kwargs):
-- Distro.__init__(self, *args, **kwargs)
--
-- self._kernel_paths = self.cache.get_treeinfo_media(self.type)
--
-- def _get_kernel_url_arg(self):
-- def _is_old_rhdistro():
-- m = re.match(r"^.*[^0-9\.]+([0-9\.]+)$", self._os_variant or "")
-- if m:
-- version = float(m.groups()[0])
-- if "fedora" in self._os_variant and version < 19:
-- return True
-- elif version < 7:
-- # rhel, centos, scientific linux, etc
-- return True
--
-- # If we can't parse, assume it's something recentish and
-- # it supports the newer arg
-- return False
--
-- if _is_old_rhdistro():
-- return "method"
-- return "inst.repo"
--
--
--class FedoraDistro(RedHatDistro):
+-class _FedoraDistro(_DistroTree):
- PRETTY_NAME = "Fedora"
- matching_distros = ["fedora"]
-
@@ -444,7 +416,7 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- return cache.treeinfo_family_regex(famregex)
-
- def _detect_version(self):
-- latest_variant = OSDB.latest_fedora_version()
+- latest_variant = "fedora-unknown"
-
- verstr = self.cache.treeinfo_version
- if not verstr:
@@ -468,7 +440,7 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- return latest_variant
-
-
--class RHELDistro(RedHatDistro):
+-class _RHELDistro(_DistroTree):
- PRETTY_NAME = "Red Hat Enterprise Linux"
- matching_distros = ["rhel"]
- _variant_prefix = "rhel"
@@ -500,7 +472,7 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- update -= 1
-
-
--class CentOSDistro(RHELDistro):
+-class _CentOSDistro(_RHELDistro):
- PRETTY_NAME = "CentOS"
- matching_distros = ["centos"]
- _variant_prefix = "centos"
@@ -511,7 +483,7 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- return cache.treeinfo_family_regex(famregex)
-
-
--class SuseDistro(Distro):
+-class _SuseDistro(_RHELDistro):
- PRETTY_NAME = None
- _suse_regex = []
- matching_distros = []
@@ -523,8 +495,8 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- if cache.treeinfo_family_regex(cls.famregex):
- return True
-
-- if not cache.suse_content:
-- cache.suse_content = -1
+- if not cache.checked_for_suse_content:
+- cache.checked_for_suse_content = True
- content_str = cache.acquire_file_content("content")
- if content_str is None:
- return False
@@ -535,21 +507,15 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- logging.debug("Error parsing SUSE content file: %s", str(e))
- return False
-
-- if cache.suse_content == -1:
+- if not cache.suse_content:
- return False
- for regex in cls._suse_regex:
- if re.match(regex, cache.suse_content.product_name):
- return True
- return False
-
-- def __init__(self, *args, **kwargs):
-- Distro.__init__(self, *args, **kwargs)
--
-- if not self.cache.suse_content or self.cache.suse_content == -1:
-- # This means we matched on treeinfo
-- self._kernel_paths = self.cache.get_treeinfo_media(self.type)
-- return
--
+- def _set_manual_kernel_paths(self):
+- # We only reach here if no treeinfo was matched
- tree_arch = self.cache.suse_content.tree_arch
-
- if re.match(r'i[4-9]86', tree_arch):
@@ -561,7 +527,6 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- oldkern += "64"
- oldinit += "64"
-
-- self._kernel_paths = []
- if self.type == "xen":
- # Matches Opensuse > 10.2 and sles 10
- self._kernel_paths.append(
@@ -569,7 +534,7 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- "boot/%s/initrd-xen" % tree_arch))
-
- if (tree_arch == "s390x" and
-- (self._os_variant == "sles11" or self._os_variant == "sled11")):
+- str(self._os_variant).startswith(("sles11", "sled11"))):
- self._kernel_paths.append(
- ("boot/s390x/vmrdr.ikr", "boot/s390x/initrd"))
-
@@ -646,11 +611,8 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- var = self._detect_osdict_from_suse_content()
- return var
-
-- def _get_kernel_url_arg(self):
-- return "install"
-
--
--class SLESDistro(SuseDistro):
+-class _SLESDistro(_SuseDistro):
- PRETTY_NAME = "SLES"
- matching_distros = ["sles"]
- _variant_prefix = "sles"
@@ -658,7 +620,7 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- famregex = ".*SUSE Linux Enterprise.*"
-
-
--class SLEDDistro(SuseDistro):
+-class _SLEDDistro(_SuseDistro):
- PRETTY_NAME = "SLED"
- matching_distros = ["sled"]
- _variant_prefix = "sled"
@@ -666,7 +628,7 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- famregex = ".*SUSE Linux Enterprise.*"
-
-
--class OpensuseDistro(SuseDistro):
+-class _OpensuseDistro(_SuseDistro):
- PRETTY_NAME = "openSUSE"
- matching_distros = ["opensuse"]
- _variant_prefix = "opensuse"
@@ -674,7 +636,7 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- famregex = ".*openSUSE.*"
-
-
--class DebianDistro(Distro):
+-class _DebianDistro(_DistroTree):
- # ex. http://ftp.egr.msu.edu/debian/dists/sarge/main/installer-i386/
- # daily builds: https://d-i.debian.org/daily-images/amd64/
- PRETTY_NAME = "Debian"
@@ -696,18 +658,23 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- media_type = "daily"
- elif cache.content_regex(".disk/info",
- "%s.*" % cls._debname.capitalize()):
-- media_type = "disk"
+- # There's two cases here:
+- # 1) Direct access ISO, attached as CDROM afterwards. We
+- # use one set of kernels in that case which seem to
+- # assume the prescence of CDROM media
+- # 2) ISO mounted and exported over URL. We use a different
+- # set of kernels that expect to boot from the network
+- if cache.fetcher_is_iso():
+- media_type = "disk"
+- else:
+- media_type = "mounted_iso_url"
-
- if media_type:
- cache.debian_media_type = media_type
- return bool(media_type)
-
-
-- def __init__(self, *args, **kwargs):
-- Distro.__init__(self, *args, **kwargs)
--
--
-- self._kernel_paths = []
+- def _set_manual_kernel_paths(self):
- if self.cache.debian_media_type == "disk":
- self._set_installcd_paths()
- else:
@@ -742,6 +709,8 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- url_prefix = "current/images"
- if self.cache.debian_media_type == "daily":
- url_prefix = "daily"
+- elif self.cache.debian_media_type == "mounted_iso_url":
+- url_prefix = "install"
-
- tree_arch = self._find_treearch()
- hvmroot = "%s/netboot/%s-installer/%s/" % (url_prefix,
@@ -808,18 +777,20 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- return osobj.name
-
-
--class UbuntuDistro(DebianDistro):
+-class _UbuntuDistro(_DebianDistro):
- # https://archive.ubuntu.com/ubuntu/dists/natty/main/installer-amd64/
- PRETTY_NAME = "Ubuntu"
- matching_distros = ["ubuntu"]
- _debname = "ubuntu"
-
-
--class ALTLinuxDistro(Distro):
+-class _ALTLinuxDistro(_DistroTree):
- PRETTY_NAME = "ALT Linux"
- matching_distros = ["altlinux"]
-
-- _kernel_paths = [("syslinux/alt0/vmlinuz", "syslinux/alt0/full.cz")]
+- def _set_manual_kernel_paths(self):
+- self._kernel_paths = [
+- ("syslinux/alt0/vmlinuz", "syslinux/alt0/full.cz")]
-
- @classmethod
- def is_valid(cls, cache):
@@ -827,7 +798,7 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- return cache.content_regex(".disk/info", ".*ALT .*")
-
-
--class MandrivaDistro(Distro):
+-class _MandrivaDistro(_DistroTree):
- # ftp://ftp.uwsg.indiana.edu/linux/mandrake/official/2007.1/x86_64/
- PRETTY_NAME = "Mandriva/Mageia"
- matching_distros = ["mandriva", "mes"]
@@ -836,10 +807,7 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- def is_valid(cls, cache):
- return cache.content_regex("VERSION", ".*(Mandriva|Mageia).*")
-
-- def __init__(self, *args, **kwargs):
-- Distro.__init__(self, *args, **kwargs)
-- self._kernel_paths = []
--
+- def _set_manual_kernel_paths(self):
- # At least Mageia 5 uses arch in the names
- self._kernel_paths += [
- ("isolinux/%s/vmlinuz" % self.arch,
@@ -850,13 +818,13 @@ diff -Naur virt-manager-2.0.0.orig/virtinst/urldetect.py virt-manager-2.0.0/virt
- ("isolinux/alt0/vmlinuz", "isolinux/alt0/all.rdz")]
-
-
- class GenericTreeinfoDistro(Distro):
+ class _GenericTreeinfoDistro(_DistroTree):
"""
Generic catchall class for .treeinfo using distros
diff -Naur virt-manager-2.0.0.orig/virtManager/details.py virt-manager-2.0.0/virtManager/details.py
--- virt-manager-2.0.0.orig/virtManager/details.py 2018-10-13 16:15:25.000000000 -0500
+++ virt-manager-2.0.0/virtManager/details.py 2018-10-19 19:34:11.219743958 -0500
-@@ -337,14 +337,6 @@
+@@ -344,14 +344,6 @@
def _label_for_os_type(os_type):
typemap = {