Hello community,

here is the log from the commit of package virtualbox for openSUSE:Factory 
checked in at 2017-08-12 19:43:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virtualbox (Old)
 and      /work/SRC/openSUSE:Factory/.virtualbox.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virtualbox"

Sat Aug 12 19:43:44 2017 rev:139 rq:515097 version:5.1.26

Changes:
--------
--- /work/SRC/openSUSE:Factory/virtualbox/virtualbox.changes    2017-08-02 
11:27:20.769150700 +0200
+++ /work/SRC/openSUSE:Factory/.virtualbox.new/virtualbox.changes       
2017-08-12 19:43:46.517168027 +0200
@@ -1,0 +2,21 @@
+Mon Aug  7 20:29:05 UTC 2017 - larry.fin...@lwfinger.net
+
+- Update vboxconfig.sh to fix problems noted in bsc#1042726
+  Disable pae build for 32-bit kernels.
+  Added missing commands to keep mkinitrd from being called twice during 
installation of host kernel modules. bsc#105248.
+
+-------------------------------------------------------------------
+Mon Aug  7 10:24:42 UTC 2017 - sch...@suse.de
+
+- internal-headers.patch: fix invalid use of internal headers, enable
+  POSIX extensions
+
+-------------------------------------------------------------------
+Thu Aug  3 17:37:58 UTC 2017 - h...@urpla.net
+
+- reorganize vbox autostart, coping with systemd:
+  - add /usr/lib/virtualbox/vboxes.sh (based on /etc/init.d/vboxes)
+  - add /usr/lib/systemd/system/vboxes.service
+  - remove /etc/init.d/vboxes
+
+-------------------------------------------------------------------

Old:
----
  virtualbox-vboxes

New:
----
  internal-headers.patch
  vboxes.service
  vboxes.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ virtualbox.spec ++++++
--- /var/tmp/diff_new_pack.Ptuezi/_old  2017-08-12 19:43:49.724718122 +0200
+++ /var/tmp/diff_new_pack.Ptuezi/_new  2017-08-12 19:43:49.728717561 +0200
@@ -44,8 +44,6 @@
 Source9:        %{name}-wrapper.sh
 Source10:       %{name}-LocalConfig.kmk
 Source11:       %{name}-60-vboxdrv.rules
-# init script to start virtual boxes during boot, to be configured via 
/etc/sysconfig/vbox bnc#582398
-Source12:       %{name}-vboxes
 Source13:       %{name}-sysconfig.vbox
 Source14:       vboxdrv.service
 Source15:       vboxadd-service.service
@@ -53,6 +51,9 @@
 Source17:       vboxguestconfig.sh
 Source18:       fix_usb_rules.sh
 Source19:       vboxdrv.sh
+# init script to start virtual boxes during boot, to be configured via 
/etc/sysconfig/vbox bnc#582398
+Source20:       vboxes.sh
+Source21:       vboxes.service
 Source98:       %{name}-rpmlintrc
 Source99:       %{name}-patch-source.sh
 #rework init scripts to fit suse needs
@@ -104,6 +105,8 @@
 Patch116:       Fix_for_server_1.19.patch
 # Fix for missing cleanup in KMS support
 Patch117:       fix_KMS_support.patch
+# Fix invalid use of internal headers
+Patch118:       internal-headers.patch
 #
 BuildRequires:  LibVNCServer-devel
 BuildRequires:  SDL-devel
@@ -237,7 +240,7 @@
 %package host-KMP
 Summary:        Host kernel module for VirtualBox
 Group:          System/Emulators/PC
-%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} 
-n %{name}-host -f %{SOURCE5} -x kdump um xen xenpae pv
+%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} 
-n %{name}-host -f %{SOURCE5} -x kdump um xen pae xenpae pv
 
 %description host-KMP
 This package contains the kernel-module for VirtualBox.
@@ -246,7 +249,7 @@
 %package guest-KMP
 Summary:        Guest kernel modules for VirtualBox
 Group:          System/Emulators/PC
