Package Details: virtualbox-kvm 20240828-1

Git Clone URL: https://aur.archlinux.org/virtualbox-kvm.git (read-only, click to copy)
Package Base: virtualbox-kvm
Description: Powerful x86 virtualization for enterprise as well as home use (KVM backend)
Upstream URL: https://github.com/cyberus-technology/virtualbox-kvm
Licenses: GPL, custom:CDDL
Conflicts: virtualbox, virtualbox-ose
Replaces: virtualbox-ose
Submitter: xyzzy
Maintainer: xyzzy (knoelli)
Last Packager: knoelli
Votes: 10
Popularity: 0.99
First Submitted: 2024-02-08 19:08 (UTC)
Last Updated: 2024-08-29 20:32 (UTC)

Dependencies (63)

Required by (0)

Sources (22)

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

galvez_65 commented on 2024-03-21 18:43 (UTC)

I just tried @knoelli proposed PKGBUILD (changing the linux headers from linux-zen-headers to linux-headers) and it appears to run fine. Note I would change the vboxver variable to _vboxver in alignment with current recommendations.

knoelli commented on 2024-03-09 21:02 (UTC)

The release scheme has been changed lately. They won't offer complete source packages anymore but rather a patch for the official VirtualBox source from Oracle. PKGBUILD needs to be updated to compile current and future versions. My suggestion:

# Maintainer: xyzzy

# Adapted from the official virtualbox package by
# Contributor: Christian Hesse <eworm@archlinux.org>
# Contributor: Sébastien "Seblu" Luttringer
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=virtualbox-kvm
pkgdesc='Powerful x86 virtualization for enterprise as well as home use (KVM backend)'
pkgver=20240307
_pkgver=dev-${pkgver}
pkgrel=1
vboxver='7.0.14'
conflicts=('virtualbox' 'virtualbox-ose')
depends=('curl' 'gcc-libs' 'glibc' 'liblzf' 'libpng' 'libtpms' 'libvpx' 'libx11' 'libxcursor'
            'libxext' 'libxinerama' 'libxml2' 'libxmu' 'libxt' 'openssl' 'procps-ng' 'python'
            'qt5-base' 'qt5-tools' 'qt5-x11extras' 'sdl' 'shared-mime-info' 'zlib')
optdepends=('vde2: Virtual Distributed Ethernet support'
            'virtualbox-guest-iso: Guest Additions CD image'
            'virtualbox-ext-vnc: VNC server support'
            'virtualbox-sdk: Developer kit')
backup=('etc/vbox/vbox.cfg')
replaces=('virtualbox-ose')
arch=('x86_64')
url='https://github.com/cyberus-technology/virtualbox-kvm'
vboxurl='https://download.virtualbox.org/virtualbox/'
license=('GPL' 'custom:CDDL')

makedepends=('alsa-lib' 'cdrkit' 'curl' 'device-mapper' 'git' 'glu' 'gsoap' 'glslang' 'iasl'
                'jdk8-openjdk' 'libidl2' 'liblzf' 'libpulse' 'libtpms' 'libvncserver' 'libvpx'
                'libxcomposite' 'libxcursor' 'libxinerama' 'libxml2' 'libxmu' 'libxrandr' 'libxslt'
                'libxtst' 'linux-zen-headers' 'mesa' 'python' 'qt5-base' 'qt5-tools' 'qt5-x11extras'
                'sdl' 'sdl_ttf' 'vde2' 'xorgproto' 'xorg-server-devel' 'yasm')

source=("${vboxurl}${vboxver}/VirtualBox-${vboxver}.tar.bz2"
    "${url}/releases/download/${_pkgver}/kvm-backend-7.0.14-${_pkgver}.patch"
        'virtualbox-host-dkms.conf'
        'virtualbox.sysusers'
        'virtualbox-guest-utils.sysusers'
        '60-vboxdrv.rules'
        '60-vboxguest.rules'
        'LocalConfig.kmk'
        'vboxservice.service'
        'vboxservice-nox.service'
        'vboxdrmclient.path'
        'vboxdrmclient.service'
        'vboxweb.service'
        'vboxreload'
        '001-disable-update.patch'
        '004-drop-Wno-format.patch'
        '008-no-vboxvideo.patch'
        '009-properly-handle-i3wm.patch'
        '012-vbglR3GuestCtrlDetectPeekGetCancelSupport.patch'
        '013-support-building-from-dkms.patch'
        '018-upate-xclient-script.patch'
        '019-libxml-2-12.patch')
