You are not logged in.

#1 2009-04-08 06:54:34

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

VirtualBox kernel 2.6.29 patch[SOLVED]

Hi,

I'm trying to build VirtualBox from AUR. I tried to apply the patch as instructed, got an error:

Verifying archive integrity... MD5 checksums are OK. All good.
patch: **** Can't open patch file /home/me/sandbox/abs/virtualbox_bin/src/virtualbox-kernel-2-6-29.patch : No such file or directory
==> ERROR: Build Failed.
    Aborting...

There's no such file indeed. I suppose the trouble is due to my lack of skills; unwilling to contaminate the AUR thread with dumb questions, I post here smile .

My PKGBUILD, modified according to instructions to the best of my ability smile :

# Maintainer: thotypous <matiasΘarchlinux-br·org>
# Contributor: Peter 'piie' Feuerer <peterΘpiie·net>
# Contributor: Sascha Pfau <MrPeacockΘgmail·com>
# Contributor: iggy <iggy.mfΘgmail·com>

pkgname="virtualbox_bin"
pkgver="2.1.4"
_build="43001"
pkgrel=2
pkgdesc="Powerful x86 virtualization (Personal Use Binaries Edition)"
url="http://www.virtualbox.org"
license=('custom:PUEL')
arch=('i686' 'x86_64')
install=('vbox.install')

md5sums=('8762a1c666af51e1b84f6b9ae53908dd'
         '9576c4ee3c362f7bc30525a4f07ea3ed')

_architect='x86'
[ "$CARCH" = "x86_64" ] && _architect='amd64'
[ "$CARCH" = "x86_64" ] && md5sums[0]='c07e44702c330796eefd897143a245ae'

source=("VirtualBox-${pkgver}-${_build}-Linux_${_architect}.run::http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}-${_build}-Linux_${_architect}.run"
        'vbox_build_module')

install=('vbox.install')
depends=('libstdc++5' 'libxcursor' 'gcc' 'make')
optdepends=("qt: For VirtualBox GUI"
            "sdl: For VBoxSDL")
provides=("virtualbox=${pkgver}")
conflicts=('virtualbox-ose' 'virtualbox-modules')

build() {
    # Check package
    sh "VirtualBox-${pkgver}-${_build}-Linux_${_architect}.run" --check || return 1

    # Unpack
    echo yes | sh "VirtualBox-${pkgver}-${_build}-Linux_${_architect}.run" --target "$srcdir" \
        --nox11 --noexec &>/dev/null || return 1

    mkdir -p \
        "$pkgdir/opt/virtualbox" \
        "$pkgdir/usr/bin" \
        "$pkgdir/etc/udev/rules.d" \
        "$pkgdir/etc/vbox" \
        "$pkgdir/usr/share/applications" \
        "$pkgdir/usr/share/pixmaps" || return 1

    cd "$pkgdir/opt/virtualbox"
    tar -jxf "$srcdir/VirtualBox.tar.bz2" || return 1
    
    # Patch needed to build the virtualbox modules under kernel 2.6.29
    patch -Np3 -i "${srcdir}/virtualbox-kernel-2-6-29.patch" || return 1

    # Mark set-user-ID-on-execution if release is marked as a hardened build.
    if egrep '^HARDENED="1"' "$srcdir/install.sh" &> /dev/null; then
        chmod 4511 "VirtualBox" "VBoxSDL" "VBoxHeadless"
        for _n in "VBoxVMM.so" "VBoxREM.so" "VBoxRT.so" "VBoxDDU.so" "VBoxXPCOM.so"; do
            ln -sf "/opt/virtualbox/${_n}" "components"
        done
        chmod go-w .
    fi

    # Replace VirtualBox built-in Qt by system Qt libraries.
    # Fixes problems with some KDE themes reported by users.
    rm "libVBoxQtCore.so.4" "libVBoxQtGui.so.4" "libVBoxQtNetwork.so.4"
    ln -s "/usr/lib/libQtCore.so.4" "libVBoxQtCore.so.4"
    ln -s "/usr/lib/libQtGui.so.4" "libVBoxQtGui.so.4"
    ln -s "/usr/lib/libQtNetwork.so.4" "libVBoxQtNetwork.so.4"

    # Install vbox_build_module
    install -D -m744 "$srcdir/vbox_build_module" "$pkgdir/usr/bin/vbox_build_module"

    # NOTE: Comment the following line if you want the SDK.
    rm -Rf "$pkgdir/opt/virtualbox/sdk"

    # Symlink the launchers
    for _app in "VirtualBox" "VBoxHeadless" "VBoxManage" "VBoxSDL" "VBoxSVC" "VBoxTunctl" "rdesktop-vrdp"; do
        ln -s "/opt/virtualbox/${_app}" "$pkgdir/usr/bin/${_app}"
    done

    # Symlink the desktop icon
    ln -s "/opt/virtualbox/VBox.png" "$pkgdir/usr/share/pixmaps/VBox.png"
    ln -s "/opt/virtualbox/VirtualBox.desktop" "$pkgdir/usr/share/applications/VirtualBox.desktop"

    # Replace some init scripts by simplified stuff
    sed -i -e 's,sudo /etc/init.d/vboxdrv setup,/usr/bin/vbox_build_module,g' "$pkgdir/opt/virtualbox/VBox.sh"
    sed -i -e 's,sudo /etc/init.d/virtualbox restart,modprobe vboxdrv,g' "$pkgdir/opt/virtualbox/VBox.sh"

    # Add udev rules
    echo 'KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"' > \
        "$pkgdir/etc/udev/rules.d/60-vboxdrv.rules"

    # Point the installation directory to vbox
    echo '# VirtualBox installation directory' > "$pkgdir/etc/vbox/vbox.cfg"
    echo 'INSTALL_DIR="/opt/virtualbox"'      >> "$pkgdir/etc/vbox/vbox.cfg"

    # Link the license
    mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
    ln -s "/opt/virtualbox/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/PUEL"

    # Link the directory because rdesktop-vrdp has a hardcoded path
    ln -s "/opt/virtualbox" "$pkgdir/opt/VirtualBox-${pkgver}"
}

Last edited by Llama (2009-04-08 09:09:10)

Offline

#2 2009-04-08 07:08:49

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: VirtualBox kernel 2.6.29 patch[SOLVED]

The patch file name is not in the source array, so it isn't being copied into the src directory.  You should add the file name to the source array and regenerate the md5sums.

Offline

#3 2009-04-08 07:50:39

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: VirtualBox kernel 2.6.29 patch[SOLVED]

peart wrote:

The patch file name is not in the source array, so it isn't being copied into the src directory.

I suspected something like that, but the patch file is nowhere to be found (?).


You should add the file name to the source array and regenerate the md5sums.

How am I supposed to do this?

Last edited by Llama (2009-04-08 07:51:00)

Offline

#4 2009-04-08 08:34:27

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: VirtualBox kernel 2.6.29 patch[SOLVED]

The patch is not needed.. Virtualbox builds and works fine here without it. If in doubt try my PKGBUILDs: http://users.archlinux.de/~pierre/packa … irtualbox/

Offline

#5 2009-04-08 09:07:50

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: VirtualBox kernel 2.6.29 patch[SOLVED]

Thanks, Pierre!

Turned out to be this problem.

Offline

Board footer

Powered by FluxBB