-%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} 
-n %{name}-guest -f %{SOURCE6} -x kdump um xen xenpae pv
+%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} 
-n %{name}-guest -f %{SOURCE6} -x kdump um xen pae xenpae pv
 
 %description guest-KMP
 This package contains the kernel-module for VirtualBox.
@@ -385,6 +388,7 @@
 %patch115 -p1
 %patch116 -p1
 %patch117 -p1
+%patch118 -p1
 
 #copy user manual
 cp %{SOURCE1} UserManual.pdf
@@ -528,10 +532,13 @@
 
####################################################################################
 export INSTALL_MOD_PATH=%{buildroot}
 export INSTALL_MOD_DIR=misc
-#to install modules we use here similar steps like in build phase, go trought 
the all modules :
+#Keep the install process from calling mkinitrd. The VB kernel modules are not 
in initrd. bsc#1052428
+export INITRD_IN_POSTTRANS=1
+export KMP_NEEDS_MKINITRD=0
+#to install modules we use here similar steps like in build phase, go through 
all the modules :
 for module_name in vbox{drv,netflt,pci,netadp,guest,sf,video}
 do
-       #and trought the all flavors
+       #and through the all flavors
        for flavor in %{flavors_to_build}; do
        #to install modules use Makefile from 
%{_prefix}/src/linux-obj/%_target_cpu/$flavor and builds from 
$PWD/modules_build_dir/$flavor/$module_name
        make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install 
M=$PWD/modules_build_dir/$flavor/$module_name
@@ -631,19 +638,23 @@
 # modify and install the vboxdrv init script
 #sed -i "s|%{NOLSB}%|yes|g;s|%{DEBIAN}%||g;s|%{PACKAGE}%|virtualbox|g" \
 #                                              
src/VBox/Installer/linux/vboxdrv.sh
-install -m 0755 %{SOURCE19}                    
%{buildroot}%{_vbox_instdir}/vboxdrv.sh
-ln -s %{_vbox_instdir}/vboxdrv.sh              
%{buildroot}%{_sbindir}/rcvboxdrv
+
 # Service files to load kernel modules on boot
 install -m 0644 %{SOURCE14}                    
%{buildroot}%{_unitdir}/vboxdrv.service
 install -m 0644 %{SOURCE15}                    
%{buildroot}%{_unitdir}/vboxadd-service.service
 install -m 0755 %{SOURCE16}                    %{buildroot}/sbin/vboxconfig
 install -m 0755 %{SOURCE17}                    
%{buildroot}/sbin/vboxguestconfig
 install -m 0755 %{SOURCE18}                    
%{buildroot}/sbin/vbox-fix-usb-rules.sh
+install -m 0755 %{SOURCE19}                    
%{buildroot}%{_vbox_instdir}/vboxdrv.sh
+install -m 0755 %{SOURCE20}                    
%{buildroot}%{_vbox_instdir}/vboxes.sh
+install -m 0644 %{SOURCE21}                    
%{buildroot}%{_unitdir}/vboxes.service
+ln -s %{_vbox_instdir}/vboxes.sh               %{buildroot}%{_sbindir}/rcvboxes
+ln -s %{_vbox_instdir}/vboxdrv.sh              
%{buildroot}%{_sbindir}/rcvboxdrv
+
 # Init script to start virtual boxes during boot
-install -m 755 %{SOURCE12} %{buildroot}%{_sysconfdir}/init.d/vboxes
-ln -s %{_sysconfdir}/init.d/vboxes %{buildroot}%{_sbindir}/rcvboxes
 ln -sf %{_unitdir}/vboxdrv.service             
%{buildroot}%{_unitdir}/multi-user.target.wants/vboxdrv.service
 ln -sf %{_unitdir}/vboxadd-service.service     
