aboutsummaryrefslogtreecommitdiff
path: root/system/virt-manager/Add-Slackware-to-OS-choices.patch
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2014-09-11 07:01:50 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-09-13 08:01:59 +0700
commit1e5aa5fb5841bc24fef802bdc1eaea0cf4709579 (patch)
tree5461a60702aa12385830e18c7f6dd2eadd666062 /system/virt-manager/Add-Slackware-to-OS-choices.patch
parentc76b5681a2a51e5a59d6e36ce7ba0a8a01e0d82b (diff)
system/virt-manager: Updated for version 1.1.0.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/virt-manager/Add-Slackware-to-OS-choices.patch')
-rw-r--r--system/virt-manager/Add-Slackware-to-OS-choices.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/system/virt-manager/Add-Slackware-to-OS-choices.patch b/system/virt-manager/Add-Slackware-to-OS-choices.patch
new file mode 100644
index 0000000000000..dfbfa7e4d3815
--- /dev/null
+++ b/system/virt-manager/Add-Slackware-to-OS-choices.patch
@@ -0,0 +1,70 @@
+diff -Naur virt-manager-1.1.0.orig/virtinst/osdict.py virt-manager-1.1.0/virtinst/osdict.py
+--- virt-manager-1.1.0.orig/virtinst/osdict.py 2014-09-07 16:47:13.000000000 +0200
++++ virt-manager-1.1.0/virtinst/osdict.py 2014-09-11 06:58:39.498034667 +0200
+@@ -48,6 +48,7 @@
+ "rhel5" : "rhel5.0",
+ "rhel6" : "rhel6.0",
+ "rhel7" : "rhel7.0",
++ "slackware" : "slackware14.1",
+ "ubuntuhardy" : "ubuntu8.04",
+ "ubuntuintrepid" : "ubuntu8.10",
+ "ubuntujaunty" : "ubuntu9.04",
+@@ -444,8 +445,9 @@
+ # We should fix this in a new libosinfo version, and then drop
+ # this hack
+ if name in ["rhel7.0", "rhel7.1", "fedora19", "fedora20", "fedora21",
+- "debian6", "debian7", "ubuntu13.04", "ubuntu13.10", "ubuntu14.04",
+- "ubuntu14.10", "win8", "win8.1", "win2k12", "win2k12r2"]:
++ "debian6", "debian7", "slackware14.1", "ubuntu13.04", "ubuntu13.10",
++ "ubuntu14.04", "ubuntu14.10", "win8", "win8.1", "win2k12",
++ "win2k12r2"]:
+ return True
+ return False
+
+diff -Naur virt-manager-1.1.0.orig/virtinst/urlfetcher.py virt-manager-1.1.0/virtinst/urlfetcher.py
+--- virt-manager-1.1.0.orig/virtinst/urlfetcher.py 2014-09-07 20:35:55.000000000 +0200
++++ virt-manager-1.1.0/virtinst/urlfetcher.py 2014-09-11 06:55:10.870047611 +0200
+@@ -1022,6 +1022,43 @@
+ return False
+
+
++class SlackwareDistro(Distro):
++ # slackware doesn't have installable URLs, so this is just for a
++ # mounted ISO
++ name = "Slackware"
++ urldistro = "slackware"
++ os_variant = "linux"
++
++ _boot_iso_paths = []
++ _xen_kernel_paths = []
++
++ def __init__(self, *args, **kwargs):
++ Distro.__init__(self, *args, **kwargs)
++ if re.match(r'i[4-9]86', self.arch):
++ self.arch = 'i486'
++ self.kname = 'hugesmp.s'
++ else:
++ self.arch = 'x86_64'
++ self.kname = 'huge.s'
++
++ self._hvm_kernel_paths = [("kernels/%s/bzImage" % self.kname,
++ "isolinux/initrd.img")]
++
++ def isValidStore(self):
++ # Don't support any paravirt installs
++ if self.type is not None and self.type != "hvm":
++ return False
++
++ # Slackware website / media appear to have a Slackware-HOWTO
++ # file in top level which we can use as our 'magic'
++ # check for validity
++ if not self.fetcher.hasFile("Slackware-HOWTO"):
++ return False
++
++ logging.debug("Regex didn't match, not a %s distro", self.name)
++ return False
++
++
+ # Build list of all *Distro classes
+ def _build_distro_list():
+ allstores = []