From 69d83b7d9b33eac7b3be999c3cb1c2b80fedeaf0 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Wed, 16 Apr 2014 16:25:12 +0200 Subject: [vbox] Adapted config files, cosmetic changes etc. --- .../openslx/vmchooser/virtualbox/run-virt.include | 75 ++++++++-------------- remote/modules/vbox/module.build | 5 ++ remote/modules/vbox/module.conf | 8 +-- remote/modules/vbox/module.conf.ubuntu | 5 -- remote/modules/vbox/module.conf.ubuntu.13.04 | 6 +- remote/modules/vbox/module.conf.ubuntu.13.10 | 7 +- remote/modules/vbox/module.conf.ubuntu.14.04 | 20 ++++++ 7 files changed, 59 insertions(+), 67 deletions(-) create mode 100644 remote/modules/vbox/module.conf.ubuntu.14.04 (limited to 'remote/modules') diff --git a/remote/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include b/remote/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include index 22c62513..161fcf5a 100755 --- a/remote/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include +++ b/remote/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include @@ -19,13 +19,10 @@ ################################################################################ VMCHOOSERVBOX="/opt/openslx/vmchooser/${self}" -# create TMPDIR for all users -TMPDIR=/tmp/virt/${self} +TMPDIR=/tmp/virt/${self} # create TMPDIR for all users mkdir -m 1777 ${TMPDIR} 2>/dev/null -# dir for configs -confdir="/tmp/virt/${self}/${USER}/${VM_ID}" -# use alternate configuration directory instead of $HOME/.VirtualBox -export VBOX_USER_HOME=${confdir} +confdir="/tmp/virt/${self}/${USER}/${VM_ID}" # dir for configs +export VBOX_USER_HOME=${confdir} # instead of $HOME/.VirtualBox # define dirs and files which can be removed after exit, be carefull! RMDIRS="${snapshotdir} ${confdir} /tmp/virt/.vbox-${USER}-ipc" rm -rf ${RMDIRS} 2>/dev/null @@ -35,21 +32,15 @@ machconfig="${machfolder}/${vm_shortname}/${vm_shortname}.xml" diskfolder="${confdir}/HardDisks" snapshotdir=${machfolder}/${vm_shortname}/Snapshots mkdir -p ${diskfolder} ${snapshotdir} 2>/dev/null -# check if diskless var empty? -[ -z "${diskless}" ] && diskless=0 -# default guest audio controller (SB16, AC97, HDA) -guestaudio="HDA" -# default guest network adaptor (Am79C970A, Am79C973, 82540EM) -vb_network_card="82540EM" -# default setting for accelerated 2D grapics (OS dependent) -enable2d="true" -# set default graphics ram -vram="128" +[ -z "${diskless}" ] && diskless=0 # check if diskless var empty? +guestaudio="HDA" # default guest audio controller (SB16, AC97, HDA) +vb_network_card="82540EM" # default guest network adaptor (Am79C970A, Am79C973, 82540EM) +enable2d="true" # default setting for accelerated 2D grapics (OS dependent) +vram="128" # set default graphics ram # configure our own rwimg, empty image which we provide if [ "${imgmode}" = "rwimg" ]; then - # what is our rwimg called? - imgname="${vm_shortname}.vdi" + imgname="${vm_shortname}.vdi" # what is our rwimg called? vmpath=${imgpath}/${imgname} if ! [ -e "${vmpath}" ]; then cat /opt/openslx/vmchooser/virtualbox/rwimg.vdi.gz | gunzip > "${vmpath}" @@ -68,12 +59,9 @@ elif [ ${diskless} -eq 0 ]; then cleanexit 1 fi -# nested paging -npaging="false" -# enable VT -enablevt="false" -# check for VT, if not available use only 1 cpu (only 1 supported) -[ ${vtflag} -eq 0 ] && cpu_cores=1 +npaging="false" # nested paging: Default: not enabled +enablevt="false" # VT: Default: not enabled +[ ${vtflag} -eq 0 ] && cpu_cores=1 # check for VT, if not available only 1 cpu supported [ ${vtflag} -eq 1 ] && enablevt="true" # set some base configuration depending on the guest operating system @@ -173,19 +161,15 @@ writelog "\tMachine config:\t\t$machconfig" macaddr=$(echo ${macaddr} | sed 's/://g') vdemacaddr=$(echo ${macaddr} | sed 's/^..../00DE/g') -# machine UUID, MAC addr part of it -machineuuid="00000000-0000-0000-0000-${macaddr}" -# cosmetical, since UUID in lower case -machineuuid=$(echo ${machineuuid} | tr "[A-Z]" "[a-z]") +machineuuid="00000000-0000-0000-0000-${macaddr}" # machine UUID, MAC addr part of it +machineuuid=$(echo ${machineuuid} | tr "[A-Z]" "[a-z]") # cosmetical, since UUID in lower case # get UUID of VBox image, if not diskless [ ${diskless} -eq 0 ] && diskuuid=$(VBoxManage -q showvdiinfo ${diskfile} \ | grep UUID | grep -v "Parent UUID" | awk '{print $2}') -# make disk immutable -imgtype="Immutable" -# snapshot UUID is static -snapshotuuid="34f617be-192a-46b3-a8ae-bce1029e093f" -# imageuuid in machine.include, dafault snapshotuuid -imageuuid=${snapshotuuid} + +imgtype="Immutable" # make disk immutable +snapshotuuid="34f617be-192a-46b3-a8ae-bce1029e093f" # snapshot UUID is static +imageuuid=${snapshotuuid} # imageuuid in machine.include, default snapshotuuid # check if rw image # remove disk and add rwimg if set @@ -202,13 +186,10 @@ if echo "${imgmode}" | grep -q rw; then writelog "Please correct, exiting!" cleanexit 1 fi - # add lock - touch "${vmpath}.lock" - # remove lock after VM stopped - RMDIRS="${RMDIRS} ${vmpath}.lock" + touch "${vmpath}.lock" # add lock + RMDIRS="${RMDIRS} ${vmpath}.lock" # remove lock after VM stopped imgtype="Normal" - # replace image uuid in machine config - imageuuid=${diskuuid} + imageuuid=${diskuuid} # replace image uuid in machine config elif [ ${diskless} -eq 0 ]; then # use temp disk as snapshot cat ${VMCHOOSERVBOX}/empty-diff.vdi.gz \ @@ -297,10 +278,8 @@ case ${boot} in n*|tftp) boot="Network" if [ "${network_kind}" = "NAT" ] && [ -n "${virtualbox_tftpdir}" ]; then - # use vm_shortname to avoid Problems /w TFTP in NAT - vm_name=${vm_shortname} - # link TFTP dir for NAT TFTP boots - mkdir -p ${confdir}/TFTP + vm_name=${vm_shortname} # use vm_shortname to avoid Problems /w TFTP in NAT + mkdir -p ${confdir}/TFTP # link TFTP dir for NAT TFTP boots if [ -e ${virtualbox_tftpdir}/pxelinux.0 ]; then cp ${virtualbox_tftpdir}/pxelinux.0 ${confdir}/TFTP/${vm_name}.pxe else @@ -319,8 +298,7 @@ case ${boot} in ;; esac -# external GUI -vrdpport=${remotedesktopport} +vrdpport=${remotedesktopport} # external GUI [ ${diskless} -eq 0 ] && writelog "\tSnapshots dir:\t\t$snapshotdir" writelog "Diskimage:" @@ -357,7 +335,7 @@ writelog "\tShared Folders '${sharename}':\t${sharepath}" ################################################################################ # create Virtualbox.xml -. ${VMCHOOSERVBOX}/virtualbox.include +. ${VMCHOOSERVBOX}/virtualbox.include # create Virtualbox.xml # remove snapshot disk when using rw images if [ "${imgtype}" != "Immutable" ]; then @@ -367,8 +345,7 @@ fi # TODO: add rawdisk if requested #"raw.vmdk" format="VMDK" type="Writethrough"/> -# create machine.xml -. ${VMCHOOSERVBOX}/machine.include +. ${VMCHOOSERVBOX}/machine.include # create machine.xml # remove CD-ROM if not available if [ "${cdrom0}" != "TRUE" ]; then diff --git a/remote/modules/vbox/module.build b/remote/modules/vbox/module.build index f095b4e2..b726a464 100644 --- a/remote/modules/vbox/module.build +++ b/remote/modules/vbox/module.build @@ -77,6 +77,11 @@ build_modules() { fetch_source() { + pinfo "REQUIRED_VBOXBASEURL: $REQUIRED_VBOXBASEURL --- REQUIRED_VBOXEXTURL: $REQUIRED_VBOXEXTURL" + if [ -z "$REQUIRED_VBOXBASEURL" -o -z "$REQUIRED_VBOXEXTURL" ]; then + perror "Virtualbox download URLs not set - please write a module.conf-file for your linux flavour." + fi + mkdir -p "src/vbox" cd src/vbox # pinfo "Downloading $REQUIRED_VBOXBASEURL" diff --git a/remote/modules/vbox/module.conf b/remote/modules/vbox/module.conf index 29067791..60cea223 100644 --- a/remote/modules/vbox/module.conf +++ b/remote/modules/vbox/module.conf @@ -1,7 +1,7 @@ -REQUIRED_VBOXEXTURL="http://download.virtualbox.org/virtualbox/4.2.16/Oracle_VM_VirtualBox_Extension_Pack-4.2.16-86992.vbox-extpack" - -# Just for local usage, development: -# REQUIRED_VBOXEXTURL="http://132.230.8.69/Oracle_VM_VirtualBox_Extension_Pack-4.2.16-86992.vbox-extpack" +REQUIRED_VBOX_VERSION_MAJOR="4.3" +REQUIRED_VBOX_VERSION_MINOR="8" +REQUIRED_VBOX_VERSION="$REQUIRED_VBOX_VERSION_MAJOR.$REQUIRED_VBOX_VERSION_MINOR" +REQUIRED_VBOX_VERSIONCODE="92456" REQUIRED_DIRECTORIES=" /etc diff --git a/remote/modules/vbox/module.conf.ubuntu b/remote/modules/vbox/module.conf.ubuntu index 4efbd571..acab7b4f 100644 --- a/remote/modules/vbox/module.conf.ubuntu +++ b/remote/modules/vbox/module.conf.ubuntu @@ -1,8 +1,3 @@ -REQUIRED_VBOXBASEURL="http://download.virtualbox.org/virtualbox/4.2.16/virtualbox-4.2_4.2.16-86992~Ubuntu~precise_${AMD64_I386}.deb" - -# Just for local usage, development: -# REQUIRED_VBOXBASEURL="http://132.230.8.69/virtualbox-4.2_4.2.16-86992~Ubuntu~precise_${AMD64_I386}.deb" - REQUIRED_CONTENT_PACKAGES=" libsdl1.2debian libpng12-0 diff --git a/remote/modules/vbox/module.conf.ubuntu.13.04 b/remote/modules/vbox/module.conf.ubuntu.13.04 index fbef8447..3008508f 100644 --- a/remote/modules/vbox/module.conf.ubuntu.13.04 +++ b/remote/modules/vbox/module.conf.ubuntu.13.04 @@ -1,7 +1,7 @@ -REQUIRED_VBOXBASEURL="http://download.virtualbox.org/virtualbox/4.2.16/virtualbox-4.2_4.2.16-86992~Ubuntu~raring_${AMD64_I386}.deb" +REQUIRED_VBOX_OSCODE='Ubuntu~raring' -# Just for local usage, development: -# REQUIRED_VBOXBASEURL="http://132.230.8.69/virtualbox-4.2_4.2.16-86992~Ubuntu~precise_${AMD64_I386}.deb" +REQUIRED_VBOXBASEURL="http://download.virtualbox.org/virtualbox/${REQUIRED_VBOX_VERSION}/virtualbox-${REQUIRED_VBOX_VERSION_MAJOR}_${REQUIRED_VBOX_VERSION}-${REQUIRED_VBOX_VERSIONCODE}~${REQUIRED_VBOX_OSCODE}_${AMD64_I386}.deb" +REQUIRED_VBOXEXTURL="http://download.virtualbox.org/virtualbox/${REQUIRED_VBOX_VERSION}/Oracle_VM_VirtualBox_Extension_Pack-${REQUIRED_VBOX_VERSION}-${REQUIRED_VBOX_VERSIONCODE}.vbox-extpack" REQUIRED_CONTENT_PACKAGES=" libsdl1.2debian diff --git a/remote/modules/vbox/module.conf.ubuntu.13.10 b/remote/modules/vbox/module.conf.ubuntu.13.10 index 463c26e2..f91fbcf1 100644 --- a/remote/modules/vbox/module.conf.ubuntu.13.10 +++ b/remote/modules/vbox/module.conf.ubuntu.13.10 @@ -1,11 +1,6 @@ -REQUIRED_VBOX_VERSION_MAJOR="4.3" -REQUIRED_VBOX_VERSION_MINOR="8" -REQUIRED_VBOX_VERSION="$REQUIRED_VBOX_VERSION_MAJOR.$REQUIRED_VBOX_VERSION_MINOR" -REQUIRED_VBOX_VERSIONCODE="92456" -REQUIRED_VBOX_OSCODE='Ubuntu~raring' +REQUIRED_VBOX_OSCODE='Ubuntu~raring' # raring: 13.04, but also used here. REQUIRED_VBOXBASEURL="http://download.virtualbox.org/virtualbox/${REQUIRED_VBOX_VERSION}/virtualbox-${REQUIRED_VBOX_VERSION_MAJOR}_${REQUIRED_VBOX_VERSION}-${REQUIRED_VBOX_VERSIONCODE}~${REQUIRED_VBOX_OSCODE}_${AMD64_I386}.deb" - REQUIRED_VBOXEXTURL="http://download.virtualbox.org/virtualbox/${REQUIRED_VBOX_VERSION}/Oracle_VM_VirtualBox_Extension_Pack-${REQUIRED_VBOX_VERSION}-${REQUIRED_VBOX_VERSIONCODE}.vbox-extpack" diff --git a/remote/modules/vbox/module.conf.ubuntu.14.04 b/remote/modules/vbox/module.conf.ubuntu.14.04 new file mode 100644 index 00000000..5691459b --- /dev/null +++ b/remote/modules/vbox/module.conf.ubuntu.14.04 @@ -0,0 +1,20 @@ +REQUIRED_VBOX_OSCODE='Ubuntu~raring' # raring: 13.04, but also used here. Should be changed when + # version for 14.04 appears on virtualbox.org. + +REQUIRED_VBOXBASEURL="http://download.virtualbox.org/virtualbox/${REQUIRED_VBOX_VERSION}/virtualbox-${REQUIRED_VBOX_VERSION_MAJOR}_${REQUIRED_VBOX_VERSION}-${REQUIRED_VBOX_VERSIONCODE}~${REQUIRED_VBOX_OSCODE}_${AMD64_I386}.deb" +REQUIRED_VBOXEXTURL="http://download.virtualbox.org/virtualbox/${REQUIRED_VBOX_VERSION}/Oracle_VM_VirtualBox_Extension_Pack-${REQUIRED_VBOX_VERSION}-${REQUIRED_VBOX_VERSIONCODE}.vbox-extpack" + + +REQUIRED_CONTENT_PACKAGES=" + libsdl1.2debian + libpng12-0 +" + +REQUIRED_INSTALLED_PACKAGES=" + libsdl1.2debian + libpng12-0 +" + +REQUIRED_LIBRARIES=" + libpng12 +" -- cgit v1.2.3-55-g7522 From 33b8dae9702152df725d2fcabe82908174a5e061 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Wed, 16 Apr 2014 16:31:12 +0200 Subject: [vbox] module.build: -debugging line --- remote/modules/vbox/module.build | 1 - 1 file changed, 1 deletion(-) (limited to 'remote/modules') diff --git a/remote/modules/vbox/module.build b/remote/modules/vbox/module.build index b726a464..5a533089 100644 --- a/remote/modules/vbox/module.build +++ b/remote/modules/vbox/module.build @@ -77,7 +77,6 @@ build_modules() { fetch_source() { - pinfo "REQUIRED_VBOXBASEURL: $REQUIRED_VBOXBASEURL --- REQUIRED_VBOXEXTURL: $REQUIRED_VBOXEXTURL" if [ -z "$REQUIRED_VBOXBASEURL" -o -z "$REQUIRED_VBOXEXTURL" ]; then perror "Virtualbox download URLs not set - please write a module.conf-file for your linux flavour." fi -- cgit v1.2.3-55-g7522 From b7545f836f4f8750059cc4e2dac34f6150d954ae Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Wed, 16 Apr 2014 16:58:18 +0200 Subject: [nvidia_kernel] Newer driver version 337.12 doesn't seem to throw error building nvidia_uvm.ko - please test. --- remote/modules/nvidia_kernel/module.conf.ubuntu.14.04 | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 remote/modules/nvidia_kernel/module.conf.ubuntu.14.04 (limited to 'remote/modules') diff --git a/remote/modules/nvidia_kernel/module.conf.ubuntu.14.04 b/remote/modules/nvidia_kernel/module.conf.ubuntu.14.04 new file mode 100644 index 00000000..73887357 --- /dev/null +++ b/remote/modules/nvidia_kernel/module.conf.ubuntu.14.04 @@ -0,0 +1,4 @@ +REQUIRED_VERSION="337.12" +REQUIRED_NVIDIA="NVIDIA-Linux-x86_64-$REQUIRED_VERSION.run" +REQUIRED_URL="http://download.nvidia.com/XFree86/Linux-x86_64/$REQUIRED_VERSION/$REQUIRED_NVIDIA" + -- cgit v1.2.3-55-g7522 From 94626bc51759e130b1d2a6235f00f7633737738b Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 17 Apr 2014 12:43:37 +0200 Subject: [vmware] added exit codes for chroot steps --- remote/modules/vmware/module.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'remote/modules') diff --git a/remote/modules/vmware/module.build b/remote/modules/vmware/module.build index 98ee2b8d..d2c3f8a0 100644 --- a/remote/modules/vmware/module.build +++ b/remote/modules/vmware/module.build @@ -35,9 +35,9 @@ build() { 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) "${KERNEL_HEADERS_PATH}/include" vmplayer vmnet - vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmmon $(which gcc) "${KERNEL_HEADERS_PATH}/include" vmplayer vmmon + yes | sh /"${VMWARE_BUNDLE_FILE}" --eulas-agreed --console --required || exit 1 + vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmnet $(which gcc) "${KERNEL_HEADERS_PATH}/include" vmplayer vmnet || exit 1 + vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmmon $(which gcc) "${KERNEL_HEADERS_PATH}/include" vmplayer vmmon || exit 1 # PS1='\[\e[1;33m\](chroot) \u@\h:\w\$ \[\e[1;32m\]' /bin/bash -norc # un-comment for debugging within chroot EOF -- cgit v1.2.3-55-g7522 From 26e6052893fc922573845b4accd95627c951acad Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 17 Apr 2014 14:39:26 +0200 Subject: [vmware] added patch for vmnet + old patching functionality --- remote/modules/vmware/module.build | 62 ++++++++++++++++++++-- .../patches/vmnet__3.13-9.9__1.0-100.0.patch | 27 ++++++++++ 2 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-100.0.patch (limited to 'remote/modules') diff --git a/remote/modules/vmware/module.build b/remote/modules/vmware/module.build index d2c3f8a0..4d08c5c5 100644 --- a/remote/modules/vmware/module.build +++ b/remote/modules/vmware/module.build @@ -31,14 +31,54 @@ build() { # sanity check to see if KERNEL_HEADERS_PATH is set and exists [ -z "${KERNEL_HEADERS_PATH}" -o ! -e "${KERNEL_HEADERS_PATH}" ] && perror "KERNEL_HEADERS_PATH ('"${KERNEL_HEADERS_PATH}"') not found. Was the kernel module built?" + # build in two steps, to be able to use mltk function while patching modules 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 + 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 || exit 1 - vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmnet $(which gcc) "${KERNEL_HEADERS_PATH}/include" vmplayer vmnet || exit 1 - vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmmon $(which gcc) "${KERNEL_HEADERS_PATH}/include" vmplayer vmmon || exit 1 - # PS1='\[\e[1;33m\](chroot) \u@\h:\w\$ \[\e[1;32m\]' /bin/bash -norc # un-comment for debugging within chroot + yes | sh /"${VMWARE_BUNDLE_FILE}" --eulas-agreed --console --required + EOF + # check if we need to patch modules + cd "${MODULE_BUILD_DIR}/usr/lib/vmware/modules/source" \ + || perror "Could not cd to '${MODULE_BUILD_DIR}/usr/lib/vmware/modules/source'" + + local KMOD SHORT PATCH MIN_KERN MAX_KERN + for KMOD in *.tar; do + SHORT="${KMOD%%.tar}" + [ -e ".${SHORT}.patched" ] && continue + for PATCH in $(find "${MODULE_DIR}/patches/" -name "${SHORT}__*__*.patch"); do + parse_patch_name "$PATCH" + [ -z "${MIN_KERN}" -o -z "${MAX_KERN}" ] && perror "Could not parse patch filename" + if version_lt "$SYS_KERNEL" "$MIN_KERN" || version_gt "$SYS_KERNEL" "$MAX_KERN"; then + pinfo "*NOT* applying $PATCH (min=$MIN_KERN max=$MAX_KERN cmp=$SYS_KERNEL)" + continue # Not suitable for our kernel + fi + pinfo "Applying $PATCH (min=$MIN_KERN max=$MAX_KERN cmp=$SYS_KERNEL)" + [ ! -d "${SHORT}-only" ] && tar xf "$KMOD" + [ ! -d "${SHORT}-only" ] && perror "untar of $KMOD failed." + cd "${SHORT}-only" || perror "Where is ${SHORT}-only?" + if ! patch -p1 < "$PATCH"; then + cd .. + rm -rf -- "${SHORT}-only" + perror "Applying $PATCH failed." + fi + cd .. + done + if [ -d "${SHORT}-only" ]; then + tar cf "$KMOD" "${SHORT}-only/" || perror "repacking of $KMOD failed." + rm -rf -- "${SHORT}-only" + touch ".${SHORT}.patched" + fi + done + cd "${MODULE_DIR}" || perror "Could not cd to '${MODULE_DIR}'" + + # now build modules inside the 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 + vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmnet $(which gcc) "${KERNEL_HEADERS_PATH}/include" vmplayer vmnet + PS1='\[\e[1;33m\](chroot) \u@\h:\w\$ \[\e[1;32m\]' /bin/bash -norc # un-comment for debugging within chroot + 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 # cleanup unneeded files @@ -63,3 +103,15 @@ post_copy() { cp "${MODULE_BUILD_DIR}/lib/modules/$SYS_UTS_RELEASE/vmplayer/"* "$TARGET_BUILD_DIR/lib/modules/vmware/" || perror "Could not cp vmware modules to target!" } +parse_patch_name() { + [ $# -ne 1 ] && perror "parse_patch_name: Wrong parameter count." + local PATCH="$1" + MIN_KERN=$(echo "$PATCH" | sed -r 's/^[^_]+__([0-9\.]+)-[0-9\.]+__[^_]+\.patch$/\1/g') + [[ "$MIN_KERN" == /* ]] && MIN_KERN=$(echo "$PATCH" | sed -r 's/^[^_]+__([0-9\.]+)__[^_]+\.patch$/\1/g') + MAX_KERN=$(echo "$PATCH" | sed -r 's/^[^_]+__[0-9\.]+-([0-9\.]+)__[^_]+\.patch$/\1/g') + [[ "$MAX_KERN" == /* ]] && MAX_KERN=$(echo "$PATCH" | sed -r 's/^[^_]+__([0-9\.]+)__[^_]+\.patch$/\1/g') + [[ "$MIN_KERN" == /* ]] && MIN_KERN= + [[ "$MAX_KERN" == /* ]] && MAX_KERN= + # TODO: Parse min and max vmplayer/workstation version +} + diff --git a/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-100.0.patch b/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-100.0.patch new file mode 100644 index 00000000..54607506 --- /dev/null +++ b/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-100.0.patch @@ -0,0 +1,27 @@ +--- a/filter.c 2014-04-17 05:30:43.497846349 -0700 ++++ b/filter.c 2014-04-17 05:30:41.445846394 -0700 +@@ -203,7 +203,11 @@ + #endif + + static unsigned int ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + VNetFilterHookFn(unsigned int hooknum, // IN: ++#else ++VNetFilterHookFn(const struct nf_hook_ops *ops, // IN: ++#endif + #ifdef VMW_NFHOOK_USES_SKB + struct sk_buff *skb, // IN: + #else +@@ -252,7 +256,11 @@ + + /* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */ + /* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */ +- transmit = (hooknum == VMW_NF_INET_POST_ROUTING); ++ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) ++ transmit = (hooknum == VMW_NF_INET_POST_ROUTING); ++ #else ++ transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING); ++ #endif + + packetHeader = compat_skb_network_header(skb); + ip = (struct iphdr*)packetHeader; -- cgit v1.2.3-55-g7522 From defe52056bd08e0403fd967cad305f602d55c6cb Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 17 Apr 2014 15:13:56 +0200 Subject: [vmware] forgot to remove debug shells in chroot --- remote/modules/vmware/module.build | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'remote/modules') diff --git a/remote/modules/vmware/module.build b/remote/modules/vmware/module.build index 4d08c5c5..57e8cb91 100644 --- a/remote/modules/vmware/module.build +++ b/remote/modules/vmware/module.build @@ -34,7 +34,7 @@ build() { # build in two steps, to be able to use mltk function while patching modules 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 + # 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 EOF @@ -74,11 +74,8 @@ build() { # now build modules inside the 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 vmware-modconfig --console --build-mod -k "${SYS_UTS_RELEASE}" vmnet $(which gcc) "${KERNEL_HEADERS_PATH}/include" vmplayer vmnet - PS1='\[\e[1;33m\](chroot) \u@\h:\w\$ \[\e[1;32m\]' /bin/bash -norc # un-comment for debugging within chroot 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 # cleanup unneeded files -- cgit v1.2.3-55-g7522 From 66bc22d049beb037e8f651e2328a84d992c73ece Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 17 Apr 2014 07:49:48 -0700 Subject: [nvidia_libs] added ub14.04 conf + fix for version mismatch --- remote/modules/nvidia_libs/module.conf | 2 +- remote/modules/nvidia_libs/module.conf.ubuntu.14.04 | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 remote/modules/nvidia_libs/module.conf.ubuntu.14.04 (limited to 'remote/modules') diff --git a/remote/modules/nvidia_libs/module.conf b/remote/modules/nvidia_libs/module.conf index 12748274..f54c114c 100644 --- a/remote/modules/nvidia_libs/module.conf +++ b/remote/modules/nvidia_libs/module.conf @@ -4,7 +4,7 @@ REQUIRED_URL="http://download.nvidia.com/XFree86/Linux-x86_64/$REQUIRED_VERSION/ REQUIRED_FILES=" /etc/OpenCL/vendors/nvidia.icd - /usr/share/nvidia/nvidia-application-profiles-331.38-rc + /usr/share/nvidia/nvidia-application-profiles-$REQUIRED_VERSION-rc /usr/share/applications/nvidia-settings.desktop /opt/openslx/etc/nvidia.whiteout " diff --git a/remote/modules/nvidia_libs/module.conf.ubuntu.14.04 b/remote/modules/nvidia_libs/module.conf.ubuntu.14.04 new file mode 100644 index 00000000..98083b50 --- /dev/null +++ b/remote/modules/nvidia_libs/module.conf.ubuntu.14.04 @@ -0,0 +1,10 @@ +REQUIRED_VERSION="337.12" +REQUIRED_NVIDIA="NVIDIA-Linux-x86_64-$REQUIRED_VERSION.run" +REQUIRED_URL="http://download.nvidia.com/XFree86/Linux-x86_64/$REQUIRED_VERSION/$REQUIRED_NVIDIA" +REQUIRED_FILES=" + /etc/OpenCL/vendors/nvidia.icd + /usr/share/nvidia/nvidia-application-profiles-$REQUIRED_VERSION-rc + /usr/share/applications/nvidia-settings.desktop + /opt/openslx/etc/nvidia.whiteout +" + -- cgit v1.2.3-55-g7522 From 20229fffa3c38567f5cdb13a3a2aa19c758dfd45 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 22 Apr 2014 14:10:00 +0200 Subject: [pam] removed NCP for ub14.04 (TODO: fix it!) --- remote/modules/pam/module.conf.ubuntu.14 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 remote/modules/pam/module.conf.ubuntu.14 (limited to 'remote/modules') diff --git a/remote/modules/pam/module.conf.ubuntu.14 b/remote/modules/pam/module.conf.ubuntu.14 new file mode 100644 index 00000000..2148f421 --- /dev/null +++ b/remote/modules/pam/module.conf.ubuntu.14 @@ -0,0 +1,31 @@ +# TODO fix and re-add ncp support ! +REQUIRED_INSTALLED_PACKAGES=" + libpam-ldap + libnss-ldapd + nslcd + krb5-user + krb5-config + libpam-krb5 + libssl-dev + ldap-utils + libnfsidmap2 + nfs-common + libpam0g-dev + cifs-utils +" +REQUIRED_CONTENT_PACKAGES=" + libpam0g + libpam-modules + libpam-cap + libldap-2.4-2 + libpam-ldap + libnss-ldapd + nslcd + krb5-user + krb5-config + libpam-krb5 + ldap-utils + libnfsidmap2 + nfs-common + cifs-utils +" -- cgit v1.2.3-55-g7522 From 3eb53ddcb765983a5175a5d53de9efc428011e8b Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 22 Apr 2014 14:22:36 +0200 Subject: [pam] no more /lib/security. only with arch triplet. --- remote/modules/pam/module.conf.ubuntu.14 | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'remote/modules') diff --git a/remote/modules/pam/module.conf.ubuntu.14 b/remote/modules/pam/module.conf.ubuntu.14 index 2148f421..b08aa71a 100644 --- a/remote/modules/pam/module.conf.ubuntu.14 +++ b/remote/modules/pam/module.conf.ubuntu.14 @@ -29,3 +29,16 @@ REQUIRED_CONTENT_PACKAGES=" nfs-common cifs-utils " +REQUIRED_BINARIES+=" + mount.cifs +" +REQUIRED_DIRECTORIES+=" + /lib + /usr/lib +" +REQUIRED_SYSTEM_FILES+=" + /etc/pam.conf + /etc/default/locale + /lib/${ARCH_TRIPLET}/security + /sbin/mkhomedir_helper +" -- cgit v1.2.3-55-g7522 From 7618e2bbb69e6283251de9c7edcb340dc4a20ae5 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 22 Apr 2014 15:23:10 +0200 Subject: [alsa] added missing pkgs for alsa config files --- remote/modules/alsa/module.conf.ubuntu | 2 ++ 1 file changed, 2 insertions(+) (limited to 'remote/modules') diff --git a/remote/modules/alsa/module.conf.ubuntu b/remote/modules/alsa/module.conf.ubuntu index b1f9f0e2..c07957ab 100644 --- a/remote/modules/alsa/module.conf.ubuntu +++ b/remote/modules/alsa/module.conf.ubuntu @@ -2,4 +2,6 @@ REQUIRED_CONTENT_PACKAGES=" alsa-utils alsa-base libasound2 + libasound2-data + libasound2-plugins " -- cgit v1.2.3-55-g7522 From f354019d8d8126ca53dc085f1474b9f10c73f4ef Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 22 Apr 2014 15:51:04 +0200 Subject: [pam] libncp, ncpfs and libpam-ncp (ncpfs depends on libpam-ncp) for Ubuntu 14.04 --- remote/modules/pam/module.build | 12 ++++++++++++ remote/modules/pam/module.conf.ubuntu.14 | 8 ++++++++ 2 files changed, 20 insertions(+) (limited to 'remote/modules') diff --git a/remote/modules/pam/module.build b/remote/modules/pam/module.build index 15828fb8..c6d92510 100644 --- a/remote/modules/pam/module.build +++ b/remote/modules/pam/module.build @@ -1,10 +1,22 @@ +#!/bin/bash + fetch_source() { # get pam-script source download_untar "$REQUIRED_PAM_SCRIPT_URL" "src/" + # Distribution switch: openSuse 13.1 has no package nss-ldap: if [[ "$SYS_DISTRIBUTION" == "opensuse" && "$SYS_VERSION" == "13.1" ]]; then pinfo "Downloading $REQUIRED_NSS_LDAPD_URL ..." download_untar "$REQUIRED_NSS_LDAPD_URL" "src/" fi + # Distribution switch: Ubuntu 14.04 dropped packages ncpfs and libncp: + if [[ "$SYS_DISTRIBUTION" == "ubuntu" && "$SYS_VERSION" == "14.04" ]]; then + for file in $REQUIRED_DOWNLOAD_URLS; do + local package="$(basename $file)" + pinfo "Downloading and installing package $package ..." + download_if_empty "$file" "src/$package" + dpkg -i "src/$package" || perror "Could not install package $package." + done + fi } build() { diff --git a/remote/modules/pam/module.conf.ubuntu.14 b/remote/modules/pam/module.conf.ubuntu.14 index b08aa71a..5d0c5803 100644 --- a/remote/modules/pam/module.conf.ubuntu.14 +++ b/remote/modules/pam/module.conf.ubuntu.14 @@ -42,3 +42,11 @@ REQUIRED_SYSTEM_FILES+=" /lib/${ARCH_TRIPLET}/security /sbin/mkhomedir_helper " + +# For Ubuntu 14.04: Both packages were dropped from official repos. Do not change the +# order, as these packages will be installed via dpkg and depend on each other. +REQUIRED_DOWNLOAD_URLS=" + de.archive.ubuntu.com/ubuntu/pool/universe/n/ncpfs/libncp_2.2.6-9ubuntu1_amd64.deb + de.archive.ubuntu.com/ubuntu/pool/universe/n/ncpfs/libpam-ncp_2.2.6-9ubuntu1_amd64.deb + de.archive.ubuntu.com/ubuntu/pool/universe/n/ncpfs/ncpfs_2.2.6-9ubuntu1_amd64.deb +" -- cgit v1.2.3-55-g7522