Add in s390x support
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
This commit is contained in:
parent
a00970172a
commit
0dfcb7852d
11
oz.spec
11
oz.spec
|
@ -1,11 +1,14 @@
|
|||
Summary: Library and utilities for automated guest OS installs
|
||||
Name: oz
|
||||
Version: 0.16.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: LGPLv2
|
||||
Group: Development/Libraries
|
||||
URL: http://github.com/clalancette/oz
|
||||
Source0: https://github.com/clalancette/%{name}/files/1209916/%{name}-%{version}.tar.gz
|
||||
Patch0: s390x-01-add-basic-support.patch
|
||||
Patch1: s390x-02-use-sclplmconsole.patch
|
||||
Patch2: s390x-03-disable-vnc-console.patch
|
||||
BuildArch: noarch
|
||||
Requires: python >= 2.5
|
||||
Requires: python-libguestfs >= 1.18
|
||||
|
@ -33,6 +36,9 @@ installations, with minimal input from the user.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0
|
||||
%patch1 -p0
|
||||
%patch2 -p0
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
|
@ -80,6 +86,9 @@ fi
|
|||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Sun Feb 18 2018 Chris Lalancette <clalancette@gmail.com> - 0.16.0-3
|
||||
- Add s390x support patches
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
commit 5a49aa873715c75b3a046790fb4bd1c50462880f
|
||||
Author: Brendan Reilly <breilly@redhat.com>
|
||||
Date: Wed Nov 15 10:16:33 2017 +0100
|
||||
|
||||
Add basic s390x support
|
||||
|
||||
Add the s390x architecture to the list of supported ones.
|
||||
|
||||
diff --git oz/Guest.py oz/Guest.py
|
||||
index 048c307..16a8b5a 100644
|
||||
--- oz/Guest.py
|
||||
+++ oz/Guest.py
|
||||
@@ -131,7 +131,7 @@ class Guest(object):
|
||||
# for backwards compatibility
|
||||
self.name = self.tdl.name
|
||||
|
||||
- if not self.tdl.arch in ["i386", "x86_64", "ppc64", "ppc64le", "aarch64", "armv7l"]:
|
||||
+ if not self.tdl.arch in ["i386", "x86_64", "ppc64", "ppc64le", "aarch64", "armv7l", "s390x"]:
|
||||
raise oz.OzException.OzException("Unsupported guest arch " + self.tdl.arch)
|
||||
|
||||
if os.uname()[4] in ["i386", "i586", "i686"] and self.tdl.arch == "x86_64":
|
||||
diff --git oz/TDL.py oz/TDL.py
|
||||
index 5f3f22b..f18c698 100644
|
||||
--- oz/TDL.py
|
||||
+++ oz/TDL.py
|
||||
@@ -206,8 +206,8 @@ class TDL(object):
|
||||
|
||||
self.arch = _xml_get_value(self.doc, '/template/os/arch',
|
||||
'OS architecture')
|
||||
- if self.arch not in ["i386", "x86_64", "ppc64", "ppc64le", "aarch64", "armv7l"]:
|
||||
- raise oz.OzException.OzException("Architecture must be one of 'i386, x86_64, ppc64, ppc64le, armv7l, or aarch64'")
|
||||
+ if self.arch not in ["i386", "x86_64", "ppc64", "ppc64le", "aarch64", "armv7l", "s390x"]:
|
||||
+ raise oz.OzException.OzException("Architecture must be one of 'i386, x86_64, ppc64, ppc64le, armv7l, aarch64, or s390x'")
|
||||
|
||||
self.key = _xml_get_value(self.doc, '/template/os/key', 'OS key',
|
||||
optional=True)
|
||||
diff --git oz/tdl.rng oz/tdl.rng
|
||||
index 500c0ed..dc29c9a 100644
|
||||
--- oz/tdl.rng
|
||||
+++ oz/tdl.rng
|
||||
@@ -34,6 +34,7 @@
|
||||
<value>ppc64le</value>
|
||||
<value>aarch64</value>
|
||||
<value>armv7l</value>
|
||||
+ <value>s390x</value>
|
||||
</choice>
|
||||
</element>
|
||||
<optional>
|
|
@ -0,0 +1,29 @@
|
|||
commit 2e17fe7f13225b879358183c509dda5f490dee95
|
||||
Author: Pino Toscano <ptoscano@redhat.com>
|
||||
Date: Thu Nov 16 15:40:44 2017 +0100
|
||||
|
||||
Use sclplmconsole for the second serial on s390x
|
||||
|
||||
The default type of serial console is sclp, whose device (sclpconsole)
|
||||
can be used at most once. Hence, use the second type of sclp, sclplm,
|
||||
for the second serial console.
|
||||
|
||||
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
|
||||
|
||||
diff --git oz/Guest.py oz/Guest.py
|
||||
index 85580d4..e86a39c 100644
|
||||
--- oz/Guest.py
|
||||
+++ oz/Guest.py
|
||||
@@ -419,7 +419,11 @@ class Guest(object):
|
||||
oz.ozutil.lxml_subelement(serial, "source", None,
|
||||
{'mode':'bind', 'host':'127.0.0.1', 'service':str(self.listen_port)})
|
||||
oz.ozutil.lxml_subelement(serial, "protocol", None, {'type':'raw'})
|
||||
- oz.ozutil.lxml_subelement(serial, "target", None, {'port':'1'})
|
||||
+ target = oz.ozutil.lxml_subelement(serial, "target", None, {'port':'1'})
|
||||
+ if self.tdl.arch == 's390x':
|
||||
+ # use a different console, as sclp can be used as most once
|
||||
+ target.set('type', 'sclp-serial')
|
||||
+ oz.ozutil.lxml_subelement(target, "model", None, {'name':'sclplmconsole'})
|
||||
|
||||
def _generate_virtio_channel(self, devices, name):
|
||||
virtio = oz.ozutil.lxml_subelement(devices, "channel", None, {'type': 'tcp'})
|
|
@ -0,0 +1,25 @@
|
|||
commit bbfe25a3d9942714ce5c5c6a056232751ac798ea
|
||||
Author: Pino Toscano <ptoscano@redhat.com>
|
||||
Date: Thu Nov 16 15:18:25 2017 +0100
|
||||
|
||||
Disable VNC console on s390x
|
||||
|
||||
There is no PCI support there, which is used when enabling VNC.
|
||||
|
||||
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
|
||||
|
||||
diff --git oz/Guest.py oz/Guest.py
|
||||
index 16a8b5a..85580d4 100644
|
||||
--- oz/Guest.py
|
||||
+++ oz/Guest.py
|
||||
@@ -484,8 +484,8 @@ class Guest(object):
|
||||
# devices
|
||||
devices = oz.ozutil.lxml_subelement(domain, "devices")
|
||||
# graphics
|
||||
- if not self.tdl.arch in ["aarch64", "armv7l"]:
|
||||
- # qemu for arm/aarch64 does not support a graphical console - amazingly
|
||||
+ if not self.tdl.arch in ["aarch64", "armv7l", "s390x"]:
|
||||
+ # qemu for arm/aarch64/s390x does not support a graphical console - amazingly
|
||||
oz.ozutil.lxml_subelement(devices, "graphics", None, {'port':'-1', 'type':'vnc'})
|
||||
# network
|
||||
interface = oz.ozutil.lxml_subelement(devices, "interface", None, {'type':'bridge'})
|
Loading…
Reference in New Issue