%{buildroot}%{_unitdir}/multi-user.target.wants/vboxadd-service.service
+ln -sf %{_unitdir}/vboxes.service              
%{buildroot}%{_unitdir}/multi-user.target.wants/vboxes.service
 # sysconfig file intended for vboxes script
 install -d -m 755 %{buildroot}%{_var}/adm/fillup-templates
 install -m 640 %{SOURCE13} 
%{buildroot}%{_var}/adm/fillup-templates/sysconfig.vbox
@@ -867,11 +878,13 @@
 %dir %{_unitdir}
 %dir %{_unitdir}/multi-user.target.wants
 /usr/lib/virtualbox/vboxdrv.sh
+/usr/lib/virtualbox/vboxes.sh
 %{_unitdir}/vboxdrv.service
+%{_unitdir}/vboxes.service
 %{_unitdir}/multi-user.target.wants/vboxdrv.service
+%{_unitdir}/multi-user.target.wants/vboxes.service
 %dir %{_sysconfdir}/vbox
 %config %{_sysconfdir}/vbox/vbox.cfg
-%{_sysconfdir}/init.d/vboxes
 %{_var}/adm/fillup-templates/sysconfig.vbox
 %{_sbindir}/rcvboxes
 %{_sbindir}/rcvboxdrv

++++++ internal-headers.patch ++++++
Index: VirtualBox-5.1.26/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
===================================================================
--- VirtualBox-5.1.26.orig/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
+++ VirtualBox-5.1.26/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
@@ -23,6 +23,9 @@ vboxvideo_70_DEFS := \
 ifeq ($(KBUILD_TARGET),solaris) # don't use .solaris or anything here.
  vboxvideo_70_DEFS += __EXTENSIONS__  ## @todo Why this?
 endif
+if1of ($(KBUILD_TARGET), linux)
+ vboxvideo_70_DEFS += _POSIX_SOURCE ## X requires POSIX extensions
+endif
 vboxvideo_13_DEFS := $(vboxvideo_70_DEFS) VBOXVIDEO_13
 vboxvideo_15_DEFS := \
        $(vboxvideo_13_DEFS) NO_ANSIC PCIACCESS XSERVER_LIBPCIACCESS 
_XORG_SERVER_H_ _DIX_CONFIG_H_
Index: VirtualBox-5.1.26/src/VBox/Additions/x11/vboxvideo/edid.c
===================================================================
--- VirtualBox-5.1.26.orig/src/VBox/Additions/x11/vboxvideo/edid.c
+++ VirtualBox-5.1.26/src/VBox/Additions/x11/vboxvideo/edid.c
@@ -44,10 +44,6 @@
  *    Dave Airlie <airl...@redhat.com>
  */
 
-#if XORG_VERSION_CURRENT >= 11900000
-#include <bits/sigset.h>
-typedef __sigset_t sigset_t;
-#endif
 #include <misc.h>
 #include <xf86DDC.h>
 #include <xf86Crtc.h>
Index: VirtualBox-5.1.26/src/VBox/Additions/x11/vboxvideo/pointer.c
===================================================================
--- VirtualBox-5.1.26.orig/src/VBox/Additions/x11/vboxvideo/pointer.c
+++ VirtualBox-5.1.26/src/VBox/Additions/x11/vboxvideo/pointer.c
@@ -15,10 +15,6 @@
  * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 
-#if XORG_VERSION_CURRENT >= 11900000
-#include <bits/sigset.h>
-typedef __sigset_t sigset_t;
-#endif
 #include <VBox/VBoxGuestLib.h>
 
 #ifndef PCIACCESS
Index: VirtualBox-5.1.26/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
===================================================================
--- VirtualBox-5.1.26.orig/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
+++ VirtualBox-5.1.26/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
@@ -52,10 +52,6 @@
 #ifndef _VBOXVIDEO_H_
 #define _VBOXVIDEO_H_
 
