Sisyphus repository
Last update: 8 april 2020 | SRPMs: 17561 | Visits: 17849715
en ru br
ALT Linux repos
5.0: 3.0.4-alt0.M50.1
4.1: 2.1.4-alt0.M41.5

Group :: Emulators
RPM: virtualbox

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#define rev 2459
%define modname kernel-source-virtualbox
%define modnameadd kernel-source-virtualbox-addition
%define modnamevfs kernel-source-virtualbox-vfs
%define vboxdir %_libdir/virtualbox

%set_verify_elf_method textrel=relaxed
%add_findprov_lib_path %vboxdir
#%%add_findreq_skiplist %vboxdir/*

%define distname VirtualBox

%ifarch %ix86
%define vbox_platform linux.x86
%define build_additions 1
%ifarch x86_64
%define vbox_platform linux.amd64
%define build_additions 0

Name: virtualbox
Version: 1.6.6
Release: alt0.M40.2%{?rev:.r%{rev}}

Summary: A general-purpose full virtualizer for x86 hardware
License: GPL
Group: Emulators

ExclusiveArch: %ix86

Packager: Evgeny Sinelnikov <sin at>

%define distarchive %distname-%{version}_OSE
Source: %distarchive.tar.bz2

Source1: %name.control
Source2: %name.init
Source3: 98vboxadd-xclient
Source4: %name.rules
Source5: 60-vboxadd.perms
Source10: virtualbox.png
Source11: virtualbox.16.png
Source12: virtualbox.48.png
Source14: %name.desktop

Patch: VirtualBox-1.6.2-alt-rpath.patch
Patch1: VirtualBox-alt-init-scripts.diff

Patch10: vbox-futex.diff
Patch12: vbox-kmp-vboxadd.diff
Patch13: vbox-kmp-vboxvfs.diff
Patch14: %name-ose-init-scripts.diff
Patch16: virtualbox-gcc43-fixes.diff
Patch17: virtualbox-validate-op-gcc43.diff
Patch19: virtualbox-system-yasm.diff
Patch20: vbox-2.6.25.diff
Patch22: vbox-buildfix.diff
Patch23: virtualbox-use-intree-yasm.diff
Patch24: %name-ose-64issue.diff

BuildPreReq: dev86 gcc-c++ iasl libalsa-devel
BuildPreReq: libIDL-devel libSDL-devel
BuildPreReq: libxalan-c-devel libXcursor-devel libXext-devel
BuildPreReq: libqt3-devel xerces-c-devel xsltproc
BuildPreReq: kernel-build-tools
BuildPreReq: libpulseaudio-devel
BuildPreReq: libxml2-devel libxslt-devel libqt4-devel libstdc++-devel-static
BuildPreReq: yasm kBuild
%ifarch x86_64
BuildRequires: i586-gcc4.1 i586-libstdc++4.1-devel

