mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-05 11:00:48 +02:00
virtualbox-guest-additions: kill tmp ebuild
This commit is contained in:
parent
d789c430ed
commit
1576adcc6a
11 changed files with 0 additions and 373 deletions
|
|
@ -1,2 +0,0 @@
|
|||
DIST VirtualBox-6.0.4.tar.bz2 155233564 BLAKE2B 6bc4d450e275e8aac5dc62ab05d9ba1450e13965f3eba64819315d121bd0e515319be2ad92ab429f2e598e157e89660561de69a2aac87e14792284669bcec7e8 SHA512 c2e5418bafd5d50b46e1bc70280753c2fdfbf7248d782fc398771839950fb575eaea437e9699d56f4d8c92ea4dc9ba8bed74379565dac6114f7e9c45aecc9fdb
|
||||
DIST virtualbox-6.0.0_beta2-patches-01.tar.xz 2732 BLAKE2B a138e715d99f135f16ca21c92781bf6cd8913f7f766bb598eddcd63e98280e568e646f56bbd0a3714f273457ca90db0b77ec7940ba25028506a22891f1af7b2d SHA512 954e4b40d6e272efe756ee0965adb4110d45f764433a89080fda7ebaebbc20031f86a3e0027dfdaa1c6a7d6379a1af557cea71512504e4b57b5f5adbfc86b56e
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
--- a/vboxsf/vfsmod.c.orig 2019-01-26 02:12:35.000000000 +0800
|
||||
+++ b/vboxsf/vfsmod.c 2019-04-12 16:45:28.393930127 +0800
|
||||
@@ -40,7 +40,9 @@
|
||||
#include "revision-generated.h"
|
||||
#include "product-generated.h"
|
||||
#include "VBoxGuestR0LibInternal.h"
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
|
||||
+# include <uapi/linux/mount.h> /* for MS_REMOUNT */
|
||||
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
|
||||
# include <linux/mount.h>
|
||||
#endif
|
||||
#include <linux/seq_file.h>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
--- a/src/VBox/Additions/linux/sharedfolders/vfsmod.c.orig 2019-01-26 02:12:35.000000000 +0800
|
||||
+++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.c 2019-04-12 16:45:28.393930127 +0800
|
||||
@@ -40,7 +40,9 @@
|
||||
#include "revision-generated.h"
|
||||
#include "product-generated.h"
|
||||
#include "VBoxGuestR0LibInternal.h"
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
|
||||
+# include <uapi/linux/mount.h> /* for MS_REMOUNT */
|
||||
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
|
||||
# include <linux/mount.h>
|
||||
#endif
|
||||
#include <linux/seq_file.h>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=VirtualBox Client Service
|
||||
Exec=VBoxClient-all
|
||||
Terminal=false
|
||||
X-KDE-StartupNotify=false
|
||||
StartupNotify=false
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
# https://bugs.gentoo.org/298988
|
||||
|
||||
--- a/vboxguest/Makefile
|
||||
+++ b/vboxguest/Makefile
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
MOD_DEFS = -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST \
|
||||
-DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST \
|
||||
- -DVBOX_WITH_HGCM
|
||||
+ -DVBOX_WITH_HGCM -DLOG_USE_C99
|
||||
ifeq ($(BUILD_TARGET_ARCH),amd64)
|
||||
MOD_DEFS += -DRT_ARCH_AMD64
|
||||
else
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
# -*- Makefile -*-
|
||||
#
|
||||
# Overwrite some default kBuild settings
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (C) 2006-2008 Sun Microsystems, Inc.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# don't build testcases to save time, they are not needed for the package
|
||||
VBOX_WITH_TESTCASES :=
|
||||
VBOX_WITH_VALIDATIONKIT :=
|
||||
|
||||
KBUILD_MSG_STYLE := brief
|
||||
|
||||
## paths, origin, hardening
|
||||
VBOX_WITH_HARDENING := 2
|
||||
VBOX_WITH_ORIGIN :=
|
||||
VBOX_ONLY_ADDITIONS := 1
|
||||
|
||||
## don't build with -Werror
|
||||
VBOX_WITH_WARNINGS_AS_ERRORS :=
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
pidfile="/var/run/vboxguest-service.pid"
|
||||
command="/usr/sbin/vboxguest-service"
|
||||
command_args="--foreground"
|
||||
command_background="true"
|
||||
|
||||
depend() {
|
||||
need dbus localmount
|
||||
before xdm
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
einfo "Loading kernel modules"
|
||||
/sbin/modprobe vboxguest 2>&1
|
||||
/sbin/modprobe vboxsf 2>&1
|
||||
}
|
||||
|
||||
stop_post() {
|
||||
einfo "Removing kernel modules"
|
||||
/sbin/modprobe -r vboxsf 2>&1
|
||||
/sbin/modprobe -r vboxguest 2>&1
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
[Unit]
|
||||
Description=VirtualBox Guest Additions
|
||||
ConditionVirtualization=oracle
|
||||
Before=display-manager.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=/sbin/modprobe vboxguest
|
||||
ExecStartPre=/sbin/modprobe vboxsf
|
||||
ExecStart=/usr/sbin/vboxguest-service --foreground
|
||||
ExecStopPost=/sbin/modprobe -r vboxsf
|
||||
ExecStopPost=/sbin/modprobe -r vboxguest
|
||||
PIDFile=/var/run/vboxguest-service.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
Section "Device"
|
||||
Identifier "Device-vboxvideo"
|
||||
Driver "vboxvideo"
|
||||
EndSection
|
||||
Section "Screen"
|
||||
Identifier "Screen-vboxvideo"
|
||||
Device "Device-vboxvideo"
|
||||
EndSection
|
||||
|
||||
Section "ServerLayout"
|
||||
Identifier "Default Layout"
|
||||
Screen "Screen-vboxvideo"
|
||||
EndSection
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>polynomial-c@gentoo.org</email>
|
||||
<name>Lars Wendler</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
|
||||
|
|
@ -1,232 +0,0 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit linux-mod systemd user toolchain-funcs
|
||||
|
||||
MY_PV="${PV/beta/BETA}"
|
||||
MY_PV="${MY_PV/rc/RC}"
|
||||
MY_P="VirtualBox-${MY_PV}"
|
||||
DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
|
||||
HOMEPAGE="https://www.virtualbox.org/"
|
||||
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
|
||||
https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-6.0.0_beta2-patches-01.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="X"
|
||||
|
||||
RDEPEND="
|
||||
X? ( x11-apps/xrandr
|
||||
x11-apps/xrefresh
|
||||
x11-libs/libXmu
|
||||
x11-libs/libX11
|
||||
x11-libs/libXt
|
||||
x11-libs/libXext
|
||||
x11-libs/libXau
|
||||
x11-libs/libXdmcp
|
||||
x11-libs/libSM
|
||||
x11-libs/libICE )
|
||||
sys-apps/dbus
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
>=dev-util/kbuild-0.1.9998.3127
|
||||
>=dev-lang/yasm-0.6.2
|
||||
sys-devel/bin86
|
||||
sys-libs/pam
|
||||
sys-power/iasl
|
||||
x11-base/xorg-proto
|
||||
"
|
||||
PDEPEND="
|
||||
X? ( x11-drivers/xf86-video-vboxvideo )
|
||||
"
|
||||
BUILD_TARGETS="all"
|
||||
BUILD_TARGET_ARCH="${ARCH}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
pkg_setup() {
|
||||
MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest)
|
||||
vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)"
|
||||
use X && MODULE_NAMES+=" vboxvideo(misc:${WORKDIR}/vboxvideo::${WORKDIR}/vboxvideo)"
|
||||
|
||||
linux-mod_pkg_setup
|
||||
BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
|
||||
# Create and unpack a tarball with the sources of the Linux guest
|
||||
# kernel modules, to include all the needed files
|
||||
"${S}"/src/VBox/Additions/linux/export_modules.sh "${WORKDIR}/vbox-kmod.tar.gz"
|
||||
unpack ./vbox-kmod.tar.gz
|
||||
|
||||
# Remove shipped binaries (kBuild,yasm), see bug #232775
|
||||
cd "${S}"
|
||||
rm -rf kBuild/bin tools
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# PaX fixes (see bug #298988)
|
||||
pushd "${WORKDIR}" &>/dev/null || die
|
||||
eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch
|
||||
#https://bugs.gentoo.org/680420
|
||||
eapply "${FILESDIR}"/vbox-kernel-50.patch
|
||||
popd &>/dev/null || die
|
||||
|
||||
|
||||
# Disable things unused or splitted into separate ebuilds
|
||||
cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
|
||||
use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
|
||||
|
||||
# stupid new header references...
|
||||
local vboxheader mdir
|
||||
for vboxheader in {product,revision,version}-generated.h ; do
|
||||
for mdir in vbox{guest,sf} ; do
|
||||
ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
|
||||
"${WORKDIR}/${mdir}/${vboxheader}"
|
||||
done
|
||||
done
|
||||
|
||||
# Remove pointless GCC version check
|
||||
sed -e '/^check_gcc$/d' -i configure || die
|
||||
|
||||
rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || die
|
||||
eapply "${WORKDIR}/patches"
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# build the user-space tools, warnings are harmless
|
||||
local cmd=(
|
||||
./configure
|
||||
--nofatal
|
||||
--disable-xpcom
|
||||
--disable-sdl-ttf
|
||||
--disable-pulse
|
||||
--disable-alsa
|
||||
--with-gcc="$(tc-getCC)"
|
||||
--with-g++="$(tc-getCXX)"
|
||||
--target-arch=${ARCH}
|
||||
--with-linux="${KV_OUT_DIR}"
|
||||
--build-headless
|
||||
)
|
||||
echo "${cmd[@]}"
|
||||
"${cmd[@]}" || die "configure failed"
|
||||
source ./env.sh
|
||||
export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
MAKE="kmk" \
|
||||
emake TOOL_YASM_AS=yasm \
|
||||
VBOX_ONLY_ADDITIONS=1 \
|
||||
KBUILD_VERBOSE=2
|
||||
|
||||
# Now creating the kernel modules. We must do this _after_
|
||||
# we compiled the user-space tools as we need two of the
|
||||
# automatically generated header files. (>=3.2.0)
|
||||
linux-mod_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
|
||||
cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
|
||||
|
||||
insinto /sbin
|
||||
newins mount.vboxsf mount.vboxsf
|
||||
fperms 4755 /sbin/mount.vboxsf
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
|
||||
|
||||
insinto /usr/sbin/
|
||||
newins VBoxService vboxguest-service
|
||||
fperms 0755 /usr/sbin/vboxguest-service
|
||||
|
||||
insinto /usr/bin
|
||||
doins VBoxControl
|
||||
fperms 0755 /usr/bin/VBoxControl
|
||||
|
||||
# VBoxClient user service and xrandr wrapper
|
||||
if use X ; then
|
||||
doins VBoxClient
|
||||
fperms 0755 /usr/bin/VBoxClient
|
||||
|
||||
pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
|
||||
|| die
|
||||
newins 98vboxadd-xclient VBoxClient-all
|
||||
fperms 0755 /usr/bin/VBoxClient-all
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# udev rule for vboxdrv
|
||||
local udev_rules_dir="/lib/udev/rules.d"
|
||||
dodir ${udev_rules_dir}
|
||||
echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
|
||||
>> "${ED%/}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
|
||||
|| die
|
||||
echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
|
||||
>> "${ED%/}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
|
||||
|| die
|
||||
|
||||
# VBoxClient autostart file
|
||||
insinto /etc/xdg/autostart
|
||||
doins "${FILESDIR}"/vboxclient.desktop
|
||||
|
||||
# sample xorg.conf
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins "${FILESDIR}"/xorg.conf.vbox
|
||||
|
||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup vboxguest
|
||||
enewuser vboxguest -1 /bin/sh /dev/null vboxguest
|
||||
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
|
||||
enewgroup vboxsf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
linux-mod_pkg_postinst
|
||||
if ! use X ; then
|
||||
elog "use flag X is off, enable it to install the"
|
||||
elog "X Window System video driver."
|
||||
fi
|
||||
elog ""
|
||||
elog "Please add users to the \"vboxguest\" group so they can"
|
||||
elog "benefit from seamless mode, auto-resize and clipboard."
|
||||
elog ""
|
||||
elog "The vboxsf group has been added to make automount services work."
|
||||
elog "These services are part of the shared folders support."
|
||||
elog ""
|
||||
elog "Please add:"
|
||||
elog "/etc/init.d/${PN}"
|
||||
elog "to the default runlevel in order to start"
|
||||
elog "needed services."
|
||||
elog "To use the VirtualBox X driver, use the following"
|
||||
elog "file as your /etc/X11/xorg.conf:"
|
||||
elog " /usr/share/doc/${PF}/xorg.conf.vbox"
|
||||
elog ""
|
||||
elog "Also make sure you use the Mesa library for OpenGL:"
|
||||
elog " eselect opengl set xorg-x11"
|
||||
elog ""
|
||||
elog "An autostart .desktop file has been installed to start"
|
||||
elog "VBoxClient in desktop sessions."
|
||||
elog ""
|
||||
elog "You can mount shared folders with:"
|
||||
elog " mount -t vboxsf <shared_folder_name> <mount_point>"
|
||||
elog ""
|
||||
elog "Warning:"
|
||||
elog "this ebuild is only needed if you are running gentoo"
|
||||
elog "inside a VirtualBox Virtual Machine, you don't need"
|
||||
elog "it to run VirtualBox itself."
|
||||
elog ""
|
||||
}
|
||||
Loading…
Reference in a new issue