-#if XORG_VERSION_CURRENT >= 11900000
-#include <bits/sigset.h>
-typedef __sigset_t sigset_t;
-#endif
 #include <VBox/VBoxVideoGuest.h>
 #include <VBox/VBoxVideo.h>
 #include "version-generated.h"
Index: VirtualBox-5.1.26/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
===================================================================
--- VirtualBox-5.1.26.orig/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
+++ VirtualBox-5.1.26/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
@@ -103,7 +103,7 @@ if defined(VBOX_WITH_EXTPACK_VBOXDTRACE)
  VBoxDTraceCmd_TEMPLATE = VBoxR3ExtPackDTrace
  VBoxDTraceCmd_DEFS = RTMEM_WRAP_TO_EF_APIS 
VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME=\"$(VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME)\"
  #VBoxDTraceCmd_DEFS += YYDEBUG
- VBoxDTraceCmd_DEFS.linux = _XOPEN_SOURCE=700
+ VBoxDTraceCmd_DEFS.linux = _XOPEN_SOURCE=700 _DEFAULT_SOURCE
  VBoxDTraceCmd_DEFS.win = YY_USE_PROTOS=1 YYENABLE_NLS=0 YYLTYPE_IS_TRIVIAL=0
  VBoxDTraceCmd_SDKS = VBOX_ZLIB
  ifn1of ($(KBUILD_TARGET), win)
++++++ vboxconfig.sh ++++++
--- /var/tmp/diff_new_pack.Ptuezi/_old  2017-08-12 19:43:49.976682780 +0200
+++ /var/tmp/diff_new_pack.Ptuezi/_new  2017-08-12 19:43:49.980682219 +0200
@@ -12,22 +12,30 @@
 # Test if vboxpci module loaded. If it is, skip everything else
 loaded=$(lsmod | grep vboxpci)
 if [ -n "$loaded" ] ; then
-       echo "Kernel modules available - exiting..."
-       exit 0
+       echo "Kernel modules are loaded, unload them via"
+       echo "systemctl stop vboxdrv.service if you wish to rebuild them."
+       echo "Quitting .."
+       exit 1
 fi
 #
-# Force installation of VB host sources. Zypper will install all the 
prerequisies
-echo "Installing all required packages..."
-killproc PackageKit
-zypper install -y virtualbox-host-source > /dev/null 2>&1
-if [ "$?" -ne 0 ] ; then
-       echo "Installation of required packages failed."
-       echo "Use 'sudo zypper install virtualbox-host-source' to see the 
reason."
+# Check if virtualbox-host-source is installed, quit if not
+if ! rpm -qf "$SOURCE/Makefile" &>/dev/null ; then
+       echo "Sources for building host modules are not present,"
+       echo "Use 'sudo zypper install virtualbox-host-source' to install them. 
Quitting .."
+       exit 1
+fi
+#
+# Check if virtualbox-host-source version matches virtualbox version
+if [ "$(rpm -q virtualbox virtualbox-host-source 
--queryformat='%{version}-%{release}\n' 2>/dev/null | sort -u | wc -l)" -ne "1" 
] ; then
+       echo "virtualbox-host-source package version doesn't match"
+       echo "the version of virtualbox package."
+       echo "Reinstall virtualbox-host-source package. Quitting .."
        exit 1
 fi
 # Prerequisites are available, start build
 pushd $SOURCE > /dev/null 2>&1
 echo "Building kernel modules..."
+make clean &>/dev/null
 make > $LOGFILE 2>&1
 if [ "$?" -ne 0 ] ; then
        echo ""

++++++ vboxes.service ++++++
# Autostart configured Virtual Box VMs
# configuration: /etc/sysconfig/vbox

[Unit]
SourcePath=/usr/lib/virtualbox/vboxes.sh
Description=Autostart Headless Virtual Box VMs
Before=multi-user.target graphical.target
After=network-online.target vboxdrv.service 
Wants=network-online.target vboxdrv.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/virtualbox/vboxes.sh start
ExecStop=/usr/lib/virtualbox/vboxes.sh stop

