Hello community, here is the log from the commit of package build for openSUSE:Factory checked in at 2019-12-11 12:01:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/build (Old) and /work/SRC/openSUSE:Factory/.build.new.4691 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "build" Wed Dec 11 12:01:17 2019 rev:127 rq:754369 version:20191205 Changes: -------- --- /work/SRC/openSUSE:Factory/build/build.changes 2019-11-20 13:43:26.548271504 +0100 +++ /work/SRC/openSUSE:Factory/.build.new.4691/build.changes 2019-12-11 12:02:32.772805441 +0100 @@ -1,0 +2,18 @@ +Thu Dec 5 08:57:27 UTC 2019 - Adrian Schröter <[email protected]> + +- qemu vm_type is running qemu system emulator now. Works for: + * aarch64 + * armv7l + * ppc64/ppc64le + * s390/s390x + * riscv64 + Note: this requires a kernel and initrd in build target via + kernel-obs-build mechanic +- various --shell improvements +- new --shell-cmd to run commands in chroot/KVM/Qemu/... directly +- raising minimal required memory in qemu mode to 512MB to be able + to run Linux kernel at least +- Normalize epoch 0 away when reading the module info +- Add systemd-nspawn backend (by Oleg Girko) + +------------------------------------------------------------------- Old: ---- obs-build-20191114.tar.gz New: ---- obs-build-20191205.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ build.spec ++++++ --- /var/tmp/diff_new_pack.9WKJ2J/_old 2019-12-11 12:02:37.592803414 +0100 +++ /var/tmp/diff_new_pack.9WKJ2J/_new 2019-12-11 12:02:37.596803412 +0100 @@ -22,7 +22,7 @@ Summary: A Script to Build SUSE Linux RPMs License: GPL-2.0-only OR GPL-3.0-only Group: Development/Tools/Building -Version: 20191114 +Version: 20191205 Release: 0 Source: obs-build-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.9WKJ2J/_old 2019-12-11 12:02:37.632803397 +0100 +++ /var/tmp/diff_new_pack.9WKJ2J/_new 2019-12-11 12:02:37.632803397 +0100 @@ -1,5 +1,5 @@ pkgname=build -pkgver=20191114 +pkgver=20191204 pkgrel=0 pkgdesc="Build packages in sandbox" arch=('i686' 'x86_64') ++++++ build.dsc ++++++ --- /var/tmp/diff_new_pack.9WKJ2J/_old 2019-12-11 12:02:37.668803382 +0100 +++ /var/tmp/diff_new_pack.9WKJ2J/_new 2019-12-11 12:02:37.668803382 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: build -Version: 20191114 +Version: 20191205 Binary: build Maintainer: Adrian Schroeter <[email protected]> Architecture: all ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.9WKJ2J/_old 2019-12-11 12:02:37.696803370 +0100 +++ /var/tmp/diff_new_pack.9WKJ2J/_new 2019-12-11 12:02:37.700803369 +0100 @@ -1,4 +1,4 @@ -build (20191114) unstable; urgency=low +build (20191205) unstable; urgency=low * Update to current git trunk - add sles11sp2 build config and adapt autodetection ++++++ obs-build-20191114.tar.gz -> obs-build-20191205.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20191114/Build/Modules.pm new/obs-build-20191205/Build/Modules.pm --- old/obs-build-20191114/Build/Modules.pm 2019-11-14 14:18:59.000000000 +0100 +++ new/obs-build-20191205/Build/Modules.pm 2019-12-05 10:01:57.000000000 +0100 @@ -52,7 +52,11 @@ next unless $data->{'artifacts'}; my $rpms = $data->{'artifacts'}->{'rpms'}; next unless $rpms && ref($rpms) eq 'ARRAY'; - push @{$res->{$_}}, $module for @$rpms; + for my $rpm (@$rpms) { + my $nrpm = $rpm; + $nrpm =~ s/-0:([^-]*-[^-]*\.[^\.]*)$/-$1/; + push @{$res->{$nrpm}}, $module; + } } # unify for (values %$res) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20191114/build new/obs-build-20191205/build --- old/obs-build-20191114/build 2019-11-14 14:18:59.000000000 +0100 +++ new/obs-build-20191205/build 2019-12-05 10:01:57.000000000 +0100 @@ -104,6 +104,7 @@ SIGNDUMMY= DO_STATISTICS= RUN_SHELL= +RUN_SHELL_CMD= CCACHE= DLNOSIGNATURE= BUILD_FLAVOR= @@ -163,6 +164,10 @@ --shell Instead of starting a build start a root shell in the build root. + --shell-cmd CMD + Run the command CMD instead of giving a root shell + --shell option is implicit set. + --sysrq $ Sends a single specifed char as sysrq to the running kernel of the build. @@ -305,7 +310,7 @@ --vm-type TYPE Use virtual machine instead of chroot - TYPE is one of xen|kvm|uml|qemu|lxc|zvm|openstack|ec2|docker|pvm + TYPE is one of xen|kvm|uml|qemu|lxc|zvm|openstack|ec2|docker|pvm|nspawn --vm-worker GUEST GUEST is a z/VM build worker controlled by the controlling @@ -1017,6 +1022,11 @@ ;; -shell) RUN_SHELL=1 + ;; + -shell-cmd) + needarg + RUN_SHELL=1 + RUN_SHELL_CMD="$ARG" shift ;; -signdummy) @@ -1155,9 +1165,9 @@ if test -z "$RUNNING_IN_VM"; then LOGFILE="$BUILD_ROOT/.build.log" else - # lxc and docker are special cases: vm shares logfile with host + # lxc, docker and nspawn are special cases: vm shares logfile with host case "$VM_TYPE" in - lxc|docker) + lxc|docker|nspawn) ;; *) LOGFILE="$BUILD_ROOT/.build.log" @@ -1243,7 +1253,7 @@ test "$VM_TYPE" = zvm && ADDITIONAL_PACKS="$ADDITIONAL_PACKS udev libcap2" # we need to do this before the vm is started - if test -n "$CHANGELOG" -a -z "$RUNNING_IN_VM" ; then + if test -n "$CHANGELOG" -a -z "$RUNNING_IN_VM" -a -z "$RUN_SHELL" ; then recipe_create_changelog "$MYSRCDIR/$RECIPEFILE" fi @@ -1383,10 +1393,13 @@ setupccache if test -n "$RUN_SHELL" ; then - echo "You may want to initialize environment via:" - echo " su - $BUILD_USER" - chroot $BUILD_ROOT - cleanup_and_exit 0 + if test -n "$RUN_SHELL_CMD"; then + chroot $BUILD_ROOT "${RUN_SHELL_CMD:=/bin/bash}" + cleanup_and_exit $? + else + chroot $BUILD_ROOT su - $BUILD_USER + cleanup_and_exit $? + fi fi # fill build directories with sources. Also sets TOPDIR diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20191114/build-vm new/obs-build-20191205/build-vm --- old/obs-build-20191114/build-vm 2019-11-14 14:18:59.000000000 +0100 +++ new/obs-build-20191205/build-vm 2019-12-05 10:01:57.000000000 +0100 @@ -51,7 +51,8 @@ VM_INITRD= VM_WORKER= VM_SERVER= -VM_MEMSIZE= +# the qemu default size is not able to run our default kernel anymore +VM_MEMSIZE=512 VM_NETOPT=() VM_NETDEVOPT=() VM_DEVICEOPT=() @@ -78,7 +79,7 @@ # openstack specific VM_OPENSTACK_FLAVOR= -for i in ec2 emulator kvm lxc openstack qemu uml xen zvm docker pvm; do +for i in ec2 emulator kvm lxc openstack qemu uml xen zvm docker pvm nspawn; do . "$BUILD_DIR/build-vm-$i" done @@ -150,7 +151,7 @@ needarg VM_TYPE="$ARG" case "$VM_TYPE" in - lxc|docker) ;; + lxc|docker|nspawn) ;; ec2|xen|kvm|uml|qemu|emulator|openstack|zvm|pvm) test -z "$VM_ROOT" && VM_ROOT=1 ;; @@ -303,7 +304,7 @@ fi exec >&0 2>&0 # so that the logging tee finishes sleep 1 # wait till tee terminates - test "$VM_TYPE" = lxc -o "$VM_TYPE" = docker && exit $1 + test "$VM_TYPE" = lxc -o "$VM_TYPE" = docker -o "$VM_TYPE" = nspawn && exit $1 kill -9 -1 # goodbye cruel world if ! test -x /sbin/halt ; then test -e /proc/sysrq-trigger || mount -n -tproc none /proc @@ -532,7 +533,7 @@ fi RUNNING_IN_VM=true test -e /proc/version || mount -orw -n -tproc none /proc - if test "$VM_TYPE" != lxc -a "$VM_TYPE" != docker ; then + if test "$VM_TYPE" != lxc -a "$VM_TYPE" != docker -a "$VM_TYPE" != nspawn ; then mount -n ${VMDISK_MOUNT_OPTIONS},remount,rw / fi umount /run >/dev/null 2>&1 @@ -737,9 +738,11 @@ local kernel="$vm_kernel" local hostarchfile local newhostarch - if test -z "$VM_KERNEL" -a -e "$BUILD_ROOT/.build.kernel.$VM_TYPE" ; then - kernel="$BUILD_ROOT/.build.kernel.$VM_TYPE" - hostarchfile="$BUILD_ROOT/.build.hostarch.$VM_TYPE" + local vm_type="$VM_TYPE" + test "$vm_type" = "qemu" && vm_type=kvm + if test -z "$VM_KERNEL" -a -e "$BUILD_ROOT/.build.kernel.$vm_type" ; then + kernel="$BUILD_ROOT/.build.kernel.$vm_type" + hostarchfile="$BUILD_ROOT/.build.hostarch.$vm_type" elif test -n "$kernel" -a -e "$kernel" -a -e "$kernel.hostarch" ; then hostarchfile="$kernel.hostarch" fi @@ -849,7 +852,7 @@ ppc|ppcle|s390) PERSONALITY=8 ;; # ppc/s390 kernel never tells us if a 32bit personality is active, assume we run on 64bit aarch64) test "$BUILD_ARCH" != "${BUILD_ARCH#armv[567]}" && PERSONALITY=8 ;; # workaround, to be removed esac - test "$VM_TYPE" = lxc -o "$VM_TYPE" = docker && PERSONALITY=0 + test "$VM_TYPE" = lxc -o "$VM_TYPE" = docker -o "$VM_TYPE" = nspawn && PERSONALITY=0 echo "PERSONALITY='$PERSONALITY'" >> $BUILD_ROOT/.build/build.data echo "VM_HOSTNAME='$HOST'" >> $BUILD_ROOT/.build/build.data echo -n "definesnstuff=(" >> $BUILD_ROOT/.build/build.data @@ -860,6 +863,7 @@ echo ")" >> $BUILD_ROOT/.build/build.data echo "VM_TYPE='$VM_TYPE'" >> $BUILD_ROOT/.build/build.data echo "RUN_SHELL='$RUN_SHELL'" >> $BUILD_ROOT/.build/build.data + echo "RUN_SHELL_CMD='$RUN_SHELL_CMD'" >> $BUILD_ROOT/.build/build.data echo "DO_STATISTICS='$DO_STATISTICS'" >> $BUILD_ROOT/.build/build.data echo "TIME_PREINSTALL='$TIME_PREINSTALL'" >> $BUILD_ROOT/.build/build.data echo "VM_WATCHDOG='$VM_WATCHDOG'" >> $BUILD_ROOT/.build/build.data @@ -878,20 +882,19 @@ umount -n $BUILD_ROOT/mnt 2> /dev/null || true vm_init_script="/.build/build" - if test -n "$RUN_SHELL"; then - vm_init_script="/bin/bash" - fi if check_use_emulator ; then - vm_init_script="/.build/$INITVM_NAME" + vm_init_script="/.build/$INITVM_NAME" fi if test -n "$VM_ROOT" ; then # copy out kernel & initrd (if they exist) during unmounting VM image KERNEL_TEMP_DIR= - if test -z "$VM_KERNEL" -a -e "$BUILD_ROOT/.build.kernel.$VM_TYPE" ; then + local vm_type="$VM_TYPE" + test "$vm_type" = "qemu" && vm_type=kvm + if test -z "$VM_KERNEL" -a -e "$BUILD_ROOT/.build.kernel.$vm_type" ; then KERNEL_TEMP_DIR=`mktemp -d` - cp "$BUILD_ROOT/.build.kernel.$VM_TYPE" "$KERNEL_TEMP_DIR/kernel" - if test -e "$BUILD_ROOT/.build.initrd.$VM_TYPE" ; then - cp "$BUILD_ROOT/.build.initrd.$VM_TYPE" "$KERNEL_TEMP_DIR/initrd" + cp "$BUILD_ROOT/.build.kernel.$vm_type" "$KERNEL_TEMP_DIR/kernel" + if test -e "$BUILD_ROOT/.build.initrd.$vm_type" ; then + cp "$BUILD_ROOT/.build.initrd.$vm_type" "$KERNEL_TEMP_DIR/initrd" fi fi check_exit @@ -931,7 +934,7 @@ fi vm_attach_root - if test -n "$VM_SWAP" ; then + if test -n "$VM_SWAP" -a -z "$RUN_SHELL" ; then vm_attach_swap BUILDSTATUS=$(dd if="$VM_SWAP" bs=12 count=1 2>/dev/null | tr '\0' a) case $BUILDSTATUS in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20191114/build-vm-nspawn new/obs-build-20191205/build-vm-nspawn --- old/obs-build-20191114/build-vm-nspawn 1970-01-01 01:00:00.000000000 +0100 +++ new/obs-build-20191205/build-vm-nspawn 2019-12-05 10:01:57.000000000 +0100 @@ -0,0 +1,73 @@ +# +# systemd-nspawn specific functions +# +################################################################ +# +# Copyright (c) 2019 Oleg Girko +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 or 3 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program (see the file COPYING); if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +# +################################################################ + +vm_verify_options_nspawn() { + VM_ROOT= + VM_SWAP= +} + +vm_startup_nspawn() { + local name="${BUILD_ROOT##*/}" + name="obsbuild.${name//_/-}" + systemd-nspawn -D "$BUILD_ROOT" -M "$name" --private-network --pipe "$vm_init_script" + return "$?" +} + +vm_kill_nspawn() { + local name="${BUILD_ROOT##*/}" + name="obsbuild.${name//_/-}" + machinectl terminate "$name" +} + +vm_fixup_nspawn() { + : +} + +vm_attach_root_nspawn() { + : +} + +vm_attach_swap_nspawn() { + : +} + +vm_detach_root_nspawn() { + : +} + +vm_detach_swap_nspawn() { + : +} + +vm_sysrq_nspawn() { + : +} + +vm_wipe_nspawn() { + : +} + +vm_cleanup_nspawn() { + : +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20191114/build-vm-qemu new/obs-build-20191205/build-vm-qemu --- old/obs-build-20191114/build-vm-qemu 2019-11-14 14:18:59.000000000 +0100 +++ new/obs-build-20191205/build-vm-qemu 2019-12-05 10:01:57.000000000 +0100 @@ -21,14 +21,205 @@ # ################################################################ -# just forward everything to kvm... +# This used to be just an alias for kvm. +# Now it is used to emulate foreign architectures via qemu system emulator. +# Note: this is not for the faster qemu user land emulator, this is is still +# handled in chroot or kvm mode vm_verify_options_qemu() { - vm_verify_options_kvm + if test -n "$KILL" -o -n "$DO_WIPE" ; then + return + fi + + vm_kernel=/.build.kernel.kvm + vm_initrd=/.build.initrd.kvm + + # overwrite some options for specific build architectures + case $BUILD_ARCH in + armv6l|armv7l) + qemu_bin="/usr/bin/qemu-system-arm" + qemu_console=ttyAMA0 + qemu_options="-M virt" + qemu_device=virtio-blk-device + qemu_rng_device=virtio-rng-device + qemu_cpu="-cpu cortex-a15" + ;; + armv8l|aarch32|aarch64|aarch64_ilp32) + qemu_bin="/usr/bin/qemu-system-aarch64" + qemu_console=ttyAMA0 + qemu_cpu="-cpu cortex-a72" + qemu_options="$qemu_options -M virt" + qemu_device=virtio-blk-device + qemu_rng_device=virtio-rng-device + ;; + ppc|ppcle|ppc64|ppc64le) + qemu_bin="/usr/bin/qemu-system-ppc64" + qemu_console=hvc0 + qemu_options="-M pseries" + qemu_cpu="" + grep -q PPC970MP /proc/cpuinfo && qemu_check_ppc970 + qemu_device=virtio-blk + qemu_rng_device=virtio-rng + ;; + riscv64) + qemu_bin="/usr/bin/qemu-system-riscv64" + qemu_console=ttyS0 + qemu_cpu="-cpu rv64" + qemu_options="$qemu_options -M virt -bios /usr/share/qemu/opensbi-riscv64-virt-fw_jump.bin" + qemu_device=virtio-blk-device + qemu_rng_device=virtio-rng-device + ;; + s390|s390x) + qemu_bin="/usr/bin/qemu-system-s390x" + qemu_cpu="-cpu qemu" + qemu_console=hvc0 + qemu_device=virtio-blk-ccw + qemu_serial_device=virtio-serial-ccw + qemu_rng_device=virtio-rng-ccw + ;; + x86_64) + qemu_bin="/usr/bin/qemu-system-x86_64" + qemu_cpu="-cpu qemu64" + # Use defaults and fallbacks for other values + ;; + # + # untested architectures + # + hppa) + qemu_bin="/usr/bin/qemu-system-hppa" + qemu_console=ttyAMA0 + qemu_cpu="" + qemu_options="$qemu_options -bios /usr/share/qemu/hppa-firmware.img" + ;; + m68k) + qemu_bin="/usr/bin/qemu-system-m68k" + qemu_console=ttyAMA0 + qemu_cpu="-cpu m68000" + qemu_options="$qemu_options -M none" + ;; + riscv32) + qemu_bin="/usr/bin/qemu-system-riscv32" + qemu_console=ttyS0 + qemu_cpu="-cpu rv32" + qemu_options="$qemu_options -M virt -bios /usr/share/qemu/opensbi-riscv32-virt-fw_jump.bin" + qemu_device=virtio-blk-device + qemu_rng_device=virtio-rng-device + ;; + esac + + case $qemu_device in + virtio*) + VM_ROOTDEV=/dev/disk/by-id/virtio-0 + VM_SWAPDEV=/dev/disk/by-id/virtio-1 + ;; + *) + VM_ROOTDEV=/dev/sda + VM_SWAPDEV=/dev/sdb + ;; + esac + + if test -n "$VM_NETOPT" -o -n "$VM_NETDEVOPT" ; then + if test -n "$VM_NETOPT" ; then + for item in "${VM_NETOPT[@]}" ; do + qemu_options="$qemu_options -net $item" + done + fi + if test -n "$VM_NETDEVOPT" ; then + for item in "${VM_NETDEVOPT[@]}" ; do + qemu_options="$qemu_options -netdev $item" + done + fi + fi + if test -n "$VM_DEVICEOPT" ; then + for item in "${VM_DEVICEOPT[@]}" ; do + qemu_options="$qemu_options -device $item" + done + fi + + if test -n "$qemu_rng_device" ; then + if test -c /dev/hwrng && + test -f /sys/class/misc/hw_random/rng_current && + test "$(cat /sys/class/misc/hw_random/rng_current)" != none; then + rng_dev="/dev/hwrng" + else + rng_dev="/dev/random" + fi + qemu_options="$qemu_options -object rng-random,filename=$rng_dev,id=rng0 -device $qemu_rng_device,rng=rng0" + fi } vm_startup_qemu() { - vm_startup_kvm + qemu_args=(-drive file="$VM_ROOT",format=raw,if=none,id=disk,cache=unsafe -device "$qemu_device",drive=disk,serial=0) + if [ -n "$VM_USER" ] ; then + getent passwd "$VM_USER" > /dev/null || cleanup_and_exit 3 "cannot find KVM user '$VM_USER'" + else + # use qemu user by default if available + getent passwd qemu >/dev/null && VM_USER=qemu + fi + [ -n "$VM_USER" ] && qemu_options="$qemu_options -runas $VM_USER" + if test -n "$VM_SWAP" ; then + qemu_args=("${qemu_args[@]}" -drive file="$VM_SWAP",format=raw,if=none,id=swap,cache=unsafe -device "$qemu_device",drive=swap,serial=1) + fi + # the serial console device needs to be compiled into the target kernel + # which is why we can not use virtio-serial on other platforms + if test -n "$qemu_serial_device" ; then + if test -n "$VM_CONSOLE_INPUT" ; then + qemu_args=("${qemu_args[@]}" -device "$qemu_serial_device" -device virtconsole,chardev=virtiocon0 -chardev stdio,mux=on,id=virtiocon0 -mon chardev=virtiocon0) + else + qemu_args=("${qemu_args[@]}" -device "$qemu_serial_device" -device virtconsole,chardev=virtiocon0 -chardev stdio,id=virtiocon0) + fi + elif test -n "$VM_CONSOLE_INPUT" ; then + qemu_args=("${qemu_args[@]}" -serial mon:stdio) + else + if ! test -e "${VM_ROOT}.qemu/monitor"; then + mkdir -p "${VM_ROOT}.qemu" + mkfifo "${VM_ROOT}.qemu/monitor" + chown "$VM_USER" "${VM_ROOT}.qemu" + fi + qemu_args=("${qemu_args[@]}" -serial stdio -chardev socket,id=monitor,server,nowait,path="${VM_ROOT}.qemu/monitor" -mon chardev=monitor,mode=readline) + fi + + if test -n "$BUILD_JOBS" -a "$icecream" = 0 -a -z "$BUILD_THREADS" ; then + qemu_args=("${qemu_args[@]}" "-smp" "$BUILD_JOBS") + elif test -n "$BUILD_JOBS" -a -n "$BUILD_THREADS" ; then + qemu_args=("${qemu_args[@]}" "-smp" "$BUILD_JOBS,threads=$BUILD_THREADS") + fi + qemu_append="root=$VM_ROOTDEV" + if test -n "$VMDISK_FILESYSTEM" ; then + qemu_append="$qemu_append rootfstype=$VMDISK_FILESYSTEM" + fi + if test -n "$VMDISK_MOUNT_OPTIONS" ; then + qemu_append="$qemu_append rootflags=${VMDISK_MOUNT_OPTIONS#-o }" + fi + qemu_append="$qemu_append $vm_linux_kernel_parameter" + qemu_append="$qemu_append panic=1 quiet no-kvmclock elevator=noop" + qemu_append="$qemu_append nmi_watchdog=0 rw rd.driver.pre=binfmt_misc" + qemu_append="$qemu_append console=$qemu_console init=$vm_init_script" + if test -z "$VM_NETOPT" -a -z "$VM_NETDEVOPT"; then + qemu_options="$qemu_options -net none" + fi + if test -n "$VM_TELNET"; then + qemu_options="$qemu_options -netdev user,id=telnet,hostfwd=tcp:127.0.0.1:$VM_TELNET-:23 -device e1000,netdev=telnet" + fi + if test -n "$VM_CUSTOMOPT"; then + qemu_options="$qemu_options $VM_CUSTOMOPT" + fi + set -- $qemu_bin -nodefaults -no-reboot -nographic -vga none $qemu_cpu $qemu_options \ + -kernel $vm_kernel \ + -initrd $vm_initrd \ + -append "$qemu_append" \ + ${VM_MEMSIZE:+-m $VM_MEMSIZE} \ + "${qemu_args[@]}" + + if test "$PERSONALITY" != 0 ; then + # have to switch back to PER_LINUX to make qemu work + set -- linux64 "$@" + fi + export QEMU_AUDIO_DRV=none # we do not want to have sound inside the VMs + echo "$@" + "$@" + qemu_ret=$? + test "$qemu_ret" = "137" && cleanup_and_exit 3 "qemu got SIGKILL" } vm_kill_qemu() { @@ -60,10 +251,10 @@ } vm_sysrq_qemu() { - : + vm_sysrq_kvm } vm_wipe_qemu() { - : + vm_wipe_kvm } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20191114/dist/build.changes new/obs-build-20191205/dist/build.changes --- old/obs-build-20191114/dist/build.changes 2019-11-14 14:18:59.000000000 +0100 +++ new/obs-build-20191205/dist/build.changes 2019-12-05 10:01:57.000000000 +0100 @@ -1,4 +1,22 @@ ------------------------------------------------------------------- +Thu Dec 5 08:57:27 UTC 2019 - Adrian Schröter <[email protected]> + +- qemu vm_type is running qemu system emulator now. Works for: + * aarch64 + * armv7l + * ppc64/ppc64le + * s390/s390x + * riscv64 + Note: this requires a kernel and initrd in build target via + kernel-obs-build mechanic +- various --shell improvements +- new --shell-cmd to run commands in chroot/KVM/Qemu/... directly +- raising minimal required memory in qemu mode to 512MB to be able + to run Linux kernel at least +- Normalize epoch 0 away when reading the module info +- Add systemd-nspawn backend (by Oleg Girko) + +------------------------------------------------------------------- Thu Nov 14 13:18:14 UTC 2019 - Adrian Schröter <[email protected]> - Add Fedora module parser diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/obs-build-20191114/dist/build.spec new/obs-build-20191205/dist/build.spec --- old/obs-build-20191114/dist/build.spec 2019-11-14 14:18:59.000000000 +0100 +++ new/obs-build-20191205/dist/build.spec 2019-12-05 10:01:57.000000000 +0100 @@ -22,7 +22,7 @@ Summary: A Script to Build SUSE Linux RPMs License: GPL-2.0-only OR GPL-3.0-only Group: Development/Tools/Building -Version: 20190709 +Version: 20191204 Release: 0 Source: obs-build-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build