sha256sums=('45860d834804a24a163c1bb264a6b1cb802a5bc7ce7e01128072f8d6a4617ca9'
        '667b517f0bf90f64fea96d294427319d223cd69d10373814dcf23bda29306725'
            '76d98ea062fcad9e5e3fa981d046a6eb12a3e718a296544a68b66f4b65cb56db'
            '2101ebb58233bbfadf3aa74381f22f7e7e508559d2b46387114bc2d8e308554c'
            'da4c49f6ca94e047e196cdbcba2c321199f4760056ea66e0fbc659353e128c9e'
            'f876e9f55243eded423fda4fc2ffe3b174dca90380a6315f7c9b3cd1c9d07206'
            '033c597e0f5285d2ddb0490868e5b6f945f45c7b1b1152a02a9e6fea438b2c95'
            '0ae014c6bb778a1b079121064f17179c27b8dde9479a37d34ce071fb3b084e25'
            'c41a801fe344a4471a7b61a4764d1d857c403e4fb96e2ba6bc89c77a35f2be7a'
            '01dbb921bd57a852919cc78be5b73580a564f28ebab2fe8d6c9b8301265cbfce'
            '83d8f24bff25bb925083cf39b3195236c6136105e62417712cc3f25b92e14b47'
            '2beab8de525220fa418c9873f9e0d657ddbad4ff9e4a46d7053e6cd9bc4ce95e'
            'e6e875ef186578b53106d7f6af48e426cdaf1b4e86834f01696b8ef1c685787f'
            '4001b5927348fe669a541e80526d4f9ea91b883805f102f7d571edbb482a9b9d'
            '9ee947c9b5ec5b25f52d3e72340fc3a57ca6e65a604e15b669ac582a3fb0dc1b'
            '7675f87d31ad3137f057dc3ee3d4a2c5b2cfe8cd362adba130ddbf7a65069516'
            '053bfeee8863f3ffdf2f0e3f9f0d77dc61dd32764700a97a7635fd8611e20491'
            'ad0d7af1e4c94f9efbc60827abea9e605398549b3673c40f697d042bb6bfe88a'
            '81900e13d36630488accd8c0bfd2ceb69563fb2c4f0f171caba1cca59d438024'
            '00f68b86d32a1fada900c2da8dad2ab4215106cd58004f049bded99727cda2ff'
            '87dddfd9047480e4c2b73367facf5dd3702148418c2efcd606af17c07da90fe0'
            '25271f26d897bb76ae2a39b6fdf10409acc929e2d424e34d1bd42014a42a0d31')

prepare() {
    cd "VirtualBox-${vboxver}"

    # apply patches from the source array
    local filename
    for filename in "${source[@]}"; do
        if [[ "${filename}" =~ \.patch$ ]]; then
            echo "Applying patch ${filename##*/}"
            patch -p1 -N -i "${srcdir}/${filename##*/}"
        fi
    done

    sed -i '/cstring/a #include <cstdint>' src/libs/dxvk-native-1.9.2a/src/util/util_bit.h

    echo 'Applying local config'
    cp "${srcdir}/LocalConfig.kmk" .

    echo 'Use our CFLAGS'
    echo "VBOX_GCC_OPT=$CXXFLAGS" >> LocalConfig.kmk
}

build() {
    cd "VirtualBox-${vboxver}"

    echo 'Build virtualbox-kvm'
    ./configure \
        --with-kvm \
        --disable-hardening \
        --disable-docs \
        --disable-kmods \
        --disable-vmmraw \
        --enable-vde \
        --enable-vnc \
        --enable-webservice \
        --with-makeself=/usr/bin/echo
    # fake makeself binary to compile without nofatal
    # makeself is used by linux installer. we don't need it.
    source ./env.sh
    kmk

    echo 'Build VNC extension pack'
    kmk -C src/VBox/ExtPacks/VNC packing
}