[Install]
WantedBy=multi-user.target

++++++ vboxes.sh ++++++
#!/bin/sh
#
# description: Starts and stops vbox autostart VMs.
# Based on
# http://www.amiryan.org/2009/11/04/virtualbox-init-d-service-autostart-scriptu
#
# By Richard Bos <rbos at opensuse dot org> - May 2010
#
# Converted to standalone script for systemd environments
#
# By Hans-Peter jansen <hpj at urpla dot net> - July 2017
#

PRG=$(basename $0)
SERVICE="Virtualbox machines"

VBOXMGR_BIN=/usr/lib/virtualbox/VBoxManage
if [[ ! -x $VBOXMGR_BIN ]]; then
  echo "$VBOXMGR_BIN does not exist"
  if [ "$1" = "stop" ]; then
    exit 0
  else
    exit 6
  fi
fi

# read config file
[ -r /etc/sysconfig/vbox ] && . /etc/sysconfig/vbox

start() {

  N=1
  for VBOX in $VBOX_AUTOSTART; do

    if grep -q \; <<< "$VBOX"; then
      VBOX_NAME[$N]=$(cut -d\; -f1 <<< "$VBOX")
      VBOX_USER[$N]=$(cut -d\; -f2 <<< "$VBOX")
    else
      VBOX_NAME[$N]="$VBOX"
      VBOX_USER[$N]=""
    fi
    N=$(($N+1)) 
  done

  VBOXES=${#VBOX_NAME[*]}

  if [ $VBOXES -eq 0 ]; then
    # The virtual machines have to be configured in /etc/sysconfig/vbox
    echo "Starting $SERVICE: no virtual machines configured"
  else

    N=1
    echo "Starting $SERVICE: "
    while [[ $N -le $VBOXES ]]; do
      if [[ $N -lt $VBOXES ]]; then
        echo -n "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}), "
      else
        echo "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]})"
      fi
      N=$(($N+1)) 
    done

    N=1
    while [[ $N -le $VBOXES ]]; do

      if [[ -n "${VBOX_USER[$N]}" ]]; then

        if getent passwd ${VBOX_USER[$N]} &>/dev/null; then

          # The tag "Name:" occurs in multiple sections.  Require at least 7 
blanks
          # with an additional flexible amount of spaces.  At the moment of 
writing
          # 13 spaces are needed.
          VBOX_RUNNING=$(su ${VBOX_USER[$N]} -c "$VBOXMGR_BIN list --long 
runningvms"  |
            sed -n 's/^Name:[[:blank:]]\{7\} *//p' | grep -w "${VBOX_NAME[$N]}")

          if [[ -z "$VBOX_RUNNING" ]]; then

            VBOX_PRESENT=$(su ${VBOX_USER[$N]} -c "$VBOXMGR_BIN list --long 
vms" |
              sed -n 's/^Name:[[:blank:]]\{7\} *//p' | grep -w 
"${VBOX_NAME[$N]}")

            if [[ -n "$VBOX_PRESENT" ]]; then

              # start VM with VBoxManage in headless mode
              # unlike VBoxHeadless, VBoxManage waits until VM is running
              su ${VBOX_USER[$N]} -c "$VBOXMGR_BIN -q startvm 
"${VBOX_NAME[$N]}" -type headless" &> /tmp/$PRG.$$
              RETVAL=$?

              if [[ $RETVAL != 0 ]]; then
                echo "Starting virtual machine: ${VBOX_NAME[$N]} (user: 
${VBOX_USER[$N]}) failed: "
                cat /tmp/$PRG.$$
              fi

              rm /tmp/$PRG.$$

            else
              echo "Virtual machine: ${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}) 
does not exist"
            fi

          else
            echo "Virtual machine: ${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}) is 
already running"
          fi

        else
          echo "Virtual machine: ${VBOX_NAME[$N]}, VBOX_USER: ${VBOX_USER[$N]} 
does not exist"
        fi

      else
        echo "Virtual machine: ${VBOX_NAME[$N]}: VBOX_USER not configured"
      fi

      N=$(($N+1))
    done
  fi
}

