mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-09 04:25:48 +01:00
- use qemu as fallback when arch is not supported (unable to test it because of broken binfmt misc)
This commit is contained in:
parent
67be93e1a4
commit
e0683d074c
1
NEWS
1
NEWS
@ -1,5 +1,6 @@
|
|||||||
0.134
|
0.134
|
||||||
- patchinfo call can work without checked out copy now
|
- patchinfo call can work without checked out copy now
|
||||||
|
- use qemu as fallback for building not directly supported architectures
|
||||||
#
|
#
|
||||||
# Features which requires OBS 2.3
|
# Features which requires OBS 2.3
|
||||||
#
|
#
|
||||||
|
17
osc/build.py
17
osc/build.py
@ -35,6 +35,14 @@ change_personality = {
|
|||||||
'sparcv8': 'linux32',
|
'sparcv8': 'linux32',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qemu_can_build = [ 'armv4l', 'armv5el', 'armv5l', 'armv6l', 'armv7l', 'armv6el', 'armv7el', 'armv7hl', 'armv8el',
|
||||||
|
'sh4', 'mips', 'mipsel',
|
||||||
|
'ppc', 'ppc64',
|
||||||
|
's390', 's390x',
|
||||||
|
'sparc64v', 'sparcv9v', 'sparcv9', 'sparcv8', 'sparc',
|
||||||
|
'hppa'
|
||||||
|
]
|
||||||
|
|
||||||
can_also_build = {
|
can_also_build = {
|
||||||
'armv4l': [ 'armv4l' ],
|
'armv4l': [ 'armv4l' ],
|
||||||
'armv6l' :[ 'armv4l', 'armv5l', 'armv6l', 'armv5el', 'armv6el' ],
|
'armv6l' :[ 'armv4l', 'armv5l', 'armv6l', 'armv5el', 'armv6el' ],
|
||||||
@ -49,10 +57,9 @@ can_also_build = {
|
|||||||
's390x': ['s390' ],
|
's390x': ['s390' ],
|
||||||
'ppc64': [ 'ppc', 'ppc64' ],
|
'ppc64': [ 'ppc', 'ppc64' ],
|
||||||
'sh4': [ 'sh4' ],
|
'sh4': [ 'sh4' ],
|
||||||
'i386': [ 'i586', 'ppc', 'ppc64', 'armv4l', 'armv5el', 'armv5l', 'armv6l', 'armv7l', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'sh4', 'mips', 'mipsel' ],
|
'i586': [ 'i386' ],
|
||||||
'i586': [ 'i386', 'ppc', 'ppc64', 'armv4l', 'armv5el', 'armv5l', 'armv6l', 'armv7l', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'sh4', 'mips', 'mipsel' ],
|
'i686': [ 'i586', 'i386' ],
|
||||||
'i686': [ 'i586', 'ppc', 'ppc64', 'armv4l', 'armv5el', 'armv5l', 'armv6l', 'armv7l', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'sh4', 'mips', 'mipsel' ],
|
'x86_64': ['i686', 'i586', 'i386' ],
|
||||||
'x86_64': ['i686', 'i586', 'i386', 'ppc', 'ppc64', 'armv4l', 'armv5el', 'armv5l', 'armv6l', 'armv7l', 'armv6el', 'armv7el', 'armv7hl', 'armv8el', 'sh4', 'mips', 'mipsel' ],
|
|
||||||
'sparc64': ['sparc64v', 'sparcv9v', 'sparcv9', 'sparcv8', 'sparc'],
|
'sparc64': ['sparc64v', 'sparcv9v', 'sparcv9', 'sparcv8', 'sparc'],
|
||||||
'parisc': ['hppa'],
|
'parisc': ['hppa'],
|
||||||
}
|
}
|
||||||
@ -619,8 +626,10 @@ def main(apiurl, opts, argv):
|
|||||||
# arch we are supposed to build for
|
# arch we are supposed to build for
|
||||||
if hostarch != bi.buildarch:
|
if hostarch != bi.buildarch:
|
||||||
if not bi.buildarch in can_also_build.get(hostarch, []):
|
if not bi.buildarch in can_also_build.get(hostarch, []):
|
||||||
|
if not bi.buildarch in qemu_can_build:
|
||||||
print >>sys.stderr, 'Error: hostarch \'%s\' cannot build \'%s\'.' % (hostarch, bi.buildarch)
|
print >>sys.stderr, 'Error: hostarch \'%s\' cannot build \'%s\'.' % (hostarch, bi.buildarch)
|
||||||
return 1
|
return 1
|
||||||
|
print >>sys.stderr, 'WARNING: hostarch \'%s\' can build \'%s\' only via QEMU.' % (hostarch, bi.buildarch)
|
||||||
|
|
||||||
rpmlist_prefers = []
|
rpmlist_prefers = []
|
||||||
if prefer_pkgs:
|
if prefer_pkgs:
|
||||||
|
@ -4788,6 +4788,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
arg_descr = arg
|
arg_descr = arg
|
||||||
else:
|
else:
|
||||||
if (arg in osc.build.can_also_build.get(osc.build.hostarch, [])
|
if (arg in osc.build.can_also_build.get(osc.build.hostarch, [])
|
||||||
|
or arg in osc.build.qemu_can_build
|
||||||
or arg in osc.build.hostarch) and arg_arch is None:
|
or arg in osc.build.hostarch) and arg_arch is None:
|
||||||
arg_arch = arg
|
arg_arch = arg
|
||||||
elif not arg_repository:
|
elif not arg_repository:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user