1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-26 08:08:55 +02:00

* add support for VM (kvm or xen) builds

* update NEWS file
This commit is contained in:
2009-02-20 12:49:17 +00:00
parent 9bc668ce3c
commit 4369deaf10
4 changed files with 31 additions and 2 deletions

View File

@@ -408,6 +408,8 @@ def main(opts, argv):
anyway, I assume... verifying package now saves time though, since we don't
even try to set up the buildroot if it wouldn't work."""
if config['build-type'] == "xen" or config['build-type'] == "kvm":
print 'Skipping verification of package signatures due to secure VM build'
if opts.no_verify:
print 'Skipping verification of package signatures'
else:
@@ -434,13 +436,28 @@ def main(opts, argv):
bc_file.write(get_buildconfig(apiurl, prj, pac, repo, arch))
bc_file.flush()
vm_options=""
if config['build-device'] and config['build-memory'] and config['build-type']:
if config['build-type'] == "kvm":
vm_options="--kvm " + config['build-device']
elif config['build-type'] == "xen":
vm_options="--xen " + config['build-device']
else:
print "ERROR: unknown VM is set ! (" + config['build-type'] + ")"
sys.exit(1)
if config['build-swap']:
vm_options+=" --swap " + config['build-swap']
if config['build-memory']:
vm_options+=" --memory " + config['build-memory']
print 'Running build'
cmd = '%s --root=%s --rpmlist=%s --dist=%s --arch=%s %s %s' \
cmd = '%s --root=%s --rpmlist=%s --dist=%s --arch=%s %s %s %s' \
% (config['build-cmd'],
config['build-root'],
rpmlist_file.name,
bc_file.name,
bi.buildarch,
vm_options,
build_descr,
buildargs)