summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2014-07-25 15:56:48 +0200
committerJonathan Bauer2014-07-25 15:56:48 +0200
commitb063cb9e530760acdfc16819fd1d21ab797666bb (patch)
treefa75dd8a01d7e8ed72e081454861d5a816d305e5
parent[rfs-s31] fix copying of the busybox (diff)
parent[pvs2 + x11vnc] Add conf files for fedora (diff)
downloadtm-scripts-b063cb9e530760acdfc16819fd1d21ab797666bb.tar.gz
tm-scripts-b063cb9e530760acdfc16819fd1d21ab797666bb.tar.xz
tm-scripts-b063cb9e530760acdfc16819fd1d21ab797666bb.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
-rw-r--r--helper/fileutil.inc4
-rw-r--r--remote/includes/paths.inc19
-rw-r--r--remote/modules/busybox/module.conf4
-rw-r--r--remote/modules/kernel/module.build10
-rw-r--r--remote/modules/nvidia_libs/module.conf1
-rw-r--r--remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient10
-rw-r--r--remote/modules/pvs2/module.conf.fedora6
-rw-r--r--remote/modules/vmware/module.conf1
-rw-r--r--remote/modules/x11vnc/module.conf.fedora6
-rw-r--r--remote/rootfs/rootfs-stage31/templates/drm.cfg9
-rwxr-xr-xremote/setup_target39
-rw-r--r--server/modules/pvs2-freiburg/etc/xdg/openslx/pvs2mgr.ini140
12 files changed, 219 insertions, 30 deletions
diff --git a/helper/fileutil.inc b/helper/fileutil.inc
index 525e46a7..10b4bbc7 100644
--- a/helper/fileutil.inc
+++ b/helper/fileutil.inc
@@ -23,7 +23,9 @@ tarcopy () {
[ -z "$TO" ] && perror "tarcopy called with empty destination."
[ ! -d "$TO" ] && { mkdir -p "$TO" || perror "could not create destination "$TO" for tar-copy."; }
# TODO count files copied? would remove the need to do it everywhere :)
- tar $IGNORE_ERROR -cpP $FROM | tar -xp -C "$TO" 2> /dev/null
+ tar $IGNORE_ERROR -cpP $FROM | tar -xp -C "$TO" \
+ --transform 's,^/lib/udev/rules.d,/usr/lib/udev/rules.d,' \
+ 2> /dev/null
local PS=(${PIPESTATUS[*]})
[ "x$IGNORE_ERROR" == "x" -a "x${PS[0]}" != "x0" ] && perror "packing-part of tar-copy from '$SHORT' to '$TO' failed. (${PS[0]})"
[ "x${PS[1]}" != "x0" ] && perror "unpacking-part of tar-copy from '$SHORT' to '$TO' failed. (${PS[1]})"
diff --git a/remote/includes/paths.inc b/remote/includes/paths.inc
index 8ab016df..ca692adb 100644
--- a/remote/includes/paths.inc
+++ b/remote/includes/paths.inc
@@ -11,3 +11,22 @@ for CANDIDATE in $(strings "$(ldd "$(which login)" | grep libpam.so | head -n 1
done
[ -z "$SYS_PAM_MODULES_PATH" ] && perror "Failed to find pam_unix.so on this system."
+
+#
+# Figure out if we have split usr
+if [ -L "/bin" -a -L "/lib" ]; then
+ declare -rg USR_SPLIT="no"
+else
+ declare -rg USR_SPLIT="yes"
+fi
+pdebug "/bin and /lib are split from /usr/bin and /usr/lib (they are not symlinks): $USR_SPLIT"
+
+SYS_LIB_PATHS=""
+for DIR in /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64; do
+ [ -d "$DIR" -a ! -L "$DIR" ] && SYS_LIB_PATHS+=" $DIR"
+done
+declare -rg SYS_LIB_PATHS=$SYS_LIB_PATHS
+pdebug "System lib paths: $SYS_LIB_PATHS"
+
+true
+
diff --git a/remote/modules/busybox/module.conf b/remote/modules/busybox/module.conf
index 82d1731e..6acfa16c 100644
--- a/remote/modules/busybox/module.conf
+++ b/remote/modules/busybox/module.conf
@@ -2,6 +2,6 @@ REQUIRED_GIT="git://git.busybox.net/busybox"
REQUIRED_BRANCH="1_22_1"
REQUIRED_BINARIES="busybox"
REQUIRED_DIRECTORIES="
- /usr/bin
- /usr/sbin
+ /bin
+ /sbin
"
diff --git a/remote/modules/kernel/module.build b/remote/modules/kernel/module.build
index 1d2aad7a..7d840c7b 100644
--- a/remote/modules/kernel/module.build
+++ b/remote/modules/kernel/module.build
@@ -2,17 +2,18 @@
# This overrides get_kernel_version from kernel.inc, so the variables will be set properly
get_kernel_version() {
+ # Do not use MODULE_DIR here as this function might run when we process another module!
[ -n "${TARGET_KERNEL_LONG}" ] && return 0
- [ ! -e "${MODULE_DIR}/ksrc/include/generated/utsrelease.h" ] && return 0
+ [ ! -e "${TARGET_DIR}/kernel/ksrc/include/generated/utsrelease.h" ] && return 0
# determine kernel version that will be running in the generated system
# declare kernel version stuff
- declare -rg TARGET_KERNEL_LONG=$(grep 'UTS_RELEASE' "${MODULE_DIR}/ksrc/include/generated/utsrelease.h" | awk -F '"' '{print $2}')
+ declare -rg TARGET_KERNEL_LONG=$(grep 'UTS_RELEASE' "${TARGET_DIR}/kernel/ksrc/include/generated/utsrelease.h" | awk -F '"' '{print $2}')
declare -rg TARGET_KERNEL_SHORT=$(echo "$TARGET_KERNEL_LONG" | grep -o -E '^[0-9\.]+')
# declare path to kernel headers and modules/firmware
- declare -rg KERNEL_HEADERS_DIR="${MODULE_DIR}/ksrc"
- declare -rg KERNEL_BASE_DIR="${MODULE_DIR}/build"
+ declare -rg KERNEL_HEADERS_DIR="${TARGET_DIR}/kernel/ksrc"
+ declare -rg KERNEL_BASE_DIR="${TARGET_DIR}/kernel/build"
# print debug info
pinfo "TARGET_KERNEL_LONG: '$TARGET_KERNEL_LONG'"
@@ -23,7 +24,6 @@ get_kernel_version() {
fetch_source() {
pdebug "getting kernel sources via git ...."
[ -d ./ksrc ] && rm -rf ./ksrc
- set -x
git clone --depth 1 "${REQUIRED_GIT}" -b "${REQUIRED_GIT_BRANCH}" ksrc || perror "Could not clone kernel git."
# check for aufs
local RSL=$(find ksrc/ -type d -name aufs)
diff --git a/remote/modules/nvidia_libs/module.conf b/remote/modules/nvidia_libs/module.conf
index 274b3d4d..f54c114c 100644
--- a/remote/modules/nvidia_libs/module.conf
+++ b/remote/modules/nvidia_libs/module.conf
@@ -1,7 +1,6 @@
REQUIRED_VERSION="331.38"
REQUIRED_NVIDIA="NVIDIA-Linux-x86_64-$REQUIRED_VERSION.run"
REQUIRED_URL="http://download.nvidia.com/XFree86/Linux-x86_64/$REQUIRED_VERSION/$REQUIRED_NVIDIA"
-REQUIRED_ORIGINAL_USR_SPLIT="yes" # Don't symlink /bin to /usr/bin etc. in build dir
REQUIRED_FILES="
/etc/OpenCL/vendors/nvidia.icd
diff --git a/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient b/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient
index 75ba0709..b33889df 100644
--- a/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient
+++ b/remote/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient
@@ -1,11 +1,9 @@
#!/bin/ash
# If the ENV var PVS has been set by vmchooser start pvsclient
-if [ -n "$PVS" -a "$PVS" = "true" ]; then
- if [ -n "$PVS_SESSIONID" ]; then
- pvsclient --session-id "$PVS_SESSIONID" &
- else
- pvsclient &
- fi
+if [ -n "$PVS_SESSIONID" ]; then
+ pvsclient --session-id "$PVS_SESSIONID" &
+else
+ pvsclient &
fi
diff --git a/remote/modules/pvs2/module.conf.fedora b/remote/modules/pvs2/module.conf.fedora
new file mode 100644
index 00000000..6d2cd0f6
--- /dev/null
+++ b/remote/modules/pvs2/module.conf.fedora
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+ qt-devel
+ libvncserver-devel
+"
+REQUIRED_CONTENT_PACKAGES="
+"
diff --git a/remote/modules/vmware/module.conf b/remote/modules/vmware/module.conf
index 42d73343..749a0838 100644
--- a/remote/modules/vmware/module.conf
+++ b/remote/modules/vmware/module.conf
@@ -1,5 +1,4 @@
REQUIRED_DOWNLOAD_BASE="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/10.0.1/1379776/linux/core/"
-REQUIRED_ORIGINAL_USR_SPLIT="yes" # Don't symlink /bin to /usr/bin etc. in build dir
REQUIRED_TYPE="workstation"
REQUIRED_MODULES="kernel"
REQUIRED_DIRECTORIES="
diff --git a/remote/modules/x11vnc/module.conf.fedora b/remote/modules/x11vnc/module.conf.fedora
new file mode 100644
index 00000000..43ae3119
--- /dev/null
+++ b/remote/modules/x11vnc/module.conf.fedora
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+ x11vnc
+"
+REQUIRED_CONTENT_PACKAGES="
+ x11vnc
+"
diff --git a/remote/rootfs/rootfs-stage31/templates/drm.cfg b/remote/rootfs/rootfs-stage31/templates/drm.cfg
index 45eda39f..d95ea31a 100644
--- a/remote/rootfs/rootfs-stage31/templates/drm.cfg
+++ b/remote/rootfs/rootfs-stage31/templates/drm.cfg
@@ -3,10 +3,17 @@
10de:0193 @nvidia
# ION
10de:087d @nvidia
+##
+# 10de-11c0: nvidia Geforce GTX 660 (OG)
+# 10de-0fc2: nvidia GeForce GT 630 (OG)
+# 10de-0dd8: nvidia Quadro 2000
+##
+10de:11c0 @nvidia
+10de:0fc2 @nvidia
+10de:0dd8 @nvidia
## intel
# Dell GX 620
8086:2772 i915
# aliases
@nvidia nvidia/nvidia.ko nvidia/nvidia-uvm.ko
@nvidia_fallback nouveau
-##
diff --git a/remote/setup_target b/remote/setup_target
index 0d28db29..6b9a7a6c 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -153,7 +153,7 @@ copy_files_with_deps () {
else
OPTIONAL="no"
fi
- local FILE_CANDIDATES=$( find . -name "${FILENAME}" -a -executable -a \( -type f -o -type l \) )
+ local FILE_CANDIDATES=$( find . -name "${FILENAME}" -a \( -type f -o -type l \) )
local FINAL_LIST=""
# Check result of find
if [ "$(echo "$FILE_CANDIDATES" | wc -l)" -gt 1 ]; then
@@ -246,6 +246,28 @@ copy_files_with_deps () {
#
#
+# If the system has no usr split, recreate the structure in the given
+# directory, otherwise, do nothing
+#
+#
+prepare_usr_split () {
+ local DIR DEST
+ local BASE=$1
+ [ -z "$BASE" ] && perror "prepare_usr_split called with empty base dir"
+ if [ "$USR_SPLIT" == "no" ]; then # no usr split, /bin /lib etc are symlinks
+ for DIR in lib lib32 lib64 bin sbin; do
+ [ -L "/${DIR}" ] || continue
+ DEST=$(readlink "/${DIR}")
+ if [ ! -L "/${DEST}" ]; then
+ mkdir -p "${BASE}/${DEST}" || perror "Could not create '${BASE}/${DEST}'"
+ fi
+ [ -L "${BASE}/${DIR}" ] || ln -s "${DEST}" "${BASE}/${DIR}" || perror "Could not symlink '${BASE}/${DIR}' to '${DEST}'"
+ done
+ fi
+}
+
+#
+#
# main public function. Requires the TARGET to be given as argument.
# this will simply go over all the modules as found in the remote/target/<TARGET>
# and run following functions:
@@ -255,7 +277,6 @@ generate_target() {
initial_checks
- local DIR
TARGET=$1 && shift
TARGET_DIR="${MODE_DIR}/targets/${TARGET}"
TARGET_BUILD_DIR="${MODE_DIR}/builds/${TARGET}"
@@ -267,10 +288,8 @@ generate_target() {
perror "Target directory cannot be named 'builds' or 'modules'."
pdebug "Generating '$TARGET_BUILD_DIR' for '$TARGET'"
- for DIR in lib lib64 bin sbin; do
- mkdir -p "${TARGET_BUILD_DIR}/usr/${DIR}" || perror "Could not create '${TARGET_BUILD_DIR}/usr/${DIR}'"
- [ -L "${TARGET_BUILD_DIR}/${DIR}" ] || ln -s "usr/${DIR}" "${TARGET_BUILD_DIR}/${DIR}" || perror "Could not symlink '${TARGET_BUILD_DIR}/${DIR}' to 'usr/${DIR}"
- done
+ mkdir -p "$TARGET_BUILD_DIR" || perror "Failed to create $TARGET_BUILD_DIR"
+ prepare_usr_split "${TARGET_BUILD_DIR}"
# if no arguments assume all.
if [ "x$1" = "x" -o "x$1" = "xall" ]; then
@@ -373,13 +392,7 @@ process_module() {
read_config
# Prepare build directory
mkdir -p "${MODULE_BUILD_DIR}" || perror "Could not create build dir"
- if [ -z "${REQUIRED_ORIGINAL_USR_SPLIT}" -o "x${REQUIRED_ORIGINAL_USR_SPLIT}" = "xno" ]; then
- local DIR
- for DIR in lib lib64 bin sbin; do
- mkdir -p "${MODULE_BUILD_DIR}/usr/${DIR}" || perror "Could not create '${MODULE_BUILD_DIR}/usr/${DIR}'"
- [ -L "${MODULE_BUILD_DIR}/${DIR}" ] || ln -s "usr/${DIR}" "${MODULE_BUILD_DIR}/${DIR}" || perror "Could not symlink '${MODULE_BUILD_DIR}/${DIR}' to 'usr/${DIR}"
- done
- fi
+ prepare_usr_split "${MODULE_BUILD_DIR}"
# Check if this module has a dependency that wasn't built yet:
if [ ! -z "$REQUIRED_MODULES" ]; then
pdebug "$MODULE depends on ${REQUIRED_MODULES}...."
diff --git a/server/modules/pvs2-freiburg/etc/xdg/openslx/pvs2mgr.ini b/server/modules/pvs2-freiburg/etc/xdg/openslx/pvs2mgr.ini
new file mode 100644
index 00000000..0c25e708
--- /dev/null
+++ b/server/modules/pvs2-freiburg/etc/xdg/openslx/pvs2mgr.ini
@@ -0,0 +1,140 @@
+# This denotes the groups that have to be available here
+rooms=-100,-101,-113,-114
+
+[-100]
+mgrIP=132.230.4.26
+client/size=16
+client/1/ip=123.230.4.156
+client/1/pos=@Point(1 6)
+client/2/ip=123.230.4.157
+client/2/pos=@Point(0 4)
+client/3/ip=123.230.4.158
+client/3/pos=@Point(1 4)
+client/4/ip=123.230.4.159
+client/4/pos=@Point(3 4)
+client/5/ip=123.230.4.160
+client/5/pos=@Point(4 4)
+client/6/ip=123.230.4.161
+client/6/pos=@Point(5 4)
+client/7/ip=123.230.4.162
+client/7/pos=@Point(0 2)
+client/8/ip=123.230.4.163
+client/8/pos=@Point(1 2)
+client/9/ip=123.230.4.164
+client/9/pos=@Point(3 2)
+client/10/ip=123.230.4.165
+client/10/pos=@Point(4 2)
+client/11/ip=123.230.4.166
+client/11/pos=@Point(5 2)
+client/12/ip=123.230.4.167
+client/12/pos=@Point(0 0)
+client/13/ip=123.230.4.168
+client/13/pos=@Point(1 0)
+client/14/ip=123.230.4.169
+client/14/pos=@Point(3 0)
+client/15/ip=123.230.4.170
+client/15/pos=@Point(4 0)
+client/16/ip=123.230.4.171
+client/16/pos=@Point(5 0)
+
+[-101]
+mgrIP=132.230.4.26
+client/size=16
+client/1/ip=123.230.4.140
+client/1/pos=@Point(6 2)
+client/2/ip=123.230.4.141
+client/2/pos=@Point(4 0)
+client/3/ip=123.230.4.142
+client/3/pos=@Point(4 1)
+client/4/ip=123.230.4.143
+client/4/pos=@Point(4 2)
+client/5/ip=123.230.4.144
+client/5/pos=@Point(4 4)
+client/6/ip=123.230.4.145
+client/6/pos=@Point(4 5)
+client/7/ip=123.230.4.146
+client/7/pos=@Point(2 0)
+client/8/ip=123.230.4.147
+client/8/pos=@Point(2 1)
+client/9/ip=123.230.4.148
+client/9/pos=@Point(2 2)
+client/10/ip=123.230.4.149
+client/10/pos=@Point(2 4)
+client/11/ip=123.230.4.150
+client/11/pos=@Point(2 5)
+client/12/ip=123.230.4.151
+client/12/pos=@Point(0 0)
+client/13/ip=123.230.4.152
+client/13/pos=@Point(0 1)
+client/14/ip=123.230.4.153
+client/14/pos=@Point(0 2)
+client/15/ip=123.230.4.154
+client/15/pos=@Point(0 4)
+client/16/ip=123.230.4.155
+client/16/pos=@Point(0 5)
+
+[-113]
+mgrIP=132.230.4.26
+client/size=16
+client/1/ip=123.230.4.120
+client/1/pos=@Point(3 3)
+client/2/ip=123.230.4.121
+client/2/pos=@Point(4 6)
+client/3/ip=123.230.4.122
+client/3/pos=@Point(3 6)
+client/4/ip=123.230.4.123
+client/4/pos=@Point(2 6)
+client/5/ip=123.230.4.124
+client/5/pos=@Point(1 6)
+client/6/ip=123.230.4.125
+client/6/pos=@Point(0 6)
+client/7/ip=123.230.4.126
+client/7/pos=@Point(0 4)
+client/8/ip=123.230.4.127
+client/8/pos=@Point(1 4)
+client/9/ip=123.230.4.128
+client/9/pos=@Point(2 4)
+client/10/ip=123.230.4.129
+client/10/pos=@Point(0 2)
+client/11/ip=123.230.4.130
+client/11/pos=@Point(1 2)
+client/12/ip=123.230.4.131
+client/12/pos=@Point(2 2)
+client/13/ip=123.230.4.132
+client/13/pos=@Point(0 0)
+client/14/ip=123.230.4.133
+client/14/pos=@Point(1 0)
+client/15/ip=123.230.4.134
+client/15/pos=@Point(2 0)
+client/16/ip=123.230.4.135
+client/16/pos=@Point(3 0)
+
+[-114]
+mgrIP=132.230.4.26
+client/size=13
+client/1/ip=123.230.4.100
+client/1/pos=@Point(4 3)
+client/2/ip=123.230.4.101
+client/2/pos=@Point(3 5)
+client/3/ip=123.230.4.102
+client/3/pos=@Point(3 6)
+client/4/ip=123.230.4.103
+client/4/pos=@Point(4 5)
+client/5/ip=123.230.4.104
+client/5/pos=@Point(0 6)
+client/6/ip=123.230.4.105
+client/6/pos=@Point(3 1)
+client/7/ip=123.230.4.106
+client/7/pos=@Point(1 5)
+client/8/ip=123.230.4.107
+client/8/pos=@Point(1 1)
+client/9/ip=123.230.4.108
+client/9/pos=@Point(0 0)
+client/10/ip=123.230.4.109
+client/10/pos=@Point(0 6)
+client/11/ip=123.230.4.110
+client/11/pos=@Point(3 0)
+client/12/ip=123.230.4.111
+client/12/pos=@Point(4 1)
+client/13/ip=123.230.4.112
+client/13/pos=@Point(0 1)