package() {
    source "VirtualBox-${vboxver}/env.sh"
    cd "VirtualBox-${vboxver}/out/linux.${BUILD_PLATFORM_ARCH}/release/bin"

    # libraries (and non-PATH executables)
    install -d -m0755 "${pkgdir}/usr/lib/virtualbox"
    install -m0755 *.so -t "${pkgdir}/usr/lib/virtualbox"
    install -m0644 *.r0 VBoxEFI*.fd -t "${pkgdir}/usr/lib/virtualbox"

    # binaries (in /usr/lib/virtualbox)
    install -m0755 \
        VirtualBoxVM \
        VBoxSDL \
        VBoxHeadless \
        VBoxNetAdpCtl \
        VBoxNetDHCP \
        VBoxNetNAT \
        VirtualBox \
        VBoxManage \
        VBoxSVC \
        VBoxExtPackHelperApp \
        VBoxXPCOMIPCD \
        VBoxTestOGL \
        VBoxBalloonCtrl \
        vbox-img \
        vboximg-mount \
        vboxwebsrv \
        webtest \
        -t "${pkgdir}/usr/lib/virtualbox"

    # binaries (in /usr/bin)
    install -d -m0755 "${pkgdir}/usr/bin"
    install -m0755 VBox.sh "${pkgdir}/usr/bin/VBox"
    for i in VirtualBox VirtualBoxVM VBoxManage VBoxSDL VBoxHeadless VBoxBugReport VBoxBalloonCtrl VBoxAutostart vboxwebsrv; do
        ln -sf VBox "${pkgdir}/usr/bin/${i}"
        ln -sf VBox "${pkgdir}/usr/bin/${i,,}"
    done
    for i in vbox-img vboximg-mount; do
        ln -s ../lib/virtualbox/"${i}" "${pkgdir}/usr/bin/${i}"
    done

    # components
    install -d -m0755 "${pkgdir}/usr/lib/virtualbox/components"
    install -m0755 components/* -t "${pkgdir}/usr/lib/virtualbox/components"

    # extension packs
    install -d -m0755 "${pkgdir}/usr/lib/virtualbox/ExtensionPacks"

    # languages
    install -d -m0755 "${pkgdir}/usr/share/virtualbox/nls"
    install -m0755 nls/*.qm -t "${pkgdir}/usr/share/virtualbox/nls"

    # scripts
    install -m0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh -t "${pkgdir}/usr/share/virtualbox"

    # icons
    install -D -m0644 VBox.png "${pkgdir}/usr/share/pixmaps/VBox.png"
    pushd icons >/dev/null
    for i in *; do
        install -d "${pkgdir}/usr/share/icons/hicolor/${i}/mimetypes"
        cp "${i}/"* "${pkgdir}/usr/share/icons/hicolor/${i}/mimetypes"
    done
    popd >/dev/null

    # desktop
    install -D -m0644 virtualbox.desktop "${pkgdir}/usr/share/applications/virtualbox.desktop"
    install -D -m0644 virtualbox.xml "${pkgdir}/usr/share/mime/packages/virtualbox.xml"

    # install configuration
    install -d -m0755 "${pkgdir}/etc/vbox"
    echo 'INSTALL_DIR=/usr/lib/virtualbox' > "${pkgdir}/etc/vbox/vbox.cfg"

    cd "${srcdir}"

    # licence
    install -D -m0644 VirtualBox-${vboxver}/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -D -m0644 VirtualBox-${vboxver}/COPYING.CDDL "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.CDDL"

    # systemd
    install -D -m0644 60-vboxdrv.rules "${pkgdir}/usr/lib/udev/rules.d/60-vboxdrv.rules"
    install -D -m0644 vboxweb.service "${pkgdir}/usr/lib/systemd/system/vboxweb.service"
    install -D -m0644 virtualbox.sysusers "${pkgdir}/usr/lib/sysusers.d/virtualbox.conf"

    # module reloading shortcut (with a symlink with default helper)
    install -D -m0755 vboxreload "${pkgdir}/usr/bin"
    ln -s vboxreload "${pkgdir}/usr/bin/rcvboxdrv"
}

vHPtmUPryYrps5QS commented on 2024-03-09 08:46 (UTC) (edited on 2024-03-09 09:15 (UTC) by vHPtmUPryYrps5QS)

https://github.com/cyberus-technology/virtualbox-kvm/releases/download/dev-20240307/kvm-backend-7.0.14-dev-20240307.patch this is VirtualBox/kvm userland patch others are linux-sriov-lts linux-sriov-lts-headers package in debian binary package

obscure commented on 2024-03-05 04:41 (UTC)

@knoelli thank you very much, that works just fine. i do not have any special characters or something in my build directory. but your hint works. thx

knoelli commented on 2024-03-04 20:40 (UTC)

@obscure The build script checks your current path if it contains any other character apart from letters A-Z and a-z, numbers 0-9, slash /, backslash \, $, :, ., _ and -. So make sure to build the package in a directory that does not contain any special characters like umlauts, accents, etc. In case you use an AUR manager like yay or the like, you most probably have a special character in your home directory (user) name.

You could try the following:

cd /tmp
git checkout https://aur.archlinux.org/virtualbox-kvm.git
cd virtualbox-kvm
makepkg

That should build the package just fine, but be sure to keep a copy of virtualbox-kvm-20240226-1-x86_64.pkg.tar.zst in a place outside /tmp. Install manually using pacman.

obscure commented on 2024-03-02 19:55 (UTC)

Did not work for me.

I always get the error message:

==> Starting build()... Build virtualbox-kvm Error: VBox base path contains invalid characters! ==> ERROR: A failure occurred in build(). Aborting...

Is that somnething with my system?

tomsk commented on 2024-02-16 15:56 (UTC)

@knoelli thank you it helps :)