diff --git a/README.md b/README.md index 9da59e7..6aba3e5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # VirtualBox +VirtualBox is a general-purpose full virtualizer for x86 hardware. +Targeted at server, desktop and embedded use, it is the professional-quality virtualization solution that is also Open Source Software. + diff --git a/VirtualBox-4.0.8-enable_ffmpeg_capture.patch b/VirtualBox-4.0.8-enable_ffmpeg_capture.patch new file mode 100644 index 0000000..c71d8e0 --- /dev/null +++ b/VirtualBox-4.0.8-enable_ffmpeg_capture.patch @@ -0,0 +1,30 @@ +--- VirtualBox-4.0.8_OSE.orig/Config.kmk 2011-05-16 18:32:40.000000000 +0200 ++++ VirtualBox-4.0.8_OSE/Config.kmk 2011-05-28 17:34:35.884436301 +0200 +@@ -486,7 +486,7 @@ + # Enables the ffmpeg module for recording test runs. + # TODO: Enable this for normal build server builds? + #if1of ($(KBUILD_TARGET), linux) +-# VBOX_WITH_FFMPEG = 1 ++VBOX_WITH_FFMPEG = 1 + #endif + # Enable shared folders + VBOX_WITH_SHARED_FOLDERS = 1 +@@ -892,7 +892,6 @@ + endif + VBOX_WITH_TESTSUITE= + VBOX_WITH_INTEL_PXE= +- VBOX_WITH_FFMPEG= + ifn1of ($(KBUILD_TARGET), darwin linux solaris win) + VBOX_WITH_INSTALLER= + endif +--- VirtualBox-4.0.8_OSE.orig/src/libs/Makefile.kmk 2011-05-16 18:34:01.000000000 +0200 ++++ VirtualBox-4.0.8_OSE/src/libs/Makefile.kmk 2011-05-28 17:47:24.224649687 +0200 +@@ -72,7 +72,7 @@ + endif + + # FFmpeg for test videos. +- if defined(VBOX_WITH_FFMPEG) && !defined(VBOX_OSE) && !defined(VBOX_ONLY_DOCS) && !defined(VBOX_WITH_SDK) ++ if defined(VBOX_WITH_FFMPEG) && !defined(VBOX_ONLY_DOCS) && !defined(VBOX_WITH_SDK) + if1of ($(KBUILD_TARGET), darwin linux solaris) + include $(PATH_SUB_CURRENT)/ffmpeg-20060710/Makefile.kmk + endif diff --git a/VirtualBox-4.1.8-x86_64-disable_check_32bit.patch b/VirtualBox-4.1.8-x86_64-disable_check_32bit.patch new file mode 100644 index 0000000..ca6d6d0 --- /dev/null +++ b/VirtualBox-4.1.8-x86_64-disable_check_32bit.patch @@ -0,0 +1,11 @@ +diff -Nru VirtualBox-4.1.8_OSE.orig/configure VirtualBox-4.1.8_OSE/configure +--- VirtualBox-4.1.8_OSE.orig/configure 2012-05-24 10:45:09.102915885 +0000 ++++ VirtualBox-4.1.8_OSE/configure 2012-05-24 10:44:58.926034932 +0000 +@@ -2600,7 +2600,6 @@ + fi + check_libcap + check_compiler_h +- [ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit + # tools/common/makeself* + [ $OSE -ge 1 ] && check_makeself + fi diff --git a/VirtualBox-4.2.10-gcc-4.8.patch b/VirtualBox-4.2.10-gcc-4.8.patch new file mode 100644 index 0000000..022e3a5 --- /dev/null +++ b/VirtualBox-4.2.10-gcc-4.8.patch @@ -0,0 +1,14 @@ +--- VirtualBox-4.2.10/configure.orig 2013-03-05 15:24:16.000000000 +0100 ++++ VirtualBox-4.2.10/configure 2013-04-08 18:50:46.228109839 +0200 +@@ -414,9 +414,9 @@ + elif [ $cc_maj -lt 3 \ + -o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \ + -o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \ +- -o \( $cc_maj -eq 4 -a $cc_min -gt 7 \) \ ++ -o \( $cc_maj -eq 4 -a $cc_min -gt 8 \) \ + -o $cc_maj -gt 4 ]; then +- log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with 01 or gcc 4.x with 0/dev/null ++ mkdir /dev/vboxusb -m 0755 2>/dev/null + chown root:$group /dev/vboxusb 2>/dev/null +- mkdir "$devdir" -m 0750 2>/dev/null ++ mkdir "$devdir" -m 0755 2>/dev/null + chown root:$group "$devdir" 2>/dev/null +- mknod "$devpath" c $1 $2 -m 0660 2>/dev/null ++ mknod "$devpath" c $1 $2 -m 0666 2>/dev/null + chown root:$group "$devpath" 2>/dev/null + ;; + 1) diff --git a/VirtualBox-desktop b/VirtualBox-desktop new file mode 100644 index 0000000..f85f6e7 --- /dev/null +++ b/VirtualBox-desktop @@ -0,0 +1,20 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=VirtualBox OSE +GenericName=Virtual Machine +GenericName[it]=Macchina Virtuale +Comment=Run several virtual systems on a single host computer +Comment[de]=Windows und andere Betriebssysteme unter Linux ausführen +Comment[it]=Esegui più macchine virtuali su un singolo computer +Comment[pl]=Uruchamianie wielu systemów wirtualnych na jednym komputerze gospodarza +Comment[sv]=Kör flera virtuella system på en enda värddator +Comment[ko]=가상 머신 +Exec=VirtualBox +TryExec=VirtualBox +Icon=VBox +Type=Application +Terminal=false +Categories=Application;Emulator;System; +DocPath=file:///opt/VirtualBox/UserManual.pdf + diff --git a/VirtualBox-initscript b/VirtualBox-initscript new file mode 100644 index 0000000..4bf70c1 --- /dev/null +++ b/VirtualBox-initscript @@ -0,0 +1,79 @@ +#! /bin/sh +# +# virtualbox: Starts the VirtualBox kernel module +# +# chkconfig: 35 30 60 +# description: VirtualBox Linux kernel module +# +### BEGIN INIT INFO +# Provides: vboxdrv +# Required-Start: $syslog +# Required-Stop: +# Default-Start: 3 5 +# Default-Stop: +# Description: VirtualBox Linux kernel module +# Should-Start: dkms +### END INIT INFO + +. /etc/sysconfig/rc +. $rc_functions + +NAME=virtualbox +LOCKFILE=/var/lock/subsys/$NAME +MODULE=vboxdrv +MODULE2=vboxnetflt + +running() { + /sbin/lsmod | grep -q $MODULE[^_-] +} + +case "$1" in + start) + # Check if it is already running + if ! running; then + echo -n $"Starting"" $NAME: " + /sbin/modprobe $MODULE + /sbin/modprobe $MODULE2 + [ -e /proc/bus/usb/devices ] || mount -t usbfs usbfs /proc/bus/usb -o devgid=30,devmode=664 + evaluate_retval + [ $? -eq 0 ] && touch $LOCKFILE + else + echo "$NAME "$"daemon is already running" + fi + echo + ;; + stop) + echo -n $"Stopping"" $NAME: " + killall -q VBoxSVC VBoxXPCOMIPCD + if running; then + /sbin/modprobe -r $MODULE2 + /sbin/modprobe -r $MODULE + evaluate_retval + [ $? -eq 0 ] && rm -f $LOCKFILE + else + echo "$NAME "$"daemon is already stopped" + fi + echo + ;; + restart) + $0 stop + $0 start + ;; + status) + if running; then + STATUS="loaded" + else + STATUS="not loaded" + fi + echo "$NAME kernel module is $STATUS." + ;; + condrestart) + [ -e "$DAEMONLOCK" ] && $0 restart || : + ;; + *) + echo $"Usage: ""/etc/init.d/$NAME {start|stop|restart|condrestart|status}" + exit 1 + ;; +esac + +: diff --git a/VirtualBox-modprobe b/VirtualBox-modprobe new file mode 100644 index 0000000..2a199fc --- /dev/null +++ b/VirtualBox-modprobe @@ -0,0 +1,2 @@ +install vboxdrv /sbin/modprobe -i vboxdrv; /sbin/modprobe -i vboxnetflt +remove vboxdrv /sbin/modprobe -r -i vboxnetflt vboxdrv diff --git a/VirtualBox-wrapper b/VirtualBox-wrapper new file mode 100644 index 0000000..c32c6c6 --- /dev/null +++ b/VirtualBox-wrapper @@ -0,0 +1,77 @@ +#!/bin/bash +# +# InnoTek VirtualBox +# +# Copyright (C) 2006 InnoTek Systemberatung GmbH +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License as published by the Free Software Foundation, +# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE +# distribution. VirtualBox OSE is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY of any kind. + +CONFIG="/etc/vbox/vbox.cfg" +if [ "$VBOX_USER_HOME" = "" ]; then + if [ ! -d $HOME/.VirtualBox ]; then + mkdir -p $HOME/.VirtualBox + fi + LOG="$HOME/.VirtualBox/VBoxSVC.log" +else + if [ ! -d "$VBOX_USER_HOME" ]; then + mkdir -p "$VBOX_USER_HOME" + fi + LOG="$VBOX_USER_HOME/VBoxSVC.log" +fi + + +if [ ! -r $CONFIG ]; then + echo "Could not find VirtualBox installation. Please reinstall." + exit 1 +fi + +if [ "$1" = "shutdown" ]; then + SHUTDOWN="true" +fi + +. $CONFIG_DIR/$CONFIG + +export LD_LIBRARY_PATH=$INSTALL_DIR + +SERVER_PID=$(ps -U `whoami` | grep VBoxSVC | awk '{ print $1 }') +if [ "$SHUTDOWN" = "" ] && [ "$SERVER_PID" = "" ]; then + rm -rf /tmp/.vbox-$(whoami)-ipc >& /dev/null + [ -f $LOG.1 ] && mv $LOG.1 $LOG.2 + [ -f $LOG.0 ] && mv $LOG.0 $LOG.1 + [ -f $LOG ] && mv $LOG $LOG.0 + $INSTALL_DIR/VBoxSVC --daemonize > $LOG 2>&1 +fi + +if [ "$SHUTDOWN" = "true" ]; then + if [ "$SERVER_PID" != "" ]; then + kill -TERM $SERVER_PID + sleep 2 + fi + exit 0 +fi + +APP=$(which $0) +APP=${APP##/*/} +case "$APP" in + VirtualBox) + exec $INSTALL_DIR/VirtualBox "$@" + ;; + VBoxManage) + exec $INSTALL_DIR/VBoxManage "$@" + ;; + VBoxSDL) + exec $INSTALL_DIR/VBoxSDL "$@" + ;; + vditool) + exec $INSTALL_DIR/vditool "$@" + ;; + *) + echo "Unknown application - $APP" + ;; +esac diff --git a/VirtualBox.spec b/VirtualBox.spec new file mode 100644 index 0000000..81371aa --- /dev/null +++ b/VirtualBox.spec @@ -0,0 +1,884 @@ +# openmamba virtualbox user space specfile + dkms for kernel drivers + +%define vboxusers_groupid 65056 +%define vboxusers_userid 65056 + +# Currently using X.org 1.12 driver +%define xorg_ver %(pkg-config xorg-server --modversion|cut -d. -f 1-2) +%define xorgdrvver %(echo %xorg_ver | tr -d .) + +# DISTCC disabled by default for this package +%define USE_DISTCC 0 + +%ifarch x86_64 +%define virtualbox_arch amd64 +%else +%define virtualbox_arch x86 +%endif + +Name: VirtualBox +Version: 4.3.10 +Release: 2mamba +Summary: A general-purpose full virtualizer for x86 hardware +Group: Graphical Desktop/Applications/Utilities +Vendor: openmamba +Distribution: openmamba +Packager: Stefano Cotta Ramusino +URL: http://www.virtualbox.org/ +Source0: http://download.virtualbox.org/virtualbox/%{version}/VirtualBox-%{version}.tar.bz2 +Source1: %{name}-wrapper +Source2: %{name}-initscript +Source3: %{name}-desktop +Source4: http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso +Source5: %{name}-modprobe +# git clone https://github.com/Thorsten-Sick/vdfuse.git +Source6: vdfuse-20140417git.tar.xz +Patch0: %{name}-4.0.8-enable_ffmpeg_capture.patch +Patch1: %{name}-4.1.8-x86_64-disable_check_32bit.patch +Patch2: VirtualBox-4.2.10-gcc-4.8.patch +Patch3: VirtualBox-4.2.16-vboxusb-permissions.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libcurl-devel +BuildRequires: libgcc +BuildRequires: libGL-devel +BuildRequires: libglib-devel +BuildRequires: libIDL-devel +BuildRequires: libopenssl-devel +BuildRequires: libpng-devel +BuildRequires: libpython27-devel +BuildRequires: libpython-devel +BuildRequires: libqt4-devel +BuildRequires: libSDL-devel +BuildRequires: libstdc++6-devel +BuildRequires: libvncserver-devel +BuildRequires: libxml2-devel +BuildRequires: libX11-devel +BuildRequires: libXcomposite-devel +BuildRequires: libXcursor-devel +BuildRequires: libXdamage-devel +BuildRequires: libXext-devel +BuildRequires: libXfixes-devel +BuildRequires: libXinerama-devel +BuildRequires: libXmu-devel +BuildRequires: libXrandr-devel +BuildRequires: libXt-devel +BuildRequires: libz-devel +BuildRequires: pam-devel +## AUTOBUILDREQ-END +BuildRequires: bin86 +BuildRequires: acpica +BuildRequires: libIDL-devel +BuildRequires: libalsa-devel +BuildRequires: libz-devel +BuildRequires: makeself +BuildRequires: tetex-latex +BuildRequires: latex-ucs +BuildRequires: latex-font-bera +BuildRequires: gsoap-devel +BuildRequires: jdk +Provides: kernelvboxdrv +Obsoletes: kernelvboxdrv +Requires(post):kernelheaders +Requires(post):dkms +Provides: virtualbox +Obsoletes: virtualbox +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +VirtualBox is a general-purpose full virtualizer for x86 hardware. +Targeted at server, desktop and embedded use, it is the professional-quality virtualization solution that is also Open Source Software. + +%package web +Summary: A service which allows to control VirtualBox from the Web +Group: Applications/Web +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description web +A service which allows to control VirtualBox from the Web. + +%package additions +Summary: VirtualBox Guest additions +Group: Applications/Emulators + +%description additions +VirtualBox Guest additions. + +%package additions-VBoxGuest +Summary: VirtualBox Guest additions ISO image +Group: Applications/Emulators +Provides: virtualbox-additions-VBoxGuest +Obsoletes: virtualbox-additions-VBoxGuest + +%description additions-VBoxGuest +VirtualBox Guest additions ISO image. + +%package -n xorg-drv-video-vboxvideo +Group: System/X11 +Summary: X.org video driver for VirtualBox guest machine +Provides: xorgdrvvideo +#Requires: kernelvboxvideo +Requires: xorg-server >= %{xorg_ver} +Requires: xorg-server <= %{xorg_ver}.255 + +%description -n xorg-drv-video-vboxvideo +X.org video driver for VirtualBox guest machine- + +%package -n xorg-drv-input-vboxmouse +Group: System/X11 +Summary: X.org mouse driver for VirtualBox guest machine +Provides: xorgdrvinput +Requires: xorg-server >= %{xorg_ver} +Requires: xorg-server <= %{xorg_ver}.255 + +%description -n xorg-drv-input-vboxmouse +X.org mouse driver for VirtualBox guest machine. + +%package vboxguest +Group: System/Kernel and Hardware +Summary: Kernel DRM driver for VirtualBox guest machines +Requires(post):dkms +Requires(post):kernelheaders +Provides: kernelvboxvideo +Obsoletes: kernelvboxvideo + +%description vboxguest +Kernel DRM driver for VirtualBox guest machines. + +%prep +%setup -q -a6 +#-D -T +#:<< _EOF +#%patch1 -p1 +#%patch2 -p1 +%patch3 -p1 + +%build +export CFLAGS="%optflags" +export CXXFLAGS="%optflags" +./configure \ + --disable-kmods \ + --disable-pulse \ + --disable-hardening \ + --with-gcc=%{_host}-gcc \ + --with-g++=%{_host}-g++ \ + --enable-vnc \ +%if "%{stage1}" == "1" + --disable-java +%endif + +# --enable-webservice \ + +. ./env.sh + +kmk %{?_smp_mflags} VBOX_GCC_WERR= \ + VBOX_VERSION_STRING='$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)'_openmamba \ + VBOX_JAVA_HOME=%{_jvmdir}/jdk \ + EB_LD=ld.bfd + +## files that needs editing before they can be included in the generic installer. +#sed "s|\%NOLSB\%|yes|g; \ +# s|\%DEBIAN\%||g; \ +# s|\%PACKAGE\%|virtualbox|g" src/VBox/Installer/linux/vboxballoon-service.sh.in > \ +# src/VBox/Installer/linux/vboxballoon-service.sh + +#sed "s|\%NOLSB\%|yes|g; \ +# s|\%DEBIAN\%||g; \ +# s|lfs-release|openmamba-release|g; \ +# s|\%PACKAGE\%|virtualbox|g" src/VBox/Installer/linux/vboxweb-service.sh.in > \ +# src/VBox/Installer/linux/vboxweb-service.sh + +# build vdfuse +cd vdfuse +sh ./vdbuild_new ../include/ vdfuse.c +cd .. + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +install -d %{buildroot}/opt/%{name} +cp -a out/*/release/bin/* %{buildroot}/opt/%{name} + +install -d %{buildroot}%{_libdir}/xorg/modules/drivers +mv %{buildroot}/opt/%{name}/additions/vboxvideo_drv_%{xorgdrvver}.so %{buildroot}%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so +rm -f %{buildroot}/opt/%{name}/additions/vboxvideo_drv* + +install -d %{buildroot}%{_libdir}/dri +mv %{buildroot}/opt/%{name}/additions/VBoxOGL.so %{buildroot}%{_libdir}/dri/vboxvideo_dri.so + +#install -d %{buildroot}%{_libdir}/xorg/modules/input +#mv %{buildroot}/opt/%{name}/additions/vboxmouse_drv_%{xorgdrvver}.so* %{buildroot}%{_libdir}/xorg/modules/input/vboxmouse_drv.so +rm -f %{buildroot}/opt/%{name}/additions/vboxmouse_drv* + +# install desktop menu icon +install -d %{buildroot}%{_datadir}/pixmaps/ +cp %{buildroot}/opt/%{name}/VBox.png %{buildroot}%{_datadir}/pixmaps/VBox.png + +# install service +install -D -m 755 %{S:2} %{buildroot}%{_initrddir}/%{name} + +## install modprobe file +#install -D -m 644 %{S:5} %{buildroot}%{_sysconfdir}/modprobe.d/vboxdrv.conf + +# fixup strange shared library permissions +for library in $(find %{buildroot}/opt/%{name} -name \*.so); do + chmod 755 $library +done + +# install wrappers +install -d %{buildroot}%{_sysconfdir}/vbox +cat > %{buildroot}%{_sysconfdir}/vbox/vbox.cfg << EOF + +# VirtualBox installation directory +INSTALL_DIR="/opt/%{name}" +EOF +install -m 755 %{S:1} %{buildroot}/opt/%{name}/vbox-run.sh +install -d %{buildroot}%{_bindir} %{buildroot}%{_sbindir} +ln -s /opt/%{name}/vbox-run.sh %{buildroot}%{_bindir}/VirtualBox +ln -s /opt/%{name}/vbox-run.sh %{buildroot}%{_bindir}/VBoxManage +ln -s /opt/%{name}/vbox-run.sh %{buildroot}%{_bindir}/VBoxSDL +ln -s /opt/%{name}/vbox-run.sh %{buildroot}%{_bindir}/vditool + +# vboxwebsrv +ln -s /opt/%{name}/vboxwebsrv %{buildroot}%{_bindir}/vboxwebsrv +install -D -m0755 src/VBox/Installer/linux/vboxweb-service.sh %{buildroot}%{_initrddir}/vboxweb-service + +#install -D -m0755 src/VBox/Installer/linux/vboxballoonctrl-service.sh.in %{buildroot}%{_initrddir}/vboxballoon-service + +# install udev rules +install -d %{buildroot}/lib/udev/rules.d/ +cat > %{buildroot}/lib/udev/rules.d/59-vboxdrv.rules << EOF +KERNEL=="vboxdrv", MODE="0666" +SUBSYSTEM=="usb_device", ACTION=="add", RUN="VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" +SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN="VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" +SUBSYSTEM=="usb_device", ACTION=="remove", RUN="VBoxCreateUSBNode.sh --remove $major $minor" +SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN="VBoxCreateUSBNode.sh --remove $major $minor" +EOF + +install -d -m0755 %{buildroot}/lib/udev/ +mv %{buildroot}/opt/VirtualBox/VBoxCreateUSBNode.sh \ + %{buildroot}/lib/udev/VBoxCreateUSBNode.sh + +# install icons +for size in 16 32 48 64; do + install -D -m 644 src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_${size}px.png \ + %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/%{name}.png +done + +# install menu entry +install -D -m 644 %{S:3} %{buildroot}%{_datadir}/applications/%{name}.desktop + +# install VirtualBox Guest Additions +install -m 644 %{S:4} %{buildroot}/opt/%{name}/additions/VBoxGuestAdditions.iso + +# remove unpackaged files +rm -rf %{buildroot}/opt/%{name}/{src,sdk,testcase} +rm -rf %{buildroot}/opt/%{name}/additions/src +rm -f %{buildroot}/opt/%{name}/tst* +#rm -f %{buildroot}/opt/%{name}/*.ko + +rm -rf %{buildroot}/opt/%{name}/VBoxPython2_4.so + +# install additions +mv %{buildroot}/opt/%{name}/additions/VBoxOGL*.so %{buildroot}%{_libdir}/ +mv %{buildroot}/opt/%{name}/additions/vboxadd-service %{buildroot}%{_initrddir}/vboxadd +install -d -m 0755 %{buildroot}%{_sbindir} +mv %{buildroot}/opt/%{name}/additions/{VBoxService,VBoxClient,VBoxControl} %{buildroot}%{_sbindir}/ + +# install suspend configuration file to fix suspend/hibernate since 4.1.0 +install -d -m0755 %{buildroot}%{_sysconfdir}/pm/config.d/ +cat >> %{buildroot}%{_sysconfdir}/pm/config.d/vboxdrv << _EOF +SUSPEND_MODULES="vboxdrv" +_EOF + +install -d -m0755 %{buildroot}%{_sysconfdir}/default +cat > %{buildroot}%{_sysconfdir}/default/virtualbox << _EOF +VBOXWEB_USER=root +_EOF + +#make -C out/linux.%virtualbox_arch/release/bin/src/ \ +# KERN_DIR=%{_prefix}/src/linux-%{kernel_version}%{?KERNEL_TARGET} +#make -C out/linux.%virtualbox_arch/release/bin/additions/src/vboxvideo \ +# KERN_DIR=%{_prefix}/src/linux-%{kernel_version}%{?KERNEL_TARGET} +#make -C out/linux.%virtualbox_arch/release/bin/additions/src/vboxguest \ +# KERN_DIR=%{_prefix}/src/linux-%{kernel_version}%{?KERNEL_TARGET} +#/lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/kernel/drivers/virtualbox/vboxdrv.ko +#/lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/kernel/drivers/virtualbox/vboxnetadp.ko +#/lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/kernel/drivers/virtualbox/vboxnetflt.ko +#/lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/kernel/drivers/virtualbox/vboxpci.ko + +# dkms +install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version} +cp -a out/linux.%virtualbox_arch/release/bin/src/* %{buildroot}%{_prefix}/src/%{name}-%{version}/ + +cat > %{buildroot}%{_prefix}/src/%{name}-%{version}/dkms.conf << _EOF +PACKAGE_NAME=%{name} +PACKAGE_VERSION=%{version} +MAKE="make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build modules" +CLEAN="make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build clean" +BUILT_MODULE_NAME[0]=vboxdrv +BUILT_MODULE_NAME[1]=vboxnetadp +BUILT_MODULE_NAME[2]=vboxnetflt +BUILT_MODULE_NAME[3]=vboxpci +BUILT_MODULE_LOCATION[0]=./vboxdrv/ +BUILT_MODULE_LOCATION[1]=./vboxnetadp/ +BUILT_MODULE_LOCATION[2]=./vboxnetflt/ +BUILT_MODULE_LOCATION[3]=./vboxpci/ +DEST_MODULE_LOCATION[0]=/kernel/drivers/virtualbox +DEST_MODULE_LOCATION[1]=/kernel/drivers/virtualbox +DEST_MODULE_LOCATION[2]=/kernel/drivers/virtualbox +DEST_MODULE_LOCATION[3]=/kernel/drivers/virtualbox +REMAKE_INITRD=no +AUTOINSTALL=yes +_EOF + +# dkms for vboxvideo +install -d -m0755 %{buildroot}%{_prefix}/src/vboxvideo-%{version} +cp -a out/linux.%virtualbox_arch/release/bin/additions/src/vboxvideo/* %{buildroot}%{_prefix}/src/vboxvideo-%{version}/ + +cat > %{buildroot}%{_prefix}/src/vboxvideo-%{version}/dkms.conf << _EOF +PACKAGE_NAME=%{name} +PACKAGE_VERSION=%{version} +MAKE="make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/vboxvideo/\${PACKAGE_VERSION}/build modules" +CLEAN="make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/vboxvideo/\${PACKAGE_VERSION}/build clean" +BUILT_MODULE_NAME=vboxvideo +BUILT_MODULE_LOCATION=./ +DEST_MODULE_LOCATION=/kernel/drivers/virtualbox +REMAKE_INITRD=no +AUTOINSTALL=yes +_EOF + +# dkms for vboxguest +install -d -m0755 %{buildroot}%{_prefix}/src/vboxguest-%{version} +cp -a out/linux.%virtualbox_arch/release/bin/additions/src/vboxguest/* %{buildroot}%{_prefix}/src/vboxguest-%{version}/ + +cat > %{buildroot}%{_prefix}/src/vboxguest-%{version}/dkms.conf << _EOF +PACKAGE_NAME=%{name} +PACKAGE_VERSION=%{version} +MAKE="make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/vboxguest/\${PACKAGE_VERSION}/build modules" +CLEAN="make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/vboxguest/\${PACKAGE_VERSION}/build clean" +BUILT_MODULE_NAME=vboxguest +BUILT_MODULE_LOCATION=./ +DEST_MODULE_LOCATION=/kernel/drivers/virtualbox +REMAKE_INITRD=no +AUTOINSTALL=yes +_EOF + +# install vdfuse binary +install -m0755 vdfuse/vdfuse %{buildroot}%{_bindir}/vdfuse + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%pre +if [ $1 -ge 1 ]; then + %{_sbindir}/groupadd vboxusers -g %{vboxusers_groupid} 2>/dev/null +fi +: + +%post +# new install +if [ $1 -eq 1 ]; then + systemctl daemon-reload + systemctl enable %{name} + systemctl start %{name} +fi +/sbin/ldconfig +: + +%preun +# erase +dkms remove -q -m %{name} -v 4.2.10 --all || true +dkms remove -q -m %{name} -v 4.2.12 --all || true +dkms remove -q -m %{name} -v 4.2.14 --all || true +dkms remove -q -m %{name} -v 4.2.16 --all || true +dkms remove -q -m %{name} -v 4.2.18 --all || true +if [ $1 -eq 0 ]; then + %{_sbindir}/groupdel vboxusers 2>/dev/null + dkms remove -q -m %{name} -v %{version} --all + systemctl stop %{name} + systemctl disable %{name} +fi +: + +%postun +# upgrade +if [ $1 -eq 1 ]; then + systemctl try-restart %{name} +fi +: + +%post web +# new install +if [ $1 -eq 1 ]; then + systemctl daemon-reload + systemctl enable vboxweb-service + systemctl start vboxweb-service start +fi +: + +%preun web +# erase +if [ $1 -eq 0 ]; then + systemctl stop vboxweb-service + systemctl disable vboxweb-service +fi +: + +%postun web +# upgrade +if [ $1 -eq 1 ]; then + systemctl restart vboxweb-service +fi +: + +%preun vboxguest +# erase +dkms remove -q -m vboxguest -v 4.2.10 --all +dkms remove -q -m vboxvideo -v 4.2.10 --all +dkms remove -q -m vboxguest -v 4.2.12 --all +dkms remove -q -m vboxvideo -v 4.2.12 --all +dkms remove -q -m vboxguest -v 4.2.14 --all +dkms remove -q -m vboxvideo -v 4.2.14 --all +dkms remove -q -m vboxguest -v 4.2.16 --all +dkms remove -q -m vboxvideo -v 4.2.16 --all +dkms remove -q -m vboxguest -v 4.2.18 --all +dkms remove -q -m vboxvideo -v 4.2.18 --all +if [ $1 -eq 0 ]; then + dkms remove -q -m vboxguest -v %{version} --all + dkms remove -q -m vboxvideo -v %{version} --all +fi +: + +%posttrans +if [ $1 -ge 1 ]; then + dkms add -q -m %{name} -v %{version} + dkms install -q -m %{name} -v %{version} --force +fi +: + +%posttrans vboxguest +if [ $1 -ge 1 ]; then + dkms add -q -m vboxguest -v %{version} + dkms add -q -m vboxvideo -v %{version} + dkms install -q -m vboxguest -v %{version} --force + dkms install -q -m vboxvideo -v %{version} --force +fi +: + +%files +%defattr(-,root,root) +%dir %{_prefix}/src/%{name}-%{version}/ +%{_prefix}/src/%{name}-%{version}/* +%config %{_sysconfdir}/vbox/vbox.cfg +%config(noreplace) %{_sysconfdir}/default/virtualbox +%{_sysconfdir}/pm/config.d/vboxdrv +#%{_sysconfdir}/modprobe.d/vboxdrv.conf +%{_initrddir}/%{name} +#%{_initrddir}/vboxballoon-service +%{_bindir}/VBoxManage +%{_bindir}/VBoxSDL +%{_bindir}/VirtualBox +%{_bindir}/vdfuse +%{_bindir}/vditool +/lib/udev/rules.d/59-vboxdrv.rules +/lib/udev/VBoxCreateUSBNode.sh +%dir /opt/%{name} +/opt/%{name}/DBGCPlugInDiggers.so +#/opt/%{name}/EfiThunk +/opt/%{name}/SUPInstall +/opt/%{name}/SUPUninstall +/opt/%{name}/VBox* +/opt/%{name}/VMMGC.gc +/opt/%{name}/VMMR0.r0 +/opt/%{name}/VMMGC.debug +/opt/%{name}/VMMR0.debug +/opt/%{name}/iPxeBaseBin +/opt/%{name}/VirtualBox +%dir /opt/%{name}/components +/opt/%{name}/components/VBox*.so +/opt/%{name}/components/VBoxXPCOMBase.xpt +/opt/%{name}/components/VirtualBox_XPCOM.xpt +%dir /opt/VirtualBox/ExtensionPacks +%dir /opt/VirtualBox/ExtensionPacks/VNC +/opt/VirtualBox/ExtensionPacks/VNC/* +%dir /opt/VirtualBox/dtrace +%dir /opt/VirtualBox/dtrace/lib +/opt/VirtualBox/dtrace/lib/* +%dir /opt/VirtualBox/dtrace/testcase +/opt/VirtualBox/dtrace/testcase/* +%dir /opt/%{name}/helpers +/opt/%{name}/helpers/generate_service_file +%dir /opt/%{name}/icons +/opt/%{name}/icons/* +%if "%{stage1}" != "1" +/opt/%{name}/libvboxjxpcom.so +%endif +/opt/%{name}/load.sh +/opt/%{name}/loadall.sh +%dir /opt/%{name}/nls +/opt/%{name}/nls/VirtualBox_*.qm +/opt/%{name}/nls/qt_*.qm +%dir /opt/%{name}/scripts +/opt/%{name}/scripts/* +#/opt/%{name}/scm +#/opt/%{name}/nls3/qt_*.qm +#/opt/%{name}/nls3/VirtualBox_*.qm +/opt/%{name}/SUPLoggerCtl +/opt/%{name}/UserManual.pdf +#/opt/%{name}/webtest +%lang(fr) /opt/%{name}/UserManual_fr_FR.pdf +/opt/%{name}/vbox-img +/opt/%{name}/vbox-run.sh +/opt/%{name}/vboxkeyboard.tar.bz2 +/opt/%{name}/vboxshell.py +/opt/%{name}/virtualbox.desktop +/opt/%{name}/virtualbox.xml +/opt/%{name}/xpidl +%{_datadir}/icons/hicolor/*/apps/%{name}.png +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/VBox.png +%doc COPYING + +#%files -n xorg-drv-input-vboxmouse +#%defattr(-,root,root) +#%{_libdir}/xorg/modules/input/vboxmouse_drv.so + +%files web +%defattr(-,root,root) +%{_initrddir}/vboxweb-service +%{_bindir}/vboxwebsrv +#/opt/%{name}/vboxwebsrv + +%files -n xorg-drv-video-vboxvideo +%defattr(-,root,root) +%{_libdir}/dri/vboxvideo_dri.so +%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so + +%files additions +%defattr(-,root,root) +%{_initrddir}/vboxadd +%{_libdir}/VBoxOGL*.so +%{_sbindir}/VBoxClient +%{_sbindir}/VBoxControl +%{_sbindir}/VBoxService +/opt/%{name}/additions/autorun.sh +/opt/%{name}/additions/mount.vboxsf +/opt/%{name}/additions/pam_vbox.so +/opt/%{name}/additions/runasroot.sh +/opt/%{name}/additions/vboxadd* + +%files additions-VBoxGuest +%defattr(-,root,root) +/opt/%{name}/additions/VBoxGuestAdditions.iso + +%files vboxguest +%defattr(-,root,root) +%dir %{_prefix}/src/vboxguest-%{version} +%{_prefix}/src/vboxguest-%{version}/* +%dir %{_prefix}/src/vboxvideo-%{version} +%{_prefix}/src/vboxvideo-%{version}/* + +%changelog +* Thu Apr 17 2014 Silvan Calarco 4.3.10-2mamba +- added vdfuse + +* Thu Mar 27 2014 Automatic Build System 4.3.10-1mamba +- automatic version update by autodist + +* Wed Feb 26 2014 Automatic Build System 4.3.8-1mamba +- automatic version update by autodist + +* Sat Feb 15 2014 Automatic Build System 4.3.6-1mamba +- automatic version update by autodist + +* Sun Sep 08 2013 Silvan Calarco 4.2.18-3mamba +- xorg-drv-video-vboxvideo: don't require kernelvboxvideo to ease livecd installation + +* Sat Sep 07 2013 Silvan Calarco 4.2.18-2mamba +- dkms: remove previous version and force installation + +* Fri Sep 06 2013 Automatic Build System 4.2.18-1mamba +- automatic version update by autodist + +* Sun Aug 11 2013 Silvan Calarco 4.2.16-4mamba +- install VBoxCreateUSBNode.sh under /lib/udev +- update udev rules to use VBoxCreateUSBNode.sh for usb support after /proc/bus/usb obsoletion +- add vboxusers group used by /lib/udev/VBoxCreateUSBNode.sh + +* Fri Jul 12 2013 Silvan Calarco 4.2.16-3mamba +- dkms: don't remove in postun for current version; use %posttrans; systemd support + +* Tue Jul 09 2013 Silvan Calarco 4.2.16-2mamba +- initscript: mount /proc/bus/usb here as systemd refuses to do it because it is deprecated + +* Fri Jul 05 2013 Automatic Build System 4.2.16-1mamba +- automatic version update by autodist + +* Sat Jun 22 2013 Automatic Build System 4.2.14-1mamba +- automatic version update by autodist + +* Sat Jun 01 2013 Silvan Calarco 4.2.12-3mamba +- python 2.7 mass rebuild + +* Sun Apr 14 2013 Silvan Calarco 4.2.12-2mamba +- correctly remove dkms modules in preun script; legacy fix explicitely by removing 4.2.10 + +* Fri Apr 12 2013 Automatic Build System 4.2.12-1mamba +- automatic version update by autodist + +* Mon Apr 08 2013 Silvan Calarco 4.2.10-2mamba +- rebuilt as a single userspace + kernel package with dkms support + +* Fri Mar 22 2013 Automatic Build System 4.2.10-1mamba +- automatic version update by autodist + +* Thu Mar 07 2013 Automatic Build System 4.2.8-1mamba +- automatic version update by autodist + +* Fri Jan 18 2013 Silvan Calarco 4.2.6-2mamba +- restore udev file for vboxdrv + +* Thu Dec 20 2012 Automatic Build System 4.2.6-1mamba +- automatic version update by autodist + +* Mon Nov 26 2012 Automatic Build System 4.2.4-1mamba +- automatic version update by autodist + +* Wed Oct 10 2012 Silvan Calarco 4.2.0-2mamba +- rebuil with 3.4.12 (fix crashes?) + +* Fri Sep 14 2012 Automatic Build System 4.2.0-1mamba +- automatic version update by autodist + +* Sat Sep 08 2012 Automatic Build System 4.1.22-1mamba +- automatic version update by autodist + +* Wed Aug 22 2012 Automatic Build System 4.1.20-1mamba +- automatic version update by autodist + +* Thu Jun 28 2012 Automatic Build System 4.1.18-1mamba +- automatic version update by autodist + +* Mon May 28 2012 Silvan Calarco 4.1.16-1mamba +- update to 4.1.16 + +* Tue Feb 14 2012 Silvan Calarco 4.1.8-3mamba +- remove modprobe.d rule for loading vboxnetflt; load from initscript to avoid infinite loop with kmod >=5 + +* Sun Feb 12 2012 Silvan Calarco 4.1.8-2mamba +- automatic update by autodist + +* Tue Dec 20 2011 Automatic Build System 4.1.8-1mamba +- automatic version update by autodist + +* Sat Nov 05 2011 Automatic Build System 4.1.6-1mamba +- automatic version update by autodist + +* Tue Nov 01 2011 Silvan Calarco 4.1.4-3mamba +- install vboxwebsrv initscript + +* Sun Oct 23 2011 Silvan Calarco 4.1.4-2mamba +- rebuilt with --enablewebservice and --enablevnc + +* Fri Oct 14 2011 Automatic Build System 4.1.4-1mamba +- automatic version update by autodist + +* Fri Sep 30 2011 Silvan Calarco 4.1.2-4mamba +- rebuilt after kernel configuration change (3.0.4-3mamba) + +* Sun Sep 04 2011 Silvan Calarco 4.1.2-3mamba +- automatic update by autodist + +* Fri Aug 19 2011 Silvan Calarco 4.1.2-2mamba +- automatic update by autodist + +* Mon Aug 15 2011 Automatic Build System 4.1.2-1mamba +- automatic version update by autodist + +* Sat Aug 13 2011 Silvan Calarco 4.1.0-2mamba +- added /etc/pm/config.d/vboxdrv to fix suspend + +* Tue Jul 19 2011 Automatic Build System 4.1.0-1mamba +- automatic update by autodist + +* Sat Jul 16 2011 Automatic Build System 4.0.12-1mamba +- automatic update by autodist + +* Tue Jun 28 2011 Automatic Build System 4.0.10-1mamba +- automatic update by autodist + +* Tue Jun 14 2011 Silvan Calarco 4.0.8-5mamba +- fix vboxguest.ko build + +* Thu Jun 09 2011 Silvan Calarco 4.0.8-4mamba +- added vboxguest.ko and VirtualBox-additions for guest only installations + +* Mon May 30 2011 Silvan Calarco 4.0.8-3mamba +- modprobe: add remove code in vboxdrv.conf to fix init script stop/restart + +* Sat May 28 2011 Silvan Calarco 4.0.8-2mamba +- enable ffmpeg fb for capturing using VBoxHeadless +- set distribution in build string (see http://www.virtualbox.org/wiki/Editions) + +* Tue May 17 2011 Automatic Build System 4.0.8-1mamba +- automatic update by autodist + +* Mon May 09 2011 Automatic Build System 4.0.6-1mamba +- automatic update by autodist + +* Wed Apr 20 2011 Silvan Calarco 4.0.4-2mamba +- kernel 2.6.38 rebuild + +* Mon Feb 21 2011 Automatic Build System 4.0.4-1mamba +- automatic update by autodist + +* Mon Feb 07 2011 Silvan Calarco 4.0.2-1mamba +- update to 4.0.2 + +* Sun Dec 26 2010 Automatic Build System 4.0.0-1mamba +- update to 4.0.0 + +* Thu Dec 16 2010 Silvan Calarco 3.2.10-5mamba +- automatic rebuild by autodist + +* Sun Nov 21 2010 Silvan Calarco 3.2.10-4mamba +- rebuilt + +* Thu Nov 18 2010 Silvan Calarco 3.2.10-3mamba +- install and rename properly only the video driver for current X.org release (1.7) + +* Mon Nov 15 2010 Silvan Calarco 3.2.10-2mamba +- added DRM kernel module, xorg-drv-video-vboxvideo and xorg-drv-input-vboxmouse + +* Tue Oct 12 2010 Automatic Build System 3.2.10-1mamba +- automatic update to 3.2.10 by autodist + +* Tue Sep 14 2010 Silvan Calarco 3.2.8-3mamba +- fix kernel version in depmod + +* Tue Aug 10 2010 Silvan Calarco 3.2.8-2mamba +- run depmod in kernel module post and postun scripts + +* Sat Aug 07 2010 Automatic Build System 3.2.8-1mamba +- automatic update to 3.2.8 by autodist + +* Sat Jun 26 2010 Automatic Build System 3.2.6-1mamba +- automatic update to 3.2.6 by autodist + +* Tue Jun 08 2010 Automatic Build System 3.2.4-1mamba +- automatic update to 3.2.4 by autodist + +* Thu Jun 03 2010 Automatic Build System 3.2.2-1mamba +- automatic update to 3.2.2 by autodist + +* Mon May 31 2010 Automatic Build System 3.2.0-1mamba +- automatic update to 3.2.0 by autodist + +* Mon May 10 2010 Automatic Build System 3.1.8-1mamba +- automatic update to 3.1.8 by autodist + +* Mon Mar 29 2010 Automatic Build System 3.1.6-1mamba +- automatic update to 3.1.6 by autodist + +* Tue Mar 09 2010 Silvan Calarco 3.1.4-2mamba +- automatic rebuild by autodist + +* Sat Feb 13 2010 Automatic Build System 3.1.4-1mamba +- automatic update to 3.1.4 by autodist + +* Sat Dec 26 2009 Silvan Calarco 3.1.2-2mamba +- automatic rebuild by autodist + +* Fri Dec 18 2009 Automatic Build System 3.1.2-1mamba +- automatic update to 3.1.2 by autodist + +* Tue Dec 01 2009 Automatic Build System 3.1.0-1mamba +- automatic update to 3.1.0 by autodist + +* Thu Nov 19 2009 Automatic Build System 3.0.12-1mamba +- automatic update to 3.0.12 by autodist + +* Thu Oct 29 2009 Automatic Build System 3.0.10-1mamba +- automatic update to 3.0.10 by autodist + +* Mon Oct 26 2009 Silvan Calarco 3.0.8-3mamba +- removed python 2.4 binding + +* Sun Oct 11 2009 Silvan Calarco 3.0.8-2mamba +- fixed icon in menu entry + +* Tue Oct 06 2009 Automatic Build System 3.0.8-1mamba +- automatic update to 3.0.8 by autodist + +* Mon Sep 28 2009 Automatic Build System 3.0.6-1mamba +- automatic update to 3.0.6 by autodist + +* Sat Aug 22 2009 Silvan Calarco 3.0.4-3mamba +- fixed kernel modules build + +* Thu Aug 06 2009 Silvan Calarco 3.0.4-2mamba +- move kernel module build from kernel-extramodules + +* Wed Aug 05 2009 Automatic Build System 3.0.4-1mamba +- automatic update to 3.0.4 by autodist + +* Sun Jul 12 2009 Automatic Build System 3.0.2-1mamba +- automatic update to 3.0.2 by autodist + +* Sun Jul 12 2009 Automatic Build System 3.0.2-1mamba +- automatic update to 3.0.2 by autodist + +* Wed Jul 01 2009 Automatic Build System 3.0.0-1mamba +- automatic update to 3.0.0 by autodist + +* Sat May 30 2009 Automatic Build System 2.2.4-1mamba +- automatic update to 2.2.4 by autodist + +* Tue Apr 28 2009 Automatic Build System 2.2.2-1mamba +- automatic update to 2.2.2 by autodist + +* Thu Apr 09 2009 Silvan Calarco 2.2.0-1mamba +- automatic update to 2.2.0 by autodist + +* Wed Feb 18 2009 Silvan Calarco 2.1.4-2mamba +- rebuilt with option --disable-hardening + +* Tue Feb 17 2009 Silvan Calarco 2.1.4-1mamba +- automatic update to 2.1.4 by autodist + +* Mon Jan 26 2009 Silvan Calarco 2.1.2-1mamba +- automatic update to 2.1.2 by autodist + +* Mon Dec 22 2008 Silvan Calarco 2.1.0-1mamba +- automatic update to 2.1.0 by autodist + +* Mon Nov 24 2008 Silvan Calarco 2.0.6-1mamba +- automatic update to 2.0.6 by autodist + +* Tue Nov 18 2008 Silvan Calarco 2.0.4-1mamba +- automatic update to 2.0.4 by autodist + +* Thu Sep 25 2008 Silvan Calarco 2.0.2-1mamba +- automatic update to 2.0.2 by autodist + +* Tue Sep 02 2008 Silvan Calarco 1.6.6-1mamba +- update to 1.6.6 + +* Mon Jun 09 2008 Silvan Calarco 1.6.2-1mamba +- update to 1.6.2 +- moved VBoxGuestAddition ISO to separate package + +* Tue May 06 2008 Aleph0 1.6.0-1mamba +- update to 1.6.0 +- install VirtualBox Guest Additions iso image + +* Wed Mar 19 2008 Silvan Calarco 1.5.6-1mamba +- update to 1.5.6 + +* Thu Oct 18 2007 Silvan Calarco 1.5.2-1mamba +- update to 1.5.2 + +* Fri May 04 2007 Stefano Cotta Ramusino 1.4.0-1mamba +- package created by autospec