stop() {

  for VBOX in $VBOX_AUTOSTART; do

    if grep -q \; <<< "$VBOX"; then
      VBOX_USER=$(cut -d\; -f2 <<< "$VBOX")

      # Only add the user to the list, if not present yet
      if ! grep -qw "$VBOX_USER" <<< "$VBOX_USERS"; then
        VBOX_USERS="$VBOX_USERS $VBOX_USER"
      fi
    fi
  done

  N=1
  for VBOX_USER in $VBOX_USERS; do

    VBOX_RUNNING=$(su $VBOX_USER -c "$VBOXMGR_BIN list --long runningvms" |
      sed -n 's/^Name:[[:blank:]]\{7\} *//p')
    
    for VBOX in $VBOX_RUNNING; do
      VBOX_NAME[$N]="$VBOX"
      VBOX_USER[$N]="$VBOX_USER"
      N=$(($N+1)) 
    done
  done

  VBOXES=${#VBOX_NAME[*]}

  if [[ $VBOXES -eq 0 ]]; then
    echo "Shutting down $SERVICE: no virtual machines running."
  else

    echo "Shutting down $SERVICE: "
    N=1
    while [[ $N -le $VBOXES ]]; do
        echo -n "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}): "
        su ${VBOX_USER[$N]} -c "$VBOXMGR_BIN -q controlvm ${VBOX_NAME[$N]} 
savestate"
      N=$(($N+1)) 
    done
  fi
}

status() {

  for VBOX in $VBOX_AUTOSTART; do

    if grep -q \; <<< "$VBOX"; then
      VBOX_USER=$(cut -d\; -f2 <<< "$VBOX")

      # Only add the user to the list, if not present yet
      if ! grep -qw "$VBOX_USER" <<< "$VBOX_USERS"; then
        VBOX_USERS="$VBOX_USERS $VBOX_USER"
      fi
    fi
  done

  N=1
  for VBOX_USER in $VBOX_USERS; do
    # The tag "Name:" occurs in multiple sections.  Require at least 7 blanks
    # with an additional flexible amount of spaces.  At the moment of writing
    # 13 spaces are needed.
    VBOX_RUNNING=$(su $VBOX_USER -c "$VBOXMGR_BIN list --long runningvms" |
      sed -n 's/^Name:[[:blank:]]\{7\} *//p')

    for VBOX in $VBOX_RUNNING; do
      VBOX_NAME[$N]="$VBOX"
      VBOX_USER[$N]="$VBOX_USER"
      N=$(($N+1)) 
    done
  done

  VBOXES=${#VBOX_NAME[*]}

  if [[ $VBOXES -eq 0 ]]; then
    echo "$SERVICE: no virtual machines running."
  else
    N=1
    while [[ $N -le $VBOXES ]]; do
      # The long sed line changes the output from:
      #    running (since 2010-04-25T14:51:57.373000000)
      # to:
      #    running (since 2010-04-25 14:51:57)
      #
      STATE=$(su ${VBOX_USER[$N]} -c "$VBOXMGR_BIN showvminfo 
"${VBOX_NAME[$N]}"" |
        sed -n 's/State: *//p' |
        sed 
's/\([0-9][0-9]\)\.[0-9]\{9\}/\1/;s/\([0-9][0-9]\)T\([0-9][0-9]\)/\1 \2/')
      printf "%-56s %s\n" "${VBOX_NAME[$N]} (user: ${VBOX_USER[$N]}):" "$STATE"
      N=$(($N+1))
    done
  fi
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|force-reload)
        stop
        start
        ;;
  status)
        status
        ;;
  *)
        echo "Usage: $PRG {start|stop|restart|force-reload|status}" >&2
        exit 3
        ;;
esac


Reply via email to