mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 18:46:17 +01:00
osc build --vm-type=qemu support for cross architecture builds
This commit is contained in:
parent
b78a0b3896
commit
4bcb78e322
1
NEWS
1
NEWS
@ -1,5 +1,6 @@
|
|||||||
0.167
|
0.167
|
||||||
- osc shell/chroot/wipe is now handled via build script (working for chroot and KVM only atm)
|
- osc shell/chroot/wipe is now handled via build script (working for chroot and KVM only atm)
|
||||||
|
- osc build --vm-type=qemu support for cross architecture builds
|
||||||
|
|
||||||
0.166.2
|
0.166.2
|
||||||
- Don't enforce password reuse (boo#1156501)
|
- Don't enforce password reuse (boo#1156501)
|
||||||
|
17
osc/build.py
17
osc/build.py
@ -46,15 +46,6 @@ change_personality = {
|
|||||||
'sparcv8': 'linux32',
|
'sparcv8': 'linux32',
|
||||||
}
|
}
|
||||||
|
|
||||||
# FIXME: qemu_can_build should not be needed anymore since OBS 2.3
|
|
||||||
qemu_can_build = [ 'armv4l', 'armv5el', 'armv5l', 'armv6l', 'armv7l', 'armv6el', 'armv6hl', 'armv7el', 'armv7hl', 'armv8el',
|
|
||||||
'sh4', 'mips', 'mipsel',
|
|
||||||
'ppc', 'ppc64',
|
|
||||||
's390', 's390x',
|
|
||||||
'sparc64v', 'sparcv9v', 'sparcv9', 'sparcv8', 'sparc',
|
|
||||||
'hppa',
|
|
||||||
]
|
|
||||||
|
|
||||||
can_also_build = {
|
can_also_build = {
|
||||||
'aarch64': ['aarch64'], # only needed due to used heuristics in build parameter evaluation
|
'aarch64': ['aarch64'], # only needed due to used heuristics in build parameter evaluation
|
||||||
'armv6l': [ 'armv4l', 'armv5l', 'armv6l', 'armv5el', 'armv6el' ],
|
'armv6l': [ 'armv4l', 'armv5l', 'armv6l', 'armv5el', 'armv6el' ],
|
||||||
@ -879,13 +870,9 @@ def main(apiurl, opts, argv):
|
|||||||
if hostarch != bi.hostarch and not bi.hostarch in can_also_build.get(hostarch, []):
|
if hostarch != bi.hostarch and not bi.hostarch in can_also_build.get(hostarch, []):
|
||||||
print('Error: hostarch \'%s\' is required.' % (bi.hostarch), file=sys.stderr)
|
print('Error: hostarch \'%s\' is required.' % (bi.hostarch), file=sys.stderr)
|
||||||
return 1
|
return 1
|
||||||
elif hostarch != bi.buildarch:
|
elif hostarch != bi.buildarch and vm_type != "emulator" and vm_type != "qemu":
|
||||||
if not bi.buildarch in can_also_build.get(hostarch, []):
|
if not bi.buildarch in can_also_build.get(hostarch, []):
|
||||||
# OBSOLETE: qemu_can_build should not be needed anymore since OBS 2.3
|
print('WARNING: It is guessed to build on hostarch \'%s\' for \'%s\' via QEMU user emulation.' % (hostarch, bi.buildarch), file=sys.stderr)
|
||||||
if vm_type != "emulator" and not bi.buildarch in qemu_can_build:
|
|
||||||
print('Error: hostarch \'%s\' cannot build \'%s\'.' % (hostarch, bi.buildarch), file=sys.stderr)
|
|
||||||
return 1
|
|
||||||
print('WARNING: It is guessed to build on hostarch \'%s\' for \'%s\' via QEMU.' % (hostarch, bi.buildarch), file=sys.stderr)
|
|
||||||
|
|
||||||
rpmlist_prefers = []
|
rpmlist_prefers = []
|
||||||
if prefer_pkgs:
|
if prefer_pkgs:
|
||||||
|
Loading…
Reference in New Issue
Block a user