summaryrefslogtreecommitdiff
path: root/libre/virt-manager-i686/libre.patch
blob: d897336c7c2be40fcdd4cc7a11b4aae122c8639f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
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 @@
 
 =back
 
-Some distro specific url samples:
-
-=over 4
-
-=item Fedora/Red Hat Based
-
-https://download.fedoraproject.org/pub/fedora/linux/releases/25/Server/x86_64/os
-
-=item Debian
-
-https://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/
-
-=item Ubuntu
-
-https://us.archive.ubuntu.com/ubuntu/dists/wily/main/installer-amd64/
-
-=item Suse
-
-https://download.opensuse.org/pub/opensuse/distribution/leap/42.3/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
@@ -472,21 +442,6 @@
 
 --initrd-inject=/path/to/my.ks --extra-args "ks=file:/my.ks"
 
-=item B<--os-variant> OS_VARIANT
-
-Optimize the guest configuration for a specific operating system (ex.
-'fedora18', 'rhel7', 'winxp'). 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
 
 Optionally specify the post-install VM boot configuration. This option allows
@@ -644,7 +599,7 @@
 
 =item B<removable>
 
-Sets the removable flag (/sys/block/$dev/removable on Linux). Only
+Sets the removable flag (/sys/block/$dev/removable on GNU/Linux). Only
 used with QEMU and bus=usb. Value can be 'on' or 'off'.
 
 =item B<readonly>
@@ -724,7 +679,7 @@
 
 =item B<serial>
 
-Serial number of the emulated disk device. This is used in linux guests
+Serial number of the emulated disk device. This is used in GNU/Linux guests
 to set /dev/disk/by-id symlinks. An example serial number might be:
 WD-WMAP9A966149
 
@@ -753,7 +708,7 @@
 
     --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
 QEMU, the target point is just a mounting hint in sysfs, so will not be
 automatically mounted.
 
@@ -1721,45 +1676,6 @@
 
 =head1 EXAMPLES
 
-Install a Fedora 20 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.
-
-  # virt-install \
-       --connect qemu:///system \
-       --virt-type kvm \
-       --name demo \
-       --memory 500 \
-       --disk size=10 \
-       --cdrom /dev/cdrom \
-       --os-variant fedora13
-
-Install a Fedora 9 plain QEMU guest, using LVM partition, virtual networking,
-booting from PXE, using VNC server/viewer, with virtio-scsi disk
-
-  # virt-install \
-       --connect qemu:///system \
-       --name demo \
-       --memory 500 \
-       --disk path=/dev/HostVG/DemoVM,bus=scsi \
-       --controller virtio-scsi \
-       --network network=default \
-       --virt-type qemu \
-       --graphics vnc \
-       --os-variant fedora9
-
-Run a Live CD image under Xen fullyvirt, in diskless environment
-
-  # virt-install \
-       --hvm \
-       --name demo \
-       --memory 500 \
-       --disk none \
-       --livecd \
-       --graphics vnc \
-       --cdrom /root/fedora7live.iso
-
 Run /usr/bin/httpd in a linux container guest (LXC). Resource usage is capped
 at 512 MiB of ram and 2 host cpus:
 
@@ -1785,7 +1701,7 @@
         --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
 options:
 
   # virt-install \
@@ -1794,7 +1710,7 @@
        --memory 500 \
        --disk /var/lib/xen/images/demo.img,size=6 \
        --graphics none \
-       --location https://download.fedora.redhat.com/pub/fedora/linux/core/6/x86_64/os/
+       --location https://repo.parabola.nu/iso/latest/
 
 Create a guest from an existing disk image 'mydisk.img' using defaults for
 the rest of the options.
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 @@
 
   # virt-xml winxp --edit --cpu host-model,clearxml=yes --confirm
 
-Change the second sound card to model=ich6 on 'fedora19', but only output the diff:
-
-  # virt-xml fedora19 --edit 2 --sound model=ich6 --print-diff
-
-Update the every graphics device password to 'foo' of the running VM 'rhel6':
-
-  # virt-xml rhel6 --edit all --graphics password=foo --update
-
-Remove the disk path from disk device hdc:
-
-  # virt-xml rhel6 --edit target=hdc --disk path=
-
 Change all disk devices of type 'disk' to use cache=none, using XML from stdin, printing the new XML to stdout.
 
   # cat <xmlfile> | virt-xml --edit device=disk --disk cache=none
 
