summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remote/includes/chroot.inc14
-rw-r--r--remote/modules/vmware/vmware.build9
2 files changed, 20 insertions, 3 deletions
diff --git a/remote/includes/chroot.inc b/remote/includes/chroot.inc
index fc9738ec..48ad39d3 100644
--- a/remote/includes/chroot.inc
+++ b/remote/includes/chroot.inc
@@ -72,6 +72,18 @@ chroot_gen_autoexec() {
# create the script to be automatically executed.
cat >"${CHROOT_MOUNTDIR}/autoexec.bat"<<-EOF
#!/bin/bash
+ #######################################################
+ # #
+ # Warning! #
+ # #
+ # This file is only meant to be executed within #
+ # the specially chrooted mltk building environment. #
+ # #
+ # Do NOT execute it if you are not sure what you do, #
+ # it may be very harmful if being run in a normal #
+ # system environment! #
+ # #
+ #######################################################
echo "chroot started successfully."
EOF
@@ -128,7 +140,7 @@ chroot_run() {
chroot_gen_autoexec || perror "'chroot_gen_autoexec' failed with $?."
# do the chroot
- exec 0>&8
+ exec 0>&8 # This redirection is used for debugging within a chroot
chroot --userspec root:root "${CHROOT_MOUNTDIR}" /autoexec.bat
local RET=$?
if [ "$RET" -eq 0 ]; then
diff --git a/remote/modules/vmware/vmware.build b/remote/modules/vmware/vmware.build
index c1dd77ce..b4baf9c2 100644
--- a/remote/modules/vmware/vmware.build
+++ b/remote/modules/vmware/vmware.build
@@ -21,6 +21,10 @@ fetch_source() {
}
build() {
+ local DELETE_FILES
+ local OLDIFS="$IFS"
+ DELETE_FILES=$(for LINE in $REQUIRED_VMWARE_DELETIONS;do echo rm -rf $LINE; done)
+
# prepare the build directory with the files needed during the chroot
cp "${MODULE_DIR}/src/$VMWARE_BUNDLE_FILE" "${MODULE_BUILD_DIR}/$VMWARE_BUNDLE_FILE"
cp -r "${MODULE_DIR}/patches" "${MODULE_BUILD_DIR}"
@@ -28,9 +32,10 @@ build() {
pinfo "Installing vmware per chroot..."
chroot_run "${MODULE_BUILD_DIR}" <<-EOF
# PS1='\[\e[1;33m\](chroot) \u@\h:\w\$ \[\e[1;32m\]' /bin/bash -norc # un-comment for debugging within chroot
+ $DELETE_FILES
yes | sh /"${VMWARE_BUNDLE_FILE}" --eulas-agreed --console --required
- vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmnet $(which gcc) "${MODULES_DIR}"/kernel/ksrc/include/ vmplayer vmnet
- vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmmon $(which gcc) "${MODULES_DIR}"/kernel/ksrc/include/ vmplayer vmmon
+ vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmnet $(which gcc) "${KERNEL_HEADERS_PATH}/include" vmplayer vmnet
+ vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmmon $(which gcc) "${KERNEL_HEADERS_PATH}/include" vmplayer vmmon
# PS1='\[\e[1;33m\](chroot) \u@\h:\w\$ \[\e[1;32m\]' /bin/bash -norc # un-comment for debugging within chroot
EOF