summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2020-11-16 15:22:53 +0100
committerJonathan Bauer2020-11-16 15:22:53 +0100
commit9459bab43a82b492ca1e41146529955b1dacf070 (patch)
tree13d7a59e1d4a007e0fa527dc6b8cdf0a72546c36
parent[dnbd3] update cmake variables (diff)
downloadmltk-9459bab43a82b492ca1e41146529955b1dacf070.tar.gz
mltk-9459bab43a82b492ca1e41146529955b1dacf070.tar.xz
mltk-9459bab43a82b492ca1e41146529955b1dacf070.zip
[vbox-src] make extpack installation configurable
Currently disabled. Activate by setting "REQUIRED_EXTPACK" in module.conf.
-rw-r--r--core/modules/vbox-src/module.build30
1 files changed, 17 insertions, 13 deletions
diff --git a/core/modules/vbox-src/module.build b/core/modules/vbox-src/module.build
index a55a5024..c5d89c65 100644
--- a/core/modules/vbox-src/module.build
+++ b/core/modules/vbox-src/module.build
@@ -11,12 +11,14 @@ fetch_source() {
download_untar "$DOWNLOAD_URL" "${MODULE_WORK_DIR}/src" || \
perror "Could not download_untar '$DOWNLOAD_URL' to '${MODULE_WORK_DIR}/src'."
- # oracle's extension pack
- DOWNLOAD_URL="${DOWNLOAD_URL%/*}/Oracle_VM_VirtualBox_Extension_Pack-${BASEVER}.vbox-extpack"
- download_untar "$DOWNLOAD_URL" "${MODULE_WORK_DIR}/extpack" || \
- perror "Could not download_untar '$DOWNLOAD_URL' to '${MODULE_WORK_DIR}/extpack'."
- # Nice, Oracle - files in the tarball are world writable, but vbox refuses to use the extpack that way
- chmod -R go-w "${MODULE_WORK_DIR}/extpack"
+ if [ -n "$REQUIRED_EXTPACK" ]; then
+ # oracle's extension pack
+ DOWNLOAD_URL="${DOWNLOAD_URL%/*}/Oracle_VM_VirtualBox_Extension_Pack-${BASEVER}.vbox-extpack"
+ download_untar "$DOWNLOAD_URL" "${MODULE_WORK_DIR}/extpack" || \
+ perror "Could not download_untar '$DOWNLOAD_URL' to '${MODULE_WORK_DIR}/extpack'."
+ # Nice, Oracle - files in the tarball are world writable, but vbox refuses to use the extpack that way
+ chmod -R go-w "${MODULE_WORK_DIR}/extpack"
+ fi
}
build() {
@@ -84,13 +86,15 @@ build() {
perror "Failed to cp $MOD.ko to '${MODULE_BUILD_DIR}/lib/modules/vbox/'."
done
- # finally copy the extension pack files, everthing is needed as the subfolders
- # target the guest architectures and not that of the host!
- local VBOX_EXTPACK_DIR="${MODULE_BUILD_DIR}/usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack"
- cp -ar "${MODULE_WORK_DIR}/extpack" "${VBOX_EXTPACK_DIR}" || \
- perror "Failed to cp '${MODULE_WORK_DIR}/extpack' to '${VBOX_EXTPACK_DIR}'."
- chown -R root:root "${VBOX_EXTPACK_DIR}" || \
- perror "Failed to chown '${VBOX_EXTPACK_DIR}' to root:root."
+ if [ -n "$REQUIRED_EXTPACK" ]; then
+ # finally copy the extension pack files, everthing is needed as the subfolders
+ # target the guest architectures and not that of the host!
+ local VBOX_EXTPACK_DIR="${MODULE_BUILD_DIR}/usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack"
+ cp -ar "${MODULE_WORK_DIR}/extpack" "${VBOX_EXTPACK_DIR}" || \
+ perror "Failed to cp '${MODULE_WORK_DIR}/extpack' to '${VBOX_EXTPACK_DIR}'."
+ chown -R root:root "${VBOX_EXTPACK_DIR}" || \
+ perror "Failed to chown '${VBOX_EXTPACK_DIR}' to root:root."
+ fi
# od binary
local OD_BIN="$(which od 2>/dev/null)"