-Change disk 'hda' IO to native and use startup policy as 'optional'.
-
-  # virt-xml fedora20 --edit target=hda \
-             --disk io=native,startup_policy=optional
-
-Change all host devices to use driver_name=vfio for VM 'fedora20' on the remote connection
-
-  # virt-xml --connect qemu+ssh://remotehost/system \
-             fedora20 --edit all --hostdev driver_name=vfio
-
-Hotplug host USB device 001.003 to running domain 'fedora19':
-
-  # virt-xml fedora19 --update --add-device --hostdev 001.003
-
-Add a spicevmc channel to the domain 'winxp', that will be available after the next VM shutdown.
-
-  # virt-xml winxp --add-device --channel spicevmc
-
-Create a 10G qcow2 disk image and attach it to 'fedora18' for the next VM startup:
-
-  # virt-xml 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
-
-Remove all graphics devices from the VM 'rhel7' after the next shutdown:
-
-  # virt-xml rhel7 --remove-device --graphics all
-
 Generate XML for a virtio console device and print it to stdout:
 
   # virt-xml --build-xml --console pty,target_type=virtio
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 @@
     # 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",
     }
 
@@ -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
 
 
-class _SUSEContent(object):
-    """
-    Helper class tracking the SUSE 'content' files
-    """
-    def __init__(self, content_str):
-        self.content_str = content_str
-        self.content_dict = {}
-
-        for line in self.content_str.splitlines():
-            for prefix in ["LABEL", "DISTRO", "VERSION",
-                           "BASEARCHS", "DEFAULTBASE", "REPOID"]:
-                if line.startswith(prefix + " "):
-                    self.content_dict[prefix] = line.split(" ", 1)[1]
-
-            logging.debug("SUSE content dict: %s", str(self.content_dict))
-
-        self.tree_arch = self._get_tree_arch()
-        self.product_name = self._get_product_name()
-        self.product_version = self._get_product_version()
-        logging.debug("SUSE content product_name=%s product_version=%s "
-            "tree_arch=%s", self.product_name, self.product_version,
-            self.tree_arch)
-
-    def _get_tree_arch(self):
-        # Examples:
-        # opensuse 11.4: BASEARCHS i586 x86_64
-        # opensuse 12.3: BASEARCHS i586 x86_64
-        # opensuse 10.3: DEFAULTBASE i586
-        distro_arch = (self.content_dict.get("BASEARCHS") or
-                       self.content_dict.get("DEFAULTBASE"))
-        if not distro_arch and "REPOID" in self.content_dict:
-            distro_arch = self.content_dict["REPOID"].rsplit('/', 1)[1]
-        if not distro_arch:
-            return None
-
-        tree_arch = distro_arch.strip()
-        # Fix for 13.2 official oss repo
-        if tree_arch.find("i586-x86_64") != -1:
-            tree_arch = "x86_64"
-        return tree_arch
-
-    def _get_product_name(self):
-        """
-        Parse the SUSE product name. Examples:
-        SUSE Linux Enterprise Server 11 SP4
-        openSUSE 11.4
-        """
-        # Some field examples in the wild
-        #
-        # opensuse 10.3: LABEL openSUSE 10.3
-        # opensuse 11.4: LABEL openSUSE 11.4
-        # opensuse 12.3: LABEL openSUSE
-        # sles11sp4 DVD: LABEL SUSE Linux Enterprise Server 11 SP4
-        #
-        #
-        # DISTRO cpe:/o:opensuse:opensuse:13.2,openSUSE
-        # DISTRO cpe:/o:suse:sled:12:sp3,SUSE Linux Enterprise Desktop 12 SP3
-        #
-        # As of 2018 all latest distros match only DISTRO and REPOID.
-        product_name = None
-        if "LABEL" in self.content_dict:
-            product_name = self.content_dict["LABEL"]
-        elif "," in self.content_dict.get("DISTRO", ""):
-            product_name = self.content_dict["DISTRO"].rsplit(",", 1)[1]
-
-        logging.debug("SUSE content product_name=%s", product_name)
-        return product_name
-
-    def _get_product_version(self):
-        # Some example fields:
-        #
-        # opensuse 10.3: VERSION 10.3
-        # opensuse 12.3: VERSION 12.3
-        # SLES-10-SP4-DVD-x86_64-GM-DVD1.iso: VERSION 10.4-0
-        #
-        # REPOID obsproduct://build.suse.de/SUSE:SLE-11-SP4:GA/SUSE_SLES/11.4/DVD/x86_64
-        # REPOID obsproduct://build.suse.de/SUSE:SLE-12-SP3:GA/SLES/12.3/DVD/aarch64
-        #
-        # As of 2018 all latest distros match only DISTRO and REPOID.
-        if not self.product_name:
-            return None
-
-        distro_version = self.content_dict.get("VERSION", "")
-        if "-" in distro_version:
-            distro_version = distro_version.split('-', 1)[0]
-
-        # Special case, parse version out of a line like this
-        # cpe:/o:opensuse:opensuse:13.2,openSUSE
-        if (not distro_version and
-            re.match("^.*:.*,openSUSE*", self.content_dict["DISTRO"])):
-            distro_version = self.content_dict["DISTRO"].rsplit(
-                    ",", 1)[0].strip().rsplit(":")[4]
-        distro_version = distro_version.strip()
-
-        if "Enterprise" in self.product_name or "SLES" in self.product_name:
-            sle_version = self.product_name.strip().rsplit(' ')[4]
-            if len(self.product_name.strip().rsplit(' ')) > 5:
-                sle_version = (sle_version + '.' +
-                        self.product_name.strip().rsplit(' ')[5][2])
-            distro_version = sle_version
-
-        return distro_version
-
-
 def getDistroStore(guest, fetcher):
     logging.debug("Finding distro store for location=%s", fetcher.location)
 