InnoTek VirtualBox is a family of powerful x86 virtualization products
for enterprise as well as home use. Presently, VirtualBox runs on
Windows and Linux 32-bit hosts and supports a large number of guest
operating systems including but not limited to Windows (NT 4.0, 2000,
XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and

%package guest-additions
Summary: Additions for VirtualBox OSE guest systems
Group: Emulators
Requires: xorg-x11-drv-vboxmouse
Requires: xorg-x11-drv-vboxvideo

%description guest-additions
This packages contains additions for VirtualBox OSE guest systems.
It allows to share files with the host system, copy/paste between
guest and host, and sync time with host.

%package -n %modname
Summary: Sources for VirtualBox module
Group: Development/Kernel
BuildArch: noarch

%description -n %modname
Sources for VirtualBox kernel module.

%package -n %modnameadd
Summary: Sources for VirtualBox module for OSE additions
Group: Development/Kernel
BuildArch: noarch

%description -n %modnameadd
Sources for VirtualBox kernel module for OSE additions.

%package -n %modnamevfs
Summary: Sources for VirtualBox module for OSE VFS
Group: Development/Kernel
BuildArch: noarch

%description -n %modnamevfs
Sources for VirtualBox kernel module for OSE VFS.

%package -n xorg-x11-drv-vboxmouse
Summary: The driver for mouse in VirtualBox guests
Group: System/X11
#Suggests: %name-guest-additions

%description -n xorg-x11-drv-vboxmouse
The driver for mouse in VirtualBox guests

%package -n xorg-x11-drv-vboxvideo
Summary: The driver for video in VirtualBox guests
Group: System/X11
#Suggests: %name-guest-additions

%description -n xorg-x11-drv-vboxvideo
The driver for video in VirtualBox guests

%package common
Summary: VirtualBox module support files
Group: System/Configuration/Other
# due to new_summary function and is_builtin_mode bugfix
PreReq: control >= 0.7.2-alt1
PreReq: shadow-utils
# due to /bin/mountpoint
PreReq: SysVinit

%description common
This package contains scripts and other support files which are
required to use the vboxdrv kernel module in the ALT Linux system.
The kernel module itself is not included - you need to install the
appropriate kernel-modules-virtualbox-* package for your kernel.

%package doc
Summary: VirtualBox documentation
Group: Documentation

%description doc
This package contains VirtualBox User Manual.

%setup -q -n %distarchive
%patch -p2
%patch1 -p2

# Patches from builds for Suse:

#ifarch x86_64
# this patch10 is taken from mandriva (i just adapt it to fit
# to the latest virtualbox-ose package)

## 0.6.2 in state is apparently too new - needs 0.6.0 specifically
%patch20 -p1
%patch22 -p1

./configure \
   --disable-kmods \
   --with-qt-dir=%_qt3dir \
   --with-qt4-dir=%_qt4dir \
%if "%build_additions" == "0"
echo "VBOX_WITH_X11_ADDITIONS        := " >> AutoConfig.kmk
kmk VBOXDIR=%vboxdir

mkdir -p %buildroot{%_bindir,%_sbindir,%vboxdir,%kernel_src,%_initrddir,%_sysconfdir/udev/rules.d}

# install common

install -Dp %SOURCE1 %buildroot%_controldir/%name
install -Dp %SOURCE2 %buildroot%_initdir/%name
install -Dp -m644 %SOURCE4 \

%if %build_additions
# install additions from src
install -m755 src/VBox/Additions/linux/installer/ %buildroot%_initrddir/vboxadd-timesync

# copy additional scripts

install -m 755 src/VBox/Installer/linux/ %buildroot%vboxdir
# create links for additional scripts
for n in VBoxAddIF VBoxDeleteIF; do
   ln -s $(relative %vboxdir/ %_bindir/$n) %buildroot%_bindir/$n

# install application

cd out/%vbox_platform/release/bin

#    SUPInstall \

#    SUPUninstall \
cp -a \
   VBoxBFE \
   VBoxManage \
   VBoxSDL \
   VBoxSVC \
   VBoxTunctl \
   VirtualBox \
   vditool \
   *.gc \
   *.r0 \
   *.so \
   *.xpt \
%if %build_additions
   additions/ \
   components/ \
   nls/ \

# create links

for n in VBoxBFE VBoxManage VBoxSDL VBoxSVC VirtualBox VBoxTunctl; do
   ln -s $(relative %vboxdir/$n %_bindir/$n) %buildroot%_bindir

# install kernel sources

cp -a src/ %buildroot%kernel_src/%modname-%version
pushd %buildroot%kernel_src
tar -c %modname-%version | bzip2 -c > \
rm -rf %buildroot%kernel_src/%modname-%version

%if %build_additions
# install additions
pushd additions
 install -d %buildroot/sbin
 install -m755 mountvboxsf %buildroot/sbin/mount.vboxsf
 install -m755 vboxadd-timesync %buildroot%_sbindir

 install -d %buildroot%_sysconfdir/X11/xinit.d
 install -m755 VBoxClient %buildroot%_bindir
 install -m755 %SOURCE3 %buildroot%_sysconfdir/X11/xinit.d

#install -pD -m644 *.so %buildroot%_libdir

# install additions kernel sources

 cp -a src/vboxadd %buildroot%kernel_src/%modnameadd-%version
 pushd %buildroot%kernel_src
 tar -c %modnameadd-%version | bzip2 -c > \
 rm -rf %buildroot%kernel_src/%modnameadd-%version

# install VFS kernel sources

 cp -a src/vboxvfs %buildroot%kernel_src/%modnamevfs-%version
 pushd %buildroot%kernel_src
 tar -c %modnamevfs-%version | bzip2 -c > \
 rm -rf %buildroot%kernel_src/%modnamevfs-%version

 install -d %buildroot%_sysconfdir/security/console.perms.d/
 install -m644 %SOURCE5 %buildroot%_sysconfdir/security/console.perms.d/

 install -d %buildroot%_sysconfdir/modprobe.d
 cat > %buildroot%_sysconfdir/modprobe.d/vbox-guest-additions << EOF

 install -d %buildroot%_x11modulesdir/{input,drivers}
 install %buildroot%_x11modulesdir/input/
 install %buildroot%_x11modulesdir/drivers/

# install icons

mkdir -p %buildroot%_iconsdir
install -m644 %SOURCE10 %buildroot%_iconsdir/%name.png
mkdir -p %buildroot%_miconsdir
install -m644 %SOURCE11 %buildroot%_miconsdir/%name.png
mkdir -p %buildroot%_liconsdir
install -m644 %SOURCE12 %buildroot%_liconsdir/%name.png

# install menu entries

mkdir -p %buildroot%_desktopdir
install -m644 %SOURCE14 %buildroot%_desktopdir/%name.desktop

# install docs

mkdir -p %buildroot%_defaultdocdir/%name-doc-%version
cp %SOURCE13 %buildroot%_defaultdocdir/%name-doc-%version/

%pre common
/usr/sbin/groupadd -r -f vboxusers
%pre_control %name

%post common
%post_control -s vboxusers %name
%post_service %name

%preun common
%preun_service %name

%triggerin common -- dev
# If using static /dev, select the same status again to fix permissions
mountpoint -q /dev || {
status="`/usr/sbin/control %name status`" || status=
[ -n "$status" ] && /usr/sbin/control %name "$status" ||:

%if %build_additions
%exclude %_bindir/VBoxClient
%dir %vboxdir

%files -n %modname

%if %build_additions
%files -n %modnameadd

%files -n %modnamevfs

%files -n xorg-x11-drv-vboxmouse

%files -n xorg-x11-drv-vboxvideo

%files guest-additions

%files common
%config %_sysconfdir/udev/rules.d/90-%name.rules

%files doc


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin