forked from pool/virtualbox
Compare commits
52 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 535d25ca13 | |||
| 975716dd9b | |||
| 4231ff47d7 | |||
|
|
2dd047ff93 | ||
| ec5804df9b | |||
|
|
a9a4264827 | ||
| 95c9d4fb7f | |||
|
|
9f9367d812 | ||
|
|
104032130b | ||
| e3337807ac | |||
|
|
e428a6fd3d | ||
| e3a8fc6c8e | |||
|
|
403ded8dd3 | ||
|
|
4abe61d446 | ||
|
|
031aa73b4a | ||
| c88fa76269 | |||
|
|
091598f8e1 | ||
| 04cc5b1a9c | |||
|
|
f8bb62416c | ||
|
|
a40fa9d0d8 | ||
|
|
53c40ac975 | ||
| 24d8d695c3 | |||
|
|
5775f8f9d8 | ||
|
|
b2bce46135 | ||
| af828c789b | |||
|
|
47085371cc | ||
|
|
9a229bd6b6 | ||
| ba1c39dd3f | |||
|
|
1fa759675d | ||
|
|
28627050ed | ||
| 74a76a8cf6 | |||
|
|
89ce80e57e | ||
| abc0386ea6 | |||
|
|
f7f84c2c96 | ||
|
|
1e0fe5aaf7 | ||
|
|
4302f9f03e | ||
| 522b8649ef | |||
|
|
33e474e47d | ||
| 27549b0396 | |||
|
|
860ff60f82 | ||
| deda901cec | |||
|
|
76f29f0942 | ||
|
|
3558be706c | ||
| 2b3184c013 | |||
|
|
ea13a7e583 | ||
| dcc13629d7 | |||
|
|
d1f29f048a | ||
|
|
fa4643bc2e | ||
| 2ba5ab27e3 | |||
|
|
a2a4e0d873 | ||
| a2b67f0919 | |||
| 9953038bec |
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -21,3 +21,5 @@
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
## Specific LFS patterns
|
||||
VirtualBox-7.2.4-patched.tpxz filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5717b94fb45dc973c932c784bef311e1c605766489e8a40b498cd8dd2789480b
|
||||
size 151174176
|
||||
BIN
VirtualBox-7.2.4-patched.tpxz
LFS
Normal file
BIN
VirtualBox-7.2.4-patched.tpxz
LFS
Normal file
Binary file not shown.
4
_scmsync.obsinfo
Normal file
4
_scmsync.obsinfo
Normal file
@@ -0,0 +1,4 @@
|
||||
mtime: 1761144152
|
||||
commit: 1c99f0ba17c8791a10198dbfb03912ae42f5ee31fa2ac3b4f8fc9541af4e9043
|
||||
url: https://src.opensuse.org/jengelh/virtualbox
|
||||
revision: master
|
||||
3
build.specials.obscpio
Normal file
3
build.specials.obscpio
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f17b0bd95cf189319568dc5d6cd7db8451f610b09f3d5657cf47b73787db893f
|
||||
size 35696
|
||||
59
curl-8.16.patch
Normal file
59
curl-8.16.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
References: https://bugzilla.suse.com/1249448
|
||||
From: Gianfranco Costamagna <locutusofborg@debian.org>
|
||||
From: Jan Engelhardt <ej@inai.de>
|
||||
Date: 2025-09-09 12:22:00 +0200
|
||||
Subject: [PATCH] Fix build with new curl version
|
||||
References: https://github.com/curl/curl/pull/18054
|
||||
References: https://bugs.debian.org/1114436
|
||||
References: https://salsa.debian.org/pkg-virtualbox-team/virtualbox/-/commit/dbf9a6ef75380ebd2705df0198c6ac8073d0b4cb#f28811e0ca565091f1d341d90b8ba208319492f5
|
||||
References: https://bugzilla.suse.com/1249448
|
||||
|
||||
curl 8.16 changed CURLPROXY_* definitions from enum{int} to long.
|
||||
C++ has more rules than C, preventing some implicit conversions
|
||||
involving enums. Debian patch changed to instead use an explicit
|
||||
conversion. [-jengelh]
|
||||
|
||||
http-curl.cpp: In function ‘int rtHttpUpdateAutomaticProxyDisable(PRTHTTPINTERNAL)’:
|
||||
http-curl.cpp:702:27: error: invalid conversion from ‘long int’ to ‘curl_proxytype’ [-fpermissive]
|
||||
702 | pThis->enmProxyType = CURLPROXY_HTTP;
|
||||
|
||||
diff --git a/src/VBox/Runtime/generic/http-curl.cpp b/src/VBox/Runtime/generic/http-curl.cpp
|
||||
index 4cf51049d..a76bf14f8 100644
|
||||
--- a/src/VBox/Runtime/generic/http-curl.cpp
|
||||
+++ b/src/VBox/Runtime/generic/http-curl.cpp
|
||||
@@ -188,7 +188,7 @@ typedef struct RTHTTPINTERNAL
|
||||
/** Proxy port number (UINT32_MAX if not specified). */
|
||||
uint32_t uProxyPort;
|
||||
/** The proxy type (CURLPROXY_HTTP, CURLPROXY_SOCKS5, ++). */
|
||||
- curl_proxytype enmProxyType;
|
||||
+ long enmProxyType;
|
||||
/** Proxy username (RTStrFree). */
|
||||
char *pszProxyUsername;
|
||||
/** Proxy password (RTStrFree). */
|
||||
@@ -591,7 +591,7 @@ RTR3DECL(int) RTHttpUseSystemProxySettings(RTHTTP hHttp)
|
||||
* @param pszUsername The proxy username, or NULL if none.
|
||||
* @param pszPassword The proxy password, or NULL if none.
|
||||
*/
|
||||
-static int rtHttpUpdateProxyConfig(PRTHTTPINTERNAL pThis, curl_proxytype enmProxyType, const char *pszHost,
|
||||
+static int rtHttpUpdateProxyConfig(PRTHTTPINTERNAL pThis, long enmProxyType, const char *pszHost,
|
||||
uint32_t uPort, const char *pszUsername, const char *pszPassword)
|
||||
{
|
||||
CURLcode rcCurl;
|
||||
@@ -871,7 +871,7 @@ static int rtHttpConfigureProxyFromUrl(PRTHTTPINTERNAL pThis, const char *pszPro
|
||||
char *pszPassword = RTUriParsedAuthorityPassword(pszProxyUrl, &Parsed);
|
||||
uint32_t uProxyPort = RTUriParsedAuthorityPort(pszProxyUrl, &Parsed);
|
||||
bool fUnknownProxyType = false;
|
||||
- curl_proxytype enmProxyType;
|
||||
+ long enmProxyType;
|
||||
if (RTUriIsSchemeMatch(pszProxyUrl, "http"))
|
||||
{
|
||||
enmProxyType = CURLPROXY_HTTP;
|
||||
@@ -1352,7 +1352,7 @@ static int rtHttpDarwinTryConfigProxy(PRTHTTPINTERNAL pThis, CFDictionaryRef hDi
|
||||
* Determine the proxy type (not entirely sure about type == proxy type and
|
||||
* not scheme/protocol)...
|
||||
*/
|
||||
- curl_proxytype enmProxyType = CURLPROXY_HTTP;
|
||||
+ long enmProxyType = (long)CURLPROXY_HTTP;
|
||||
uint32_t uDefaultProxyPort = 8080;
|
||||
if ( CFEqual(hStrProxyType, kCFProxyTypeHTTP)
|
||||
|| CFEqual(hStrProxyType, kCFProxyTypeHTTPS))
|
||||
108
cxx17.patch
Normal file
108
cxx17.patch
Normal file
@@ -0,0 +1,108 @@
|
||||
From: Jan Engelhardt <ej@inai.de>
|
||||
Date: 2024-09-20 22:48:58.758026690 +0200
|
||||
|
||||
The code uses <filesystem>, so ensure we always use -std=c++17 at the
|
||||
very least.
|
||||
|
||||
Prior to C++17, noexcept cannot be part of a type alias, and so is
|
||||
not part of the function signature, and so is not part of the ABI.
|
||||
|
||||
In C++17, noexcept is significant. There is a compile error because
|
||||
the FNCONSUMER alias as defined in a .h file does not match the
|
||||
function body in a .cpp file.
|
||||
|
||||
The def file is also wrong, but no one at virtualbox.org noticed for
|
||||
some reason, even though the def mismatch also caused a link/build
|
||||
failure in its own right.
|
||||
|
||||
To resolve the mismatch between .cpp/.h, the function signature is
|
||||
augmented by RT_NOEXCEPT, based upon the function head being the
|
||||
authoritative source as to whether something was meant to be noexcept
|
||||
or not.
|
||||
|
||||
In turn, adding RT_NOEXCEPT causes a change in the ABI of VBoxRT.so.
|
||||
The closed-source VirtualBox extension pack does not expect that and
|
||||
is unable to load [LD_BIND_NOW=1]. To resolve _that_, we add extra
|
||||
symbol aliases.
|
||||
|
||||
---
|
||||
Config.kmk | 3 +++
|
||||
include/iprt/cpp/restclient.h | 12 ++++++++++--
|
||||
src/VBox/Runtime/VBox/VBoxRTImp-gcc.def | 2 +-
|
||||
src/VBox/Runtime/common/rest/rest-binary.cpp | 9 +++++++++
|
||||
4 files changed, 23 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: VirtualBox-7.1.0/Config.kmk
|
||||
===================================================================
|
||||
--- VirtualBox-7.1.0.orig/Config.kmk
|
||||
+++ VirtualBox-7.1.0/Config.kmk
|
||||
@@ -3093,6 +3093,9 @@ ifeq ($(KBUILD_TARGET),darwin)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
+ifndef VBOX_GCC_std
|
||||
+ VBOX_GCC_std := -std=c++17
|
||||
+endif
|
||||
|
||||
#
|
||||
# Check for incompatible rpath combinations.
|
||||
Index: VirtualBox-7.1.0/include/iprt/cpp/restclient.h
|
||||
===================================================================
|
||||
--- VirtualBox-7.1.0.orig/include/iprt/cpp/restclient.h
|
||||
+++ VirtualBox-7.1.0/include/iprt/cpp/restclient.h
|
||||
@@ -130,7 +130,11 @@ public:
|
||||
* is the sum of the previously returned @a *pcbActual values.
|
||||
*/
|
||||
typedef DECLCALLBACKTYPE(int, FNPRODUCER,(RTCRestBinaryParameter *a_pThis, void *a_pvDst, size_t a_cbDst,
|
||||
- uint64_t a_offContent, size_t *a_pcbActual)) /*RT_NOEXCEPT*/;
|
||||
+ uint64_t a_offContent, size_t *a_pcbActual))
|
||||
+#if defined(__cplusplus) && __cplusplus >= 201700L
|
||||
+RT_NOEXCEPT
|
||||
+#endif
|
||||
+;
|
||||
/** Pointer to a byte producer callback. */
|
||||
typedef FNPRODUCER *PFNPRODUCER;
|
||||
|
||||
@@ -268,7 +272,11 @@ public:
|
||||
* is the sum of the previous @a a_cbSrc values.
|
||||
*/
|
||||
typedef DECLCALLBACKTYPE(int, FNCONSUMER,(RTCRestBinaryResponse *a_pThis, const void *a_pvSrc, size_t a_cbSrc,
|
||||
- uint32_t a_uHttpStatus, uint64_t a_offContent, uint64_t a_cbContent)) /*RT_NOEXCEPT*/;
|
||||
+ uint32_t a_uHttpStatus, uint64_t a_offContent, uint64_t a_cbContent))
|
||||
+#if defined(__cplusplus) && __cplusplus >= 201700L
|
||||
+RT_NOEXCEPT
|
||||
+#endif
|
||||
+;
|
||||
/** Pointer to a byte consumer callback. */
|
||||
typedef FNCONSUMER *PFNCONSUMER;
|
||||
|
||||
Index: VirtualBox-7.1.0/src/VBox/Runtime/VBox/VBoxRTImp-gcc.def
|
||||
===================================================================
|
||||
--- VirtualBox-7.1.0.orig/src/VBox/Runtime/VBox/VBoxRTImp-gcc.def
|
||||
+++ VirtualBox-7.1.0/src/VBox/Runtime/VBox/VBoxRTImp-gcc.def
|
||||
@@ -379,7 +379,7 @@ EXPORTS
|
||||
_ZN22RTCRestBinaryParameter16xmitHttpCallbackEP14RTHTTPINTERNALPvmyPmS2_ ; int64=llong
|
||||
_ZN22RTCRestBinaryParameter19setProducerCallbackEPFiPS_PvmmPmES1_m ; before-noexcept int64=long
|
||||
_ZN22RTCRestBinaryParameter19setProducerCallbackEPFiPS_PvmyPmES1_y ; before-noexcept int64=llong
|
||||
- _ZN22RTCRestBinaryParameter19setProducerCallbackEPDoFiPS_PvmyPmES1_m ; after-noexcept int64=long
|
||||
+ _ZN22RTCRestBinaryParameter19setProducerCallbackEPDoFiPS_PvmmPmES1_m ; after-noexcept int64=long
|
||||
_ZN22RTCRestBinaryParameter19setProducerCallbackEPDoFiPS_PvmyPmES1_y ; after-noexcept int64=llong
|
||||
_ZN22RTCRestBinaryParameterC1Ev
|
||||
_ZN22RTCRestBinaryParameterC2Ev
|
||||
Index: VirtualBox-7.1.0/src/VBox/Runtime/common/rest/rest-binary.cpp
|
||||
===================================================================
|
||||
--- VirtualBox-7.1.0.orig/src/VBox/Runtime/common/rest/rest-binary.cpp
|
||||
+++ VirtualBox-7.1.0/src/VBox/Runtime/common/rest/rest-binary.cpp
|
||||
@@ -706,3 +706,12 @@ void RTCRestBinaryResponse::receiveCompl
|
||||
AssertRC(rc);
|
||||
}
|
||||
|
||||
+// extpack was built with wrong -std=, add a redirect
|
||||
+extern "C" void DECLEXPORT_CLASS __attribute__((weak,
|
||||
+alias("_ZN21RTCRestBinaryResponse19setConsumerCallbackEPDoFiPS_PKvmjmmEPv"))) // T symbol that exists
|
||||
+ _ZN21RTCRestBinaryResponse19setConsumerCallbackEPFiPS_PKvmjmmEPv( // W symbol to make
|
||||
+ RTCRestBinaryResponse::PFNCONSUMER, void *);
|
||||
+extern "C" void DECLEXPORT_CLASS __attribute__((weak,
|
||||
+alias("_ZN22RTCRestBinaryParameter19setProducerCallbackEPDoFiPS_PvmmPmES1_m"))) // T
|
||||
+ _ZN22RTCRestBinaryParameter19setProducerCallbackEPFiPS_PvmmPmES1_m( // W
|
||||
+ RTCRestBinaryParameter::PFNPRODUCER, void *, uint64_t);
|
||||
@@ -1,8 +1,13 @@
|
||||
Index: VirtualBox-7.0.20/configure
|
||||
---
|
||||
configure | 17 ++++++-----------
|
||||
src/VBox/Frontends/VBoxSDL/Makefile.kmk | 8 ++++----
|
||||
2 files changed, 10 insertions(+), 15 deletions(-)
|
||||
|
||||
Index: VirtualBox-7.2.0/configure
|
||||
===================================================================
|
||||
--- VirtualBox-7.0.20.orig/configure
|
||||
+++ VirtualBox-7.0.20/configure
|
||||
@@ -1186,21 +1186,19 @@ check_sdl()
|
||||
--- VirtualBox-7.2.0.orig/configure
|
||||
+++ VirtualBox-7.2.0/configure
|
||||
@@ -1150,21 +1150,19 @@ check_sdl()
|
||||
fail
|
||||
fi
|
||||
else
|
||||
@@ -27,7 +32,7 @@ Index: VirtualBox-7.0.20/configure
|
||||
#undef main
|
||||
extern "C" int main(int argc, char** argv)
|
||||
{
|
||||
@@ -1216,7 +1214,7 @@ extern "C" int main(int argc, char** arg
|
||||
@@ -1180,7 +1178,7 @@ extern "C" int main(int argc, char** arg
|
||||
}
|
||||
EOF
|
||||
[ -n "$INCSDL" ] && I_INCSDL=`prefix_I "$INCSDL"`
|
||||
@@ -36,7 +41,7 @@ Index: VirtualBox-7.0.20/configure
|
||||
if test_execute; then
|
||||
cnf_append "LIB_SDK_LIBSDL_SDL" "`strip_l "$LIBSDL"`"
|
||||
cnf_append "SDK_LIBSDL_LIBPATH" "`strip_L "$LIBSDL"`"
|
||||
@@ -3010,11 +3008,8 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then
|
||||
@@ -2960,11 +2958,8 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then
|
||||
[ $WITH_LIBLZMA -eq 1 ] && check_liblzma
|
||||
[ "$OS" != "darwin" ] && check_png
|
||||
[ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam
|
||||
@@ -50,20 +55,20 @@ Index: VirtualBox-7.0.20/configure
|
||||
[ $WITH_SDL_TTF -eq 1 -a $OSE -eq 0 ] && check_sdl_ttf
|
||||
[ $WITH_X11 -eq 1 ] && check_x
|
||||
# TODO check for xcomposite-dev (X11/extensions/Xcomposite.h, additions only)
|
||||
Index: VirtualBox-7.0.20/src/VBox/Frontends/VBoxSDL/Makefile.kmk
|
||||
Index: VirtualBox-7.2.0/src/VBox/Frontends/VBoxSDL/Makefile.kmk
|
||||
===================================================================
|
||||
--- VirtualBox-7.0.20.orig/src/VBox/Frontends/VBoxSDL/Makefile.kmk
|
||||
+++ VirtualBox-7.0.20/src/VBox/Frontends/VBoxSDL/Makefile.kmk
|
||||
--- VirtualBox-7.2.0.orig/src/VBox/Frontends/VBoxSDL/Makefile.kmk
|
||||
+++ VirtualBox-7.2.0/src/VBox/Frontends/VBoxSDL/Makefile.kmk
|
||||
@@ -51,7 +51,7 @@ if !defined(VBOX_WITH_HARDENING) || "$(K
|
||||
PROGRAMS += VBoxSDL
|
||||
endif
|
||||
VBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBoxMainClientDll,VBoxMainClientExe)
|
||||
VBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBoxMainClientDll,VBoxMainClientSignedExe)
|
||||
- VBoxSDL_SDKS = LIBSDL2
|
||||
+ VBoxSDL_SDKS = LIBSDL
|
||||
VBoxSDL_SOURCES = \
|
||||
VBoxSDL.cpp \
|
||||
Framebuffer.cpp \
|
||||
@@ -81,7 +81,7 @@ if !defined(VBOX_WITH_HARDENING) || "$(K
|
||||
@@ -78,7 +78,7 @@ if !defined(VBOX_WITH_HARDENING) || "$(K
|
||||
endif
|
||||
ifn1of ($(KBUILD_TARGET), solaris) # Probably wrong with SDL2
|
||||
VBoxSDL_LIBS = \
|
||||
@@ -72,7 +77,7 @@ Index: VirtualBox-7.0.20/src/VBox/Frontends/VBoxSDL/Makefile.kmk
|
||||
endif
|
||||
if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
|
||||
VBoxSDL_LIBS += \
|
||||
@@ -121,7 +121,7 @@ if !defined(VBOX_WITH_HARDENING) || "$(K
|
||||
@@ -116,7 +116,7 @@ if !defined(VBOX_WITH_HARDENING) || "$(K
|
||||
if 0
|
||||
PROGRAMS += tstSDL
|
||||
tstSDL_TEMPLATE = VBoxR3TstExe
|
||||
@@ -81,7 +86,7 @@ Index: VirtualBox-7.0.20/src/VBox/Frontends/VBoxSDL/Makefile.kmk
|
||||
tstSDL_INST = $(INST_TESTCASE)
|
||||
tstSDL_SOURCES = \
|
||||
VBoxSDLTest.cpp
|
||||
@@ -138,7 +138,7 @@ if !defined(VBOX_WITH_HARDENING) || "$(K
|
||||
@@ -131,7 +131,7 @@ if !defined(VBOX_WITH_HARDENING) || "$(K
|
||||
$(LIB_RUNTIME)
|
||||
ifn1of ($(KBUILD_TARGET), solaris)
|
||||
tstSDL_LIBS += \
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
# script to disable USB passthru in /etc/udev/rules.d/60-vboxdrv.rules
|
||||
# if already disabled, clear the comment character
|
||||
sed -i 's/#SUBSYSTEM==\"usb/SUBSYSTEM==\"usb/' /usr/lib/udev/rules.d/60-vboxdrv.rules
|
||||
# now comment the usb lines
|
||||
sed -i 's/SUBSYSTEM==\"usb/#SUBSYSTEM==\"usb/' /usr/lib/udev/rules.d/60-vboxdrv.rules
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
Index: VirtualBox-7.0.20/src/libs/dxvk-native-1.9.2a/src/util/util_bit.h
|
||||
---
|
||||
src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
Index: VirtualBox-7.1.0/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h
|
||||
===================================================================
|
||||
--- VirtualBox-7.0.20.orig/src/libs/dxvk-native-1.9.2a/src/util/util_bit.h
|
||||
+++ VirtualBox-7.0.20/src/libs/dxvk-native-1.9.2a/src/util/util_bit.h
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
+#include <cstdint>
|
||||
#include "util_likely.h"
|
||||
#include "util_math.h"
|
||||
|
||||
Index: VirtualBox-7.0.20/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h
|
||||
===================================================================
|
||||
--- VirtualBox-7.0.20.orig/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h
|
||||
+++ VirtualBox-7.0.20/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h
|
||||
--- VirtualBox-7.1.0.orig/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h
|
||||
+++ VirtualBox-7.1.0/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h
|
||||
@@ -66,6 +66,9 @@ TORTIOUS ACTION, ARISING OUT OF OR IN CO
|
||||
OF THIS SOFTWARE.
|
||||
|
||||
|
||||
16
gentoo-C23.patch
Normal file
16
gentoo-C23.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
https://bugs.gentoo.org/946955
|
||||
|
||||
--- a/include/iprt/types.h
|
||||
+++ b/include/iprt/types.h
|
||||
@@ -282,7 +282,10 @@
|
||||
# endif
|
||||
# else
|
||||
-# undef bool /* see above netbsd explanation */
|
||||
+# if defined (__KERNEL__)
|
||||
typedef _Bool bool;
|
||||
+# else
|
||||
+# include <stdbool.h>
|
||||
+# endif
|
||||
# endif
|
||||
# else
|
||||
# if RT_MSC_PREREQ(RT_MSC_VER_VC120)
|
||||
48
host-source.patch
Normal file
48
host-source.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
From: Jan Engelhardt <ej@inai.de>
|
||||
Date: 2024-11-14 15:11:28.216506193 +0100
|
||||
References: https://bugzilla.suse.com/1231346
|
||||
|
||||
Stop overriding INSTALL_MOD_DIR, stop using a non-standard path.
|
||||
[MODULE_DIR is a 2.4ism and irrelevant here;
|
||||
but INSTALL_MOD_DIR affects the 2.6+ install alike.]
|
||||
|
||||
---
|
||||
src/VBox/Installer/linux/Makefile-footer.gmk | 2 +-
|
||||
src/VBox/Installer/linux/Makefile-header.gmk | 4 +---
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: VirtualBox-7.1.4/src/VBox/Installer/linux/Makefile-footer.gmk
|
||||
===================================================================
|
||||
--- VirtualBox-7.1.4.orig/src/VBox/Installer/linux/Makefile-footer.gmk
|
||||
+++ VirtualBox-7.1.4/src/VBox/Installer/linux/Makefile-footer.gmk
|
||||
@@ -145,7 +145,7 @@ $(VBOXMOD_0_TARGET):
|
||||
$(MAKE) V=$(VBOX_LNX_VERBOSE) $(VBOX_DISABLE_SIGN) -C $(KERN_DIR) $(VBOX_SUBDIR_VAR)=$(CURDIR) SRCROOT=$(CURDIR) $(if $(JOBS),-j$(JOBS),) modules
|
||||
|
||||
install: $(VBOXMOD_0_TARGET)
|
||||
- $(MAKE) V=$(VBOX_LNX_VERBOSE) $(VBOX_DISABLE_SIGN) -C $(KERN_DIR) $(VBOX_SUBDIR_VAR)=$(CURDIR) SRCROOT=$(CURDIR) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install
|
||||
+ $(MAKE) V=$(VBOX_LNX_VERBOSE) $(VBOX_DISABLE_SIGN) -C $(KERN_DIR) $(VBOX_SUBDIR_VAR)=$(CURDIR) SRCROOT=$(CURDIR) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) modules_install
|
||||
|
||||
modules_install: install
|
||||
|
||||
Index: VirtualBox-7.1.4/src/VBox/Installer/linux/Makefile-header.gmk
|
||||
===================================================================
|
||||
--- VirtualBox-7.1.4.orig/src/VBox/Installer/linux/Makefile-header.gmk
|
||||
+++ VirtualBox-7.1.4/src/VBox/Installer/linux/Makefile-header.gmk
|
||||
@@ -261,8 +261,7 @@ endif
|
||||
# Kernel include folder
|
||||
KERN_INCL := $(KERN_DIR)/include
|
||||
# module install folder
|
||||
-INSTALL_MOD_DIR ?= misc
|
||||
-MODULE_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KERN_VER)/$(INSTALL_MOD_DIR)
|
||||
+MODULE_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KERN_VER)/updates
|
||||
|
||||
# For VBOX_GCC_CHECK_CC
|
||||
VBOX_CLOSEPAR := )
|
||||
@@ -298,7 +297,6 @@ endif
|
||||
ifdef DEBUG
|
||||
ifndef VBOX_KERN_QUIET
|
||||
$(warning dbg: INSTALL_MOD_PATH = $(INSTALL_MOD_PATH))
|
||||
-$(warning dbg: INSTALL_MOD_DIR = $(INSTALL_MOD_DIR))
|
||||
$(warning dbg: KERN_DIR = $(KERN_DIR))
|
||||
$(warning dbg: KERN_INCL = $(KERN_INCL))
|
||||
$(warning dbg: KERN_VERSION = $(KERN_VERSION))
|
||||
@@ -1,64 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script to update extpack
|
||||
# The idea for this method and the original code came from Larry Len Rainey.
|
||||
#
|
||||
# This implementation by Larry Finger
|
||||
|
||||
# Define some symbols and determine the current version of VB
|
||||
|
||||
VBOXMANAGE=/usr/bin/VBoxManage
|
||||
AWK=/usr/bin/awk
|
||||
GREP=/usr/bin/grep
|
||||
WGET=/usr/bin/wget
|
||||
VBOX_VERSION=`$VBOXMANAGE --version | $AWK -F_ {'print $1'}`
|
||||
|
||||
# Define a symbol for the name of the extpack matching the VB version
|
||||
VBOX_EXT=`echo Oracle_VM_VirtualBox_Extension_Pack-${VBOX_VERSION}.vbox-extpack`
|
||||
|
||||
# Full path to extpack license file
|
||||
LICENSE_PATH="/usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack/ExtPack-license.rtf"
|
||||
|
||||
# Determine the installed version of extpack, if any.
|
||||
EXTPACK_CURRENT=`$VBOXMANAGE list extpacks | $GREP -A1 "Oracle VM VirtualBox Extension Pack" | $GREP Version | $AWK -F\ {'print $2'}`
|
||||
|
||||
# The extpacks are licensed under a Personal Use and Evaluation License
|
||||
# At some point, the user must agree to the conditions of that license.
|
||||
# If no extpack is installed on this system, then there is no agreement,
|
||||
# thus this script cannot install the extpack.
|
||||
#
|
||||
# This situation applies to new installations that could conform to the license,
|
||||
# but more importantly, it handles commercial setups that have not purchased
|
||||
# the necessary license.
|
||||
# Check if extpack is currently installed. If not exit
|
||||
if [ -z $EXTPACK_CURRENT ]; then
|
||||
exit 0
|
||||
fi
|
||||
#
|
||||
# An extpack has been installed on this system. Now we need to check if
|
||||
# it was issued under the current version of the license.
|
||||
|
||||
#Note to maintainers: The "version 11" in the next command must be changed
|
||||
# manually when Oracle revises the license.
|
||||
|
||||
LICENSE_CHECK=`$GREP "version 11" $LICENSE_PATH | $AWK -F\ {'print $2'}`
|
||||
if [ -z $LICENSE_CHECK ]; then
|
||||
# New license version does not match the current installation.
|
||||
# The user will need to agree to the new version, thus we do nothing here.
|
||||
exit 0
|
||||
fi
|
||||
if [ $VBOX_VERSION == $EXTPACK_CURRENT ]; then
|
||||
# The extpack currently installed matches - we are done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# A new version of extpack is needed - switch to directory that can be written, and download it
|
||||
pushd ~ > /dev/null 2>&1
|
||||
$WGET https://download.virtualbox.org/virtualbox/$VBOX_VERSION/$VBOX_EXT > /dev/null 2>&1
|
||||
|
||||
# Now install it
|
||||
echo Y | $VBOXMANAGE extpack install --replace $VBOX_EXT > /dev/null 2>&1
|
||||
|
||||
# Clean up by deleting downloaded file and restoring the original working directory
|
||||
rm -f $VBOX_EXT
|
||||
popd ~ > /dev/null 2>&1
|
||||
@@ -1,19 +1,25 @@
|
||||
Index: VirtualBox-7.0.20/src/apps/Makefile.kmk
|
||||
---
|
||||
src/apps/Makefile.kmk | 2
|
||||
src/apps/VBoxPermissionMessage/Makefile.kmk | 32 +++++++++++++++
|
||||
src/apps/VBoxPermissionMessage/VBoxPermissionMessage.cpp | 12 +++++
|
||||
3 files changed, 46 insertions(+)
|
||||
|
||||
Index: VirtualBox-7.2.0/src/apps/Makefile.kmk
|
||||
===================================================================
|
||||
--- VirtualBox-7.0.20.orig/src/apps/Makefile.kmk
|
||||
+++ VirtualBox-7.0.20/src/apps/Makefile.kmk
|
||||
@@ -28,5 +28,7 @@
|
||||
SUB_DEPTH = ../..
|
||||
include $(KBUILD_PATH)/subheader.kmk
|
||||
--- VirtualBox-7.2.0.orig/src/apps/Makefile.kmk
|
||||
+++ VirtualBox-7.2.0/src/apps/Makefile.kmk
|
||||
@@ -33,5 +33,7 @@ ifneq ($(KBUILD_TARGET),win)
|
||||
include $(PATH_SUB_CURRENT)/svn2git-vbox/Makefile.kmk
|
||||
endif
|
||||
|
||||
+include $(PATH_SUB_CURRENT)/VBoxPermissionMessage/Makefile.kmk
|
||||
+
|
||||
include $(FILE_KBUILD_SUB_FOOTER)
|
||||
|
||||
Index: VirtualBox-7.0.20/src/apps/VBoxPermissionMessage/Makefile.kmk
|
||||
Index: VirtualBox-7.2.0/src/apps/VBoxPermissionMessage/Makefile.kmk
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ VirtualBox-7.0.20/src/apps/VBoxPermissionMessage/Makefile.kmk
|
||||
+++ VirtualBox-7.2.0/src/apps/VBoxPermissionMessage/Makefile.kmk
|
||||
@@ -0,0 +1,32 @@
|
||||
+# $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z vboxsync $
|
||||
+## @file
|
||||
@@ -47,10 +53,10 @@ Index: VirtualBox-7.0.20/src/apps/VBoxPermissionMessage/Makefile.kmk
|
||||
+
|
||||
+include $(KBUILD_PATH)/subfooter.kmk
|
||||
+
|
||||
Index: VirtualBox-7.0.20/src/apps/VBoxPermissionMessage/VBoxPermissionMessage.cpp
|
||||
Index: VirtualBox-7.2.0/src/apps/VBoxPermissionMessage/VBoxPermissionMessage.cpp
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ VirtualBox-7.0.20/src/apps/VBoxPermissionMessage/VBoxPermissionMessage.cpp
|
||||
+++ VirtualBox-7.2.0/src/apps/VBoxPermissionMessage/VBoxPermissionMessage.cpp
|
||||
@@ -0,0 +1,12 @@
|
||||
+#include <QtWidgets/QApplication>
|
||||
+#include <QtWidgets/QMessageBox>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
Index: VirtualBox-7.0.20/src/VBox/Installer/linux/vboxdrv.sh
|
||||
---
|
||||
src/VBox/Installer/linux/vboxdrv.sh | 42 ++++++------------------------------
|
||||
1 file changed, 7 insertions(+), 35 deletions(-)
|
||||
|
||||
Index: VirtualBox-7.1.0/src/VBox/Installer/linux/vboxdrv.sh
|
||||
===================================================================
|
||||
--- VirtualBox-7.0.20.orig/src/VBox/Installer/linux/vboxdrv.sh
|
||||
+++ VirtualBox-7.0.20/src/VBox/Installer/linux/vboxdrv.sh
|
||||
--- VirtualBox-7.1.0.orig/src/VBox/Installer/linux/vboxdrv.sh
|
||||
+++ VirtualBox-7.1.0/src/VBox/Installer/linux/vboxdrv.sh
|
||||
@@ -29,11 +29,12 @@
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
@@ -66,17 +70,3 @@ Index: VirtualBox-7.0.20/src/VBox/Installer/linux/vboxdrv.sh
|
||||
|
||||
# Sign kernel modules if kernel configuration requires it.
|
||||
if test "$(kernel_requires_module_signature)" = "1"; then
|
||||
Index: VirtualBox-7.0.20/Config.kmk
|
||||
===================================================================
|
||||
--- VirtualBox-7.0.20.orig/Config.kmk
|
||||
+++ VirtualBox-7.0.20/Config.kmk
|
||||
@@ -3087,6 +3087,9 @@ else
|
||||
endif
|
||||
VBOX_MACOSX_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/darwin/NonOSE/VirtualBox.icns
|
||||
endif
|
||||
+ifndef VBOX_GCC_std
|
||||
+ VBOX_GCC_std := -std=c++17
|
||||
+endif
|
||||
|
||||
|
||||
ifndef VBOX_NOINC_DYNAMIC_CONFIG_KMK
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $Id: vboxautostart-service.sh 143795 2021-04-15 11:42:37Z vgalitsy $
|
||||
## @file
|
||||
# VirtualBox autostart service init script.
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (C) 2012-2020 Oracle Corporation
|
||||
#
|
||||
# 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 (GPL) 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.
|
||||
#
|
||||
|
||||
# chkconfig: 345 35 65
|
||||
# description: VirtualBox autostart service
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: vboxautostart-service
|
||||
# Required-Start: vboxdrv
|
||||
# Required-Stop: vboxdrv
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Description: VirtualBox autostart service
|
||||
### END INIT INFO
|
||||
|
||||
PATH=$PATH:/bin:/sbin:/usr/sbin
|
||||
SCRIPTNAME=vboxautostart-service.sh
|
||||
|
||||
[ -f /etc/debian_release -a -f /lib/lsb/init-functions ] || NOLSB=yes
|
||||
[ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg
|
||||
|
||||
if [ -n "$INSTALL_DIR" ]; then
|
||||
binary="$INSTALL_DIR/VBoxAutostart"
|
||||
else
|
||||
binary="/usr/lib/virtualbox/VBoxAutostart"
|
||||
fi
|
||||
|
||||
# silently exit if the package was uninstalled but not purged,
|
||||
# applies to Debian packages only (but shouldn't hurt elsewhere)
|
||||
[ ! -f /etc/debian_release -o -x $binary ] || exit 0
|
||||
|
||||
[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
|
||||
|
||||
# Preamble for Gentoo
|
||||
if [ "`which $0`" = "/sbin/rc" ]; then
|
||||
shift
|
||||
fi
|
||||
|
||||
begin_msg()
|
||||
{
|
||||
test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
|
||||
logger -t "${SCRIPTNAME}" "${1}."
|
||||
}
|
||||
|
||||
succ_msg()
|
||||
{
|
||||
logger -t "${SCRIPTNAME}" "${1}."
|
||||
}
|
||||
|
||||
fail_msg()
|
||||
{
|
||||
echo "${SCRIPTNAME}: failed: ${1}." >&2
|
||||
logger -t "${SCRIPTNAME}" "failed: ${1}."
|
||||
}
|
||||
|
||||
start_daemon() {
|
||||
usr="$1"
|
||||
shift
|
||||
su - $usr -c "$*"
|
||||
}
|
||||
|
||||
if which start-stop-daemon >/dev/null 2>&1; then
|
||||
start_daemon() {
|
||||
usr="$1"
|
||||
shift
|
||||
bin="$1"
|
||||
shift
|
||||
start-stop-daemon --chuid $usr --start --exec $bin -- $@
|
||||
}
|
||||
fi
|
||||
|
||||
vboxdrvrunning() {
|
||||
lsmod | grep -q "vboxdrv[^_-]"
|
||||
}
|
||||
|
||||
valid_db_entry() {
|
||||
|
||||
entry="$1"
|
||||
[ -z "$entry" ] && return 1
|
||||
|
||||
user="$2"
|
||||
[ -z "$user" ] && return 1
|
||||
|
||||
user_name=$(id -n -u "$user" 2>/dev/null)
|
||||
[ -z "$user_name" ] && return 1
|
||||
|
||||
user_id=$(id -u "$user" 2>/dev/null)
|
||||
|
||||
# Verify that @user identifies a user *by name* (i.e. not a numeric id).
|
||||
# Careful, all numeric user names are legal.
|
||||
if [ "$user_id" = "$user" ] && [ "$user_name" != "$user" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Verify whether file name is the same as file owner name.
|
||||
[ -z "$(find "$entry" -user "$user" -type f 2>/dev/null)" ] && return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
start() {
|
||||
[ -z "$VBOXAUTOSTART_DB" ] && exit 0
|
||||
[ -z "$VBOXAUTOSTART_CONFIG" ] && exit 0
|
||||
begin_msg "Starting VirtualBox VMs configured for autostart" console;
|
||||
vboxdrvrunning || {
|
||||
fail_msg "VirtualBox kernel module not loaded!"
|
||||
exit 0
|
||||
}
|
||||
PARAMS="--background --start --config $VBOXAUTOSTART_CONFIG"
|
||||
|
||||
# prevent inheriting this setting to VBoxSVC
|
||||
unset VBOX_RELEASE_LOG_DEST
|
||||
|
||||
for entry in "$VBOXAUTOSTART_DB"/*.start
|
||||
do
|
||||
user=$(basename "$entry" .start)
|
||||
[ "$user" = "*" ] && break
|
||||
valid_db_entry "$entry" "$user" || continue
|
||||
|
||||
start_daemon "$user" "$binary" $PARAMS > /dev/null 2>&1
|
||||
done
|
||||
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
[ -z "$VBOXAUTOSTART_DB" ] && exit 0
|
||||
[ -z "$VBOXAUTOSTART_CONFIG" ] && exit 0
|
||||
|
||||
PARAMS="--stop --config $VBOXAUTOSTART_CONFIG"
|
||||
|
||||
# prevent inheriting this setting to VBoxSVC
|
||||
unset VBOX_RELEASE_LOG_DEST
|
||||
|
||||
for entry in "$VBOXAUTOSTART_DB"/*.stop
|
||||
do
|
||||
user=$(basename "$entry" .stop)
|
||||
[ "$user" = "*" ] && break
|
||||
valid_db_entry "$entry" "$user" || continue
|
||||
|
||||
start_daemon "$user" "$binary" $PARAMS > /dev/null 2>&1
|
||||
done
|
||||
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
@@ -1,7 +1,6 @@
|
||||
[Unit]
|
||||
Description=VirtualBox guest VMSVGA resize client
|
||||
ConditionVirtualization=|oracle
|
||||
ExecCondition=sh -c '[[ "$XDG_SESSION_TYPE" == "wayland" ]] || exit -1'
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
@@ -10,4 +9,4 @@ Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
# also Wanted by 90-vboxguest.rules
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Script to build VirtualBox host kernel modules
|
||||
# Copyright C 2017 by Larry Finger
|
||||
#
|
||||
# This script is part of the openSUSE VirtualBox package
|
||||
#
|
||||
SOURCE="/usr/src/kernel-modules/virtualbox/src"
|
||||
LOGFILE="/var/log/virtualbox.log"
|
||||
INCLUDE="/lib/modules/`uname -r`/build/include"
|
||||
#
|
||||
# Test if vboxdrv module loaded. If it is, skip everything else
|
||||
loaded=$(lsmod | grep vboxdrv)
|
||||
if [ -n "$loaded" ] ; then
|
||||
echo "Kernel modules are loaded, unload them via"
|
||||
echo "systemctl stop vboxdrv.service if you wish to rebuild them."
|
||||
echo "Quitting .."
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
# Check if virtualbox-host-source is installed, quit if not
|
||||
if ! rpm -qf "$SOURCE/Makefile" &>/dev/null ; then
|
||||
echo "Sources for building host modules are not present,"
|
||||
echo "Use 'sudo zypper install virtualbox-host-source kernel-devel kernel-default-devel' to install them. Quitting .."
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
# Check if virtualbox-host-source version matches virtualbox version
|
||||
if [ "$(rpm -q virtualbox virtualbox-host-source --queryformat='%{version}-%{release}\n' 2>/dev/null | sort -u | wc -l)" -ne "1" ] ; then
|
||||
echo "virtualbox-host-source package version doesn't match the version of virtualbox package."
|
||||
echo "This situation is probably not fatal, thus we will try to continue .."
|
||||
fi
|
||||
# Prerequisites are available, start build
|
||||
pushd $SOURCE > /dev/null 2>&1
|
||||
echo "Building kernel modules..."
|
||||
make clean &>/dev/null
|
||||
make > $LOGFILE 2>&1
|
||||
if [ "$?" -ne 0 ] ; then
|
||||
echo ""
|
||||
echo "Build of VirtualBox host kernel modules failed."
|
||||
echo "Look at $LOGFILE to find reasons."
|
||||
popd > /dev/null 2>&1
|
||||
exit 1
|
||||
else
|
||||
echo "Kernel modules built correctly. They will now be installed."
|
||||
fi
|
||||
make install >> $LOGFILE 2>&1
|
||||
if [ "$?" -ne 0 ] ; then
|
||||
echo ""
|
||||
echo "Installation of VirtualBox host kernel modules failed."
|
||||
echo "Look at $LOGFILE to find reasons."
|
||||
popd > /dev/null 2>&1
|
||||
exit 1
|
||||
fi
|
||||
depmod -a
|
||||
modprobe -av vboxnetflt vboxnetadp
|
||||
popd > /dev/null 2>&1
|
||||
echo "Kernel modules are installed and loaded."
|
||||
exit 0
|
||||
|
||||
375
vboxdrv.sh
375
vboxdrv.sh
@@ -1,375 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Oracle VM VirtualBox
|
||||
# Linux kernel module init script
|
||||
|
||||
#
|
||||
# Copyright (C) 2006-2015 Oracle Corporation
|
||||
#
|
||||
# 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 (GPL) 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.
|
||||
#
|
||||
|
||||
# chkconfig: 345 20 80
|
||||
# description: VirtualBox Linux kernel module
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: vboxdrv
|
||||
# Required-Start: $syslog $remote_fs
|
||||
# Required-Stop: $syslog $remote_fs
|
||||
# Default-Start: 2 3 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: VirtualBox Linux module
|
||||
# Description: VirtualBox Linux kernel module
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/usr/sbin:/usr/bin:$PATH
|
||||
DEVICE=/dev/vboxdrv
|
||||
LOG="/var/log/vbox-install.log"
|
||||
MODPROBE=/usr/sbin/modprobe
|
||||
SCRIPTNAME=vboxdrv.sh
|
||||
INSTALL_DIR=/usr/lib/virtualbox
|
||||
|
||||
# The below is GNU-specific. See VBox.sh for the longer Solaris/OS X version.
|
||||
TARGET=`readlink -e -- "${0}"` || exit 1
|
||||
SCRIPT_DIR="${TARGET%/[!/]*}"
|
||||
|
||||
if $MODPROBE -c | grep -q '^allow_unsupported_modules *0'; then
|
||||
MODPROBE="$MODPROBE --allow-unsupported-modules"
|
||||
fi
|
||||
|
||||
[ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg
|
||||
export BUILD_TYPE
|
||||
export USERNAME
|
||||
export USER=$USERNAME
|
||||
|
||||
VIRTUALBOX="${INSTALL_DIR}/VirtualBox"
|
||||
VBOXMANAGE="${INSTALL_DIR}/VBoxManage"
|
||||
BUILDINTMP="${MODULE_SRC}/build_in_tmp"
|
||||
if test -u "${VBOXMANAGE}"; then
|
||||
GROUP=root
|
||||
DEVICE_MODE=0600
|
||||
else
|
||||
GROUP=vboxusers
|
||||
DEVICE_MODE=0660
|
||||
fi
|
||||
|
||||
[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
|
||||
|
||||
begin_msg()
|
||||
{
|
||||
test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
|
||||
logger -t "${SCRIPTNAME}" "${1}."
|
||||
}
|
||||
|
||||
succ_msg()
|
||||
{
|
||||
logger -t "${SCRIPTNAME}" "${1}."
|
||||
}
|
||||
|
||||
fail_msg()
|
||||
{
|
||||
echo "${SCRIPTNAME}: failed: ${1}." >&2
|
||||
logger -t "${SCRIPTNAME}" "failed: ${1}."
|
||||
}
|
||||
|
||||
failure()
|
||||
{
|
||||
fail_msg "$1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
running()
|
||||
{
|
||||
lsmod | grep -q "$1[^_-]"
|
||||
}
|
||||
|
||||
## Output the vboxdrv part of our udev rule. This is redirected to the right file.
|
||||
udev_write_vboxdrv() {
|
||||
VBOXDRV_GRP="$1"
|
||||
VBOXDRV_MODE="$2"
|
||||
|
||||
echo "KERNEL==\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"$VBOXDRV_GRP\", MODE=\"$VBOXDRV_MODE\""
|
||||
echo "KERNEL==\"vboxdrvu\", NAME=\"vboxdrvu\", OWNER=\"root\", GROUP=\"$VBOXDRV_GRP\", MODE=\"0660\""
|
||||
echo "KERNEL==\"vboxnetctl\", NAME=\"vboxnetctl\", OWNER=\"root\", GROUP=\"$VBOXDRV_GRP\", MODE=\"$VBOXDRV_MODE\""
|
||||
}
|
||||
|
||||
## Output the USB part of our udev rule. This is redirected to the right file.
|
||||
udev_write_usb() {
|
||||
INSTALLATION_DIR="$1"
|
||||
USB_GROUP="$2"
|
||||
|
||||
echo "SUBSYSTEM==\"usb_device\", ACTION==\"add\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}${USB_GROUP}\""
|
||||
echo "SUBSYSTEM==\"usb\", ACTION==\"add\", ENV{DEVTYPE}==\"usb_device\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}${USB_GROUP}\""
|
||||
echo "SUBSYSTEM==\"usb_device\", ACTION==\"remove\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\""
|
||||
echo "SUBSYSTEM==\"usb\", ACTION==\"remove\", ENV{DEVTYPE}==\"usb_device\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\""
|
||||
}
|
||||
|
||||
## Generate our udev rule file. This takes a change in udev rule syntax in
|
||||
## version 55 into account. It only creates rules for USB for udev versions
|
||||
## recent enough to support USB device nodes.
|
||||
generate_udev_rule() {
|
||||
VBOXDRV_GRP="$1" # The group owning the vboxdrv device
|
||||
VBOXDRV_MODE="$2" # The access mode for the vboxdrv device
|
||||
INSTALLATION_DIR="$3" # The directory VirtualBox is installed in
|
||||
USB_GROUP="$4" # The group that has permission to access USB devices
|
||||
NO_INSTALL="$5" # Set this to "1" to remove but not re-install rules
|
||||
|
||||
# Extra space!
|
||||
case "$USB_GROUP" in ?*) USB_GROUP=" $USB_GROUP" ;; esac
|
||||
case "$NO_INSTALL" in "1") return ;; esac
|
||||
udev_write_vboxdrv "$VBOXDRV_GRP" "$VBOXDRV_MODE"
|
||||
udev_write_usb "$INSTALLATION_DIR" "$USB_GROUP"
|
||||
}
|
||||
|
||||
## Install udev rule (disable with INSTALL_NO_UDEV=1 in
|
||||
## /etc/default/virtualbox).
|
||||
install_udev() {
|
||||
VBOXDRV_GRP="$1" # The group owning the vboxdrv device
|
||||
VBOXDRV_MODE="$2" # The access mode for the vboxdrv device
|
||||
INSTALLATION_DIR="$3" # The directory VirtualBox is installed in
|
||||
USB_GROUP="$4" # The group that has permission to access USB devices
|
||||
NO_INSTALL="$5" # Set this to "1" to remove but not re-install rules
|
||||
|
||||
if test -d /etc/udev/rules.d; then
|
||||
generate_udev_rule "$VBOXDRV_GRP" "$VBOXDRV_MODE" "$INSTALLATION_DIR" \
|
||||
"$USB_GROUP" "$NO_INSTALL"
|
||||
fi
|
||||
# Remove old udev description file
|
||||
rm -f /etc/udev/rules.d/10-vboxdrv.rules 2> /dev/null
|
||||
}
|
||||
|
||||
## Create a usb device node for a given sysfs path to a USB device.
|
||||
install_create_usb_node_for_sysfs() {
|
||||
path="$1" # sysfs path for the device
|
||||
usb_createnode="$2" # Path to the USB device node creation script
|
||||
usb_group="$3" # The group to give ownership of the node to
|
||||
if test -r "${path}/dev"; then
|
||||
dev="`cat "${path}/dev" 2> /dev/null`"
|
||||
major="`expr "$dev" : '\(.*\):' 2> /dev/null`"
|
||||
minor="`expr "$dev" : '.*:\(.*\)' 2> /dev/null`"
|
||||
class="`cat ${path}/bDeviceClass 2> /dev/null`"
|
||||
sh "${usb_createnode}" "$major" "$minor" "$class" \
|
||||
"${usb_group}" 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
udev_rule_file=/etc/udev/rules.d/60-vboxdrv.rules
|
||||
sysfs_usb_devices="/sys/bus/usb/devices/*"
|
||||
|
||||
## Install udev rules and create device nodes for usb access
|
||||
setup_usb() {
|
||||
VBOXDRV_GRP="$1" # The group that should own /dev/vboxdrv
|
||||
VBOXDRV_MODE="$2" # The mode to be used for /dev/vboxdrv
|
||||
INSTALLATION_DIR="$3" # The directory VirtualBox is installed in
|
||||
USB_GROUP="$4" # The group that should own the /dev/vboxusb device
|
||||
# nodes unless INSTALL_NO_GROUP=1 in
|
||||
# /etc/default/virtualbox. Optional.
|
||||
usb_createnode="$INSTALLATION_DIR/VBoxCreateUSBNode.sh"
|
||||
# install udev rule (disable with INSTALL_NO_UDEV=1 in
|
||||
# /etc/default/virtualbox)
|
||||
if [ "$INSTALL_NO_GROUP" != "1" ]; then
|
||||
usb_group=$USB_GROUP
|
||||
vboxdrv_group=$VBOXDRV_GRP
|
||||
else
|
||||
usb_group=root
|
||||
vboxdrv_group=root
|
||||
fi
|
||||
install_udev "${vboxdrv_group}" "$VBOXDRV_MODE" \
|
||||
"$INSTALLATION_DIR" "${usb_group}" \
|
||||
"$INSTALL_NO_UDEV" > ${udev_rule_file}
|
||||
# Build our device tree
|
||||
for i in ${sysfs_usb_devices}; do # This line intentionally without quotes.
|
||||
install_create_usb_node_for_sysfs "$i" "${usb_createnode}" \
|
||||
"${usb_group}"
|
||||
done
|
||||
}
|
||||
|
||||
cleanup_usb()
|
||||
{
|
||||
# Remove udev description file
|
||||
rm -f /etc/udev/rules.d/60-vboxdrv.rules
|
||||
rm -f /etc/udev/rules.d/10-vboxdrv.rules
|
||||
|
||||
# Remove our USB device tree
|
||||
rm -rf /dev/vboxusb
|
||||
}
|
||||
|
||||
start_drv()
|
||||
{
|
||||
begin_msg "Starting VirtualBox services" console
|
||||
if [ -d /proc/xen ]; then
|
||||
failure "Running VirtualBox in a Xen environment is not supported"
|
||||
fi
|
||||
if ! running vboxdrv; then
|
||||
if ! rm -f $DEVICE; then
|
||||
failure "Cannot remove $DEVICE"
|
||||
fi
|
||||
if ! $MODPROBE vboxdrv > /dev/null 2>&1; then
|
||||
/usr/sbin/vboxconfig
|
||||
if ! $MODPROBE vboxdrv > /dev/null 2>&1; then
|
||||
failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why"
|
||||
fi
|
||||
fi
|
||||
sleep .2
|
||||
fi
|
||||
# ensure the character special exists
|
||||
if [ ! -c $DEVICE ]; then
|
||||
MAJOR=`sed -n 's;\([0-9]\+\) vboxdrv$;\1;p' /proc/devices`
|
||||
if [ ! -z "$MAJOR" ]; then
|
||||
MINOR=0
|
||||
else
|
||||
MINOR=`sed -n 's;\([0-9]\+\) vboxdrv$;\1;p' /proc/extra`
|
||||
if [ ! -z "$MINOR" ]; then
|
||||
MAJOR=10
|
||||
fi
|
||||
fi
|
||||
if [ -z "$MAJOR" ]; then
|
||||
rmmod vboxdrv 2>/dev/null
|
||||
failure "Cannot locate the VirtualBox device"
|
||||
fi
|
||||
if ! mknod -m 0660 $DEVICE c $MAJOR $MINOR 2>/dev/null; then
|
||||
rmmod vboxdrv 2>/dev/null
|
||||
failure "Cannot create device $DEVICE with major $MAJOR and minor $MINOR"
|
||||
fi
|
||||
fi
|
||||
# ensure permissions
|
||||
if ! $MODPROBE vboxnetflt > /dev/null 2>&1; then
|
||||
failure "modprobe vboxnetflt failed. Please use 'dmesg' to find out why"
|
||||
fi
|
||||
if ! $MODPROBE vboxnetadp > /dev/null 2>&1; then
|
||||
failure "modprobe vboxnetadp failed. Please use 'dmesg' to find out why"
|
||||
fi
|
||||
# Create the /dev/vboxusb directory if the host supports that method
|
||||
# of USB access. The USB code checks for the existance of that path.
|
||||
if grep -q usb_device /proc/devices; then
|
||||
mkdir -p -m 0750 /dev/vboxusb 2>/dev/null
|
||||
chown root:vboxusers /dev/vboxusb 2>/dev/null
|
||||
fi
|
||||
succ_msg "VirtualBox services started"
|
||||
}
|
||||
|
||||
stop_drv()
|
||||
{
|
||||
begin_msg "Stopping VirtualBox services" console
|
||||
|
||||
if running vboxnetadp; then
|
||||
if ! rmmod vboxnetadp 2>/dev/null; then
|
||||
failure "Cannot unload module vboxnetadp"
|
||||
fi
|
||||
fi
|
||||
if running vboxdrv; then
|
||||
if running vboxnetflt; then
|
||||
if ! rmmod vboxnetflt 2>/dev/null; then
|
||||
failure "Cannot unload module vboxnetflt"
|
||||
fi
|
||||
fi
|
||||
if ! rmmod vboxdrv 2>/dev/null; then
|
||||
failure "Cannot unload module vboxdrv"
|
||||
fi
|
||||
if ! rm -f $DEVICE; then
|
||||
failure "Cannot unlink $DEVICE"
|
||||
fi
|
||||
fi
|
||||
succ_msg "VirtualBox services stopped"
|
||||
}
|
||||
|
||||
cleanup_vb()
|
||||
{
|
||||
for i in /lib/modules/*; do
|
||||
# We could just do "rm -f", but we only want to try deleting folders if
|
||||
# we are sure they were ours, i.e. they had our modules in beforehand.
|
||||
if test -e "${i}/extra/vboxdrv.ko" \
|
||||
|| test -e "${i}/extra/vboxnetadp.ko" \
|
||||
|| test -e "${i}/extra/vboxnetflt.ko"; then
|
||||
rm -f "${i}/extra/vboxdrv.ko" "${i}/extra/vboxnetadp.ko" \
|
||||
"${i}/extra/vboxnetflt.ko"
|
||||
# Remove the kernel version folder if it was empty except for us.
|
||||
test "`echo ${i}/extra/* ${i}/extra/.?* ${i}/* ${i}/.?*`" \
|
||||
= "${i}/extra/* ${i}/extra/.. ${i}/extra ${i}/.." &&
|
||||
rmdir "${i}/extra" "${i}" # We used to leave empty folders.
|
||||
version=`expr "${i}" : "/lib/modules/\(.*\)"`
|
||||
depmod -a "${version}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# setup_script
|
||||
setup_vb()
|
||||
{
|
||||
# Try to build the host kernel modules in case prepackaging has failed
|
||||
/usr/sbin/vboxconfig
|
||||
}
|
||||
|
||||
dmnstatus()
|
||||
{
|
||||
if running vboxdrv; then
|
||||
str="vboxdrv"
|
||||
if running vboxnetflt; then
|
||||
str="$str, vboxnetflt"
|
||||
if running vboxnetadp; then
|
||||
str="$str, vboxnetadp"
|
||||
fi
|
||||
fi
|
||||
echo "VirtualBox kernel modules ($str) are loaded."
|
||||
for i in $SHUTDOWN_USERS; do
|
||||
# don't create the ipcd directory with wrong permissions!
|
||||
if [ -d /tmp/.vbox-$i-ipc ]; then
|
||||
export VBOX_IPC_SOCKETID="$i"
|
||||
VMS=`$VBOXMANAGE --nologo list runningvms | sed -e 's/^".*".*{\(.*\)}/\1/' 2>/dev/null`
|
||||
if [ -n "$VMS" ]; then
|
||||
echo "The following VMs are currently running:"
|
||||
for v in $VMS; do
|
||||
echo " $v"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "VirtualBox kernel module is not loaded."
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start_drv
|
||||
;;
|
||||
stop)
|
||||
stop_drv
|
||||
;;
|
||||
restart)
|
||||
"$0" stop && "$0" start
|
||||
;;
|
||||
setup)
|
||||
# Create udev rule and USB device nodes.
|
||||
## todo Wouldn't it make more sense to install the rule to /lib/udev? This
|
||||
## is not a user-created configuration file after all.
|
||||
## todo Do we need a udev rule to create /dev/vboxdrv[u] at all? We have
|
||||
## working fall-back code here anyway, and the "right" code is more complex
|
||||
## than the fall-back. Unnecessary duplication?
|
||||
stop_drv && cleanup_vb
|
||||
setup_usb "$GROUP" "$DEVICE_MODE" "$INSTALL_DIR"
|
||||
setup_vb && start_drv
|
||||
;;
|
||||
cleanup)
|
||||
stop_drv && cleanup_vb
|
||||
cleanup_usb
|
||||
;;
|
||||
force-reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
status)
|
||||
dmnstatus
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|stop_vms|restart|force-reload|status}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Script to build VirtualBox guest kernel modules
|
||||
# Copyright C 2017 by Larry Finger
|
||||
#
|
||||
# This script is part of the openSUSE VirtualBox package
|
||||
#
|
||||
SOURCE="/usr/src/kernel-modules/"
|
||||
LOGFILE="/var/log/virtualbox.log"
|
||||
INCLUDE="/lib/modules/`uname -r`/build/include"
|
||||
#
|
||||
# Test if vboxguest module loaded. If it is, skip everything else
|
||||
loaded=$(lsmod | grep vboxguest)
|
||||
if [ -n "$loaded" ] ; then
|
||||
echo "Kernel modules available. but we will continue..."
|
||||
fi
|
||||
#
|
||||
# Check if virtualbox-guest-source is installed, quit if not
|
||||
if ! rpm -qf "$SOURCE/additions/guest_src.tar.bz2" &>/dev/null ; then
|
||||
echo "Sources for building guest modules are not present,"
|
||||
echo "Use 'sudo zypper install virtualbox-guest-source' to install them. Quitting .."
|
||||
exit 1
|
||||
fi
|
||||
# unpack source
|
||||
pushd $SOURCE > /dev/null 2>&1
|
||||
tar jxf additions/guest_src.tar.bz2 > /dev/null 2>&1
|
||||
popd > /dev/null 2>&1
|
||||
#
|
||||
# Check if virtualbox-guest-source version matches virtualbox version
|
||||
if [ "$(rpm -q virtualbox virtualbox-guest-source --queryformat='%{version}-%{release}\n' 2>/dev/null | sort -u | wc -l)" -ne "1" ] ; then
|
||||
echo "virtualbox-guest-source package version doesn't match the version of virtualbox package."
|
||||
echo "This situation is probably not fatal, thus we will try to continue .."
|
||||
fi
|
||||
# Prerequisites are available, start build
|
||||
pushd $SOURCE/additions/src > /dev/null 2>&1
|
||||
echo "Building kernel modules..."
|
||||
make > $LOGFILE 2>&1
|
||||
if [ "$?" -ne 0 ] ; then
|
||||
echo ""
|
||||
echo "Build of VirtualBox guest kernel modules failed."
|
||||
echo "Look at $LOGFILE to find reasons."
|
||||
popd > /dev/null 2>&1
|
||||
exit 1
|
||||
else
|
||||
echo "Kernel modules built correctly. They will now be installed."
|
||||
fi
|
||||
make install >> $LOGFILE 2>&1
|
||||
if [ "$?" -ne 0 ] ; then
|
||||
echo ""
|
||||
echo "Installation of VirtualBox guest kernel modules failed."
|
||||
echo "Look at $LOGFILE to find reasons."
|
||||
popd > /dev/null 2>&1
|
||||
exit 1
|
||||
fi
|
||||
depmod -a
|
||||
modprobe -av vboxguest vboxvideo
|
||||
cd ../..
|
||||
rm -rf additions
|
||||
popd > /dev/null 2>&1
|
||||
echo "Kernel modules are installed and loaded."
|
||||
exit 0
|
||||
|
||||
@@ -1,229 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $Id: vboxweb-service.sh 127855 2019-01-01 01:45:53Z bird $
|
||||
## @file
|
||||
# VirtualBox web service API daemon init script.
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (C) 2006-2019 Oracle Corporation
|
||||
#
|
||||
# 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 (GPL) 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.
|
||||
#
|
||||
|
||||
# chkconfig: 345 35 65
|
||||
# description: VirtualBox web service API
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: vboxweb-service
|
||||
# Required-Start: vboxdrv
|
||||
# Required-Stop: vboxdrv
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Description: VirtualBox web service API
|
||||
### END INIT INFO
|
||||
|
||||
PATH=$PATH:/bin:/sbin:/usr/sbin
|
||||
SCRIPTNAME=vboxweb-service.sh
|
||||
|
||||
[ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg
|
||||
|
||||
if [ -n "$INSTALL_DIR" ]; then
|
||||
binary="$INSTALL_DIR/vboxwebsrv"
|
||||
vboxmanage="$INSTALL_DIR/VBoxManage"
|
||||
else
|
||||
binary="/usr/lib/virtualbox/vboxwebsrv"
|
||||
vboxmanage="/usr/lib/virtualbox/VBoxManage"
|
||||
fi
|
||||
|
||||
# silently exit if the package was uninstalled but not purged,
|
||||
# applies to Debian packages only (but shouldn't hurt elsewhere)
|
||||
[ ! -f /etc/debian_release -o -x $binary ] || exit 0
|
||||
|
||||
[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
|
||||
|
||||
PIDFILE="/var/run/${SCRIPTNAME}"
|
||||
|
||||
# Preamble for Gentoo
|
||||
if [ "`which $0`" = "/sbin/rc" ]; then
|
||||
shift
|
||||
fi
|
||||
|
||||
begin_msg()
|
||||
{
|
||||
test -n "${2}" && echo "${SCRIPTNAME}: ${1}."
|
||||
logger -t "${SCRIPTNAME}" "${1}."
|
||||
}
|
||||
|
||||
succ_msg()
|
||||
{
|
||||
logger -t "${SCRIPTNAME}" "${1}."
|
||||
}
|
||||
|
||||
fail_msg()
|
||||
{
|
||||
echo "${SCRIPTNAME}: failed: ${1}." >&2
|
||||
logger -t "${SCRIPTNAME}" "failed: ${1}."
|
||||
}
|
||||
|
||||
start_daemon() {
|
||||
usr="$1"
|
||||
shift
|
||||
su - $usr -c "$*"
|
||||
}
|
||||
|
||||
killproc() {
|
||||
killall $1
|
||||
rm -f $PIDFILE
|
||||
}
|
||||
|
||||
if which start-stop-daemon >/dev/null 2>&1; then
|
||||
start_daemon() {
|
||||
usr="$1"
|
||||
shift
|
||||
bin="$1"
|
||||
shift
|
||||
start-stop-daemon --background --chuid $usr --start --exec $bin -- $@
|
||||
}
|
||||
|
||||
killproc() {
|
||||
start-stop-daemon --stop --exec $@
|
||||
}
|
||||
fi
|
||||
|
||||
vboxdrvrunning() {
|
||||
lsmod | grep vboxdrv
|
||||
}
|
||||
|
||||
check_single_user() {
|
||||
if [ -n "$2" ]; then
|
||||
fail_msg "VBOXWEB_USER must not contain multiple users!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
if ! test -f $PIDFILE; then
|
||||
[ -z "$VBOXWEB_USER" ] && exit 0
|
||||
begin_msg "Starting VirtualBox web service" console;
|
||||
check_single_user $VBOXWEB_USER
|
||||
temp=$(lsmod | grep vboxdrv)
|
||||
echo $temp
|
||||
if [ -z "$temp" ]; then
|
||||
fail_msg "VirtualBox kernel module not loaded!"
|
||||
exit 1
|
||||
fi
|
||||
PARAMS="--background"
|
||||
[ -n "$VBOXWEB_HOST" ] && PARAMS="$PARAMS -H $VBOXWEB_HOST"
|
||||
[ -n "$VBOXWEB_PORT" ] && PARAMS="$PARAMS -p $VBOXWEB_PORT"
|
||||
[ -n "$VBOXWEB_SSL_KEYFILE" ] && PARAMS="$PARAMS -s -K $VBOXWEB_SSL_KEYFILE"
|
||||
[ -n "$VBOXWEB_SSL_PASSWORDFILE" ] && PARAMS="$PARAMS -a $VBOXWEB_SSL_PASSWORDFILE"
|
||||
[ -n "$VBOXWEB_SSL_CACERT" ] && PARAMS="$PARAMS -c $VBOXWEB_SSL_CACERT"
|
||||
[ -n "$VBOXWEB_SSL_CAPATH" ] && PARAMS="$PARAMS -C $VBOXWEB_SSL_CAPATH"
|
||||
[ -n "$VBOXWEB_SSL_DHFILE" ] && PARAMS="$PARAMS -D $VBOXWEB_SSL_DHFILE"
|
||||
[ -n "$VBOXWEB_SSL_RANDFILE" ] && PARAMS="$PARAMS -r $VBOXWEB_SSL_RANDFILE"
|
||||
[ -n "$VBOXWEB_TIMEOUT" ] && PARAMS="$PARAMS -t $VBOXWEB_TIMEOUT"
|
||||
[ -n "$VBOXWEB_CHECK_INTERVAL" ] && PARAMS="$PARAMS -i $VBOXWEB_CHECK_INTERVAL"
|
||||
[ -n "$VBOXWEB_THREADS" ] && PARAMS="$PARAMS -T $VBOXWEB_THREADS"
|
||||
[ -n "$VBOXWEB_KEEPALIVE" ] && PARAMS="$PARAMS -k $VBOXWEB_KEEPALIVE"
|
||||
[ -n "$VBOXWEB_AUTHENTICATION" ] && PARAMS="$PARAMS -A $VBOXWEB_AUTHENTICATION"
|
||||
[ -n "$VBOXWEB_LOGFILE" ] && PARAMS="$PARAMS -F $VBOXWEB_LOGFILE"
|
||||
[ -n "$VBOXWEB_ROTATE" ] && PARAMS="$PARAMS -R $VBOXWEB_ROTATE"
|
||||
[ -n "$VBOXWEB_LOGSIZE" ] && PARAMS="$PARAMS -S $VBOXWEB_LOGSIZE"
|
||||
[ -n "$VBOXWEB_LOGINTERVAL" ] && PARAMS="$PARAMS -I $VBOXWEB_LOGINTERVAL"
|
||||
# set authentication method + password hash
|
||||
if [ -n "$VBOXWEB_AUTH_LIBRARY" ]; then
|
||||
su - "$VBOXWEB_USER" -c "$vboxmanage setproperty websrvauthlibrary \"$VBOXWEB_AUTH_LIBRARY\""
|
||||
if [ $? -ne 0 ]; then
|
||||
fail_msg "Error $? setting webservice authentication library to $VBOXWEB_AUTH_LIBRARY"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$VBOXWEB_AUTH_PWHASH" ]; then
|
||||
su - "$VBOXWEB_USER" -c "$vboxmanage setextradata global \"VBoxAuthSimple/users/$VBOXWEB_USER\" \"$VBOXWEB_AUTH_PWHASH\""
|
||||
if [ $? -ne 0 ]; then
|
||||
fail_msg "Error $? setting webservice password hash"
|
||||
fi
|
||||
fi
|
||||
# prevent inheriting this setting to VBoxSVC
|
||||
unset VBOX_RELEASE_LOG_DEST
|
||||
start_daemon $VBOXWEB_USER $binary $PARAMS > /dev/null 2>&1
|
||||
# ugly: wait until the final process has forked
|
||||
sleep .1
|
||||
PID=`pidof $binary 2>/dev/null`
|
||||
if [ -n "$PID" ]; then
|
||||
echo "$PID" > $PIDFILE
|
||||
RETVAL=0
|
||||
firewall-cmd --permanent --new-service=vboxweb
|
||||
firewall-cmd --permanent --service=vboxweb --set-description="service to remotely manage VirtualBox"
|
||||
firewall-cmd --permanent --add-port=18083/tcp --zone=internal --service=vboxweb
|
||||
firewall-cmd --permanent --set-short="vboxweb" --service=vboxweb
|
||||
succ_msg "VirtualBox web service started"
|
||||
else
|
||||
RETVAL=1
|
||||
fail_msg "VirtualBox web service failed to start"
|
||||
fi
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
if test -f $PIDFILE; then
|
||||
begin_msg "Stopping VirtualBox web service" console;
|
||||
killproc $binary
|
||||
RETVAL=$?
|
||||
# Be careful: wait 1 second, making sure that everything is cleaned up.
|
||||
sleep 1
|
||||
if ! pidof $binary > /dev/null 2>&1; then
|
||||
rm -f $PIDFILE
|
||||
succ_msg "VirtualBox web service stopped"
|
||||
else
|
||||
fail_msg "VirtualBox web service failed to stop"
|
||||
fi
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop && start
|
||||
}
|
||||
|
||||
status() {
|
||||
echo -n "Checking for VBox Web Service"
|
||||
if [ -f $PIDFILE ]; then
|
||||
echo " ...running"
|
||||
else
|
||||
echo " ...not running"
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
force-reload)
|
||||
restart
|
||||
;;
|
||||
status)
|
||||
status
|
||||
;;
|
||||
setup)
|
||||
;;
|
||||
cleanup)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
@@ -1,4 +1,3 @@
|
||||
KERNEL=="vboxguest", NAME="vboxguest", OWNER="root", MODE="0660" ENV{ID_INPUT}="1", ENV{ID_INPUT_MOUSE}="1"
|
||||
KERNEL=="vboxuser", NAME="vboxuser", OWNER="root", MODE="0660", TAG+="uaccess"
|
||||
ACTION=="add|change", SUBSYSTEM=="drm", KERNEL=="card[0-9]", SUBSYSTEMS=="pci", ATTRS{vendor}=="0x15ad", ATTRS{device}=="0x0405", TAG+="systemd", ENV{SYSTEMD_WANTS}="vboxclient.service"
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
%defattr (-,root,root)
|
||||
%dir %{kernel_module_directory}/%2-%1/
|
||||
%dir %{kernel_module_directory}/%2-%1/extra
|
||||
%{kernel_module_directory}/%2-%1/extra/vboxdrv.ko
|
||||
%{kernel_module_directory}/%2-%1/extra/vboxnetadp.ko
|
||||
%{kernel_module_directory}/%2-%1/extra/vboxnetflt.ko
|
||||
%{kernel_module_directory}/%2-%1/extra/vboxguest.ko
|
||||
%{kernel_module_directory}/%2-%1/extra/vboxsf.ko
|
||||
%{kernel_module_directory}/%2-%1/extra/vboxvideo.ko
|
||||
@@ -1,4 +1,3 @@
|
||||
Requires: kernel-%1
|
||||
Provides: virtualbox-kmp = %version
|
||||
Enhances: kernel-%1
|
||||
Supplements: (virtualbox-guest-tools and kernel-%1)
|
||||
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
REMOVE_DIRS=(
|
||||
src/VBox/Additions/WINNT
|
||||
src/VBox/Additions/os2
|
||||
src/VBox/Runtime/r3/darwin
|
||||
src/VBox/Runtime/r0drv/darwin
|
||||
src/VBox/Runtime/darwin
|
||||
kBuild/bin
|
||||
kBuild/msgstyles
|
||||
kBuild/tools
|
||||
kBuild/sdks
|
||||
tools/darwin.x86
|
||||
tools/darwin.amd64
|
||||
tools/freebsd.x86
|
||||
tools/os2.x86
|
||||
tools/solaris.x86
|
||||
tools/solaris.amd64
|
||||
tools/win.amd64
|
||||
tools/win.x86
|
||||
tools/linux.x86
|
||||
tools/linux.amd64
|
||||
)
|
||||
|
||||
set -o errexit
|
||||
|
||||
CMDNAME=${0##*/}
|
||||
SOURCEDIR=${0%$CMDNAME}
|
||||
|
||||
BASENAME=${1%.tar.bz2}
|
||||
|
||||
trap "rm -rf \"$BASENAME-patched.tar\" \"$BASENAME-patched.tar.bz2\"" ERR
|
||||
|
||||
for (( N=0 ; N<${#REMOVE_DIRS[@]} ; N++ )) ; do
|
||||
#REMOVE_DIRS[N]="$BASENAME/${REMOVE_DIRS[N]}"
|
||||
# use a wildcard because VirtualBox-1.6.0-OSE != VirtualBox-1.6.0_OSE
|
||||
REMOVE_DIRS[N]="*/${REMOVE_DIRS[N]}"
|
||||
done
|
||||
|
||||
cd "$SOURCEDIR" >/dev/null
|
||||
|
||||
if ! test -f "$BASENAME.tar.bz2" ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -f "$BASENAME-patched.tar.bz2" ; then
|
||||
if test "$BASENAME.tar.bz2" -ot "$BASENAME-patched.tar.bz2" ; then
|
||||
if test $CMDNAME -ot "$BASENAME-patched.tar.bz2" ; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
cp -a "$BASENAME.tar.bz2" "$BASENAME-patched.tar.bz2"
|
||||
bunzip2 "$BASENAME-patched.tar.bz2"
|
||||
tar --wildcards --delete -f "$BASENAME-patched.tar" "${REMOVE_DIRS[@]}"
|
||||
bzip2 "$BASENAME-patched.tar"
|
||||
@@ -1,70 +0,0 @@
|
||||
#!/bin/bash
|
||||
export QT_NO_KDE_INTEGRATION=1
|
||||
|
||||
# make certain that the user/group combination is valid
|
||||
/usr/bin/id -nG | grep -v -e "root" -e "vboxusers" >/dev/null && /usr/lib/virtualbox/VBoxPermissionMessage && exit
|
||||
#
|
||||
# Handle the issue regarding USB passthru
|
||||
# The following conditions apply:
|
||||
# 1. If ~/.config/VirtualBox/enable exists, the user accepts the security risk.
|
||||
# 2. If ~/.config/VirtualBox/disable exists, the user does not accept the risk. That file will contain the inode of /usr/lib/udev/rules.d/60-vboxdrv.rules.
|
||||
# When that changes, the VBoxUSB_DevRules will again be displayed as that means that VB has been reloaded.
|
||||
#
|
||||
devrules()
|
||||
{
|
||||
/usr/lib/virtualbox/VBoxUSB_DevRules
|
||||
if [ $? -eq 0 ] ; then
|
||||
# User accepts the risk
|
||||
touch ~/.config/VirtualBox/enable
|
||||
rm -f ~/.config/VirtualBox/disable
|
||||
else
|
||||
# User declines the risk - save the inode
|
||||
echo "" > ~/.config/VirtualBox/disable
|
||||
rm -f ~/.config/VirtualBox/enable
|
||||
fi
|
||||
}
|
||||
|
||||
# Start of main routine
|
||||
#
|
||||
# Ensure that ~/.config/VirtualBox exists
|
||||
mkdir -p ~/.config/VirtualBox
|
||||
# Get the inode for /usr/lib/udev/rules.d/60-vboxdrv.rules
|
||||
INODE=$(stat /usr/lib/udev/rules.d/60-vboxdrv.rules | grep Inode | cut -d' ' -f3)
|
||||
if [ ! -f ~/.config/VirtualBox/enable ] && [ ! -f ~/.config/VirtualBox/disable ] ; then
|
||||
# Neither file exists - find what the user wants
|
||||
devrules
|
||||
fi
|
||||
# Get the original Inode if it exists
|
||||
if [ -f ~/.config/VirtualBox/disable ] ; then
|
||||
read LINE < ~/.config/VirtualBox/disable
|
||||
else
|
||||
LINE=" "
|
||||
fi
|
||||
# If user originally declined, make certain that /usr/lib/udev/rules.d/60-vboxdrv.rules has not been changed
|
||||
if [ -f ~/.config/VirtualBox/disable ] && [ "$LINE" != "$INODE" ] && [ "$LINE" != "" ] ; then
|
||||
# disable is selected and the Inode has changed - ask again
|
||||
devrules
|
||||
fi
|
||||
if [ -f ~/.config/VirtualBox/disable ] ; then
|
||||
echo $INODE > ~/.config/VirtualBox/disable
|
||||
if [ "$LINE" != "$INODE" ] ; then
|
||||
if [ -f /usr/bin/kdesu ] ; then
|
||||
kdesu /usr/sbin/vbox-fix-usb-rules.sh
|
||||
fi
|
||||
if [ -f /usr/bin/gnomesu ] ; then
|
||||
gnomesu /usr/sbin/vbox-fix-usb-rules.sh
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# Check if extpack needs to be updated
|
||||
/usr/bin/update-extpack.sh
|
||||
# Check that /usr/lib/virtualbox/VirtualBoxVM has SUID permissions
|
||||
PERM=$(ls -l /usr/lib/virtualbox/VirtualBoxVM | grep rwsr)
|
||||
if [ -z "$PERM" ]
|
||||
then
|
||||
logger -s "Wrong permissions for VirtualBoxVM - use 'sudo chmod 4711 /usr/lib/virtualbox/VirtualBoxVM' to fix"
|
||||
/usr/lib/virtualbox/VBoxSUIDMessage
|
||||
exit 1
|
||||
fi
|
||||
# Now run the VB GUI
|
||||
LD_LIBRARY_PATH="/usr/lib/virtualbox${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" /usr/lib/virtualbox/VirtualBox6 $@
|
||||
@@ -1,3 +1,233 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 22 10:52:35 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 7.2.4
|
||||
* GUI: Fixed VBox Manager crash when some VM has a lot of
|
||||
snapshots.
|
||||
* GUI: Fixed VBox Manager crash while attempting to show error
|
||||
notifications too early.
|
||||
* GUI: Fixed VBox Manager freeze on Linux hosts at startup or
|
||||
while attempting to add a VM.
|
||||
* Network: Added a new experimental type of e1000 adapter.
|
||||
(82583V). It requires the ICH9 chipset, since MSIs are not
|
||||
supported by PIIX3.
|
||||
* USB Webcam: The virtual USB webcam is now part of the open
|
||||
source base package.
|
||||
* GUI: Fixed VirtualBox VM Manager crash when host was resuming
|
||||
from sleep.
|
||||
* Support for Linux 6.18
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 30 09:31:18 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Drop logic for building and installing on pre-Leap 15.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 11 15:03:37 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add curl-8.16.patch [boo#1249448]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 26 10:21:54 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Disable python bindings for Leap 16.0 (bsc#1248418)
|
||||
python3.13 is not supported by the current virtualbox version so
|
||||
we can't build the bindings.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 15 14:46:51 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 7.2.0
|
||||
* GUI: Moved global and VM tools from hamburger menus to global
|
||||
tools taskbar (vertically on the left) and the VM tools tabs
|
||||
(horizontally above the right hand panel) to make them easier
|
||||
to reach.
|
||||
* ARM host: Virtualization of Windows 11/ARM VMs.
|
||||
* Linux host: Video decoding acceleration when 3D is enabled.
|
||||
* Storage: The NVMe storage controller emulation is now part of
|
||||
the open source base package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 24 13:07:21 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 7.1.12
|
||||
* VMM: Fixed issue when running a nested VM caused Guru
|
||||
Meditation for outer VM
|
||||
* NAT: Fixed issue when VMs with long names were unable to start
|
||||
* Linux host: Fixed possible kernel panic when using bridged
|
||||
networking with a network interface handled by the ixgbe
|
||||
driver on newer kernels
|
||||
* Recording: Fixed issue when Windows Guest Machine was unable
|
||||
to start when recording was enabled in Display Settings
|
||||
* Support for Linux 6.16
|
||||
* Linux Guest Additions (LGA): Fixed issue when 'rcvboxadd
|
||||
status-kernel' was reporting incorrect status when guest was
|
||||
running kernel 3.10 series and older
|
||||
* LGA: Fixed issue when VBoxClient was unable to start if guest
|
||||
was running kernel 2.6 series and older
|
||||
* LGA: Fixed issue which caused a warning in system log due to
|
||||
incorrect udev rule
|
||||
- Delete kernel-6.16-READ-WRITE.patch, kernel-6.16-from_timer.patch,
|
||||
kernel-6.16-page-index.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 11 07:18:15 UTC 2025 - Jiri Slaby <jslaby@suse.cz>
|
||||
|
||||
- fix build against 6.16, add:
|
||||
* kernel-6.16-READ-WRITE.patch
|
||||
* kernel-6.16-from_timer.patch
|
||||
* kernel-6.16-page-index.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 4 21:09:42 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 7.1.10
|
||||
* Linux host: Fixed issue which caused VM Selector process crash
|
||||
due to missing libdl.so and libpthread.so libraries
|
||||
[boo#1231346, boo#1231456, boo#1233145, boo#1233164,
|
||||
boo#1233498, boo#1240833]
|
||||
* RDP: Fixed issue when it was not possible to paste clipboard
|
||||
buffer into a guest over RDP remote session
|
||||
* Linux 6.15 support
|
||||
- Delete kernel-6-15-EXTRA_CFLAGS.patch kernel-6-15-fb_probe.patch
|
||||
kernel-6-15-mkdir.patch kernel-6-15-mode_valid.patch
|
||||
kernel-6-15-timer.patch (merged/obsolete)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 3 16:34:33 UTC 2025 - Martin Jambor <mjambor@suse.com>
|
||||
|
||||
- Adjust gentoo-C23.patch to fix building the kmp flavor which was
|
||||
broken by the previous patch by keeping the bool typedef when
|
||||
building a kmp. [boo#1242085]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 27 15:19:29 UTC 2025 - Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
- Add gentoo-C23.patch, taken from the corresponding gentoo
|
||||
package, to fix building with GCC 15 where the C language
|
||||
defaults to standard C23. [boo#1242085]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 16 13:59:59 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 7.1.8
|
||||
* VMM: Fixed issue when VM clock went backwards in rare
|
||||
circumstances.
|
||||
* Graphics: Fixed issue when assertion was triggered on
|
||||
restoring VM state if VMSVGA graphics adapter was used
|
||||
without 3D acceleration.
|
||||
* Linux Guest Additions: Fixed issue when VBoxClient could
|
||||
crash in XWayland guest.
|
||||
- Delete kernel-6-14.patch (obsolete)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 9 09:02:26 UTC 2025 - Jiri Slaby <jslaby@suse.cz>
|
||||
|
||||
- build with kernel 6.15, add:
|
||||
* kernel-6-15-EXTRA_CFLAGS.patch
|
||||
* kernel-6-15-fb_probe.patch -- this disables fb_probe and needs
|
||||
a rewrite similar to "9fa154f40eb6 drm/{i915,xe}: Run DRM default
|
||||
client setup". Good luck.
|
||||
* kernel-6-15-mkdir.patch
|
||||
* kernel-6-15-mode_valid.patch
|
||||
* kernel-6-15-timer.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 28 10:06:19 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 7.1.6a
|
||||
* VirtioNet: Fixed issue with re-negotiation of features
|
||||
after reset
|
||||
* Graphics: Fixed issue with Linux guest screen flickering when
|
||||
guest was using VMSVGA graphics adapter
|
||||
* Linux Guest Additions: Introduced initial support for
|
||||
kernel 6.13
|
||||
- Delete kernel-6-13.patch (merged)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 28 06:42:00 UTC 2025 - Jiri Slaby <jslaby@suse.cz>
|
||||
|
||||
- add: kernel-6-14.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 12 10:00:50 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Build python bindings for python311, do not use python3 since
|
||||
virtualbox doesn't support python3.13 yet.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 21 11:17:17 UTC 2025 - Jiri Slaby <jslaby@suse.cz>
|
||||
|
||||
- add: kernel-6-13.patch (bsc#1235146)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 4 01:40:37 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Remove bogus ExecCondition= from vboxclient.service.
|
||||
[boo#1234870]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 29 22:25:33 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Set kvm.enable_virt_at_load=0 via a modprobe file when virtualbox
|
||||
is installed, to workaround kvm.ko stealing VMX mode.
|
||||
<https://lore.kernel.org/kvm/ZwQjUSOle6sWARsr@google.com/T/ >
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 14 16:03:49 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Use distro-default INSTALL_MOD_DIR for both kmp
|
||||
and for local-built files. Add host-source.patch [boo#1233251].
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 16 23:37:43 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 7.1.4
|
||||
* NAT: Fixed DHCP problems with certain guests when domain is
|
||||
empty
|
||||
* VMSVGA: Improved flickering, black screen and other screen
|
||||
update issues with recent Linux kernels
|
||||
* Linux Guest Additions: Introduce initial support for kernel 6.12
|
||||
* EFI: Added missing LsiLogic MPT SCSI driver again to fix
|
||||
booting from devices attached to this device if the EFI
|
||||
firmware is used (7.1.0 regression)
|
||||
* EFI: Restored broken network boot support (7.1.0 regression)
|
||||
* Adressed CVE-2024-21248 [boo#1231735],
|
||||
CVE-2024-21273 [boo#1231736], CVE-2024-21259 [boo#1231737],
|
||||
CVE-2024-21263 [boo#1231738]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 1 23:30:00 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Edit cxx17.patch to make the Extension Pack work with our
|
||||
compiler flags and RT_NOEXCEPT choices. [boo#1231225]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 29 12:00:17 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Set BuildRequire on glslang to 11.5; this is when it starts to
|
||||
recognize GL_EXT_spirv_intrinsics.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 20 22:33:49 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 7.1
|
||||
* The GUI now offers a selection between Basic and Experienced
|
||||
user level with reduced or full UI functionality.
|
||||
* VRDE: If user does not set up TLS with custom certificates,
|
||||
enable it with self-signed certificate, including issuing a
|
||||
new one before the old one expires
|
||||
* NAT: New engine with IPv6 support.
|
||||
* Linux host and guest: Added Wayland support for Clipboard
|
||||
sharing.
|
||||
- Add cxx17.patch to workaround "new" build failures
|
||||
with gcc14/C++17
|
||||
- Move the C++17 command line switch from vbox-vboxadd-init-script.diff
|
||||
to cxx17.patch
|
||||
- Add Conflict markers to prevent the situation {virtualbox-7.1
|
||||
combined with virtualbox-qt-7.0}; old VBQT did not have the right
|
||||
(strong enough) Requires lines.
|
||||
|
||||
---------------------------------------------------------------------
|
||||
Wed Aug 12 20:12:00 UTC 2024 - Larry Rainey <llrainey15@gmail.com>
|
||||
|
||||
|
||||
577
virtualbox.spec
577
virtualbox.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package virtualbox
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,44 +15,61 @@
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%if "@BUILD_FLAVOR@" == "kmp"
|
||||
### macros for virtualbox-kmp ###
|
||||
%define main_package 0
|
||||
%define kmp_package 1
|
||||
%if 0%{?suse_version} > 1600
|
||||
%define kmp_longterm 1
|
||||
%endif
|
||||
%define name_suffix kmp
|
||||
%define dash -
|
||||
%define package_summary Kernel modules for VirtualBox
|
||||
%if %{undefined kernel_module_directory}
|
||||
%define kernel_module_directory /lib/modules
|
||||
%endif
|
||||
# macros for virtualbox-kmp
|
||||
%define main_package 0
|
||||
%define kmp_package 1
|
||||
%if 0%{?suse_version} > 1600
|
||||
%define kmp_longterm 1
|
||||
%endif
|
||||
%define name_suffix kmp
|
||||
%define dash -
|
||||
%define package_summary Kernel modules for VirtualBox
|
||||
%if %{undefined kernel_module_directory}
|
||||
%define kernel_module_directory /lib/modules
|
||||
%endif
|
||||
%else
|
||||
### macros for virtualbox main package ###
|
||||
%define main_package 1
|
||||
%define kmp_package 0
|
||||
%define package_summary VirtualBox is an Emulator
|
||||
%define qt5ver %(rpm -q --queryformat %%{version} libQt5Core5|perl -ne '/(\\d+)\\.(\\d+)\\.(\\d+)?/&&printf "%%d%%02d%%02d\\n",$1,$2,$3')
|
||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
# macros for virtualbox main package ###
|
||||
%define main_package 1
|
||||
%define kmp_package 0
|
||||
%define package_summary VirtualBox is an Emulator
|
||||
%define qt5ver %(rpm -q --queryformat %%{version} libQt5Core5|perl -ne '/(\\d+)\\.(\\d+)\\.(\\d+)?/&&printf "%%d%%02d%%02d\\n",$1,$2,$3')
|
||||
# Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||
%if !%{defined _fillupdir}
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
%if ! %{defined _distconfdir}
|
||||
%define _distconfdir %{_sysconfdir}
|
||||
%endif
|
||||
# Do not provide libGL.so symbols - they are owned by Mesa already and
|
||||
# this could potentially confuse rpm/zypp
|
||||
%global __provides_exclude ^libE?GL.so.1.*$
|
||||
# With 32-bit builds, the job limit cannot be larger than 2, otherwise
|
||||
# the build runs out of memory.
|
||||
# For 64-bit builds, no memory limit is reached when more jobs are run,
|
||||
# but the builds crash with strange errors.
|
||||
# For the above reasons, limit the number of jobs to 2.
|
||||
%define _vbox_instdir %{_prefix}/lib/virtualbox
|
||||
%define _udevrulesdir %{_prefix}/lib/udev/rules.d
|
||||
%endif
|
||||
%if ! %{defined _distconfdir}
|
||||
%define _distconfdir %{_sysconfdir}
|
||||
|
||||
# If you want to disable building Python parts, just set this to %%nil
|
||||
%if 0%{?suse_version} == 1600
|
||||
# Leap 16.0 has python3.13, currently not supported
|
||||
%global mypython %nil
|
||||
%else
|
||||
# Using python3.11 for Factory, current version doesn't support python3.13
|
||||
%global mypython python311
|
||||
%endif
|
||||
# Do not provide libGL.so symbols - they are owned by Mesa already and this could potentially confuse rpm/zypp
|
||||
%global __provides_exclude ^libE?GL.so.1.*$
|
||||
# With 32-bit builds, the job limit cannot be larger than 2, otherwise the build runs out of memory.
|
||||
# For 64-bit builds, no memory limit is reached when more jobs are run, but the builds crash with strange errors.
|
||||
# For the above reasons, limit the number of jobs to 2.
|
||||
%define _vbox_instdir %{_prefix}/lib/virtualbox
|
||||
%define _udevrulesdir %{_prefix}/lib/udev/rules.d
|
||||
|
||||
%if "%mypython" != ""
|
||||
%global __mypython %{expand:%%__%{mypython}}
|
||||
%global mypython_sitelib %{expand:%%%{mypython}_sitelib}
|
||||
%endif
|
||||
# ********* If the VB version exceeds 6.1.x, notify the libvirt maintainer!!
|
||||
|
||||
Name: virtualbox%{?dash}%{?name_suffix}
|
||||
Version: 7.0.20
|
||||
Version: 7.2.4
|
||||
%define rversion 7.2.4
|
||||
Release: 0
|
||||
Summary: %{package_summary}
|
||||
License: GPL-3.0-or-later
|
||||
@@ -67,11 +84,11 @@ URL: https://www.virtualbox.org/
|
||||
# script virtualbox-patch-source.sh will do the job :)
|
||||
# WARNING: This is not a comment, but the real command to repack source
|
||||
#%%(bash %%{_sourcedir}/virtualbox-patch-source.sh VirtualBox-%%{version}.tar.bz2)
|
||||
Source0: VirtualBox-%{version}-patched.tar.bz2
|
||||
#Source: https://download.virtualbox.org/virtualbox/7.1.8/VirtualBox-7.1.8.tar.bz2
|
||||
Source0: VirtualBox-%{version}-patched.tpxz
|
||||
Source1: UserManual.pdf
|
||||
Source3: virtualbox-60-vboxguest.rules
|
||||
Source4: virtualbox-default.virtualbox
|
||||
Source5: virtualbox-kmp-files
|
||||
Source7: virtualbox-kmp-preamble
|
||||
Source8: update-extpack.sh
|
||||
Source9: virtualbox-wrapper.sh
|
||||
@@ -113,6 +130,10 @@ Patch8: turn_off_cloud_net.patch
|
||||
Patch9: vbox-usb-warning.diff
|
||||
# Patch for 15.5
|
||||
Patch10: fix_for_leap15.5.patch
|
||||
Patch11: cxx17.patch
|
||||
Patch12: host-source.patch
|
||||
Patch20: gentoo-C23.patch
|
||||
Patch21: curl-8.16.patch
|
||||
#
|
||||
# Common BuildRequires for both virtualbox and virtualbox-kmp
|
||||
BuildRequires: %{kernel_module_package_buildreqs}
|
||||
@@ -122,9 +143,14 @@ BuildRequires: kernel-syms-longterm
|
||||
BuildRequires: acpica
|
||||
BuildRequires: cmake-full
|
||||
BuildRequires: dwarves
|
||||
%if 0%{?suse_version} && 0%{?suse_version} >= 1600
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: kbuild >= 0.1.9998svn3101
|
||||
%else
|
||||
BuildRequires: gcc12
|
||||
BuildRequires: gcc12-c++
|
||||
%endif
|
||||
BuildRequires: kbuild >= 0.1.9998+svn3686
|
||||
BuildRequires: libcap-devel
|
||||
BuildRequires: libcurl-devel
|
||||
BuildRequires: libopenssl-devel
|
||||
@@ -138,38 +164,24 @@ ExclusiveArch: x86_64
|
||||
%if 0%{?sle_version} != 120300
|
||||
Source2: VirtualBox.appdata.xml
|
||||
%endif
|
||||
### Requirements for virtualbox main package ###
|
||||
|
||||
%if %{main_package}
|
||||
BuildRequires: LibVNCServer-devel
|
||||
BuildRequires: SDL2-devel
|
||||
BuildRequires: alsa-devel
|
||||
BuildRequires: device-mapper-devel
|
||||
BuildRequires: dmidecode
|
||||
BuildRequires: e2fsprogs-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: glibc-devel-static
|
||||
BuildRequires: glslang-devel
|
||||
BuildRequires: gsoap-devel >= 2.8.50
|
||||
BuildRequires: glslang-devel >= 11.5
|
||||
BuildRequires: java-devel >= 1.6.0
|
||||
#BuildRequires: libSDL2-2_0-0
|
||||
BuildRequires: libelf-devel
|
||||
BuildRequires: libidl-devel
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: libopus-devel
|
||||
BuildRequires: libqt5-linguist
|
||||
BuildRequires: libqt5-linguist-devel
|
||||
BuildRequires: libqt5-qtbase-devel
|
||||
BuildRequires: libqt5-qttools-devel
|
||||
BuildRequires: libqt5-qtx11extras-devel
|
||||
BuildRequires: libtpms-devel
|
||||
BuildRequires: libvpx-devel
|
||||
BuildRequires: libxslt-devel
|
||||
BuildRequires: libzio-devel
|
||||
BuildRequires: lzfse
|
||||
BuildRequires: lzfse-devel
|
||||
BuildRequires: pulseaudio-devel
|
||||
%if "%mypython" != ""
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: %{mypython}-devel
|
||||
BuildRequires: %{mypython}-setuptools
|
||||
BuildRequires: %{mypython}-pip
|
||||
%endif
|
||||
BuildRequires: qt6-tools-linguist
|
||||
BuildRequires: rpm
|
||||
BuildRequires: sed
|
||||
BuildRequires: systemd-rpm-macros
|
||||
@@ -177,16 +189,38 @@ BuildRequires: sysuser-tools
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: which
|
||||
BuildRequires: xorg-x11-server
|
||||
BuildRequires: pkgconfig(Qt6Core) >= 6.8
|
||||
BuildRequires: pkgconfig(Qt6DBus)
|
||||
BuildRequires: pkgconfig(Qt6Gui)
|
||||
BuildRequires: pkgconfig(Qt6Help)
|
||||
BuildRequires: pkgconfig(Qt6Network)
|
||||
BuildRequires: pkgconfig(Qt6PrintSupport)
|
||||
BuildRequires: pkgconfig(Qt6Sql)
|
||||
BuildRequires: pkgconfig(Qt6StateMachine)
|
||||
BuildRequires: pkgconfig(Qt6Widgets)
|
||||
BuildRequires: pkgconfig(Qt6Xml)
|
||||
BuildRequires: pkgconfig(alsa)
|
||||
BuildRequires: pkgconfig(devmapper)
|
||||
BuildRequires: pkgconfig(fontsproto)
|
||||
BuildRequires: pkgconfig(glu)
|
||||
BuildRequires: pkgconfig(glx)
|
||||
BuildRequires: pkgconfig(gsoap) >= 2.8.50
|
||||
BuildRequires: pkgconfig(libelf)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(libpulse)
|
||||
BuildRequires: pkgconfig(libssl)
|
||||
BuildRequires: pkgconfig(libtpms)
|
||||
BuildRequires: pkgconfig(libvncserver)
|
||||
BuildRequires: pkgconfig(libxslt)
|
||||
BuildRequires: pkgconfig(opus)
|
||||
BuildRequires: pkgconfig(randrproto)
|
||||
BuildRequires: pkgconfig(renderproto)
|
||||
BuildRequires: pkgconfig(resourceproto)
|
||||
BuildRequires: pkgconfig(scrnsaverproto)
|
||||
BuildRequires: pkgconfig(sdl)
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
BuildRequires: pkgconfig(udev)
|
||||
BuildRequires: pkgconfig(vpx)
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xau)
|
||||
BuildRequires: pkgconfig(xcomposite)
|
||||
@@ -203,35 +237,34 @@ BuildRequires: pkgconfig(xproto)
|
||||
BuildRequires: pkgconfig(xrandr)
|
||||
Requires: %{name}-kmp = %{version}
|
||||
Requires(pre): %fillup_prereq
|
||||
Requires(pre): permissions
|
||||
Requires(post): permissions
|
||||
Requires(verify): permissions
|
||||
Conflicts: %{name}-qt < %{version}
|
||||
Conflicts: %{name}-qt > %{version}
|
||||
Conflicts: %{name}-websrv < %{version}
|
||||
Conflicts: %{name}-websrv > %{version}
|
||||
Recommends: %{name}-gui = %{version}
|
||||
# package i4l-vbox from source package i4l-base shares the directory /etc/vbox
|
||||
# with us, but with different owner.
|
||||
Conflicts: i4l-vbox
|
||||
#rename from ose version:
|
||||
Provides: %{name}-ose = %{version}
|
||||
Obsoletes: %{name}-ose < %{version}
|
||||
%{?systemd_ordering}
|
||||
%{?sysusers_requires}
|
||||
%if 0%{?suse_version} > 1325
|
||||
BuildRequires: libboost_headers-devel
|
||||
%else
|
||||
BuildRequires: boost-devel
|
||||
%endif
|
||||
%ifarch amd64 x86_64 ia32e em64t
|
||||
%if 0%{?suse_version} && 0%{?suse_version} >= 1600
|
||||
BuildRequires: gcc-32bit
|
||||
BuildRequires: gcc-c++-32bit
|
||||
%else
|
||||
BuildRequires: gcc12-32bit
|
||||
BuildRequires: gcc12-c++-32bit
|
||||
%endif
|
||||
BuildRequires: xorg-x11-libX11-devel-32bit
|
||||
BuildRequires: xorg-x11-libXext-devel-32bit
|
||||
BuildRequires: xorg-x11-libXmu-devel-32bit
|
||||
BuildRequires: xorg-x11-libXt-devel-32bit
|
||||
%endif
|
||||
%if ! 0%{?suse_version} > 1325
|
||||
Requires(pre): net-tools-deprecated
|
||||
%endif
|
||||
# end of main_package
|
||||
%endif
|
||||
### Requirements for virtualbox-kmp ###
|
||||
|
||||
%if %{kmp_package}
|
||||
BuildRequires: alsa-devel
|
||||
BuildRequires: libiptc-devel
|
||||
@@ -239,10 +272,9 @@ BuildRequires: libpulse-devel
|
||||
BuildRequires: libxml2-devel
|
||||
Requires: ca-certificates
|
||||
Requires: openSUSE-signkey-cert
|
||||
%kernel_module_package -p %{SOURCE7} -n virtualbox -f %{SOURCE5} -x kdump um xen pae xenpae pv
|
||||
# end of kmp_package
|
||||
%kernel_module_package -p %{SOURCE7} -n virtualbox -x kdump um xen pae xenpae pv
|
||||
%endif
|
||||
### Description and subpackages of virtualbox main package ###
|
||||
|
||||
%if %{main_package}
|
||||
%description
|
||||
VirtualBox is a hosted hypervisor for x86 computers. It supports the
|
||||
@@ -256,7 +288,9 @@ the terms of the GNU Public License (GPL).
|
||||
Summary: Qt GUI part for %{name}
|
||||
Group: System/Emulators/PC
|
||||
Requires(pre): %{name} = %{version}
|
||||
Requires(pre): permissions
|
||||
Requires: %{name} = %{version}
|
||||
Requires(post): permissions
|
||||
Requires(verify): permissions
|
||||
Provides: %{name}-gui = %{version}
|
||||
#this is needed during update to trigger installing qt subpackage
|
||||
#http://en.opensuse.org/openSUSE:Upgrade_dependencies_explanation#Splitting_and_Merging
|
||||
@@ -291,36 +325,37 @@ Provides: %{name}-ose-guest-tools = %{version}
|
||||
Obsoletes: %{name}-ose-guest-tools < %{version}
|
||||
Obsoletes: virtualbox-guest-x11 < %{version}
|
||||
Obsoletes: xorg-x11-driver-virtualbox-ose < %{version}
|
||||
%if ! 0%{?suse_version} > 1325
|
||||
Requires(pre): net-tools-deprecated
|
||||
%endif
|
||||
%{?sysusers_requires}
|
||||
|
||||
%description guest-tools
|
||||
VirtualBox guest addition tools.
|
||||
|
||||
%package -n python3-%{name}
|
||||
%if "%mypython" != ""
|
||||
%package -n %{mypython}-%{name}
|
||||
Summary: Python bindings for %{name}
|
||||
Group: Development/Libraries/Python
|
||||
Requires: %{name} = %{version}
|
||||
#rename from "ose" version:
|
||||
Provides: python3-%{name} = %{version}-%{release}
|
||||
Provides: %{mypython}-%{name} = %{version}-%{release}
|
||||
Obsoletes: python-%{name} < %{version}-%{release}
|
||||
Obsoletes: python2-%{name} < %{version}-%{release}
|
||||
Obsoletes: python3-%{name} < %{version}-%{release}
|
||||
Provides: python3-%{name}-ose = %{version}
|
||||
Provides: %{mypython}-%{name}-ose = %{version}
|
||||
Obsoletes: python-%{name}-ose < %{version}
|
||||
Obsoletes: python2-%{name}-ose < %{version}
|
||||
Obsoletes: python3-%{name}-ose < %{version}
|
||||
|
||||
%description -n python3-%{name}
|
||||
%description -n %{mypython}-%{name}
|
||||
Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package.
|
||||
%endif
|
||||
|
||||
%package devel
|
||||
Summary: Devel files for %{name}
|
||||
Group: Development/Libraries/Other
|
||||
Requires: %{name} = %{version}
|
||||
Requires: python3-%{name} = %{version}
|
||||
%if "%mypython" != ""
|
||||
Requires: %{mypython}-%{name} = %{version}
|
||||
%endif
|
||||
#rename from "ose" version:
|
||||
Provides: %{name}-ose-devel = %{version}
|
||||
Obsoletes: %{name}-ose-devel < %{version}
|
||||
@@ -376,11 +411,9 @@ Requires: %{name} = %{version}
|
||||
Virtual Network Computing (VNC) is a graphical desktop sharing system that uses the Remote Frame Buffer
|
||||
protocol (RFB) to remotely control another computer. When this optional feature is desired, it is installed
|
||||
as an "extpack" for VirtualBox. The implementation is licensed under GPL.
|
||||
###########################################
|
||||
# main_package
|
||||
%endif
|
||||
|
||||
### Description of virtualbox-kmp ###
|
||||
%if %{kmp_package}
|
||||
%description
|
||||
This package contains the kernel-modules that VirtualBox uses to create or run virtual machines.
|
||||
@@ -388,17 +421,7 @@ This package contains the kernel-modules that VirtualBox uses to create or run v
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n VirtualBox-%{version}
|
||||
%patch -P 1 -p1
|
||||
%patch -P 2 -p1
|
||||
%patch -P 3 -p1
|
||||
%patch -P 4 -p1
|
||||
%patch -P 5 -p1
|
||||
%patch -P 6 -p1
|
||||
%patch -P 7 -p1
|
||||
%patch -P 8 -p1
|
||||
%patch -P 9 -p1
|
||||
%patch -P 10 -p1
|
||||
%autosetup -n VirtualBox-%{rversion} -p1
|
||||
|
||||
### Documents for virtualbox main package ###
|
||||
%if %{main_package}
|
||||
@@ -419,22 +442,32 @@ sed -i 's:include/drm:%{_prefix}/src/linux/include/drm:' src/VBox/Additions/linu
|
||||
### %%build, %%install, and %%file sections for virtualbox ###
|
||||
%if %{main_package}
|
||||
%build
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1600
|
||||
# kmk is annoying, does not respond to CXX=g++-12 ...
|
||||
mkdir tc
|
||||
export PATH="$PWD/tc:$PATH"
|
||||
ln -s /usr/bin/gcc-12 tc/gcc
|
||||
ln -s /usr/bin/g++-12 tc/g++
|
||||
%endif
|
||||
# Disable LTO - Link Time Optimization
|
||||
%define _lto_cflags %{nil}
|
||||
#ensure we don't ever use them
|
||||
rm -rf src/libs/{libpng-*,libxml2-*,libxslt-*,zlib-*,boost-*}
|
||||
|
||||
# --disable-kmods don't build Linux kernel modules - but use SUSE specific way see few lines under
|
||||
# NOT an autoconf ceonfigure macro
|
||||
# NOT an autoconf configure script
|
||||
./configure \
|
||||
--enable-vnc \
|
||||
--enable-vde \
|
||||
--disable-kmods \
|
||||
--with-linux="%{_prefix}" \
|
||||
--disable-java \
|
||||
--disable-docs \
|
||||
--enable-webservice \
|
||||
--with-makeself=%{_bindir}/true
|
||||
--enable-vnc \
|
||||
--enable-vde \
|
||||
--disable-kmods \
|
||||
--with-linux="%{_prefix}" \
|
||||
--disable-java \
|
||||
--disable-docs \
|
||||
--enable-webservice \
|
||||
%if "%mypython" == ""
|
||||
--disable-python \
|
||||
%endif
|
||||
--with-makeself=%{_bindir}/true
|
||||
|
||||
# configure actually warns we should source env.sh (which seems like it could influence the build...)
|
||||
source ./env.sh
|
||||
@@ -443,14 +476,14 @@ source ./env.sh
|
||||
# VBOX_PATH_PACKAGE_DOCS set propper path for link to pdf in .desktop file
|
||||
# VBOX_WITH_REGISTRATION_REQUEST= VBOX_WITH_UPDATE_REQUEST= just disable some functionality in gui
|
||||
echo "build basic parts"
|
||||
%{_bindir}/kmk %{?_smp_mflags} \
|
||||
VBOX_GCC_WERR= \
|
||||
VBOX_USE_SYSTEM_XORG_HEADERS=1 \
|
||||
VBOX_WITH_REGISTRATION_REQUEST= VBOX_WITH_UPDATE_REQUEST= \
|
||||
TOOL_YASM_AS=yasm \
|
||||
VBOX_BUILD_PUBLISHER=_SUSE \
|
||||
TOOL_GCC3_CFLAGS="%{optflags}" TOOL_GCC3_CXXFLAGS="%{optflags}" \
|
||||
VBOX_GCC_OPT="%{optflags}"
|
||||
%{_bindir}/kmk %{?_smp_mflags} \
|
||||
VBOX_GCC_WERR= \
|
||||
VBOX_USE_SYSTEM_XORG_HEADERS=1 \
|
||||
VBOX_WITH_REGISTRATION_REQUEST= VBOX_WITH_UPDATE_REQUEST= \
|
||||
TOOL_YASM_AS=yasm \
|
||||
VBOX_BUILD_PUBLISHER=_SUSE \
|
||||
TOOL_GCC3_CFLAGS="%{optflags}" TOOL_GCC3_CXXFLAGS="%{optflags}" \
|
||||
VBOX_GCC_OPT="%{optflags}"
|
||||
|
||||
echo "build VNC extension pack"
|
||||
# tar must use GNU, not POSIX, format here
|
||||
@@ -475,41 +508,39 @@ EOF
|
||||
%sysusers_generate_pre vbox-guest-tools.conf vbox-guest-tools vbox-guest-tools.conf
|
||||
|
||||
%install
|
||||
#################################
|
||||
echo "create directory structure"
|
||||
#################################
|
||||
install -d -m 755 %{buildroot}%{_sbindir}
|
||||
install -d -m 755 %{buildroot}%{_prefix}/lib
|
||||
install -d -m 755 %{buildroot}%{_bindir}
|
||||
install -d -m 755 %{buildroot}%{_sbindir}
|
||||
install -d -m 755 %{buildroot}%{_datadir}/virtualbox/nls
|
||||
install -d -m 755 %{buildroot}%{_datadir}/virtualbox/UnattendedTemplates
|
||||
install -d -m 755 %{buildroot}%{_datadir}/pixmaps
|
||||
install -d -m 755 %{buildroot}%{_datadir}/applications
|
||||
install -d -m 755 %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
|
||||
install -d -m 755 %{buildroot}%{_vbox_instdir}/components
|
||||
install -d -m 755 %{buildroot}%{_libdir}/dri
|
||||
install -d -m 755 %{buildroot}%{_libdir}/xorg/modules/drivers
|
||||
install -d -m 755 %{buildroot}%{_libdir}/xorg/modules/input
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/default
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/init.d
|
||||
install -d %{buildroot}%{_unitdir}
|
||||
install -d %{buildroot}%{_unitdir}/multi-user.target.wants
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/vbox
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/vbox/autostart.d
|
||||
install -d -m 755 %{buildroot}%{_udevrulesdir}
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d
|
||||
mkdir -p \
|
||||
%{buildroot}%{_sbindir} \
|
||||
%{buildroot}%{_prefix}/lib \
|
||||
%{buildroot}%{_bindir} \
|
||||
%{buildroot}%{_sbindir} \
|
||||
%{buildroot}%{_datadir}/virtualbox/nls \
|
||||
%{buildroot}%{_datadir}/virtualbox/UnattendedTemplates \
|
||||
%{buildroot}%{_datadir}/pixmaps \
|
||||
%{buildroot}%{_datadir}/applications \
|
||||
%{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom \
|
||||
%{buildroot}%{_vbox_instdir}/components \
|
||||
%{buildroot}%{_libdir}/dri \
|
||||
%{buildroot}%{_libdir}/xorg/modules/drivers \
|
||||
%{buildroot}%{_libdir}/xorg/modules/input \
|
||||
%{buildroot}%{_sysconfdir}/default \
|
||||
%{buildroot}%{_sysconfdir}/init.d \
|
||||
%{buildroot}%{_unitdir} \
|
||||
%{buildroot}%{_unitdir}/multi-user.target.wants \
|
||||
%{buildroot}%{_sysconfdir}/vbox \
|
||||
%{buildroot}%{_sysconfdir}/vbox/autostart.d \
|
||||
%{buildroot}%{_udevrulesdir} \
|
||||
%{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d \
|
||||
%{buildroot}%{_modprobedir}
|
||||
|
||||
###########################################
|
||||
echo "entering guest-tools install section"
|
||||
###########################################
|
||||
install -m 755 out/linux.*/release/bin/additions/VBoxControl %{buildroot}%{_bindir}
|
||||
install -m 755 out/linux.*/release/bin/additions/VBoxService %{buildroot}%{_sbindir}/VBoxService
|
||||
install -m 755 out/linux.*/release/bin/additions/mount.vboxsf %{buildroot}%{_sbindir}/mount.vboxsf
|
||||
install -m 744 src/VBox/Additions/linux/installer/vboxadd-service.sh %{buildroot}%{_vbox_instdir}/vboxadd-service
|
||||
install -d %{buildroot}%{_userunitdir}
|
||||
# udev rule for guest (virtualbox-guest-tools)
|
||||
install -m 644 %{SOURCE3} %{buildroot}%{_udevrulesdir}/90-vboxguest.rules
|
||||
install -m 644 %{SOURCE3} %{buildroot}%{_udevrulesdir}/90-vboxguest.rules
|
||||
install -p -m 0644 -D %{SOURCE12} %{buildroot}%{_unitdir}/vboxclient.service
|
||||
install -p -m 0644 -D %{SOURCE13} %{buildroot}%{_unitdir}/vboxservice.service
|
||||
# /media is used for auto-mounting of shared folders
|
||||
@@ -520,106 +551,92 @@ install -m 755 out/linux.*/release/bin/additions/VBoxDRMClient %{buildroot}%{_bi
|
||||
install -m 755 src/VBox/Additions/x11/Installer/98vboxadd-xclient %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/
|
||||
install -d %{buildroot}%{_sysconfdir}/xdg/autostart/
|
||||
install -m 644 %{SOURCE25} %{buildroot}%{_sysconfdir}/xdg/autostart/vboxclient.desktop
|
||||
%if 0%{?suse_version} > 1320 || 0%{?sle_version} == 120300
|
||||
install -d -m 755 %{buildroot}/media
|
||||
%endif
|
||||
|
||||
###########################################
|
||||
echo "entering VNC extension install section"
|
||||
###########################################
|
||||
pushd out/linux.*/release/packages/
|
||||
cd out/linux.*/release/packages/
|
||||
mkdir -p "%{buildroot}%{_datadir}/virtualbox/extensions/"
|
||||
install -D -m 644 VNC-*.vbox-extpack "%{buildroot}%{_datadir}/virtualbox/extensions/VNC-%{version}.vbox-extpack"
|
||||
popd
|
||||
install -D -m 644 VNC-*.vbox-extpack "%{buildroot}%{_datadir}/virtualbox/extensions/VNC-%{rversion}.vbox-extpack"
|
||||
cd -
|
||||
|
||||
##############################################
|
||||
echo "entering virtualbox(-qt) install section"
|
||||
##############################################
|
||||
# copy the main files to %%{_vbox_instdir}
|
||||
pushd out/linux.*/release/bin
|
||||
install -m 755 VBoxManage %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxHeadless %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxSDL %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxNetNAT %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxAutostart %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxVolInfo %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 vboxshell.py %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxBalloonCtrl %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 webtest %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxDTrace %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxDbg.so %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxDbg.so %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxDxVk.so %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 UICommon.so %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 vboximg-mount %{buildroot}%{_vbox_instdir}
|
||||
cd out/linux.*/release/bin
|
||||
cp -a VBoxManage VBoxHeadless VBoxSDL VBoxNetNAT VBoxAutostart VBoxVolInfo \
|
||||
VBoxBalloonCtrl webtest VBoxDTrace VBoxDbg.so \
|
||||
VBoxDxVk.so UICommon.so vboximg-mount %{buildroot}%{_vbox_instdir}
|
||||
%if "%mypython" != ""
|
||||
cp -a vboxshell.py %{buildroot}/%{_vbox_instdir}
|
||||
%endif
|
||||
# create links to vbox tools in PATH - they could be usefull for controlling vbox from command line
|
||||
ln -s %{_vbox_instdir}/VBoxManage %{buildroot}%{_bindir}/VBoxManage
|
||||
ln -s %{_vbox_instdir}/VBoxHeadless %{buildroot}%{_bindir}/VBoxHeadless
|
||||
ln -s %{_vbox_instdir}/VBoxSDL %{buildroot}%{_bindir}/VBoxSDL
|
||||
ln -s %{_vbox_instdir}/vboximg-mount %{buildroot}%{_bindir}/vboximg-mount
|
||||
install -m 755 VBoxSVC %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxXPCOMIPCD %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxExtPackHelperApp %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxTestOGL %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxPermissionMessage %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxSUIDMessage %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxUSB_DevRules %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxNetDHCP %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxNetAdpCtl %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VirtualBox %{buildroot}%{_vbox_instdir}/VirtualBox6
|
||||
install -m 755 VirtualBoxVM %{buildroot}%{_vbox_instdir}
|
||||
cp -a VBoxSVC VBoxExtPackHelperApp VBoxPermissionMessage VBoxSUIDMessage \
|
||||
VBoxUSB_DevRules VBoxNetDHCP VBoxNetAdpCtl VirtualBoxVM \
|
||||
%{buildroot}%{_vbox_instdir}/
|
||||
ls -al VBoxSVC VBoxExtPackHelperApp VBoxPermissionMessage VBoxSUIDMessage \
|
||||
VBoxUSB_DevRules VBoxNetDHCP VBoxNetAdpCtl VirtualBoxVM 0755 || :
|
||||
install -m 755 VirtualBox %{buildroot}%{_vbox_instdir}/VirtualBoxQt
|
||||
# compatibility symlink in order to keep old desktop links functional
|
||||
ln -s %{_vbox_instdir}/VirtualBoxVM %{buildroot}%{_vbox_instdir}/VirtualBox
|
||||
install -m 755 VBoxEFI*.fd %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 VBoxSysInfo.sh %{buildroot}%{_vbox_instdir}
|
||||
cp -a VBoxEFI*.fd VBoxSysInfo.sh %{buildroot}%{_vbox_instdir}/
|
||||
ls -al VBoxEFI*.fd VBoxSysInfo.sh 0755 || :
|
||||
install -m 644 *.so %{buildroot}%{_vbox_instdir}
|
||||
install -m 644 *.r0 %{buildroot}%{_vbox_instdir}
|
||||
install -m 644 components/* %{buildroot}%{_vbox_instdir}/components/
|
||||
# install languages
|
||||
install -m 644 nls/* %{buildroot}%{_datadir}/virtualbox/nls/
|
||||
install -m 644 UnattendedTemplates/* %{buildroot}%{_datadir}/virtualbox/UnattendedTemplates/
|
||||
|
||||
# Workaround kvm.ko usurping VMX.
|
||||
# (Linux kernel commit b4886fab6fb620b96ad7eeefb9801c42dfa91741 is the culprit.
|
||||
# See also https://lore.kernel.org/kvm/ZwQjUSOle6sWARsr@google.com/T/ )
|
||||
echo options kvm enable_virt_at_load=0 >"%buildroot/%_modprobedir/50-virtualbox.conf"
|
||||
|
||||
# install kmp src
|
||||
mkdir -p %{buildroot}%{_usrsrc}/kernel-modules/virtualbox
|
||||
mkdir -p %{buildroot}%{_usrsrc}/kernel-modules/additions
|
||||
tar jcf %{buildroot}%{_usrsrc}/kernel-modules/additions/guest_src.tar.bz2 additions/src
|
||||
tar -jcf %{buildroot}%{_usrsrc}/kernel-modules/additions/guest_src.tar.bz2 additions/src
|
||||
cp -a src %{buildroot}%{_usrsrc}/kernel-modules/virtualbox
|
||||
install -m 644 %{SOURCE11} %{buildroot}%{_udevrulesdir}/60-vboxdrv.rules
|
||||
popd
|
||||
cd -
|
||||
|
||||
# install desktop file
|
||||
install -m 644 out/linux.*/release/bin/virtualbox.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
|
||||
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}.desktop 'System Emulator'
|
||||
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}.desktop 'System Emulator'
|
||||
|
||||
%if 0%{?sle_version} != 120300
|
||||
# install appstream file
|
||||
mkdir -p %{buildroot}%{_datadir}/metainfo
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
|
||||
%endif
|
||||
|
||||
# create a menu entry
|
||||
install -m 644 out/linux.*/release/bin/VBox.png %{buildroot}%{_datadir}/pixmaps/virtualbox.png
|
||||
# install config with session shutdown defs
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/default/virtualbox
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/default/virtualbox
|
||||
#install wrapper script
|
||||
install -m 644 %{SOURCE9} %{buildroot}%{_bindir}/VirtualBox
|
||||
install -m 644 %{SOURCE8} %{buildroot}%{_bindir}/update-extpack.sh
|
||||
install -m 644 %{SOURCE9} %{buildroot}%{_bindir}/VirtualBox
|
||||
install -m 644 %{SOURCE8} %{buildroot}%{_bindir}/update-extpack.sh
|
||||
# Service files to load kernel modules on boot
|
||||
install -m 0644 %{SOURCE14} %{buildroot}%{_unitdir}/vboxdrv.service
|
||||
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcvboxdrv
|
||||
install -m 0644 %{SOURCE15} %{buildroot}%{_unitdir}/vboxadd-service.service
|
||||
install -m 0755 %{SOURCE16} %{buildroot}%{_sbindir}/vboxconfig
|
||||
install -m 0755 %{SOURCE17} %{buildroot}%{_sbindir}/vboxguestconfig
|
||||
install -m 0755 %{SOURCE18} %{buildroot}%{_sbindir}/vbox-fix-usb-rules.sh
|
||||
install -m 0755 %{SOURCE19} %{buildroot}%{_vbox_instdir}/vboxdrv.sh
|
||||
install -m 0644 %{SOURCE21} %{buildroot}%{_unitdir}/vboxweb-service.service
|
||||
install -m 0755 %{SOURCE22} %{buildroot}%{_vbox_instdir}/vboxweb-service.sh
|
||||
install -m 0644 %{SOURCE23} %{buildroot}%{_unitdir}/vboxautostart-service.service
|
||||
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcvboxautostart
|
||||
install -m 0755 %{SOURCE24} %{buildroot}%{_vbox_instdir}/vboxautostart-service.sh
|
||||
install -m 0644 %{SOURCE14} %{buildroot}%{_unitdir}/vboxdrv.service
|
||||
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcvboxdrv
|
||||
install -m 0644 %{SOURCE15} %{buildroot}%{_unitdir}/vboxadd-service.service
|
||||
install -m 0755 %{SOURCE16} %{buildroot}%{_sbindir}/vboxconfig
|
||||
install -m 0755 %{SOURCE17} %{buildroot}%{_sbindir}/vboxguestconfig
|
||||
install -m 0755 %{SOURCE18} %{buildroot}%{_sbindir}/vbox-fix-usb-rules.sh
|
||||
install -m 0755 %{SOURCE19} %{buildroot}%{_vbox_instdir}/vboxdrv.sh
|
||||
install -m 0644 %{SOURCE21} %{buildroot}%{_unitdir}/vboxweb-service.service
|
||||
install -m 0755 %{SOURCE22} %{buildroot}%{_vbox_instdir}/vboxweb-service.sh
|
||||
install -m 0644 %{SOURCE23} %{buildroot}%{_unitdir}/vboxautostart-service.service
|
||||
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcvboxautostart
|
||||
install -m 0755 %{SOURCE24} %{buildroot}%{_vbox_instdir}/vboxautostart-service.sh
|
||||
# Init scripts to start virtualbox during boot
|
||||
ln -sf %{_unitdir}/vboxdrv.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxdrv.service
|
||||
ln -sf %{_unitdir}/vboxadd-service.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxadd-service.service
|
||||
ln -sf %{_unitdir}/vboxautostart-service.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxautostart-service.service
|
||||
ln -sf %{_unitdir}/vboxdrv.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxdrv.service
|
||||
ln -sf %{_unitdir}/vboxadd-service.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxadd-service.service
|
||||
ln -sf %{_unitdir}/vboxautostart-service.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxautostart-service.service
|
||||
|
||||
# config file for vboxdrv and vboxweb
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/vbox
|
||||
@@ -636,74 +653,52 @@ allow = true
|
||||
EOF
|
||||
# install udev helper script for creating usb devices
|
||||
install -m 0755 -D src/VBox/Installer/linux/VBoxCreateUSBNode.sh %{buildroot}%{_vbox_instdir}/VBoxCreateUSBNode.sh
|
||||
######################################################
|
||||
|
||||
%if "%mypython" != ""
|
||||
echo "entering python-virtualbox install section"
|
||||
######################################################
|
||||
pushd out/linux.*/release/bin/sdk/installer
|
||||
VBOX_INSTALL_PATH=%{_vbox_instdir} python3 vboxapisetup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
popd
|
||||
cd out/linux.*/release/bin/sdk/installer/python
|
||||
VBOX_INSTALL_PATH=%{_vbox_instdir} %{__mypython} vboxapisetup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
cd -
|
||||
install -d -m 755 %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
|
||||
cp -r out/linux.*/release/bin/sdk/bindings/xpcom/python %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
|
||||
%py3_compile %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom/python
|
||||
%endif
|
||||
|
||||
######################################################
|
||||
echo "entering virtualbox-devel install section"
|
||||
######################################################
|
||||
cp -r out/linux.*/release/bin/sdk/bindings/auth %{buildroot}%{_vbox_instdir}/sdk/bindings
|
||||
|
||||
pushd out/linux.*/release/bin/sdk/bindings/xpcom
|
||||
cd out/linux.*/release/bin/sdk/bindings/xpcom
|
||||
cp -r include %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
|
||||
cp -r idl %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
|
||||
cp -r samples %{buildroot}%{_vbox_instdir}/sdk/bindings/xpcom
|
||||
popd
|
||||
cd -
|
||||
|
||||
cp out/linux.*/release/bin/sdk/bindings/VirtualBox.xidl %{buildroot}%{_vbox_instdir}/sdk/bindings
|
||||
|
||||
######################################################
|
||||
echo "entering virtualbox-websrv install section"
|
||||
######################################################
|
||||
pushd out/linux.*/release/bin
|
||||
cd out/linux.*/release/bin
|
||||
install -m 755 vboxwebsrv %{buildroot}%{_vbox_instdir}
|
||||
install -m 755 webtest %{buildroot}%{_vbox_instdir}
|
||||
popd
|
||||
cd -
|
||||
ln -sf %{_unitdir}/vboxweb-service.service %{buildroot}%{_unitdir}/multi-user.target.wants/vboxweb-service.service
|
||||
|
||||
#
|
||||
######################################################
|
||||
echo "entering virtualbox-guest-desktop-icons install section"
|
||||
######################################################
|
||||
install -d -m 755 %{buildroot}%{_datadir}/pixmaps/virtualbox
|
||||
install -d -m 755 %{buildroot}%{_datadir}/pixmaps/virtualbox
|
||||
|
||||
pushd src/VBox/Frontends/VirtualBox/images
|
||||
cd src/VBox/Frontends/VirtualBox/images
|
||||
for icon in os_*.png; do
|
||||
install -m 644 "$icon" %{buildroot}%{_datadir}/pixmaps/virtualbox/"$icon";
|
||||
install -m 644 "$icon" %{buildroot}%{_datadir}/pixmaps/virtualbox/"$icon";
|
||||
done
|
||||
popd
|
||||
#
|
||||
######################################################
|
||||
# system users and groups
|
||||
cd -
|
||||
|
||||
install -Dm0644 vbox.conf %{buildroot}%{_sysusersdir}/vbox.conf
|
||||
install -Dm0644 vbox-guest-tools.conf %{buildroot}%{_sysusersdir}/vbox-guest-tools.conf
|
||||
######################################################
|
||||
# run fdupes
|
||||
######################################################
|
||||
#run fdupes because we lost link for virtualbox/components directory
|
||||
%fdupes %{buildroot}/%{_vbox_instdir}
|
||||
#also some translation files are duplicated
|
||||
%fdupes %{buildroot}/%{_datadir}/virtualbox/nls
|
||||
#also some icon files are duplicated
|
||||
%fdupes %{buildroot}/%{_datadir}/pixmaps/virtualbox
|
||||
|
||||
#
|
||||
#
|
||||
######################################################
|
||||
# scriptlets - pre
|
||||
######################################################
|
||||
|
||||
%pre -f vbox.pre
|
||||
%service_add_pre vboxdrv.service
|
||||
%service_add_pre vboxautostart-service.service
|
||||
%service_add_pre vboxdrv.service vboxautostart-service.service
|
||||
|
||||
%pre guest-tools -f vbox-guest-tools.pre
|
||||
%service_add_pre vboxadd-service.service
|
||||
@@ -711,22 +706,16 @@ install -Dm0644 vbox-guest-tools.conf %{buildroot}%{_sysusersdir}/vbox-guest-too
|
||||
%pre websrv
|
||||
%service_add_pre vboxweb-service.service
|
||||
|
||||
#######################################################
|
||||
# scriptlets - post
|
||||
#######################################################
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
#setup our sysconfig file /etc/sysconfig/vbox
|
||||
%set_permissions %{_vbox_instdir}/VBoxNetNAT
|
||||
%set_permissions %{_vbox_instdir}/VBoxNetDHCP
|
||||
%set_permissions %{_vbox_instdir}/VBoxNetAdpCtl
|
||||
%set_permissions %{_vbox_instdir}/VBoxHeadless
|
||||
%service_add_post vboxdrv.service
|
||||
%service_add_post vboxautostart-service.service
|
||||
%service_add_post vboxdrv.service vboxautostart-service.service
|
||||
# add new autostart stuff to the existing default config, if missing
|
||||
grep -q VBOXAUTOSTART %{_sysconfdir}/default/virtualbox || {
|
||||
cat >> %{_sysconfdir}/default/virtualbox << EOF
|
||||
cat >> %{_sysconfdir}/default/virtualbox << EOF
|
||||
#
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Autostart
|
||||
@@ -738,8 +727,8 @@ EOF
|
||||
}
|
||||
for entry in %{_sysconfdir}/vbox/*.start
|
||||
do
|
||||
user=$(basename "$entry" .start)
|
||||
[ "$user" = "*" ] && break
|
||||
user=$(basename "$entry" .start)
|
||||
[ "$user" = "*" ] && break
|
||||
mv %{_sysconfdir}/vbox/user.start %{_sysconfdir}/vbox/autostart.d/.
|
||||
done
|
||||
|
||||
@@ -758,72 +747,42 @@ done
|
||||
%verify_permissions -e %{_vbox_instdir}/VBoxSDL
|
||||
|
||||
%post guest-tools
|
||||
%service_add_post vboxadd-service.service
|
||||
%service_add_post vboxclient.service
|
||||
%service_add_post vboxservice.service
|
||||
%service_add_post vboxadd-service.service vboxclient.service vboxservice.service
|
||||
|
||||
%post websrv
|
||||
%service_add_post vboxweb-service.service
|
||||
|
||||
%post vnc
|
||||
EXTPACK="%{_datadir}/virtualbox/extensions/VNC-%{version}.vbox-extpack"
|
||||
EXTPACK="%{_datadir}/virtualbox/extensions/VNC-%{rversion}.vbox-extpack"
|
||||
ACCEPT="$(tar --to-stdout -xf "${EXTPACK}" ./ExtPack-license.txt | sha256sum | head --bytes=64)"
|
||||
VBoxManage extpack install --replace "${EXTPACK}" --accept-license="${ACCEPT}" > /dev/null
|
||||
|
||||
#######################################################
|
||||
# scriptlets preun
|
||||
#######################################################
|
||||
|
||||
%preun
|
||||
%stop_on_removal vboxautostart-service
|
||||
%stop_on_removal vboxdrv
|
||||
%service_del_preun vboxautostart-service.service
|
||||
%service_del_preun vboxdrv.service
|
||||
exit 0
|
||||
%service_del_preun vboxautostart-service.service vboxdrv.service
|
||||
|
||||
%preun guest-tools
|
||||
%stop_on_removal vboxadd-service
|
||||
%stop_on_removal vboxadd
|
||||
%service_del_preun vboxadd-service.service
|
||||
%systemd_preun vboxclient.service
|
||||
%systemd_preun vboxservice.service
|
||||
exit 0
|
||||
%systemd_preun vboxclient.service vboxservice.service
|
||||
|
||||
%preun websrv
|
||||
%stop_on_removal vboxweb-service
|
||||
%service_del_preun vboxweb-service.service
|
||||
exit 0
|
||||
|
||||
#######################################################
|
||||
# scriptlets postun
|
||||
#######################################################
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%restart_on_update vboxdrv
|
||||
%restart_on_update vboxautostart-service
|
||||
# immediately restarting virtualbox may not work. As such wait for the next reboot to restart
|
||||
%if ! %{defined service_del_postun_without_restart}
|
||||
export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%service_del_postun vboxautostart-service.service
|
||||
%service_del_postun vboxdrv.service
|
||||
%service_del_postun vboxautostart-service.service vboxdrv.service
|
||||
%else
|
||||
%service_del_postun_without_restart vboxautostart-service.service
|
||||
%service_del_postun_without_restart vboxdrv.service
|
||||
%service_del_postun_without_restart vboxautostart-service.service vboxdrv.service
|
||||
%endif
|
||||
|
||||
%postun guest-tools
|
||||
%restart_on_update vboxadd
|
||||
%restart_on_update vboxadd-service
|
||||
%service_del_postun vboxadd-service.service
|
||||
%service_del_postun vboxclient.service
|
||||
%service_del_postun vboxservice.service
|
||||
%service_del_postun vboxadd-service.service vboxclient.service vboxservice.service
|
||||
|
||||
%postun websrv
|
||||
%restart_on_update vboxweb-service
|
||||
%service_del_postun vboxweb-service.service
|
||||
#
|
||||
#######################################################
|
||||
|
||||
%files
|
||||
%doc README.autostart UserManual.pdf README.build
|
||||
@@ -837,7 +796,9 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%{_vbox_instdir}/VBoxDTrace
|
||||
%{_vbox_instdir}/VBoxNetNAT
|
||||
%{_vbox_instdir}/VBoxVolInfo
|
||||
%if "%mypython" != ""
|
||||
%{_vbox_instdir}/vboxshell.py
|
||||
%endif
|
||||
%{_vbox_instdir}/VBoxSysInfo.sh
|
||||
%{_vbox_instdir}/VBoxDD2.so
|
||||
%{_vbox_instdir}/VBoxDD.so
|
||||
@@ -850,6 +811,7 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%{_vbox_instdir}/VBoxRT.so
|
||||
%{_vbox_instdir}/VBoxSharedFolders.so
|
||||
%{_vbox_instdir}/VBoxVMM.so
|
||||
%{_vbox_instdir}/VBoxVMMArm.so
|
||||
%{_vbox_instdir}/VBoxXPCOMC.so
|
||||
%{_vbox_instdir}/VBoxXPCOM.so
|
||||
%{_vbox_instdir}/VBox*.r0
|
||||
@@ -857,7 +819,7 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%{_vbox_instdir}/VBoxEFI*.fd
|
||||
%{_vbox_instdir}/VBoxManage
|
||||
%{_vbox_instdir}/VBoxSVC
|
||||
%{_vbox_instdir}/VBoxXPCOMIPCD
|
||||
%{_vbox_instdir}/VBoxXPCOMIPCD.so
|
||||
%{_vbox_instdir}/VBoxExtPackHelperApp
|
||||
%{_vbox_instdir}/vboximg-mount
|
||||
%{_vbox_instdir}/DbgPlugInDiggers.so
|
||||
@@ -869,6 +831,7 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%{_vbox_instdir}/VBoxDxVk.so
|
||||
%{_vbox_instdir}/UICommon.so
|
||||
%{_vbox_instdir}/VBoxHostChannel.so
|
||||
%{_vbox_instdir}/VBoxTraceLogDecoders.so
|
||||
%dir %{_vbox_instdir}/components
|
||||
%{_vbox_instdir}/components/*.so
|
||||
%{_vbox_instdir}/components/*.xpt
|
||||
@@ -879,6 +842,7 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%dir %{_unitdir}/multi-user.target.wants
|
||||
%{_prefix}/lib/virtualbox/vboxdrv.sh
|
||||
%{_prefix}/lib/virtualbox/vboxautostart-service.sh
|
||||
%{_modprobedir}/
|
||||
%{_unitdir}/vboxdrv.service
|
||||
%{_unitdir}/vboxautostart-service.service
|
||||
%{_unitdir}/multi-user.target.wants/vboxweb-service.service
|
||||
@@ -907,15 +871,13 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxPermissionMessage
|
||||
%attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxSUIDMessage
|
||||
%attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxUSB_DevRules
|
||||
%attr(0755,root,vboxusers) %{_vbox_instdir}/VirtualBox6
|
||||
%attr(0755,root,vboxusers) %{_vbox_instdir}/VirtualBoxQt
|
||||
%verify(not mode) %attr(0750,root,vboxusers) %{_vbox_instdir}/VirtualBoxVM
|
||||
%verify(not mode) %attr(0755,root,vboxusers) %{_vbox_instdir}/VBoxSDL
|
||||
%{_vbox_instdir}/VirtualBox
|
||||
#wrapper script is in bindir
|
||||
%attr(0755,root,root) %{_bindir}/VirtualBox
|
||||
%attr(0755,root,root) %{_bindir}/update-extpack.sh
|
||||
#ldd shows libQt* dependency
|
||||
%{_vbox_instdir}/VBoxTestOGL
|
||||
#qm's translations
|
||||
%{_datadir}/virtualbox/nls
|
||||
%{_vbox_instdir}/VBoxSVGA3D.so
|
||||
@@ -956,18 +918,18 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%dir %{_sysconfdir}/xdg
|
||||
%dir %{_sysconfdir}/xdg/autostart
|
||||
%{_sysconfdir}/xdg/autostart/vboxclient.desktop
|
||||
%if 0%{?suse_version} > 1320 || 0%{?sle_version} == 120300
|
||||
%dir /media
|
||||
%endif
|
||||
|
||||
%files -n python3-%{name}
|
||||
%if "%mypython" != ""
|
||||
%files -n %{mypython}-%{name}
|
||||
%dir %{_vbox_instdir}/sdk
|
||||
%dir %{_vbox_instdir}/sdk/bindings
|
||||
%dir %{_vbox_instdir}/sdk/bindings/xpcom
|
||||
%{_vbox_instdir}/sdk/bindings/xpcom/python
|
||||
%{_vbox_instdir}/VBoxPython*.so
|
||||
%{python3_sitelib}/vboxapi-1.0-*.egg-info
|
||||
%{python3_sitelib}/vboxapi/
|
||||
%{mypython_sitelib}/vboxapi-*.egg-info
|
||||
%{mypython_sitelib}/vboxapi/
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%dir %{_vbox_instdir}/sdk
|
||||
@@ -1001,7 +963,7 @@ export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%files vnc
|
||||
%license COPYING
|
||||
%dir %{_datadir}/virtualbox/extensions
|
||||
%{_datadir}/virtualbox/extensions/VNC-%{version}.vbox-extpack
|
||||
%{_datadir}/virtualbox/extensions/VNC-%{rversion}.vbox-extpack
|
||||
|
||||
# main_package
|
||||
%endif
|
||||
@@ -1022,18 +984,18 @@ rm -rf src/libs/{libpng-*,libxml2-*,libxslt-*,zlib-*,boost-*}
|
||||
# guest modules : vboxguest,vboxsf,vboxvideo
|
||||
echo "build kernel modules"
|
||||
for vbox_module in kmp_host/vbox{drv,netflt,netadp} \
|
||||
kmp_additions/vbox{guest,sf,video}; do
|
||||
#get the module name from path
|
||||
module_name=$(basename "$vbox_module")
|
||||
kmp_additions/vbox{guest,sf,video}; do
|
||||
#get the module name from path
|
||||
module_name=$(basename "$vbox_module")
|
||||
|
||||
# go through the all flavors (desktop,default ...)
|
||||
for flavor in %{flavors_to_build}; do
|
||||
# go through the all flavors (desktop,default ...)
|
||||
for flavor in %{flavors_to_build}; do
|
||||
# delete old build dir for sure
|
||||
rm -rf modules_build_dir/${module_name}_${flavor}
|
||||
|
||||
if [ "$module_name" = "vboxdrv" -o \
|
||||
"$module_name" = "vboxguest" ] ; then
|
||||
SYMBOLS=""
|
||||
SYMBOLS=""
|
||||
fi
|
||||
# create build directory for specific flavor
|
||||
mkdir -p modules_build_dir/$flavor
|
||||
@@ -1044,32 +1006,31 @@ for vbox_module in kmp_host/vbox{drv,netflt,netadp} \
|
||||
# copy vboxdrv (for host) module symbols which are used by vboxnetflt and vboxnetadp km's:
|
||||
if [ "$module_name" = "vboxnetflt" -o \
|
||||
"$module_name" = "vboxnetadp" ] ; then
|
||||
cp $PWD/modules_build_dir/$flavor/vboxdrv/Module.symvers \
|
||||
$PWD/modules_build_dir/$flavor/$module_name
|
||||
SYMBOLS="$PWD/modules_build_dir/$flavor/vboxdrv/Module.symvers"
|
||||
cp $PWD/modules_build_dir/$flavor/vboxdrv/Module.symvers \
|
||||
$PWD/modules_build_dir/$flavor/$module_name
|
||||
SYMBOLS="$PWD/modules_build_dir/$flavor/vboxdrv/Module.symvers"
|
||||
fi
|
||||
# copy vboxguest (for guest) module symbols which are used by vboxsf and vboxvideo km's:
|
||||
# copy vboxguest (for guest) module symbols which are used by vboxsf and vboxvideo km's:
|
||||
if [ "$module_name" = "vboxsf" -o \
|
||||
"$module_name" = "vboxvideo" ] ; then
|
||||
cp $PWD/modules_build_dir/$flavor/vboxguest/Module.symvers \
|
||||
cp $PWD/modules_build_dir/$flavor/vboxguest/Module.symvers \
|
||||
$PWD/modules_build_dir/$flavor/$module_name
|
||||
SYMBOLS="$PWD/modules_build_dir/$flavor/vboxguest/Module.symvers"
|
||||
SYMBOLS="$PWD/modules_build_dir/$flavor/vboxguest/Module.symvers"
|
||||
fi
|
||||
# build the module for the specific flavor
|
||||
%make_build -j4 -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor %{?linux_make_arch} modules \
|
||||
M=$PWD/modules_build_dir/$flavor/$module_name KBUILD_EXTRA_SYMBOLS="$SYMBOLS" V=1
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
%install
|
||||
export INSTALL_MOD_PATH=%{buildroot}
|
||||
export INSTALL_MOD_DIR=extra
|
||||
#to install modules we use here similar steps like in build phase, go through all the modules :
|
||||
for module_name in vbox{drv,netflt,netadp,guest,sf,video}
|
||||
do
|
||||
#and through all flavors
|
||||
for flavor in %{flavors_to_build}; do
|
||||
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install M=$PWD/modules_build_dir/$flavor/$module_name
|
||||
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install M=$PWD/modules_build_dir/$flavor/$module_name
|
||||
done
|
||||
done
|
||||
# kmp_package
|
||||
|
||||
Reference in New Issue
Block a user