@@ -369,455 +265,6 @@
         return None
 
 
-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):
-    PRETTY_NAME = "Fedora"
-    matching_distros = ["fedora"]
-
-    @classmethod
-    def is_valid(cls, cache):
-        famregex = ".*Fedora.*"
-        return cache.treeinfo_family_regex(famregex)
-
-    def _detect_version(self):
-        latest_variant = OSDB.latest_fedora_version()
-
-        verstr = self.cache.treeinfo_version
-        if not verstr:
-            logging.debug("No treeinfo version? Assume latest_variant=%s",
-                    latest_variant)
-            return latest_variant
-
-        # rawhide trees changed to use version=Rawhide in Apr 2016
-        if verstr in ["development", "rawhide", "Rawhide"]:
-            logging.debug("treeinfo version=%s, using latest_variant=%s",
-                    verstr, latest_variant)
-            return latest_variant
-
-        # treeinfo version is just an integer
-        variant = "fedora" + verstr
-        if OSDB.lookup_os(variant):
-            return variant
-
-        logging.debug("variant=%s from treeinfo version=%s not found, "
-                "using latest_variant=%s", variant, verstr, latest_variant)
-        return latest_variant
-
-
-class RHELDistro(RedHatDistro):
-    PRETTY_NAME = "Red Hat Enterprise Linux"
-    matching_distros = ["rhel"]
-    _variant_prefix = "rhel"
-
-    @classmethod
-    def is_valid(cls, cache):
-        # Matches:
-        #   Red Hat Enterprise Linux
-        #   RHEL Atomic Host
-        famregex = ".*(Red Hat Enterprise Linux|RHEL).*"
-        return cache.treeinfo_family_regex(famregex)
-
-    def _detect_version(self):
-        if not self.cache.treeinfo_version:
-            logging.debug("No treeinfo version? Not setting an os_variant")
-            return
-
-        version, update = self.cache.split_version()
-
-        # start with example base=rhel7, then walk backwards
-        # through the OS list to find the latest os name that matches
-        # this way we handle rhel7.6 from treeinfo when osdict only
-        # knows about rhel7.5
-        base = self._variant_prefix + str(version)
-        while update >= 0:
-            tryvar = base + ".%s" % update
-            if OSDB.lookup_os(tryvar):
-                return tryvar
-            update -= 1
-
-
-class CentOSDistro(RHELDistro):
-    PRETTY_NAME = "CentOS"
-    matching_distros = ["centos"]
-    _variant_prefix = "centos"
-
-    @classmethod
-    def is_valid(cls, cache):
-        famregex = ".*(CentOS|Scientific).*"
-        return cache.treeinfo_family_regex(famregex)
-
-
-class SuseDistro(Distro):
-    PRETTY_NAME = None
-    _suse_regex = []
-    matching_distros = []
-    _variant_prefix = NotImplementedError
-    famregex = NotImplementedError
-
-    @classmethod
-    def is_valid(cls, cache):
-        if cache.treeinfo_family_regex(cls.famregex):
-            return True
-
-        if not cache.suse_content:
-            cache.suse_content = -1
-            content_str = cache.acquire_file_content("content")
-            if content_str is None:
-                return False
-
-            try:
-                cache.suse_content = _SUSEContent(content_str)
-            except Exception as e:
-                logging.debug("Error parsing SUSE content file: %s", str(e))
-                return False
-
-        if cache.suse_content == -1:
-            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
-
-        tree_arch = self.cache.suse_content.tree_arch
-
-        if re.match(r'i[4-9]86', tree_arch):
-            tree_arch = 'i386'
-
-        oldkern = "linux"
-        oldinit = "initrd"
-        if tree_arch == "x86_64":
-            oldkern += "64"
-            oldinit += "64"
-
-        self._kernel_paths = []
-        if self.type == "xen":
-            # Matches Opensuse > 10.2 and sles 10
-            self._kernel_paths.append(
-                ("boot/%s/vmlinuz-xen" % tree_arch,
-                 "boot/%s/initrd-xen" % tree_arch))
-
-        if (tree_arch == "s390x" and
-            (self._os_variant == "sles11" or self._os_variant == "sled11")):
-            self._kernel_paths.append(
-                ("boot/s390x/vmrdr.ikr", "boot/s390x/initrd"))
-
-        # Tested with SLES 12 for ppc64le, all s390x
-        self._kernel_paths.append(
-            ("boot/%s/linux" % tree_arch,
-             "boot/%s/initrd" % tree_arch))
-        # Tested with Opensuse 10.0
-        self._kernel_paths.append(
-            ("boot/loader/%s" % oldkern,
-             "boot/loader/%s" % oldinit))
-        # Tested with Opensuse >= 10.2, 11, and sles 10
-        self._kernel_paths.append(
-            ("boot/%s/loader/linux" % tree_arch,
-             "boot/%s/loader/initrd" % tree_arch))
-
-    def _detect_osdict_from_suse_content(self):
-        if not self.cache.suse_content:
-            return
-
-        distro_version = self.cache.suse_content.product_version
-        if not distro_version:
-            return
-
-        version = distro_version.split('.', 1)[0].strip()
-        if len(version) == 8:
-            # Tumbleweed 8 digit date
-            return "opensusetumbleweed"
-
-        if int(version) < 10:
-            return self._variant_prefix + "9"
-
-        if str(self._variant_prefix).startswith(("sles", "sled")):
-            sp_version = ""
-            if len(distro_version.split('.', 1)) == 2:
-                sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
-
-            return self._variant_prefix + version + sp_version
-
-        return self._variant_prefix + distro_version
-
-    def _detect_osdict_from_url(self):
-        root = "opensuse"
-        oses = [n for n in OSDB.list_os() if n.name.startswith(root)]
-
-        for osobj in oses:
-            codename = osobj.name[len(root):]
-            if re.search("/%s/" % codename, self.uri):
-                return osobj.name
-
-    def _detect_from_treeinfo(self):
-        if not self.cache.treeinfo_name:
-            return
-        if re.search("openSUSE Tumbleweed", self.cache.treeinfo_name):
-            return "opensusetumbleweed"
-
-        version, update = self.cache.split_version()
-        base = self._variant_prefix + str(version)
-        while update >= 0:
-            tryvar = base
-            # SLE doesn't use '.0' for initial releases in
-            # osinfo-db (sles11, sles12, etc)
-            if update > 0 or not base.startswith('sle'):
-                tryvar += ".%s" % update
-            if OSDB.lookup_os(tryvar):
-                return tryvar
-            update -= 1
-
-    def _detect_version(self):
-        var = self._detect_from_treeinfo()
-        if not var:
-            var = self._detect_osdict_from_url()
-        if not var:
-            var = self._detect_osdict_from_suse_content()
-        return var
-
-    def _get_kernel_url_arg(self):
-        return "install"
-
-
-class SLESDistro(SuseDistro):
-    PRETTY_NAME = "SLES"
-    matching_distros = ["sles"]
-    _variant_prefix = "sles"
-    _suse_regex = [".*SUSE Linux Enterprise Server*", ".*SUSE SLES*"]
-    famregex = ".*SUSE Linux Enterprise.*"
-
-
-class SLEDDistro(SuseDistro):
-    PRETTY_NAME = "SLED"
-    matching_distros = ["sled"]
-    _variant_prefix = "sled"
-    _suse_regex = [".*SUSE Linux Enterprise Desktop*"]
-    famregex = ".*SUSE Linux Enterprise.*"
-
-
-class OpensuseDistro(SuseDistro):
-    PRETTY_NAME = "openSUSE"
-    matching_distros = ["opensuse"]
-    _variant_prefix = "opensuse"
-    _suse_regex = [".*openSUSE.*"]
-    famregex = ".*openSUSE.*"
-
-
-class DebianDistro(Distro):
-    # 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"
-    matching_distros = ["debian"]
-    _debname = "debian"
-
-    @classmethod
-    def is_valid(cls, cache):
-        def check_manifest(mfile):
-            is_ubuntu = cls._debname == "ubuntu"
-            if cache.content_regex(mfile, ".*[Uu]buntu.*"):
-                return is_ubuntu
-            return cache.content_regex(mfile, ".*[Dd]ebian.*")
-
-        media_type = None
-        if check_manifest("current/images/MANIFEST"):
-            media_type = "url"
-        elif check_manifest("daily/MANIFEST"):
-            media_type = "daily"
-        elif cache.content_regex(".disk/info",
-                "%s.*" % cls._debname.capitalize()):
-            media_type = "disk"
-
-        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 = []
-        if self.cache.debian_media_type == "disk":
-            self._set_installcd_paths()
-        else:
-            self._set_url_paths()
-
-
-    def _find_treearch(self):
-        for pattern in [r"^.*/installer-(\w+)/?$",
-                        r"^.*/daily-images/(\w+)/?$"]:
-            arch = re.findall(pattern, self.uri)
-            if not arch:
-                continue
-            logging.debug("Found pattern=%s treearch=%s in uri",
-                pattern, arch[0])
-            return arch[0]
-
-        # Check for standard arch strings which will be
-        # in the URI name for --location $ISO mounts
-        for arch in ["i386", "amd64", "x86_64", "arm64"]:
-            if arch in self.uri:
-                logging.debug("Found treearch=%s in uri", arch)
-                if arch == "x86_64":
-                    arch = "amd64"
-                return arch
-
-        # Otherwise default to i386
-        arch = "i386"
-        logging.debug("No treearch found in uri, defaulting to arch=%s", arch)
-        return arch
-
-    def _set_url_paths(self):
-        url_prefix = "current/images"
-        if self.cache.debian_media_type == "daily":
-            url_prefix = "daily"
-
-        tree_arch = self._find_treearch()
-        hvmroot = "%s/netboot/%s-installer/%s/" % (url_prefix,
-                self._debname, tree_arch)
-        initrd_basename = "initrd.gz"
-        kernel_basename = "linux"
-        if tree_arch in ["ppc64el"]:
-            kernel_basename = "vmlinux"
-
-        if tree_arch == "s390x":
-            hvmroot = "%s/generic/" % url_prefix
-            kernel_basename = "kernel.%s" % self._debname
-            initrd_basename = "initrd.%s" % self._debname
-
-
-        if self.type == "xen":
-            xenroot = "%s/netboot/xen/" % url_prefix
-            self._kernel_paths.append(
-                    (xenroot + "vmlinuz", xenroot + "initrd.gz"))
-        self._kernel_paths.append(
-                (hvmroot + kernel_basename, hvmroot + initrd_basename))
-
-    def _set_installcd_paths(self):
-        if self._debname == "ubuntu":
-            if not self.arch == "s390x":
-                kpair = ("install/vmlinuz", "install/initrd.gz")
-            else:
-                kpair = ("boot/kernel.ubuntu", "boot/initrd.ubuntu")
-        elif self.arch == "x86_64":
-            kpair = ("install.amd/vmlinuz", "install.amd/initrd.gz")
-        elif self.arch == "i686":
-            kpair = ("install.386/vmlinuz", "install.386/initrd.gz")
-        elif self.arch == "aarch64":
-            kpair = ("install.a64/vmlinuz", "install.a64/initrd.gz")
-        elif self.arch == "ppc64le":
-            kpair = ("install/vmlinux", "install/initrd.gz")
-        elif self.arch == "s390x":
-            kpair = ("boot/linux_vm", "boot/root.bin")
-        else:
-            kpair = ("install/vmlinuz", "install/initrd.gz")
-        self._kernel_paths += [kpair]
-        return True
-
-    def _detect_version(self):
-        oses = [n for n in OSDB.list_os() if n.name.startswith(self._debname)]
-
-        if self.cache.debian_media_type == "daily":
-            logging.debug("Appears to be debian 'daily' URL, using latest "
-                "debian OS")
-            return oses[0].name
-
-        for osobj in oses:
-            if osobj.codename:
-                # Ubuntu codenames look like 'Warty Warthog'
-                codename = osobj.codename.split()[0].lower()
-            else:
-                if " " not in osobj.label:
-                    continue
-                # Debian labels look like 'Debian Sarge'
-                codename = osobj.label.split()[1].lower()
-
-            if ("/%s/" % codename) in self.uri:
-                logging.debug("Found codename=%s in the URL string", codename)
-                return osobj.name
-
-
-class UbuntuDistro(DebianDistro):
-    # https://archive.ubuntu.com/ubuntu/dists/natty/main/installer-amd64/
-    PRETTY_NAME = "Ubuntu"
-    matching_distros = ["ubuntu"]
-    _debname = "ubuntu"
-
-
-class ALTLinuxDistro(Distro):
-    PRETTY_NAME = "ALT Linux"
-    matching_distros = ["altlinux"]
-
-    _kernel_paths = [("syslinux/alt0/vmlinuz", "syslinux/alt0/full.cz")]
-
-    @classmethod
-    def is_valid(cls, cache):
-        # altlinux doesn't have installable URLs, so this is just for ISO
-        return cache.content_regex(".disk/info", ".*ALT .*")
-
-
-class MandrivaDistro(Distro):
-    # ftp://ftp.uwsg.indiana.edu/linux/mandrake/official/2007.1/x86_64/
-    PRETTY_NAME = "Mandriva/Mageia"
-    matching_distros = ["mandriva", "mes"]
-
-    @classmethod
-    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 = []
-
-        # At least Mageia 5 uses arch in the names
-        self._kernel_paths += [
-            ("isolinux/%s/vmlinuz" % self.arch,
-             "isolinux/%s/all.rdz" % self.arch)]
-
-        # Kernels for HVM: valid for releases 2007.1, 2008.*, 2009.0
-        self._kernel_paths += [
-            ("isolinux/alt0/vmlinuz", "isolinux/alt0/all.rdz")]
-
-
 class GenericTreeinfoDistro(Distro):
     """
     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 @@
 
 def _label_for_os_type(os_type):
     typemap = {
-        "dos": _("MS-DOS/FreeDOS"),
-        "freebsd": _("FreeBSD"),
-        "hurd": _("GNU/Hurd"),
-        "linux": _("Linux"),
-        "minix": _("MINIX"),
-        "netbsd": _("NetBSD"),
-        "openbsd": _("OpenBSD"),
-        "windows": _("Microsoft Windows"),
     }
     try:
         return typemap[os_type]
diff -Naur virt-manager-2.0.0.orig/virtManager/oslist.py virt-manager-2.0.0/virtManager/oslist.py
--- virt-manager-2.0.0.orig/virtManager/oslist.py	2018-10-13 13:26:55.000000000 -0500
+++ virt-manager-2.0.0/virtManager/oslist.py	2018-10-20 17:45:29.688394493 -0500
@@ -55,7 +55,8 @@
         all_os = virtinst.OSDB.list_os()
 
         for os in all_os:
-            os_list_model.append([os, "%s (%s)" % (os.label, os.name)])
+            if os.name == "generic":
+                os_list_model.append([os, "%s (%s)" % (os.label, os.name)])
 
         model_filter = Gtk.TreeModelFilter(child_model=os_list_model)
         model_filter.set_visible_func(self._filter_os_cb)