diff --git a/NEWS b/NEWS index 52d03293..14634c62 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ 0.153 - "my sr" is using the server side request collection to get right results - maintenance request offers to supersede old, but still open requests + - add build --vm-telnet option for getting debug shell in KVM builds OBS 2.7 only: - add "addchannels" and "enablechannel" commands - support new package instances on branching when using -N parameter diff --git a/osc/build.py b/osc/build.py index 039de980..53ddcf49 100644 --- a/osc/build.py +++ b/osc/build.py @@ -424,6 +424,7 @@ def main(apiurl, opts, argv): cache_dir = None build_uid = '' vm_type = config['build-type'] + vm_telnet = None build_descr = os.path.abspath(build_descr) build_type = os.path.splitext(build_descr)[1][1:] @@ -502,6 +503,8 @@ def main(apiurl, opts, argv): return 1 if opts.vm_type: vm_type = opts.vm_type + if opts.vm_telnet: + vm_telnet = opts.vm_telnet if opts.alternative_project: prj = opts.alternative_project pac = '_repository' @@ -1013,6 +1016,10 @@ def main(apiurl, opts, argv): my_build_swap = build_root + '/swap' vm_options = [ '--vm-type=%s' % vm_type ] + if vm_telnet: + vm_options += [ '--vm-telnet=' + vm_telnet ] + if config['build-memory']: + vm_options += [ '--memory=' + config['build-memory'] ] if vm_type != 'lxc': vm_options += [ '--vm-disk=' + my_build_device ] vm_options += [ '--vm-swap=' + my_build_swap ] diff --git a/osc/commandline.py b/osc/commandline.py index 04af1eea..3f34a54b 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -5761,6 +5761,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='use hard links instead of a deep copied source') @cmdln.option('--vm-type', metavar='TYPE', help='use VM type TYPE (e.g. kvm)') + @cmdln.option('--vm-telnet', metavar='TELNET', + help='Launch a telnet server inside of VM build') @cmdln.option('--target', metavar='TARGET', help='define target platform') @cmdln.option('--alternative-project', metavar='PROJECT',