summaryrefslogtreecommitdiffstats
path: root/remote/modules
diff options
context:
space:
mode:
authorJonathan Bauer2014-03-25 15:24:04 +0100
committerJonathan Bauer2014-03-25 15:24:04 +0100
commit3d1235af060955e271be68240c0ca46bc6d81b03 (patch)
treeef02dcc4bb8476cfeef07e2df6a38b4c29d350df /remote/modules
parent[rootfs-stage32] /var/log/openslx in tmpfiles.d (diff)
downloadtm-scripts-3d1235af060955e271be68240c0ca46bc6d81b03.tar.gz
tm-scripts-3d1235af060955e271be68240c0ca46bc6d81b03.tar.xz
tm-scripts-3d1235af060955e271be68240c0ca46bc6d81b03.zip
[modules] new module naming convention
rename $MODULE.{conf,build} to module.{conf,build}
Diffstat (limited to 'remote/modules')
-rw-r--r--remote/modules/alsa/module.build19
-rw-r--r--remote/modules/alsa/module.conf8
-rw-r--r--remote/modules/alsa/module.conf.debian5
-rw-r--r--remote/modules/alsa/module.conf.opensuse5
-rw-r--r--remote/modules/alsa/module.conf.scientific12
-rw-r--r--remote/modules/alsa/module.conf.ubuntu5
-rw-r--r--remote/modules/beamergui/module.build19
-rw-r--r--remote/modules/beamergui/module.conf9
-rw-r--r--remote/modules/beamergui/module.conf.debian8
-rw-r--r--remote/modules/beamergui/module.conf.ubuntu8
-rw-r--r--remote/modules/busybox/module.build26
-rw-r--r--remote/modules/busybox/module.conf9
-rw-r--r--remote/modules/consolekit/module.build28
-rw-r--r--remote/modules/consolekit/module.conf17
-rw-r--r--remote/modules/consolekit/module.conf.debian6
-rw-r--r--remote/modules/consolekit/module.conf.opensuse8
-rw-r--r--remote/modules/consolekit/module.conf.ubuntu9
-rw-r--r--remote/modules/cron/module.build30
-rw-r--r--remote/modules/cron/module.conf3
-rw-r--r--remote/modules/cups/module.build19
-rw-r--r--remote/modules/cups/module.conf9
-rw-r--r--remote/modules/cups/module.conf.opensuse10
-rw-r--r--remote/modules/cups/module.conf.ubuntu10
-rw-r--r--remote/modules/cups/module.conf.ubuntu.1312
-rw-r--r--remote/modules/cups/module.conf.ubuntu.13.1012
-rw-r--r--remote/modules/dbus/module.build63
-rw-r--r--remote/modules/dbus/module.conf15
-rw-r--r--remote/modules/dbus/module.conf.debian9
-rw-r--r--remote/modules/dbus/module.conf.opensuse4
-rw-r--r--remote/modules/dbus/module.conf.ubuntu7
-rw-r--r--remote/modules/debug/module.build20
-rw-r--r--remote/modules/debug/module.conf18
-rw-r--r--remote/modules/debug/module.conf.debian7
-rw-r--r--remote/modules/debug/module.conf.opensuse11
-rw-r--r--remote/modules/debug/module.conf.ubuntu7
-rw-r--r--remote/modules/dhcpc-busybox/module.build13
-rw-r--r--remote/modules/dhcpc-busybox/module.conf1
-rw-r--r--remote/modules/dnbd3/module.build43
-rw-r--r--remote/modules/dnbd3/module.conf11
-rw-r--r--remote/modules/dnbd3/module.conf.debian7
-rw-r--r--remote/modules/dnbd3/module.conf.opensuse8
-rw-r--r--remote/modules/dnbd3/module.conf.ubuntu8
-rw-r--r--remote/modules/german/module.build39
-rw-r--r--remote/modules/german/module.conf5
-rw-r--r--remote/modules/german/module.conf.debian10
-rw-r--r--remote/modules/german/module.conf.opensuse13
-rw-r--r--remote/modules/german/module.conf.scientific8
-rw-r--r--remote/modules/german/module.conf.ubuntu11
-rw-r--r--remote/modules/idleaction/module.build16
-rw-r--r--remote/modules/idleaction/module.conf4
-rw-r--r--remote/modules/idleaction/module.conf.opensuse6
-rw-r--r--remote/modules/idleaction/module.conf.ubuntu6
-rw-r--r--remote/modules/iptables-helper/module.build13
-rw-r--r--remote/modules/iptables-helper/module.conf1
-rw-r--r--remote/modules/kdm-theme-bwlp/module.build13
-rw-r--r--remote/modules/kdm-theme-bwlp/module.conf2
-rw-r--r--remote/modules/kdm/module.build19
-rw-r--r--remote/modules/kdm/module.conf20
-rw-r--r--remote/modules/kdm/module.conf.debian28
-rw-r--r--remote/modules/kdm/module.conf.opensuse10
-rw-r--r--remote/modules/kdm/module.conf.scientific20
-rw-r--r--remote/modules/kdm/module.conf.ubuntu29
-rw-r--r--remote/modules/kernel-system/module.build114
-rw-r--r--remote/modules/kernel-system/module.conf3
-rw-r--r--remote/modules/kernel-system/module.conf.opensuse6
-rw-r--r--remote/modules/kernel-system/module.conf.ubuntu6
-rw-r--r--remote/modules/kernel/module.build151
-rw-r--r--remote/modules/kernel/module.conf3
-rw-r--r--remote/modules/kernel/module.conf.opensuse2
-rw-r--r--remote/modules/kernel/module.conf.ubuntu2
-rw-r--r--remote/modules/kernel/module.conf.ubuntu.13.042
-rw-r--r--remote/modules/ldm-gtk-greeter/module.build34
-rw-r--r--remote/modules/ldm-gtk-greeter/module.conf9
-rw-r--r--remote/modules/ldm/module.build34
-rw-r--r--remote/modules/ldm/module.conf8
-rw-r--r--remote/modules/nscd/module.build17
-rw-r--r--remote/modules/nscd/module.conf3
-rw-r--r--remote/modules/nscd/module.conf.debian6
-rw-r--r--remote/modules/nscd/module.conf.opensuse6
-rw-r--r--remote/modules/nscd/module.conf.ubuntu6
-rw-r--r--remote/modules/nvidia_kernel/module.build55
-rw-r--r--remote/modules/nvidia_kernel/module.conf10
-rw-r--r--remote/modules/nvidia_libs/module.build56
-rw-r--r--remote/modules/nvidia_libs/module.conf17
-rw-r--r--remote/modules/nvidia_libs/module.conf.ubuntu13
-rw-r--r--remote/modules/openbox/module.build36
-rw-r--r--remote/modules/openbox/module.conf11
-rw-r--r--remote/modules/openbox/module.conf.debian15
-rw-r--r--remote/modules/openbox/module.conf.opensuse13
-rw-r--r--remote/modules/openbox/module.conf.ubuntu15
-rw-r--r--remote/modules/openbox/module.conf.zypper11
-rw-r--r--remote/modules/pam/module.build45
-rw-r--r--remote/modules/pam/module.conf26
-rw-r--r--remote/modules/pam/module.conf.debian51
-rw-r--r--remote/modules/pam/module.conf.opensuse43
-rw-r--r--remote/modules/pam/module.conf.opensuse.13.147
-rw-r--r--remote/modules/pam/module.conf.ubuntu51
-rw-r--r--remote/modules/plymouth/module.build20
-rw-r--r--remote/modules/plymouth/module.conf15
-rw-r--r--remote/modules/plymouth/module.conf.debian7
-rw-r--r--remote/modules/plymouth/module.conf.opensuse7
-rw-r--r--remote/modules/plymouth/module.conf.ubuntu7
-rw-r--r--remote/modules/polkit/module.build25
-rw-r--r--remote/modules/polkit/module.conf13
-rw-r--r--remote/modules/polkit/module.conf.debian19
-rw-r--r--remote/modules/polkit/module.conf.opensuse12
-rw-r--r--remote/modules/polkit/module.conf.ubuntu19
-rw-r--r--remote/modules/printergui/module.build25
-rw-r--r--remote/modules/printergui/module.conf9
-rw-r--r--remote/modules/printergui/module.conf.opensuse7
-rw-r--r--remote/modules/printergui/module.conf.ubuntu7
-rw-r--r--remote/modules/qemukvm/module.build16
-rw-r--r--remote/modules/qemukvm/module.conf11
-rw-r--r--remote/modules/qemukvm/module.conf.ubuntu37
-rw-r--r--remote/modules/redsocks/module.build24
-rw-r--r--remote/modules/redsocks/module.conf6
-rw-r--r--remote/modules/redsocks/module.conf.debian3
-rw-r--r--remote/modules/redsocks/module.conf.opensuse3
-rw-r--r--remote/modules/redsocks/module.conf.ubuntu3
-rw-r--r--remote/modules/rsyslogd/module.build34
-rw-r--r--remote/modules/rsyslogd/module.conf6
-rw-r--r--remote/modules/rsyslogd/module.conf.debian6
-rw-r--r--remote/modules/rsyslogd/module.conf.opensuse9
-rw-r--r--remote/modules/rsyslogd/module.conf.ubuntu6
-rw-r--r--remote/modules/samba/module.build26
-rw-r--r--remote/modules/samba/module.conf24
-rw-r--r--remote/modules/samba/module.conf.opensuse24
-rw-r--r--remote/modules/samba/module.conf.ubuntu20
-rw-r--r--remote/modules/smartctl/module.build13
-rw-r--r--remote/modules/smartctl/module.conf5
-rw-r--r--remote/modules/smartctl/module.conf.opensuse6
-rw-r--r--remote/modules/smartctl/module.conf.ubuntu6
-rw-r--r--remote/modules/smbclient/module.build20
-rw-r--r--remote/modules/smbclient/module.conf10
-rw-r--r--remote/modules/smbclient/module.conf.opensuse9
-rw-r--r--remote/modules/smbclient/module.conf.ubuntu9
-rw-r--r--remote/modules/splash-openslx/module.build13
-rw-r--r--remote/modules/splash-openslx/module.conf1
-rw-r--r--remote/modules/sshd/module.build20
-rw-r--r--remote/modules/sshd/module.conf3
-rw-r--r--remote/modules/swiss/module.build55
-rw-r--r--remote/modules/swiss/module.conf5
-rw-r--r--remote/modules/swiss/module.conf.debian10
-rw-r--r--remote/modules/swiss/module.conf.opensuse14
-rw-r--r--remote/modules/swiss/module.conf.scientific8
-rw-r--r--remote/modules/swiss/module.conf.ubuntu17
-rw-r--r--remote/modules/systemd/module.build72
-rw-r--r--remote/modules/systemd/module.build.scientific178
-rw-r--r--remote/modules/systemd/module.build.scientific.README11
-rw-r--r--remote/modules/systemd/module.conf65
-rw-r--r--remote/modules/systemd/module.conf.debian13
-rw-r--r--remote/modules/systemd/module.conf.opensuse11
-rw-r--r--remote/modules/systemd/module.conf.scientific37
-rw-r--r--remote/modules/systemd/module.conf.ubuntu13
-rw-r--r--remote/modules/udisks/module.build53
-rw-r--r--remote/modules/udisks/module.conf14
-rw-r--r--remote/modules/udisks/module.conf.debian32
-rw-r--r--remote/modules/udisks/module.conf.opensuse7
-rw-r--r--remote/modules/udisks/module.conf.ubuntu34
-rw-r--r--remote/modules/udisks/module.conf.ubuntu.1231
-rw-r--r--remote/modules/vbox/module.build127
-rw-r--r--remote/modules/vbox/module.conf12
-rw-r--r--remote/modules/vbox/module.conf.opensuse0
-rw-r--r--remote/modules/vbox/module.conf.opensuse.12.319
-rw-r--r--remote/modules/vbox/module.conf.ubuntu18
-rw-r--r--remote/modules/vbox/module.conf.ubuntu.13.0418
-rw-r--r--remote/modules/vmchooser/module.build36
-rw-r--r--remote/modules/vmchooser/module.conf3
-rw-r--r--remote/modules/vmchooser/module.conf.debian4
-rw-r--r--remote/modules/vmchooser/module.conf.opensuse4
-rw-r--r--remote/modules/vmchooser/module.conf.ubuntu4
-rw-r--r--remote/modules/vmware/module.build65
-rw-r--r--remote/modules/vmware/module.conf24
-rw-r--r--remote/modules/vmware/module.conf.ubuntu136
-rw-r--r--remote/modules/xorg/module.build22
-rw-r--r--remote/modules/xorg/module.conf19
-rw-r--r--remote/modules/xorg/module.conf.debian40
-rw-r--r--remote/modules/xorg/module.conf.opensuse59
-rw-r--r--remote/modules/xorg/module.conf.opensuse.13.195
-rw-r--r--remote/modules/xorg/module.conf.ubuntu40
180 files changed, 3748 insertions, 0 deletions
diff --git a/remote/modules/alsa/module.build b/remote/modules/alsa/module.build
new file mode 100644
index 00000000..4d3990b1
--- /dev/null
+++ b/remote/modules/alsa/module.build
@@ -0,0 +1,19 @@
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+
+ # These shitty greps are 'excludes' for this high quality scientific linux.
+ list_packet_files | grep -v "^/etc/asound.state" \
+ | grep -v "^/etc/modprobe.d/local.conf" >> "$COPYLIST"
+ tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}"
+
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/alsa/module.conf b/remote/modules/alsa/module.conf
new file mode 100644
index 00000000..2a8be7a1
--- /dev/null
+++ b/remote/modules/alsa/module.conf
@@ -0,0 +1,8 @@
+REQUIRED_BINARIES="
+ amixer
+ alsamixer
+"
+REQUIRED_DIRECTORIES=" /usr/share/alsa
+ /etc/modprobe.d
+"
+
diff --git a/remote/modules/alsa/module.conf.debian b/remote/modules/alsa/module.conf.debian
new file mode 100644
index 00000000..b1f9f0e2
--- /dev/null
+++ b/remote/modules/alsa/module.conf.debian
@@ -0,0 +1,5 @@
+REQUIRED_CONTENT_PACKAGES="
+ alsa-utils
+ alsa-base
+ libasound2
+"
diff --git a/remote/modules/alsa/module.conf.opensuse b/remote/modules/alsa/module.conf.opensuse
new file mode 100644
index 00000000..17651c29
--- /dev/null
+++ b/remote/modules/alsa/module.conf.opensuse
@@ -0,0 +1,5 @@
+REQUIRED_CONTENT_PACKAGES="
+ alsa-utils
+ alsa
+ libasound2
+"
diff --git a/remote/modules/alsa/module.conf.scientific b/remote/modules/alsa/module.conf.scientific
new file mode 100644
index 00000000..643e52d3
--- /dev/null
+++ b/remote/modules/alsa/module.conf.scientific
@@ -0,0 +1,12 @@
+REQUIRED_INSTALLED_PACKAGES="
+ module-init-tools
+ alsa-utils
+ alsa-lib
+"
+REQUIRED_CONTENT_PACKAGES="
+ module-init-tools
+ alsa-utils
+ alsa-lib
+"
+
+# libasound2
diff --git a/remote/modules/alsa/module.conf.ubuntu b/remote/modules/alsa/module.conf.ubuntu
new file mode 100644
index 00000000..b1f9f0e2
--- /dev/null
+++ b/remote/modules/alsa/module.conf.ubuntu
@@ -0,0 +1,5 @@
+REQUIRED_CONTENT_PACKAGES="
+ alsa-utils
+ alsa-base
+ libasound2
+"
diff --git a/remote/modules/beamergui/module.build b/remote/modules/beamergui/module.build
new file mode 100644
index 00000000..837a2e38
--- /dev/null
+++ b/remote/modules/beamergui/module.build
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+fetch_source() {
+ git clone "${REQUIRED_GIT}" src
+}
+
+build() {
+ local SRCDIR="${MODULE_DIR}/src/"
+
+ mkdir -p "$MODULE_BUILD_DIR/opt/openslx/bin"
+ cd "${MODULE_BUILD_DIR}/opt/openslx/bin" || perror "Could not cd!"
+ pinfo "Running qmake"
+ qmake "$SRCDIR/src/beamergui.pro" -r -spec linux-g++ || perror "'qmake' failed (e.g. not installed)."
+ pinfo "Running make"
+ make || perror "'make' failed."
+}
+post_copy() {
+ :
+}
diff --git a/remote/modules/beamergui/module.conf b/remote/modules/beamergui/module.conf
new file mode 100644
index 00000000..da786271
--- /dev/null
+++ b/remote/modules/beamergui/module.conf
@@ -0,0 +1,9 @@
+REQUIRED_GIT="git://git.openslx.org/openslx-ng/beamergui.git"
+REQUIRED_BINARIES="
+ beamergui
+"
+REQUIRED_LIBRARIES="
+"
+REQUIRED_SYSTEM_FILES="
+"
+# TODO add libraries
diff --git a/remote/modules/beamergui/module.conf.debian b/remote/modules/beamergui/module.conf.debian
new file mode 100644
index 00000000..ea4cd194
--- /dev/null
+++ b/remote/modules/beamergui/module.conf.debian
@@ -0,0 +1,8 @@
+REQUIRED_INSTALLED_PACKAGES="
+libqt4-dev
+libxrandr-dev
+"
+REQUIRED_CONTENT_PACKAGES="
+libqt4-dev
+libxrandr-dev
+"
diff --git a/remote/modules/beamergui/module.conf.ubuntu b/remote/modules/beamergui/module.conf.ubuntu
new file mode 100644
index 00000000..ea4cd194
--- /dev/null
+++ b/remote/modules/beamergui/module.conf.ubuntu
@@ -0,0 +1,8 @@
+REQUIRED_INSTALLED_PACKAGES="
+libqt4-dev
+libxrandr-dev
+"
+REQUIRED_CONTENT_PACKAGES="
+libqt4-dev
+libxrandr-dev
+"
diff --git a/remote/modules/busybox/module.build b/remote/modules/busybox/module.build
new file mode 100644
index 00000000..727a334c
--- /dev/null
+++ b/remote/modules/busybox/module.build
@@ -0,0 +1,26 @@
+
+fetch_source() {
+ git clone "${REQUIRED_GIT}" src || perror "Could not clone busybox git"
+ cd src || perror "Could not cd to src"
+ git checkout "$REQUIRED_BRANCH" || perror "Could not checkout requested branch"
+ # Patch image centering if not patched yet
+ if ! grep -q "bcenter_image" "miscutils/fbsplash.c"; then
+ git apply "../fbsplash-center.patch" || perror "Could not apply busybox patch for fbsplash image centering"
+ fi
+ cd .. || perror "cd .. failed"
+}
+
+build() {
+ cp "openslx-busybox-config" "src/.config"
+ cd src || perror "Could not cd to src"
+ pinfo "Running make (if this hangs, check for unset options, ie. when you increased the REQUIRED_BRANCH)"
+ make || perror "failed."
+ pinfo "Running make install"
+ make CONFIG_PREFIX="$MODULE_BUILD_DIR" install || perror "failed"
+ rm "$MODULE_BUILD_DIR/bin/mount" "$MODULE_BUILD_DIR/bin/umount" "$MODULE_BUILD_DIR/bin/bash"
+ cd - &> /dev/null
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/busybox/module.conf b/remote/modules/busybox/module.conf
new file mode 100644
index 00000000..d2536ac9
--- /dev/null
+++ b/remote/modules/busybox/module.conf
@@ -0,0 +1,9 @@
+REQUIRED_GIT="git://git.busybox.net/busybox"
+REQUIRED_BRANCH="1_22_1"
+REQUIRED_BINARIES="busybox"
+REQUIRED_DIRECTORIES="
+ /bin
+ /sbin
+ /usr/bin
+ /usr/sbin
+"
diff --git a/remote/modules/consolekit/module.build b/remote/modules/consolekit/module.build
new file mode 100644
index 00000000..0c63ec6b
--- /dev/null
+++ b/remote/modules/consolekit/module.build
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+fetch_source() {
+ pinfo "Extracting from running system..."
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "${COPYLIST}" ] && rm "${COPYLIST}"
+
+ list_packet_files >> "${COPYLIST}"
+ tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}"
+ # Systemd/dbus
+ mkdir -p "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services" "$MODULE_BUILD_DIR/etc/systemd/system"
+ local DAEMON=$(find "$MODULE_BUILD_DIR" -name console-kit-daemon -executable | head -n 1)
+ DAEMON="${DAEMON#$MODULE_BUILD_DIR}"
+ [ -z "$DAEMON" ] && perror "Could not find console-kit-daemon binary"
+ sed "s,%DAEMON%,/$DAEMON,g" "templates/consolekit.systemd.service" > "$MODULE_BUILD_DIR/etc/systemd/system/console-kit-daemon.service" || perror "Could not generate systemd service"
+ sed "s,%DAEMON%,/$DAEMON,g" "templates/consolekit.dbus.service" > "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services/org.freedesktop.ConsoleKit.service" || perror "Could not generate dbus service"
+}
+
+post_copy() {
+ mkdir -p "${TARGET_BUILD_DIR}/usr/lib/ConsoleKit/run-seat.d"
+ mkdir -p "${TARGET_BUILD_DIR}/etc/ConsoleKit/run-seat.d"
+ mkdir -p "${TARGET_BUILD_DIR}/etc/ConsoleKit/run-session.d"
+ mkdir -p "${TARGET_BUILD_DIR}/var/log/ConsoleKit"
+}
+
diff --git a/remote/modules/consolekit/module.conf b/remote/modules/consolekit/module.conf
new file mode 100644
index 00000000..e27b15e6
--- /dev/null
+++ b/remote/modules/consolekit/module.conf
@@ -0,0 +1,17 @@
+REQUIRED_BINARIES="
+ console-kit-daemon
+ ck-history
+ ck-launch-session
+ ck-list-sessions
+"
+REQUIRED_DIRECTORIES="
+ /etc/ConsoleKit
+ /etc/dbus-1
+ /usr/lib/ConsoleKit
+ /usr/share
+"
+REQUIRED_LIBRARIES="
+ pam_ck_connector
+ libck-connector
+"
+
diff --git a/remote/modules/consolekit/module.conf.debian b/remote/modules/consolekit/module.conf.debian
new file mode 100644
index 00000000..0171868a
--- /dev/null
+++ b/remote/modules/consolekit/module.conf.debian
@@ -0,0 +1,6 @@
+REQUIRED_CONTENT_PACKAGES="
+ consolekit
+ libpam-ck-connector
+"
+
+
diff --git a/remote/modules/consolekit/module.conf.opensuse b/remote/modules/consolekit/module.conf.opensuse
new file mode 100644
index 00000000..d0f46410
--- /dev/null
+++ b/remote/modules/consolekit/module.conf.opensuse
@@ -0,0 +1,8 @@
+REQUIRED_INSTALLED_PACKAGES="
+ ConsoleKit
+ ConsoleKit-x11
+"
+REQUIRED_CONTENT_PACKAGES="
+ ConsoleKit
+ ConsoleKit-x11
+"
diff --git a/remote/modules/consolekit/module.conf.ubuntu b/remote/modules/consolekit/module.conf.ubuntu
new file mode 100644
index 00000000..e7f5e47d
--- /dev/null
+++ b/remote/modules/consolekit/module.conf.ubuntu
@@ -0,0 +1,9 @@
+REQUIRED_INSTALLED_PACKAGES="
+ consolekit
+"
+REQUIRED_CONTENT_PACKAGES="
+ consolekit
+ libpam-ck-connector
+ libck-connector0
+"
+
diff --git a/remote/modules/cron/module.build b/remote/modules/cron/module.build
new file mode 100644
index 00000000..932c3e85
--- /dev/null
+++ b/remote/modules/cron/module.build
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+
+fetch_source() {
+
+ # use our own patched source
+ local TARBALL="vixie-cron-4.1-openslx.tgz"
+ [ ! -e "${TARBALL}" ] && perror "${TARBALL} not found under ${MODULE_DIR}."
+
+ mkdir "${MODULE_DIR}/src" || perror "Could not create ${MODULE_DIR}/src"
+ tar xfz "${TARBALL}" -C "${MODULE_DIR}/src" || perror "Could not extract ${TARBALL} to ${MODULE_DIR}/src"
+}
+
+build() {
+
+ # compilation
+ cd "${MODULE_DIR}/src" || perror "Could not cd to '${MODULE_DIR}/src'. Did fetch_source work?"
+ make cron || perror "Could not compile cron using 'make'."
+
+ # copy to build dir, since there are no shared libs linked in
+ mkdir -p "${MODULE_BUILD_DIR}/opt/openslx/sbin"
+ cp "${MODULE_DIR}/src/cron" "${MODULE_BUILD_DIR}/opt/openslx/sbin/" || perror "Could copy cron binary to ${MODULE_BUILD_DIR}"
+
+ cd - &>/dev/null
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/cron/module.conf b/remote/modules/cron/module.conf
new file mode 100644
index 00000000..8ecca658
--- /dev/null
+++ b/remote/modules/cron/module.conf
@@ -0,0 +1,3 @@
+REQUIRED_BINARIES="
+ cron
+"
diff --git a/remote/modules/cups/module.build b/remote/modules/cups/module.build
new file mode 100644
index 00000000..0238f1bd
--- /dev/null
+++ b/remote/modules/cups/module.build
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/cups/module.conf b/remote/modules/cups/module.conf
new file mode 100644
index 00000000..586e0d12
--- /dev/null
+++ b/remote/modules/cups/module.conf
@@ -0,0 +1,9 @@
+REQUIRED_BINARIES="
+ cupsd
+ foomatic-rip
+"
+REQUIRED_DIRECTORIES="
+ /usr/lib/cups/
+ /usr/share/cups/
+"
+REQUIRED_FILES=""
diff --git a/remote/modules/cups/module.conf.opensuse b/remote/modules/cups/module.conf.opensuse
new file mode 100644
index 00000000..d13021ba
--- /dev/null
+++ b/remote/modules/cups/module.conf.opensuse
@@ -0,0 +1,10 @@
+REQUIRED_INSTALLED_PACKAGES="
+ cups
+ cups-libs
+ foomatic-filters
+"
+REQUIRED_CONTENT_PACKAGES="
+ cups
+ cups-libs
+ foomatic-filters
+"
diff --git a/remote/modules/cups/module.conf.ubuntu b/remote/modules/cups/module.conf.ubuntu
new file mode 100644
index 00000000..8ca1d1c6
--- /dev/null
+++ b/remote/modules/cups/module.conf.ubuntu
@@ -0,0 +1,10 @@
+REQUIRED_INSTALLED_PACKAGES="
+ cups
+ ghostscript-cups
+ foomatic-filters
+"
+REQUIRED_CONTENT_PACKAGES="
+ cups
+ ghostscript-cups
+ foomatic-filters
+"
diff --git a/remote/modules/cups/module.conf.ubuntu.13 b/remote/modules/cups/module.conf.ubuntu.13
new file mode 100644
index 00000000..53c8d62d
--- /dev/null
+++ b/remote/modules/cups/module.conf.ubuntu.13
@@ -0,0 +1,12 @@
+REQUIRED_INSTALLED_PACKAGES="
+ cups
+ cups-daemon
+ ghostscript-cups
+ foomatic-filters
+"
+REQUIRED_CONTENT_PACKAGES="
+ cups
+ cups-daemon
+ ghostscript-cups
+ foomatic-filters
+"
diff --git a/remote/modules/cups/module.conf.ubuntu.13.10 b/remote/modules/cups/module.conf.ubuntu.13.10
new file mode 100644
index 00000000..d3fa3b5d
--- /dev/null
+++ b/remote/modules/cups/module.conf.ubuntu.13.10
@@ -0,0 +1,12 @@
+REQUIRED_INSTALLED_PACKAGES="
+ cups
+ cups-daemon
+ cups-filters
+ foomatic-filters
+"
+REQUIRED_CONTENT_PACKAGES="
+ cups
+ cups-daemon
+ cups-filters
+ foomatic-filters
+"
diff --git a/remote/modules/dbus/module.build b/remote/modules/dbus/module.build
new file mode 100644
index 00000000..c5b2d353
--- /dev/null
+++ b/remote/modules/dbus/module.build
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+fetch_source() {
+ echo "Extracting from running system..."
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "${COPYLIST}" ] && rm "${COPYLIST}"
+
+ list_packet_files >> "${COPYLIST}"
+ tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}"
+
+ # Generate systemd files
+ mkdir -p "$MODULE_BUILD_DIR/etc/systemd/system"
+ # This is ugly, as the command line arguments changed over time. Try to do the right thing (whatever that is)
+ # Need to run dbus-uuidgen first?
+ local UUIDGEN="# This line intentionally left blank"
+ if files_contain "ExecStartPre.*uuidgen" "/lib/systemd/system/dbus.service" "/usr/lib/systemd/system/dbus.service"; then
+ UUIDGEN=$(find "$MODULE_BUILD_DIR" -name dbus-uuidgen -executable | head -n 1)
+ [ -z "$UUIDGEN" ] && perror "Could not determine dbus-uuidgen location"
+ UUIDGEN="ExecStartPre=/${UUIDGEN#$MODULE_BUILD_DIR} --ensure"
+ fi
+ # Figure out daemon location
+ local DAEMON=$(find "$MODULE_BUILD_DIR" -name dbus-daemon -executable | head -n 1)
+ [ -z "$DAEMON" ] && perror "Could not determine dbus-daemon location"
+ DAEMON="/${DAEMON#$MODULE_BUILD_DIR}"
+ local DAEMON_ARGS=""
+ # Daemon arguments
+ if files_contain "dbus-daemon.*nopidfile" "/lib/systemd/system/dbus.service" "/usr/lib/systemd/system/dbus.service"; then
+ DAEMON_ARGS+=" --nopidfile"
+ fi
+ if files_contain "dbus-daemon.*activation=systemd" "/lib/systemd/system/dbus.service" "/usr/lib/systemd/system/dbus.service"; then
+ DAEMON_ARGS+=" --activation=systemd"
+ fi
+ if files_contain "dbus-daemon.*systemd-activation" "/lib/systemd/system/dbus.service" "/usr/lib/systemd/system/dbus.service"; then
+ DAEMON_ARGS+=" --systemd-activation"
+ fi
+ # dbus-send location
+ local SEND=$(find "$MODULE_BUILD_DIR" -name dbus-send -executable | head -n 1)
+ [ -z "$SEND" ] && perror "Could not determine dbus-send location"
+ SEND="/${SEND#$MODULE_BUILD_DIR}"
+ sed "s,%UUIDGEN%,$UUIDGEN,g;s,%DAEMON%,$DAEMON,g;s,%SEND%,$SEND,g;s,%DAEMON_ARGS%,$DAEMON_ARGS,g" "templates/dbus.service" \
+ > "$MODULE_BUILD_DIR/etc/systemd/system/dbus.service" \
+ || perror "Could not generate $MODULE_BUILD_DIR/etc/systemd/system/dbus.service"
+}
+
+post_copy() {
+ :
+}
+
+files_contain () {
+ [ $# -lt 2 ] && perror "files_contain needs at least 2 arguments (pattern, file)"
+ local PATTERN="$1"
+ shift
+ local FILE
+ for FILE in $@; do
+ [ -e "$FILE" ] || continue
+ grep -q "$PATTERN" "$FILE" && return 0 # Found
+ done
+ return 1
+}
+
diff --git a/remote/modules/dbus/module.conf b/remote/modules/dbus/module.conf
new file mode 100644
index 00000000..40f8a53d
--- /dev/null
+++ b/remote/modules/dbus/module.conf
@@ -0,0 +1,15 @@
+REQUIRED_BINARIES="
+ dbus-cleanup-sockets
+ dbus-daemon
+ dbus-uuidgen
+ dbus-monitor
+ dbus-send
+ dbus-daemon-launch-helper
+ "
+REQUIRED_DIRECTORIES="
+ /etc/dbus-1
+"
+REQUIRED_FILES="
+ /etc/systemd/system/dbus.service
+"
+
diff --git a/remote/modules/dbus/module.conf.debian b/remote/modules/dbus/module.conf.debian
new file mode 100644
index 00000000..d007c2ef
--- /dev/null
+++ b/remote/modules/dbus/module.conf.debian
@@ -0,0 +1,9 @@
+REQUIRED_CONTENT_PACKAGES="
+ dbus
+"
+REQUIRED_DIRECTORIES+="
+ /lib/systemd
+"
+REQUIRED_FILES="
+ /etc/default/dbus
+"
diff --git a/remote/modules/dbus/module.conf.opensuse b/remote/modules/dbus/module.conf.opensuse
new file mode 100644
index 00000000..9bc514e2
--- /dev/null
+++ b/remote/modules/dbus/module.conf.opensuse
@@ -0,0 +1,4 @@
+REQUIRED_CONTENT_PACKAGES="
+ dbus-1
+"
+
diff --git a/remote/modules/dbus/module.conf.ubuntu b/remote/modules/dbus/module.conf.ubuntu
new file mode 100644
index 00000000..558eea7f
--- /dev/null
+++ b/remote/modules/dbus/module.conf.ubuntu
@@ -0,0 +1,7 @@
+REQUIRED_CONTENT_PACKAGES="
+ dbus
+"
+REQUIRED_FILES+="
+ /etc/default/dbus
+"
+
diff --git a/remote/modules/debug/module.build b/remote/modules/debug/module.build
new file mode 100644
index 00000000..c020181d
--- /dev/null
+++ b/remote/modules/debug/module.build
@@ -0,0 +1,20 @@
+fetch_source() {
+ :
+}
+
+build() {
+
+ for BIN in $REQUIRED_BINARIES; do
+ [[ "$BIN" == @* ]] && BIN=$(echo "$BIN" | cut -c 2-)
+ BIN_LOCATION=$(which ${BIN})
+ if [ ! -z ${BIN_LOCATION} -a -e ${BIN_LOCATION} ]; then
+ tarcopy "$(get_link_chain ${BIN_LOCATION})" "${MODULE_BUILD_DIR}"
+ else
+ pwarning "'${BIN}' not found on the system."
+ fi
+ done
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/debug/module.conf b/remote/modules/debug/module.conf
new file mode 100644
index 00000000..71006514
--- /dev/null
+++ b/remote/modules/debug/module.conf
@@ -0,0 +1,18 @@
+REQUIRED_BINARIES="
+ strace
+ ltrace
+ ldd
+ setterm
+ curl
+ nano
+ fc-cache
+ fc-query
+ @xset
+ locale
+ su
+ file
+ @htop
+ @logger
+ @tcpdump
+ getfacl
+"
diff --git a/remote/modules/debug/module.conf.debian b/remote/modules/debug/module.conf.debian
new file mode 100644
index 00000000..00bfea2c
--- /dev/null
+++ b/remote/modules/debug/module.conf.debian
@@ -0,0 +1,7 @@
+REQUIRED_INSTALLED_PACKAGES="
+ curl
+ ltrace
+ strace
+ nano
+ fontconfig
+"
diff --git a/remote/modules/debug/module.conf.opensuse b/remote/modules/debug/module.conf.opensuse
new file mode 100644
index 00000000..b7971956
--- /dev/null
+++ b/remote/modules/debug/module.conf.opensuse
@@ -0,0 +1,11 @@
+REQUIRED_INSTALLED_PACKAGES="
+ curl
+ ltrace
+ nano
+ fontconfig
+ fonts-config
+ xset
+"
+REQUIRED_BINARIES+="
+ fonts-config
+"
diff --git a/remote/modules/debug/module.conf.ubuntu b/remote/modules/debug/module.conf.ubuntu
new file mode 100644
index 00000000..00bfea2c
--- /dev/null
+++ b/remote/modules/debug/module.conf.ubuntu
@@ -0,0 +1,7 @@
+REQUIRED_INSTALLED_PACKAGES="
+ curl
+ ltrace
+ strace
+ nano
+ fontconfig
+"
diff --git a/remote/modules/dhcpc-busybox/module.build b/remote/modules/dhcpc-busybox/module.build
new file mode 100644
index 00000000..d8804784
--- /dev/null
+++ b/remote/modules/dhcpc-busybox/module.build
@@ -0,0 +1,13 @@
+
+fetch_source() {
+ :
+}
+
+build() {
+ :
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/dhcpc-busybox/module.conf b/remote/modules/dhcpc-busybox/module.conf
new file mode 100644
index 00000000..c01ade29
--- /dev/null
+++ b/remote/modules/dhcpc-busybox/module.conf
@@ -0,0 +1 @@
+# Nothing
diff --git a/remote/modules/dnbd3/module.build b/remote/modules/dnbd3/module.build
new file mode 100644
index 00000000..2651daac
--- /dev/null
+++ b/remote/modules/dnbd3/module.build
@@ -0,0 +1,43 @@
+fetch_source() {
+ mkdir -p "src/kmod"
+ if [ ! -d "src/dnbd3" ]; then
+ git clone "$REQUIRED_GIT" "src/dnbd3" || perror "Could not clone dnbd3 git repo"
+ fi
+ cd src/dnbd3
+ #git checkout "$REQUIRED_BRANCH" || perror "Could not checkout requested branch $REQUIRED_BRANCH"
+ git checkout "$REQUIRED_COMMIT" || perror "Could not checkout requested commit $REQUIRED_COMMIT"
+ cd -
+ cp src/dnbd3/Kbuild.in src/dnbd3/src/*.{c,h} src/dnbd3/src/kernel/*.{c,h} src/kmod/ || perror "Could not copy kernel module source files"
+ cat > "src/kmod/Makefile" <<HEREEND
+include \$(PWD)/Kbuild.in
+
+ifndef KDIR
+ KDIR = /lib/modules/\$(shell uname -r)/build
+endif
+
+all:
+ make -C "\$(KDIR)" "M=\$(PWD)" modules
+
+clean:
+ make -C "\$(KDIR)" "M=\$(PWD)" clean
+HEREEND
+}
+
+build() {
+ cd "$MODULE_DIR/src/kmod" || perror "Could not CD to standalone dnbd3 kmod dir"
+ make MODULE_NAME=dnbd3 KDIR="$KERNEL_HEADERS_PATH" || perror "Could not compile kernel module"
+ mkdir -p "$MODULE_BUILD_DIR/lib/modules/dnbd3" || perror "Could not create lib/modules/dnbd3"
+ mkdir -p "$MODULE_BUILD_DIR/opt/openslx/bin" || perror "Coould not create opt/openslx/bin"
+ cp "$MODULE_DIR/src/kmod/dnbd3.ko" "$MODULE_BUILD_DIR/lib/modules/dnbd3/" || perror "could not cp dnbd3.ko"
+ cd "$MODULE_BUILD_DIR/opt/openslx/bin" || perror "Could not cd to build dir for client binary"
+ cmake "$MODULE_DIR/src/dnbd3" || perror "Could not cmake"
+ make dnbd3-client || perror "Could not make dnbd3-client"
+ chown root:root "dnbd3-client"
+ chmod +xs "dnbd3-client"
+ cd "$MODULE_DIR"
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/dnbd3/module.conf b/remote/modules/dnbd3/module.conf
new file mode 100644
index 00000000..333637fd
--- /dev/null
+++ b/remote/modules/dnbd3/module.conf
@@ -0,0 +1,11 @@
+#REQUIRED_INSTALLED_PACKAGES="libgconf-2-4 fontconfig-config"
+#REQUIRED_CONTENT_PACKAGES="libgconf-2-4 fontconfig-config"
+REQUIRED_MODULES="kernel"
+REQUIRED_GIT="git://git.openslx.org/dnbd3.git"
+REQUIRED_COMMIT="32ca216b49b2417a102457ce54bdd9bb76d6f02d"
+REQUIRED_BINARIES="
+ dnbd3-client
+"
+REQUIRED_DIRECTORIES="
+ /lib/modules
+"
diff --git a/remote/modules/dnbd3/module.conf.debian b/remote/modules/dnbd3/module.conf.debian
new file mode 100644
index 00000000..c26fd833
--- /dev/null
+++ b/remote/modules/dnbd3/module.conf.debian
@@ -0,0 +1,7 @@
+REQUIRED_CONTENT_PACKAGES="
+ cmake
+"
+
+REQUIRED_INSTALLED_PACKAGES="
+ cmake
+"
diff --git a/remote/modules/dnbd3/module.conf.opensuse b/remote/modules/dnbd3/module.conf.opensuse
new file mode 100644
index 00000000..713ad2b1
--- /dev/null
+++ b/remote/modules/dnbd3/module.conf.opensuse
@@ -0,0 +1,8 @@
+REQUIRED_CONTENT_PACKAGES="
+ cmake
+"
+
+REQUIRED_INSTALLED_PACKAGES="
+ cmake
+ zlib-devel
+"
diff --git a/remote/modules/dnbd3/module.conf.ubuntu b/remote/modules/dnbd3/module.conf.ubuntu
new file mode 100644
index 00000000..d303245c
--- /dev/null
+++ b/remote/modules/dnbd3/module.conf.ubuntu
@@ -0,0 +1,8 @@
+REQUIRED_CONTENT_PACKAGES="
+ cmake
+"
+
+REQUIRED_INSTALLED_PACKAGES="
+ cmake
+ zlib1g-dev
+"
diff --git a/remote/modules/german/module.build b/remote/modules/german/module.build
new file mode 100644
index 00000000..cd68f009
--- /dev/null
+++ b/remote/modules/german/module.build
@@ -0,0 +1,39 @@
+fetch_source() {
+ :
+}
+
+build() {
+ # Debian-like
+ if [ -e "/etc/locale.gen" ] && ! grep -q -E '^\s*de_DE\.UTF-8' "/etc/locale.gen"; then
+ pinfo "Generating locales..."
+ echo 'de_DE.UTF-8 UTF-8' >> "/etc/locale.gen"
+ locale-gen || perror "Could not generate locales (debian style)"
+ fi
+ # Ubuntu's version
+ if [ -d "/var/lib/locales/supported.d" ] && [ ! -d /usr/lib/locale/de_DE.utf8 ]; then
+ pinfo "Generating locales..."
+ grep -q -E -r '^\s*de_DE\.UTF-8' "/var/lib/locales/supported.d" || echo 'de_DE.UTF-8 UTF-8' >> "/var/lib/locales/supported.d/openslx"
+ locale-gen --no-archive --purge "de_DE.UTF-8" || perror "Could not generate locales (ubuntu style)"
+ fi
+
+ # Put everything we build or get from the system in build dir
+ local FILELIST="$MODULE_DIR/list_copy_build"
+ rm -f "$FILELIST"
+
+ # Copy required directories from source system to build dir
+ for FILE in ${REQUIRED_DIRECTORIES}; do
+ [ ! -d "${FILE}" ] && perror "Missing required directory $FILE"
+ echo ${FILE} >> "${FILELIST}"
+ done
+
+ # Done collecting file and directory names, copy everything
+ tarcopy "$(sort -u "$FILELIST")" "$MODULE_BUILD_DIR"
+
+}
+
+post_copy() {
+ for i in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION; do
+ add_env $i de_DE.UTF-8 || perror "$i: add_env function failed."
+ done
+}
+
diff --git a/remote/modules/german/module.conf b/remote/modules/german/module.conf
new file mode 100644
index 00000000..e2f82123
--- /dev/null
+++ b/remote/modules/german/module.conf
@@ -0,0 +1,5 @@
+REQUIRED_BINARIES=""
+REQUIRED_FILES=""
+REQUIRED_DIRECTORIES="
+ /usr/share/X11
+"
diff --git a/remote/modules/german/module.conf.debian b/remote/modules/german/module.conf.debian
new file mode 100644
index 00000000..a43faea2
--- /dev/null
+++ b/remote/modules/german/module.conf.debian
@@ -0,0 +1,10 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libX11-data
+"
+REQUIRED_CONTENT_PACKAGES="
+ libX11-data
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib/locale
+"
+
diff --git a/remote/modules/german/module.conf.opensuse b/remote/modules/german/module.conf.opensuse
new file mode 100644
index 00000000..2bb901ff
--- /dev/null
+++ b/remote/modules/german/module.conf.opensuse
@@ -0,0 +1,13 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libX11-data
+ glibc-locale
+"
+REQUIRED_CONTENT_PACKAGES="
+ libX11-data
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib/locale/de_DE.utf8
+"
+REQUIRED_BINARIES=""
+REQUIRED_FILES=""
+
diff --git a/remote/modules/german/module.conf.scientific b/remote/modules/german/module.conf.scientific
new file mode 100644
index 00000000..88ac0d27
--- /dev/null
+++ b/remote/modules/german/module.conf.scientific
@@ -0,0 +1,8 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libX11-data
+ glibc-common
+"
+REQUIRED_CONTENT_PACKAGES="
+ libX11-data"
+REQUIRED_BINARIES=""
+REQUIRED_FILES=""
diff --git a/remote/modules/german/module.conf.ubuntu b/remote/modules/german/module.conf.ubuntu
new file mode 100644
index 00000000..aee3c64b
--- /dev/null
+++ b/remote/modules/german/module.conf.ubuntu
@@ -0,0 +1,11 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libx11-data
+ language-pack-de
+"
+REQUIRED_CONTENT_PACKAGES="
+ libx11-data
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib/locale/de_DE.utf8
+"
+
diff --git a/remote/modules/idleaction/module.build b/remote/modules/idleaction/module.build
new file mode 100644
index 00000000..1b740aa1
--- /dev/null
+++ b/remote/modules/idleaction/module.build
@@ -0,0 +1,16 @@
+fetch_source() {
+ :
+}
+
+build() {
+ # We ship xprintidle's source as suse doesn't have it in one of the default repos
+ # and its just too tiny to do anything fancy like fetching source from somewhere
+ mkdir -p "$MODULE_BUILD_DIR/opt/openslx/bin"
+ gcc -o "$MODULE_BUILD_DIR/opt/openslx/bin/xprintidle" "$MODULE_DIR/xprintidle.c" -lX11 -lXss -lXext \
+ || perror "Compilation of xprintidle failed!"
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/idleaction/module.conf b/remote/modules/idleaction/module.conf
new file mode 100644
index 00000000..1661735b
--- /dev/null
+++ b/remote/modules/idleaction/module.conf
@@ -0,0 +1,4 @@
+REQUIRED_BINARIES="
+ xprintidle
+"
+
diff --git a/remote/modules/idleaction/module.conf.opensuse b/remote/modules/idleaction/module.conf.opensuse
new file mode 100644
index 00000000..d368cbd8
--- /dev/null
+++ b/remote/modules/idleaction/module.conf.opensuse
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libX11-devel
+ libXScrnSaver-devel
+ xorg-x11-proto-devel
+"
+
diff --git a/remote/modules/idleaction/module.conf.ubuntu b/remote/modules/idleaction/module.conf.ubuntu
new file mode 100644
index 00000000..0dad2e48
--- /dev/null
+++ b/remote/modules/idleaction/module.conf.ubuntu
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libx11-dev
+ libxss-dev
+ x11proto-scrnsaver-dev
+"
+
diff --git a/remote/modules/iptables-helper/module.build b/remote/modules/iptables-helper/module.build
new file mode 100644
index 00000000..d8804784
--- /dev/null
+++ b/remote/modules/iptables-helper/module.build
@@ -0,0 +1,13 @@
+
+fetch_source() {
+ :
+}
+
+build() {
+ :
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/iptables-helper/module.conf b/remote/modules/iptables-helper/module.conf
new file mode 100644
index 00000000..34103f5b
--- /dev/null
+++ b/remote/modules/iptables-helper/module.conf
@@ -0,0 +1 @@
+# requires some rootfs that provies iptables
diff --git a/remote/modules/kdm-theme-bwlp/module.build b/remote/modules/kdm-theme-bwlp/module.build
new file mode 100644
index 00000000..ccb7c4e1
--- /dev/null
+++ b/remote/modules/kdm-theme-bwlp/module.build
@@ -0,0 +1,13 @@
+
+fetch_source () {
+ :
+}
+
+build () {
+ :
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/kdm-theme-bwlp/module.conf b/remote/modules/kdm-theme-bwlp/module.conf
new file mode 100644
index 00000000..04a7b61d
--- /dev/null
+++ b/remote/modules/kdm-theme-bwlp/module.conf
@@ -0,0 +1,2 @@
+REQUIRED_MODULES="kdm"
+
diff --git a/remote/modules/kdm/module.build b/remote/modules/kdm/module.build
new file mode 100644
index 00000000..d5199340
--- /dev/null
+++ b/remote/modules/kdm/module.build
@@ -0,0 +1,19 @@
+
+fetch_source () {
+ :
+}
+
+build () {
+ COPYLIST="list_dpkg_output"
+ [ -e "${COPYLIST}" ] && rm "${COPYLIST}"
+
+ list_packet_files >> "${COPYLIST}"
+ tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}"
+}
+
+post_copy() {
+ # copy required icons
+ # TODO: Why here? gtk <-> kdm?
+ gtk-update-icon-cache-3.0 "${TARGET_BUILD_DIR}/usr/share/icons/oxygen/" || pwarning "update-icon-cache-3.0 failed."
+}
+
diff --git a/remote/modules/kdm/module.conf b/remote/modules/kdm/module.conf
new file mode 100644
index 00000000..2778a2bc
--- /dev/null
+++ b/remote/modules/kdm/module.conf
@@ -0,0 +1,20 @@
+REQUIRED_BINARIES=""
+REQUIRED_FILES=""
+REQUIRED_DIRECTORIES="
+ /usr/bin
+ /usr/share/dbus-1
+ /usr/share/polkit-1
+ /usr/share/kde4/services
+ /etc/dbus-1
+"
+REQUIRED_LIBRARIES=""
+# non-standard vars
+REQUIRED_SYSTEM_FILES="
+ /usr/share/icons/oxygen/16x16/actions/system-reboot.png
+ /usr/share/icons/oxygen/16x16/actions/system-shutdown.png
+ /usr/share/icons/oxygen/16x16/actions/dialog-cancel.png
+ /usr/share/icons/oxygen/index.theme
+ /usr/share/icons/default.kde4/index.theme
+"
+# Ignore these libs even if output by ldd
+REQUIRED_LDD_BLACKLIST="\|libQtWebKit\|libGL"
diff --git a/remote/modules/kdm/module.conf.debian b/remote/modules/kdm/module.conf.debian
new file mode 100644
index 00000000..da0df913
--- /dev/null
+++ b/remote/modules/kdm/module.conf.debian
@@ -0,0 +1,28 @@
+REQUIRED_INSTALLED_PACKAGES="
+ kdm
+ kde-workspace-kgreet-plugins
+"
+REQUIRED_CONTENT_PACKAGES="
+ kdm
+ kde-workspace-kgreet-plugins
+ libicu48
+ libxcursor1
+ libxrandr2
+ libxfixes3
+ libxinerama1
+ libxi6
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib
+ /etc/pam.d
+ /etc/logrotate.d
+ /etc/insserv.conf.d
+ /etc/kde4/kdm
+"
+# non-standard vars
+REQUIRED_SYSTEM_FILES+="
+ /usr/share/kde4/apps/kdm/pics/shutdown.png
+ /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
+ /usr/share/icons/default/index.theme
+"
+
diff --git a/remote/modules/kdm/module.conf.opensuse b/remote/modules/kdm/module.conf.opensuse
new file mode 100644
index 00000000..832baf9c
--- /dev/null
+++ b/remote/modules/kdm/module.conf.opensuse
@@ -0,0 +1,10 @@
+REQUIRED_INSTALLED_PACKAGES="
+ kdm
+"
+REQUIRED_CONTENT_PACKAGES="
+ kdm
+ kde4-kgreeter-plugins
+"
+REQUIRED_DIRECTORIES+="
+ /usr/$LIB64/kde4
+"
diff --git a/remote/modules/kdm/module.conf.scientific b/remote/modules/kdm/module.conf.scientific
new file mode 100644
index 00000000..d61cc8d6
--- /dev/null
+++ b/remote/modules/kdm/module.conf.scientific
@@ -0,0 +1,20 @@
+REQUIRED_INSTALLED_PACKAGES="
+ kdm
+"
+REQUIRED_CONTENT_PACKAGES="
+ kdm
+"
+REQUIRED_BINARIES=""
+REQUIRED_DIRECTORIES+="
+ /usr/$LIB64/kde4
+"
+REQUIRED_FILES=""
+REQUIRED_LIBRARIES=""
+#non-standard vars
+REQUIRED_SYSTEM_FILES="
+ /usr/share/icons/oxygen/16x16/actions/system-reboot.png
+ /usr/share/icons/oxygen/16x16/actions/system-shutdown.png
+ /usr/share/icons/oxygen/16x16/actions/dialog-cancel.png
+ /usr/share/icons/oxygen/index.theme
+ /usr/share/icons/default.kde4/index.theme
+"
diff --git a/remote/modules/kdm/module.conf.ubuntu b/remote/modules/kdm/module.conf.ubuntu
new file mode 100644
index 00000000..b91d00e0
--- /dev/null
+++ b/remote/modules/kdm/module.conf.ubuntu
@@ -0,0 +1,29 @@
+REQUIRED_INSTALLED_PACKAGES="
+ kdm
+ kde-workspace-kgreet-plugins
+"
+REQUIRED_CONTENT_PACKAGES="
+ kdm
+ kde-workspace-kgreet-plugins
+ libicu48
+ libxcursor1
+ libxrandr2
+ libxfixes3
+ libxinerama1
+ libxi6
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib
+ /etc/pam.d
+ /etc/logrotate.d
+ /etc/insserv.conf.d
+ /etc/kde4/kdm
+"
+# non-standard vars
+REQUIRED_SYSTEM_FILES+="
+ /usr/share/kde4/apps/kdm/pics/shutdown.png
+ /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
+ /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf
+ /usr/share/icons/default/index.theme
+"
+
diff --git a/remote/modules/kernel-system/module.build b/remote/modules/kernel-system/module.build
new file mode 100644
index 00000000..d542a80d
--- /dev/null
+++ b/remote/modules/kernel-system/module.build
@@ -0,0 +1,114 @@
+# overloaded get_kernel_version function
+get_kernel_version(){
+ pinfo "KERNEL_CURRENT_VERSION: ${KERNEL_CURRENT_VERSION}"
+ [ -z "${KERNEL_CURRENT_VERSION}" ] && perror "KERNEL_CURRENT_VERSION is not set, 'uname -r' output: '$(uname -r)'. Aborting..."
+
+ # set SYS_UTS_RELEASE and SYS_KERNEL correctly
+ declare -rg SYS_UTS_RELEASE="${KERNEL_CURRENT_VERSION}" 2>/dev/null
+ declare -rg SYS_KERNEL="$(echo ${KERNEL_CURRENT_VERSION} | grep -o -E '^[0-9\.]+')" 2>/dev/null
+
+ # KERNEL_NEW_VERSION is the same as KERNEL_CURRENT_VERSION
+ declare -rg KERNEL_NEW_VERSION="$KERNEL_CURRENT_VERSION" 2>/dev/null
+
+ # check linux headers directory
+ if [ -d "/usr/src/linux-headers-$(uname -r)" ]; then
+ declare -rg KERNEL_HEADERS_PATH="/usr/src/linux-headers-$(uname -r)" 2>/dev/null
+ else
+ # fetch source did not install the headers correctly.
+ perror "kernel headers for $KERNEL_CURRENT_VERSION not found! Re-build the kernel-system module"
+ fi
+
+ # check kernel modules/firmware directory
+ if [ -d "/lib/modules/${KERNEL_CURRENT_VERSION}" -a \
+ -d "/lib/firmware/${KERNEL_CURRENT_VERSION}" ]; then
+ # The expected paths exists, set KERNEL_BASE_DIR to /
+ declare -rg KERNEL_BASE_DIR="/" 2>/dev/null
+ else
+ perror "Could not find kernel modules / firmware for kernel version '$KERNEL_CURRENT_VERSION'. \
+ Does '/lib/modules/$KERNEL_CURRENT_VERSION' exist?"
+ fi
+
+ # print debug info
+ pdebug "SYS_UTS_RELEASE: '$SYS_UTS_RELEASE'"
+ pdebug "SYS_KERNEL: '$SYS_KERNEL'"
+ pdebug "KERNEL_NEW_VERSION: '$KERNEL_NEW_VERSION'"
+ pdebug "KERNEL_BASE_DIR: '$KERNEL_BASE_DIR'"
+
+ # set KERNEL_HEADERS_PATH
+ #get_kernel_headers_path
+}
+
+get_kernel_headers_path(){
+ # determine the path to the kernel headers we just installed
+ for DIR in $(list_content_package --dirs linux-headers-$(uname -r) ); do
+ if [[ "$DIR" =~ .*linux-headers-$(uname -r)$ ]]; then
+ # validate candidate
+ [ -e "$DIR/./include/generated/utsrelease.h" ] \
+ || perror "Could not find utsrelease.h at '$DIR/./include/generated/utsrelease.h'"
+ # TODO: maybe check if SYS_UTS_RELEASE is the same as in the header.
+
+ # all good, we found it
+ pinfo "Kernel headers found at '$DIR'."
+ declare -rg KERNEL_HEADERS_PATH="$DIR"
+ break
+ fi
+ done
+
+ [ -z "$KERNEL_HEADERS_PATH" ] && perror "KERNEL_HEADERS_PATH was not set correctly."
+
+}
+
+fetch_source() {
+
+ # get the source from repos, use meta-package for now
+ pinfo "Installing kernel headers from the repositories for version '${KERNEL_CURRENT_VERSION}'"
+
+ # the actual install routine is done via config file
+ # through the REQUIRED_INSTALLED_PACKAGES variable
+
+}
+
+build() {
+
+ # simply copy the kernel from the running system
+ # to the build directory as it is.
+ local KERNEL_SYSTEM_PATH=""
+
+ # 1st "parse" /proc/cmdline for the kernel name
+ for i in $(cat /proc/cmdline); do
+ [[ "$i" =~ ^BOOT_IMAGE=.* ]] && local BOOT_IMAGE="$(basename $(echo $i|cut -c 12-))"
+ done
+
+ # exit if KERNEL_SYSTEM_FILENAME is empty, should not happen
+ [ -z "${BOOT_IMAGE}" ] && perror "Could not determine the full path to the running kernel..."
+
+ # now find it in KERNEL_SYSTEM_SEARCH_PATH
+ # NOTE: this variable should be expanded in the future if new locations are to be searched
+ local KERNEL_SYSTEM_SEARCH_PATH="/boot"
+ local KERNEL_SYSTEM_SEARCH_RESULTS="$(find "${KERNEL_SYSTEM_SEARCH_PATH}" -type f -iname "*${BOOT_IMAGE}*")"
+
+ if [ "$(echo $KERNEL_SYSTEM_SEARCH_RESULTS|wc -w)" -eq 1 ]; then
+ # we found the running kernel path
+ KERNEL_SYSTEM_PATH="${KERNEL_SYSTEM_SEARCH_RESULTS}"
+ else
+ # we found more than one, shouldn't happen...
+ perror "Found more than one kernel named '${BOOT_IMAGE}' inside '${KERNEL_SYSTEM_SEARCH_PATH}'."
+ fi
+
+ # at this point, we should definitly have KERNEL_SYSTEM_PATH, check just in case :)
+ [ -z "${KERNEL_SYSTEM_PATH}" ] && perror "KERNEL_SYSTEM_PATH isn't set, kernel not found. This shouldn't happen!"
+ pinfo "Live kernel path: $KERNEL_SYSTEM_PATH"
+
+ # copy kernel to build directory
+ [ -z "${KERNEL_TARGET_NAME}" ] && perror "KERNEL_TARGET_NAME not set, this mean something is wrong with remote/include/kernel.inc"
+ cp "${KERNEL_SYSTEM_PATH}" "${MODULE_BUILD_DIR}/${KERNEL_TARGET_NAME}" && \
+ pinfo "Copied kernel from '${KERNEL_SYSTEM_PATH}' to '${MODULE_BUILD_DIR}/${KERNEL_TARGET_NAME}'"
+ #[ -z "${KERNEL_BUILD_DIR}" ] && KERNEL_BUILD_DIR="${MODULE_BUILD_DIR}"
+}
+
+post_copy() {
+ :
+ #mkdir -p "$TARGET_BUILD_DIR/../kernel"
+ #cp -a "$MODULE_BUILD_DIR/kernel" "$TARGET_BUILD_DIR/../kernel/kernel" || perror "could not copy kernel to remote build dir."
+}
+
diff --git a/remote/modules/kernel-system/module.conf b/remote/modules/kernel-system/module.conf
new file mode 100644
index 00000000..0cd03752
--- /dev/null
+++ b/remote/modules/kernel-system/module.conf
@@ -0,0 +1,3 @@
+REQUIRED_BINARIES=""
+REQUIRED_LIBRARIES=""
+REQUIRED_DIRECTORIES=""
diff --git a/remote/modules/kernel-system/module.conf.opensuse b/remote/modules/kernel-system/module.conf.opensuse
new file mode 100644
index 00000000..6bfc2078
--- /dev/null
+++ b/remote/modules/kernel-system/module.conf.opensuse
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+ kernel-desktop-devel
+"
+REQUIRED_CONTENT_PACKAGES="
+ kernel-desktop-devel
+"
diff --git a/remote/modules/kernel-system/module.conf.ubuntu b/remote/modules/kernel-system/module.conf.ubuntu
new file mode 100644
index 00000000..4d47b243
--- /dev/null
+++ b/remote/modules/kernel-system/module.conf.ubuntu
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+ linux-headers-$(uname -r)
+"
+REQUIRED_CONTENT_PACKAGES="
+ linux-headers-$(uname -r)
+"
diff --git a/remote/modules/kernel/module.build b/remote/modules/kernel/module.build
new file mode 100644
index 00000000..fdc7e9ff
--- /dev/null
+++ b/remote/modules/kernel/module.build
@@ -0,0 +1,151 @@
+get_kernel_version() {
+ # determine kernel version that will be running in the generated system
+ if [ -e "$MODULES_DIR/kernel/ksrc/include/generated/utsrelease.h" ]; then
+ # declare kernel version stuff
+ declare -rg SYS_UTS_RELEASE=$(grep 'UTS_RELEASE' "$MODULES_DIR/kernel/ksrc/include/generated/utsrelease.h" | awk -F '"' '{print $2}')
+ declare -rg SYS_KERNEL=$(echo "$SYS_UTS_RELEASE" | grep -o -E '^[0-9\.]+')
+ declare -rg KERNEL_NEW_VERSION="$SYS_UTS_RELEASE"
+
+ # declare path to kernel headers and modules/firmware
+ declare -rg KERNEL_HEADERS_PATH="$MODULES_DIR/kernel/ksrc"
+ declare -rg KERNEL_BASE_DIR="$MODULES_DIR/kernel/build"
+ fi
+
+ # print debug info
+ pdebug "SYS_UTS_RELEASE: '$SYS_UTS_RELEASE'"
+ pdebug "SYS_KERNEL: '$SYS_KERNEL'"
+ pdebug "KERNEL_NEW_VERSION: '$KERNEL_NEW_VERSION'"
+ pdebug "KERNEL_BASE_DIR: '$KERNEL_BASE_DIR'"
+
+ # check the headers/src path
+}
+
+fetch_source() {
+ pdebug "getting kernel sources via git ...."
+ [ -d ./ksrc ] && rm -rf ./ksrc # slightly brutal ...
+ git clone --depth 1 ${REQUIRED_GIT} ksrc || perror "Could not clone kernel git."
+ # check for aufs
+ local RSL=$(find ksrc/ -type d -name aufs)
+ if [ -z "$RSL" ]; then
+ pinfo "aufs not found in kernel sources, patching it..."
+ patch_aufs
+ else
+ pinfo "aufs detected in kernel source :)"
+ fi
+ # remember the current kernel version
+ echo "${KERNEL_CURRENT_VERSION}" > ksrc/KVERSION
+}
+
+build() {
+ local TARGET_CONFIG_FILE="openslx.config"
+ [ -e "${TARGET_CONFIG_FILE}" ] && rm -f "${TARGET_CONFIG_FILE}"
+ # update config and copy to ksrc
+ pinfo "Updating kernel config..."
+ update_config
+ cp "${TARGET_CONFIG_FILE}" ksrc/.config
+ # make kernel with the new config
+ cd ksrc || perror "Could not cd to ksrc, was the kernel source fetched properly?"
+ pinfo "Preparing kernel for new config ('make oldconfig')."
+ if [ "x$MLTK_QUIET" = "x1" ]; then
+ yes "" | make oldconfig || perror "make oldconfig failed."
+ else
+ make oldconfig || perror "make oldconfig failed."
+ fi
+ make prepare || perror "make prepare failed."
+ make scripts || perror "make scripts failed."
+
+ pinfo "Compiling kernel... (this will take some time)"
+ if gcc --version | grep "4\.7" && which distcc; then
+ pinfo "USING DISTCC"
+ make CC="distcc gcc-4.7" -j16 || perror "make failed."
+ else
+ # explicitly state number of cores here, as MAKEFLAGS seems to be overridden
+ make "-j$CPU_CORES" || perror "make failed."
+ fi
+
+ # install modules to build directory
+ pinfo "Installing kernel modules..."
+ if [ -d "${MODULE_BUILD_DIR}/lib/modules" ]; then
+ rm -r "${MODULE_BUILD_DIR}/lib/modules" || pwarning "Could not clean old modules."
+ fi
+ make INSTALL_MOD_PATH="${MODULE_BUILD_DIR}" INSTALL_MOD_STRIP=1 modules_install || perror "make modules_install failed in ${MODULE_BUILD_DIR}."
+ cd - 2> /dev/null
+
+ # copy kernel to build
+ cp ksrc/arch/x86/boot/bzImage "${MODULE_BUILD_DIR}/${KERNEL_TARGET_NAME}"
+ pinfo "Kernel was successfully built at ${MODULE_BUILD_DIR}/${KERNEL_TARGET_NAME}"
+ [ -z "${KERNEL_BUILD_DIR}" ] && KERNEL_BUILD_DIR="${MODULE_BUILD_DIR}"
+}
+
+post_copy() {
+ mkdir -p "$TARGET_BUILD_DIR/../kernel"
+ cp -a "$MODULE_BUILD_DIR/kernel" "$TARGET_BUILD_DIR/../kernel/kernel" || perror "could not copy kernel to remote build dir."
+}
+
+# helper function to update the current kernel config with our parameters
+update_config() {
+
+ # first we need to update the current config
+ local BASE_CONFIG_FILE="/boot/config-$(uname -r)"
+ [ -e "${BASE_CONFIG_FILE}" ] || perror "$BASE_CONFIG_FILE could not be found! This should not happen."
+
+ # check for our wanted config parameter
+ local OPENSLX_WANTED_CONFIG="${ROOT_DIR}/data/kernel.wanted.config"
+
+ [ -e "${OPENSLX_WANTED_CONFIG}" ] || perror "$OPENSLX_WANTED_CONFIG does not exist! Please add a list of wanted kernel config parameters."
+
+ # copy basic config file
+ cp "$BASE_CONFIG_FILE" "$TARGET_CONFIG_FILE"
+
+ for WANTED_CONFIG in $(cat $OPENSLX_WANTED_CONFIG|sort -u); do
+ local CONFIG_PARAM_NAME="$(echo $WANTED_CONFIG | awk -F "=" '{print $1}')"
+ local SEARCH_RESULT="$(grep -E "^\s*$(echo "$CONFIG_PARAM_NAME" | escape_search)=" "$BASE_CONFIG_FILE")"
+
+ #echo "Process: $SEARCH_RESULT"
+ # analyse results
+ if [ "x$SEARCH_RESULT" == "x" ]; then
+ # no match, add it
+ sed -i -r "s/^\s*#.*\s$(echo "$CONFIG_PARAM_NAME" | escape_search)[^_A-Z0-9].*$//" "$TARGET_CONFIG_FILE"
+ echo "$WANTED_CONFIG" >> "$TARGET_CONFIG_FILE"
+ else
+ # match, change to our setting if they differ
+ if [ "x$SEARCH_RESULT" != "x$WANTED_CONFIG" ]; then
+ sed -i "s/$(echo "$SEARCH_RESULT" | escape_search)/$(echo "$WANTED_CONFIG" | escape_replace)/" "$TARGET_CONFIG_FILE"
+ fi
+ fi
+ done
+}
+
+# helper to patch aufs
+patch_aufs() {
+ pinfo "Cloning aufs3 standalone git"
+ cd "$MODULE_DIR"
+ [ -d "aufs3-standalone/.git" ] && rm -rf "aufs3-standalone" # if already there, kill it.
+ # git: --depth 1 won't work here due to later "checkout origin/branch"
+ git clone "git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git" || perror "Cloning aufs3 failed."
+ # get the needed version
+ [ ! -z ${KERNEL_CURRENT_VERSION} ] && local NEEDED_BRANCH=$(echo $KERNEL_CURRENT_VERSION | awk -F "." '{print $1"."$2}') \
+ || perror "KERNEL_CURRENT_VERSION not set, this should not happen!"
+ pinfo "Getting branch origin/$NEEDED_BRANCH"
+ cd "$MODULE_DIR/aufs3-standalone" || perror "Could not CD to aufs3-standalone"
+ git checkout "origin/aufs$NEEDED_BRANCH" || perror "Could not checkout needed branch."
+ pinfo "Starting to patch... $NEEDED_BRANCH"
+ tarcopy "Documentation fs" "$MODULE_DIR/ksrc"
+
+ # Quick-and-dirty aufs_type.h copying:
+ [ -e "include/linux/aufs_type.h" ] && cp "include/linux/aufs_type.h" "$MODULE_DIR/ksrc/include/linux/"
+ [ -e "include/uapi/linux/aufs_type.h" ] && cp "include/uapi/linux/aufs_type.h" "$MODULE_DIR/ksrc/include/uapi/linux/"
+
+ cd "$MODULE_DIR/ksrc" || perror "Could not CD to kernel-source dir ksrc"
+
+ patch -p1 < "$MODULE_DIR/aufs3-standalone/aufs3-kbuild.patch" || perror "aufs3-standalone/aufs3-kbuild.patch failed!"
+ patch -p1 < "$MODULE_DIR/aufs3-standalone/aufs3-base.patch" || perror "aufs3-standalone/aufs3-base.patch failed!"
+
+ # this following 'if' is a burning shame - caused as patching under eg. openSuse 13.1 is always unsuccessful due to hunk failing
+ if [ -f "$MODULE_DIR/aufs3-standalone/aufs3-mmap.patch" ]; then
+ patch -p1 < "$MODULE_DIR/aufs3-standalone/aufs3-mmap.patch" || pwarning "Problem patching aufs3-mmap.patch: hunks failed?"
+ fi
+ pinfo "Patched kernel source with aufs-${NEEDED_BRANCH}"
+ cd "$MODULE_DIR"
+}
+
diff --git a/remote/modules/kernel/module.conf b/remote/modules/kernel/module.conf
new file mode 100644
index 00000000..0cd03752
--- /dev/null
+++ b/remote/modules/kernel/module.conf
@@ -0,0 +1,3 @@
+REQUIRED_BINARIES=""
+REQUIRED_LIBRARIES=""
+REQUIRED_DIRECTORIES=""
diff --git a/remote/modules/kernel/module.conf.opensuse b/remote/modules/kernel/module.conf.opensuse
new file mode 100644
index 00000000..a66564fe
--- /dev/null
+++ b/remote/modules/kernel/module.conf.opensuse
@@ -0,0 +1,2 @@
+REQUIRED_GIT_BRANCH="-b openSUSE-${SYS_VERSION}"
+REQUIRED_GIT="git://kernel.opensuse.org/kernel.git $REQUIRED_GIT_BRANCH"
diff --git a/remote/modules/kernel/module.conf.ubuntu b/remote/modules/kernel/module.conf.ubuntu
new file mode 100644
index 00000000..1c876d15
--- /dev/null
+++ b/remote/modules/kernel/module.conf.ubuntu
@@ -0,0 +1,2 @@
+REQUIRED_GIT_BRANCH="-b master"
+REQUIRED_GIT="git://kernel.ubuntu.com/ubuntu/ubuntu-${SYS_CODENAME}.git $REQUIRED_GIT_BRANCH"
diff --git a/remote/modules/kernel/module.conf.ubuntu.13.04 b/remote/modules/kernel/module.conf.ubuntu.13.04
new file mode 100644
index 00000000..e9192f01
--- /dev/null
+++ b/remote/modules/kernel/module.conf.ubuntu.13.04
@@ -0,0 +1,2 @@
+REQUIRED_GIT_BRANCH="-b master"
+REQUIRED_GIT="git://kernel.ubuntu.com/ubuntu-archive/ubuntu-${SYS_CODENAME}.git $REQUIRED_GIT_BRANCH"
diff --git a/remote/modules/ldm-gtk-greeter/module.build b/remote/modules/ldm-gtk-greeter/module.build
new file mode 100644
index 00000000..27e5a592
--- /dev/null
+++ b/remote/modules/ldm-gtk-greeter/module.build
@@ -0,0 +1,34 @@
+#tool/distro specific functions for fetching, building and installing dependencies
+
+fetch_source () {
+ download_untar "$URL" "src/"
+}
+
+build () {
+ cd "src/$VERSION"
+ pinfo "Running configure"
+ ./configure --prefix="/" --datarootdir="/usr/share" || perror "failed."
+ pinfo "Running make"
+ make || perror "failed."
+ pinfo "Running make install"
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "failed."
+
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+ cd -
+}
+
+post_copy() {
+ gdk-pixbuf-query-loaders > "${TARGET_BUILD_DIR}/usr/lib/${ARCH_TRIPLET}/gdk-pixbuf-2.0/2.10.0/loaders.cache" || perror "pixbuf-query-loaders failed."
+ mkdir -p "${TARGET_BUILD_DIR}/etc/pango" || perror "Making etc/pango failed."
+ pango-querymodules > "${TARGET_BUILD_DIR}/etc/pango/pango.modules" || perror "pango-querymodules failed."
+ gtk-update-icon-cache-3.0 "${TARGET_BUILD_DIR}/usr/share/icons/hicolor/" || perror "update-icon-cache-3.0 failed."
+ update-mime-database "${TARGET_BUILD_DIR}/usr/share/mime" || perror "update-mime-database failed."
+ mkdir -p "${TARGET_BUILD_DIR}/var/lib"
+ cp -r "/var/lib/polkit-1" "${TARGET_BUILD_DIR}/var/lib/" || perror "Copying -r /var/lib/polkit-1 to '${TARGET_BUILD_DIR}/var/lib/' failed."
+}
+
diff --git a/remote/modules/ldm-gtk-greeter/module.conf b/remote/modules/ldm-gtk-greeter/module.conf
new file mode 100644
index 00000000..e9349002
--- /dev/null
+++ b/remote/modules/ldm-gtk-greeter/module.conf
@@ -0,0 +1,9 @@
+VERSION=lightdm-gtk-greeter-1.3.1
+URL=https://launchpad.net/lightdm-gtk-greeter/1.4/1.3.1/+download/lightdm-gtk-greeter-1.3.1.tar.gz
+REQUIRED_INSTALLED_PACKAGES="gtk+-3.0 liblightdm-gobject-1-dev libgdk-pixbuf2.0-0 libpango1.0-0 librsvg2-common shared-mime-info gnome-themes-standard"
+REQUIRED_CONTENT_PACKAGES="libgdk-pixbuf2.0-0 libpango1.0-0 librsvg2-common shared-mime-info gnome-themes-standard"
+REQUIRED_BINARIES="lightdm-gtk-greeter"
+REQUIRED_DIRECTORIES="/usr/lib /usr/share/lightdm-gtk-greeter /usr/share/mime /usr/share/xgreeters /usr/share/icons /usr/share/themes /etc /usr/bin"
+REQUIRED_FILES="/etc/lightdm/lightdm-gtk-greeter.conf"
+REQUIRED_MODULES="ldm"
+
diff --git a/remote/modules/ldm/module.build b/remote/modules/ldm/module.build
new file mode 100644
index 00000000..e88f0b08
--- /dev/null
+++ b/remote/modules/ldm/module.build
@@ -0,0 +1,34 @@
+#tool/distro specific functions for fetching, building and installing dependencies
+
+fetch_source () {
+ download_untar "$URL" "src/"
+}
+
+build () {
+ cd "src/$VERSION"
+ pinfo "Running configure"
+ ./configure --prefix="/" --datarootdir="/usr/share" || perror "failed."
+ pinfo "Running make"
+ make || perror "failed."
+ pinfo "Running make install"
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "failed."
+
+ COPYLIST="list_dpkg_output"
+
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+ cd -
+}
+
+post_copy() {
+ mkdir -p "${TARGET_BUILD_DIR}/var/lib/lightdm"
+ touch "${TARGET_BUILD_DIR}/var/lib/lightdm/.Xauthority" || perror "Cannot touch '${TARGET_BUILD_DIR}/var/lib/lightdm/.Xauthority'"
+ local LDMUID=$(add_user "lightdm")
+ local LDMGID=$(add_group "lightdm")
+ pinfo "lightdm user and group is $LDMUID $LDMGID"
+ chown -R "${LDMUID}:${LDMGID}" "${TARGET_BUILD_DIR}/var/lib/lightdm/" || perror "chowning '${TARGET_BUILD_DIR}/var/lib/lightdm/' failed."
+}
+
diff --git a/remote/modules/ldm/module.conf b/remote/modules/ldm/module.conf
new file mode 100644
index 00000000..74ab9450
--- /dev/null
+++ b/remote/modules/ldm/module.conf
@@ -0,0 +1,8 @@
+VERSION=lightdm-1.4.0
+URL=https://launchpad.net/lightdm/1.4/1.4.0/+download/lightdm-1.4.0.tar.gz
+REQUIRED_INSTALLED_PACKAGES="libpam-dev itstool liblightdm-gobject-1-dev"
+REQUIRED_CONTENT_PACKAGES=""
+REQUIRED_BINARIES="dm-tool lightdm lightdm-set-defaults gdmflexiserver lightdm-guest-session-wrapper lightdm-set-defaults"
+REQUIRED_DIRECTORIES="/etc /lib"
+REQUIRED_FILES=""
+
diff --git a/remote/modules/nscd/module.build b/remote/modules/nscd/module.build
new file mode 100644
index 00000000..bd189b66
--- /dev/null
+++ b/remote/modules/nscd/module.build
@@ -0,0 +1,17 @@
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+ return 0
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/nscd/module.conf b/remote/modules/nscd/module.conf
new file mode 100644
index 00000000..74af4cfb
--- /dev/null
+++ b/remote/modules/nscd/module.conf
@@ -0,0 +1,3 @@
+REQUIRED_BINARIES="
+ nscd
+"
diff --git a/remote/modules/nscd/module.conf.debian b/remote/modules/nscd/module.conf.debian
new file mode 100644
index 00000000..4a61cc19
--- /dev/null
+++ b/remote/modules/nscd/module.conf.debian
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+ nscd
+"
+REQUIRED_CONTENT_PACKAGES="
+ nscd
+"
diff --git a/remote/modules/nscd/module.conf.opensuse b/remote/modules/nscd/module.conf.opensuse
new file mode 100644
index 00000000..4a61cc19
--- /dev/null
+++ b/remote/modules/nscd/module.conf.opensuse
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+ nscd
+"
+REQUIRED_CONTENT_PACKAGES="
+ nscd
+"
diff --git a/remote/modules/nscd/module.conf.ubuntu b/remote/modules/nscd/module.conf.ubuntu
new file mode 100644
index 00000000..4a61cc19
--- /dev/null
+++ b/remote/modules/nscd/module.conf.ubuntu
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+ nscd
+"
+REQUIRED_CONTENT_PACKAGES="
+ nscd
+"
diff --git a/remote/modules/nvidia_kernel/module.build b/remote/modules/nvidia_kernel/module.build
new file mode 100644
index 00000000..a1275c70
--- /dev/null
+++ b/remote/modules/nvidia_kernel/module.build
@@ -0,0 +1,55 @@
+fetch_source() {
+ mkdir -p src 2>/dev/null
+ cd src || perror "Could not change into src directory."
+ download "$REQUIRED_URL"
+}
+
+build() {
+ local ROOTUPPERDIR="$MODULE_DIR/rootupper"
+
+ local NVIDIA="$MODULE_DIR/src/$REQUIRED_NVIDIA"
+ local NVIDIAEXTRACTDIR="$ROOTUPPERDIR/NVIDIA"
+
+ [ -d "$NVIDIAEXTRACTDIR" ] && rm -rf "$NVIDIAEXTRACTDIR"
+ pinfo "Unpacking NVidia archive ($NVIDIA) ..."
+ sh "$NVIDIA" --extract-only --target "$NVIDIAEXTRACTDIR" || perror "Could not extract $NVIDIA to $NVIDIAEXTRACTDIR."
+
+ pinfo "Ready to chroot - compiling may take some time."
+ pdebug "--- chroot ---------------------------------------------------------------------"
+ pdebug "- -"
+ pdebug "- Notice: This may take a while! -"
+ pdebug "- -"
+ pdebug "- Please keep note the Nvidia installer _will_ complain about -"
+ pdebug "- several warnings and errors. It will do this in any case. -"
+ pdebug "- -"
+ pdebug "- This does _not_ mean the kernel module compilation was unsuccessful! -"
+ pdebug "- -"
+ pdebug "--------------------------------------------------------------------------------"
+
+
+ chroot_run "$ROOTUPPERDIR" <<-EOF
+ /NVIDIA/nvidia-installer --no-nouveau-check --no-network --no-backup --no-rpms --no-runlevel-check --no-distro-scripts --no-cc-version-check --no-x-check --no-precompiled-interface --silent --kernel-source-path /"$KERNEL_HEADERS_PATH" # Do the work!
+ # fake success since the installer will exit with an error due to the module not loading properly.
+ exit 0
+ EOF
+ pinfo "chroot terminated."
+
+ pinfo "Stripping kernel modules..."
+ strip -g "$ROOTUPPERDIR/NVIDIA/kernel/nvidia.ko" || \
+ pwarning "Could not strip kernel module $ROOTUPPERDIR/NVIDIA/kernel/nvidia.ko."
+ strip -g "$ROOTUPPERDIR/NVIDIA/kernel/uvm/nvidia-uvm.ko" || \
+ pwarning "Could not strip kernel module $ROOTUPPERDIR/NVIDIA/kernel/uvm/nvidia-uvm.ko."
+
+ pinfo "Copying kernel modules..."
+ local NVIDIA_MODULES="$MODULE_BUILD_DIR/lib/modules/nvidia/"
+ mkdir -p "$NVIDIA_MODULES"
+ cp "$ROOTUPPERDIR/NVIDIA/kernel/nvidia.ko" "$NVIDIA_MODULES" || perror "Could not copy nvidia.ko!"
+ cp "$ROOTUPPERDIR/NVIDIA/kernel/uvm/nvidia-uvm.ko" "$NVIDIA_MODULES" || perror "Could not copy nvidia-uvm.ko!"
+
+ rm -rf "$MODULE_BUILD_DIR/NVIDIA"
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/nvidia_kernel/module.conf b/remote/modules/nvidia_kernel/module.conf
new file mode 100644
index 00000000..9880100d
--- /dev/null
+++ b/remote/modules/nvidia_kernel/module.conf
@@ -0,0 +1,10 @@
+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_DIRECTORIES="
+ /lib/modules/nvidia
+"
+REQUIRED_MODULES="
+ kernel
+"
diff --git a/remote/modules/nvidia_libs/module.build b/remote/modules/nvidia_libs/module.build
new file mode 100644
index 00000000..38f60d09
--- /dev/null
+++ b/remote/modules/nvidia_libs/module.build
@@ -0,0 +1,56 @@
+fetch_source() {
+ mkdir -p src
+ cd src || perror "Could not change into src directory."
+ download "$REQUIRED_URL"
+}
+
+build() {
+ local KERNELSRCDIR="$MODULE_DIR/../kernel/ksrc" # kernel sources
+ local NVIDIA="$MODULE_DIR/src/$REQUIRED_NVIDIA"
+ local NVIDIAEXTRACTDIR="$MODULE_BUILD_DIR/NVIDIA"
+
+ pdebug "Unpacking NVidia-Installer ..."
+ [ -d "$NVIDIAEXTRACTDIR" ] && rm -rf "$NVIDIAEXTRACTDIR"
+ sh "$NVIDIA" --extract-only --target "$NVIDIAEXTRACTDIR" || perror "Could not extract $NVIDIA to $NVIDIAEXTRACTDIR."
+
+ pinfo "Ready to chroot - may take some time."
+ pdebug "--- chroot ---------------------------------------------------------------------"
+ pdebug "- -"
+ pdebug "- Notice: This may take a while! -"
+ pdebug "- -"
+ pdebug "- Please keep note the Nvidia installer _will_ complain about -"
+ pdebug "- several warnings and errors. It will do this in any case. -"
+ pdebug "- -"
+ pdebug "- This does _not_ mean the library module compilation was unsuccessful! -"
+ pdebug "- -"
+ pdebug "--------------------------------------------------------------------------------"
+
+ chroot_run "${MODULE_BUILD_DIR}" <<-EOF
+ /NVIDIA/nvidia-installer --no-nouveau-check --no-network --no-backup --no-rpms --no-runlevel-check --no-distro-scripts --no-cc-version-check --no-x-check --no-precompiled-interface --silent --no-kernel-module
+ EOF
+ pinfo "chroot terminated, cleaning up"
+
+ # move whiteout list to its /opt/openslx/etc/nvidia.whiteout
+ if [ -e "${MODULE_BUILD_DIR}/overlay.whiteout.list" ]; then
+ mkdir -p "${MODULE_BUILD_DIR}/opt/openslx/etc"
+ mv "${MODULE_BUILD_DIR}/overlay.whiteout.list" "${MODULE_BUILD_DIR}/opt/openslx/etc/nvidia.whiteout"
+ fi
+
+ #pdebug "Handling whiteouts ..."
+ #local WHITEOUT_LIST="${MODULE_BUILD_DIR}/opt/openslx/etc/nvidia.whiteout"
+ #rm -f -- "$WHOUTEOUT_LIST"
+ #mkdir -p "$(dirname "$WHITEOUT_LIST")" || perror "Could not create $(dirname "$WHITEOUT_LIST")"
+ #pdebug "Searching for overlayfs-whiteouts ..."
+ #for WHITEOUT in $(find "$MODULE_BUILD_DIR" -lname "(overlay-whiteout)"); do
+# pdebug "Whiteout found: $WHITEOUT"
+# echo "/./${WHITEOUT#$MODULE_BUILD_DIR}" >> "$WHITEOUT_LIST"
+# rm -f -- "$WHITEOUT" || perror "Could not delete whiteout $WHITEOUT!"
+# done
+
+ rm -rf "$MODULE_BUILD_DIR/NVIDIA"
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/nvidia_libs/module.conf b/remote/modules/nvidia_libs/module.conf
new file mode 100644
index 00000000..12748274
--- /dev/null
+++ b/remote/modules/nvidia_libs/module.conf
@@ -0,0 +1,17 @@
+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_FILES="
+ /etc/OpenCL/vendors/nvidia.icd
+ /usr/share/nvidia/nvidia-application-profiles-331.38-rc
+ /usr/share/applications/nvidia-settings.desktop
+ /opt/openslx/etc/nvidia.whiteout
+"
+
+REQUIRED_DIRECTORIES="
+ /usr/bin
+ /usr/lib
+ /var/lib/nvidia
+"
+
diff --git a/remote/modules/nvidia_libs/module.conf.ubuntu b/remote/modules/nvidia_libs/module.conf.ubuntu
new file mode 100644
index 00000000..a3a80bee
--- /dev/null
+++ b/remote/modules/nvidia_libs/module.conf.ubuntu
@@ -0,0 +1,13 @@
+# libvdpau: While nvidia delivers a linvdpau within it's driver package, nvidia
+# itself recommends using a distribution package if available. So, here we go.
+
+REQUIRED_CONTENT_PACKAGES="
+ libvdpau1
+"
+
+REQUIRED_INSTALLED_PACKAGES="
+ libvdpau1
+"
+REQUIRED_SYSTEM_FILES+="
+ /sbin/ldconfig.real
+"
diff --git a/remote/modules/openbox/module.build b/remote/modules/openbox/module.build
new file mode 100644
index 00000000..0cd6aaad
--- /dev/null
+++ b/remote/modules/openbox/module.build
@@ -0,0 +1,36 @@
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ # FIXME: Hack: openSUSE's rpm -ql lilsts non-existant pango.modules, which makes
+ # tarcopy fail. We probably can't fix that, so remove it using grep....
+ tarcopy "$(cat "$COPYLIST" | grep -v 'pango\.modules$' | sort -u)" "${MODULE_BUILD_DIR}"
+
+ return 0
+}
+
+post_copy() {
+ [ ! -d "$TARGET_BUILD_DIR/etc/pango" ] && mkdir -p "$TARGET_BUILD_DIR/etc/pango"
+
+ # little Workaround, as under e.g. 64bit Suse the binary is called
+ # pango-querymodules-64, not pango-querymodules.
+ which pango-querymodules 2>/dev/null 1>&2
+ ERR=$?
+ if [[ "$ERR" -eq 0 ]]; then
+ PANGO_QUERYMODULES_ARCH=pango-querymodules
+ else
+ which pango-querymodules-64 2>/dev/null 1>&2
+ ERR=$?
+ if [[ "$ERR" -eq 0 ]]; then
+ PANGO_QUERYMODULES_ARCH=pango-querymodules-64
+ else
+ perror "Could not find either pango-querymodules or pango-querymodules-64!"
+ fi
+ fi
+ $PANGO_QUERYMODULES_ARCH > "$TARGET_BUILD_DIR/etc/pango/pango.modules"
+}
diff --git a/remote/modules/openbox/module.conf b/remote/modules/openbox/module.conf
new file mode 100644
index 00000000..8a816b97
--- /dev/null
+++ b/remote/modules/openbox/module.conf
@@ -0,0 +1,11 @@
+REQUIRED_BINARIES="
+ openbox
+ openbox-session
+"
+REQUIRED_FILES="
+ /usr/share/xsessions/openbox.desktop
+"
+REQUIRED_DIRECTORIES="
+ /etc
+ /usr/share/themes/Clearlooks
+"
diff --git a/remote/modules/openbox/module.conf.debian b/remote/modules/openbox/module.conf.debian
new file mode 100644
index 00000000..b10bd40d
--- /dev/null
+++ b/remote/modules/openbox/module.conf.debian
@@ -0,0 +1,15 @@
+REQUIRED_INSTALLED_PACKAGES="
+ openbox
+ libpango1.0-0
+ libpango1.0-dev
+ libdbus-1-dev
+"
+REQUIRED_CONTENT_PACKAGES="
+ openbox
+ libpango1.0-0
+ libpango1.0-dev
+ libdbus-1-dev
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib
+"
diff --git a/remote/modules/openbox/module.conf.opensuse b/remote/modules/openbox/module.conf.opensuse
new file mode 100644
index 00000000..c06a89b2
--- /dev/null
+++ b/remote/modules/openbox/module.conf.opensuse
@@ -0,0 +1,13 @@
+REQUIRED_INSTALLED_PACKAGES="
+ openbox
+ libpango-1_0-0
+ pango-tools
+"
+REQUIRED_CONTENT_PACKAGES="
+ openbox
+ libpango-1_0-0
+ pango-tools
+"
+REQUIRED_DIRECTORIES+="
+ /usr/$LIB64
+"
diff --git a/remote/modules/openbox/module.conf.ubuntu b/remote/modules/openbox/module.conf.ubuntu
new file mode 100644
index 00000000..b10bd40d
--- /dev/null
+++ b/remote/modules/openbox/module.conf.ubuntu
@@ -0,0 +1,15 @@
+REQUIRED_INSTALLED_PACKAGES="
+ openbox
+ libpango1.0-0
+ libpango1.0-dev
+ libdbus-1-dev
+"
+REQUIRED_CONTENT_PACKAGES="
+ openbox
+ libpango1.0-0
+ libpango1.0-dev
+ libdbus-1-dev
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib
+"
diff --git a/remote/modules/openbox/module.conf.zypper b/remote/modules/openbox/module.conf.zypper
new file mode 100644
index 00000000..1d0b68c5
--- /dev/null
+++ b/remote/modules/openbox/module.conf.zypper
@@ -0,0 +1,11 @@
+REQUIRED_INSTALLED_PACKAGES=" openbox
+ libpango-1_0-0"
+REQUIRED_CONTENT_PACKAGES=" openbox
+ libpango-1_0-0"
+REQUIRED_BINARIES=" openbox
+ openbox-session"
+REQUIRED_FILES=" /usr/share/xsessions/openbox.desktop"
+REQUIRED_DIRECTORIES=" /etc
+ /usr/$LIB64
+ /usr/share/themes/Clearlooks"
+
diff --git a/remote/modules/pam/module.build b/remote/modules/pam/module.build
new file mode 100644
index 00000000..15828fb8
--- /dev/null
+++ b/remote/modules/pam/module.build
@@ -0,0 +1,45 @@
+fetch_source() {
+ # get pam-script source
+ download_untar "$REQUIRED_PAM_SCRIPT_URL" "src/"
+ if [[ "$SYS_DISTRIBUTION" == "opensuse" && "$SYS_VERSION" == "13.1" ]]; then
+ pinfo "Downloading $REQUIRED_NSS_LDAPD_URL ..."
+ download_untar "$REQUIRED_NSS_LDAPD_URL" "src/"
+ fi
+}
+
+build() {
+ mkdir -p "$MODULE_BUILD_DIR/opt/openslx/bin"
+ gcc -o "$MODULE_BUILD_DIR/opt/openslx/bin/sslconnect" "$MODULE_DIR/sslconnect.c" -lssl -lcrypto -O3 || perror "Could not compile sslconnect.c"
+ local COPYLIST="$MODULE_BUILD_DIR/list_packet_files"
+ # TODO: Hack for SUSE: Ignore file (/var/lib/nfs/state) that does not exist :(
+ list_packet_files | grep -v '/var/lib/nfs/state' | sort -u > "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST")" "${MODULE_BUILD_DIR}"
+
+ # build pam-script separatly since we use a source tarball
+ # HACK: find pam_unix.so in MODULE_BUILD_DIR to see where to put pam_script at
+ cd "$MODULE_BUILD_DIR"
+ local PAM_UNIX_LOCATION=$(find . -name pam_unix.so)
+ cd "${MODULE_DIR}/src/pam-script-${REQUIRED_PAM_SCRIPT_VERSION}" || perror "Could not cd to ${MODULE_DIR}/src/pam-script-${REQUIRED_PAM_SCRIPT_VERSION}."
+ ./configure --prefix=/ --sysconfdir=/etc/pam-script --libdir="$(dirname ${PAM_UNIX_LOCATION:1})" || perror "pam-script: ./configure failed."
+ make DESTDIR="${MODULE_BUILD_DIR}" install || perror "pam-script: make install to ${MODULE_BUILD_DIR} failed."
+ # openSuse 13.1 has no package nss-pam-ldapd. So, we compile it.
+ if [[ "$SYS_DISTRIBUTION" == "opensuse" && "$SYS_VERSION" == "13.1" ]]; then
+ cd "${MODULE_DIR}/src/$REQUIRED_NSS_LDAPD_VERSION"
+ pinfo "compiling pam-nss-ldapd for openSuse 13.1 ..."
+ ./configure || perror "openSuse 13.1 - pam-nss-ldapd: ./configure failed."
+ make DESTDIR="${MODULE_BUILD_DIR}" install || perror "openSuse 13.1 - pam-nss-ldapd: make install to ${MODULE_BUILD_DIR} failed."
+ cd "$MODULE_BUILD_DIR"
+ local NSLCD_PATH=$(find . -executable -name "nslcd") # Not in path, so we 'find' below MODULE_BUILD_DIR
+ else
+ cd "$MODULE_BUILD_DIR"
+ local NSLCD_PATH=$(which nslcd)
+ fi
+ [ -z "$NSLCD_PATH" ] && perror "Could not 'which nslcd'"
+ # Build nslcd service file
+ mkdir -p "etc/systemd/system"
+ sed "s,%PATH%,$NSLCD_PATH,g" "$MODULE_DIR/templates/nslcd-systemd.service" > "etc/systemd/system/nslcd.service" || perror "Could not fill nslcd.service template"
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/pam/module.conf b/remote/modules/pam/module.conf
new file mode 100644
index 00000000..c0a21a79
--- /dev/null
+++ b/remote/modules/pam/module.conf
@@ -0,0 +1,26 @@
+REQUIRED_BINARIES="
+ ldapsearch
+ nslcd
+ rpc.gssd
+ rpc.idmapd
+ sslconnect
+"
+REQUIRED_LIBRARIES="
+ nsswitch
+ static
+ umich_ldap
+ libnfsidmap
+ pam_script
+"
+REQUIRED_DIRECTORIES="
+ /etc/security
+"
+REQUIRED_FILES="
+ /etc/systemd/system/nslcd.service
+"
+REQUIRED_SYSTEM_FILES="
+ /etc/login.defs
+ /etc/securetty
+"
+REQUIRED_PAM_SCRIPT_VERSION="1.1.6"
+REQUIRED_PAM_SCRIPT_URL="http://downloads.sourceforge.net/project/pam-script/pam-script-${REQUIRED_PAM_SCRIPT_VERSION}.tar.gz"
diff --git a/remote/modules/pam/module.conf.debian b/remote/modules/pam/module.conf.debian
new file mode 100644
index 00000000..d424f1f7
--- /dev/null
+++ b/remote/modules/pam/module.conf.debian
@@ -0,0 +1,51 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libpam-ldap
+ libnss-ldapd
+ nslcd
+ libpam-ck-connector
+ libpam-cap
+ krb5-user
+ krb5-config
+ libpam-krb5
+ libssl-dev
+ ldap-utils
+ libnfsidmap2
+ nfs-common
+ libpam0g-dev
+ ncpfs
+"
+REQUIRED_CONTENT_PACKAGES="
+ libpam0g
+ libpam-modules
+ libpam-ck-connector
+ libpam-cap
+ libldap-2.4-2
+ libpam-ldap
+ libnss-ldapd
+ nslcd
+ krb5-user
+ krb5-config
+ libpam-krb5
+ ldap-utils
+ libnfsidmap2
+ nfs-common
+ ncpfs
+"
+REQUIRED_BINARIES+="
+ nwmsg
+ ncpmount
+ ncpumount
+ mount.ncp
+ mount.ncpfs
+"
+REQUIRED_DIRECTORIES+="
+ /lib
+ /usr/lib
+"
+REQUIRED_SYSTEM_FILES+="
+ /etc/pam.conf
+ /etc/default/locale
+ /lib/security
+ /lib/${ARCH_TRIPLET}/security
+ /sbin/mkhomedir_helper
+"
diff --git a/remote/modules/pam/module.conf.opensuse b/remote/modules/pam/module.conf.opensuse
new file mode 100644
index 00000000..adef3174
--- /dev/null
+++ b/remote/modules/pam/module.conf.opensuse
@@ -0,0 +1,43 @@
+REQUIRED_INSTALLED_PACKAGES="
+ pam
+ pam_krb5
+ pam-devel
+ nss-pam-ldapd
+ pam-modules
+ libopenssl-devel
+ openldap2-client
+ nfsidmap
+ nfs-client
+ glibc
+ pam-devel
+"
+REQUIRED_CONTENT_PACKAGES="
+ pam
+ pam_krb5
+ pam-devel
+ pam-modules
+ nss-pam-ldapd
+ nss-mdns
+ openldap2-client
+ nfsidmap
+ nfs-client
+ glibc
+"
+REQUIRED_BINARIES+="
+ mkhomedir_helper
+"
+REQUIRED_LIBRARIES+="
+ libnss_compat
+ libnss_db
+ libnss_dns
+ libnss_files
+ libnss_nis
+"
+REQUIRED_DIRECTORIES+="
+ /$LIB64
+ /usr/$LIB64
+"
+REQUIRED_SYSTEM_FILES+="
+ /$LIB64/security
+"
+
diff --git a/remote/modules/pam/module.conf.opensuse.13.1 b/remote/modules/pam/module.conf.opensuse.13.1
new file mode 100644
index 00000000..9fe1de17
--- /dev/null
+++ b/remote/modules/pam/module.conf.opensuse.13.1
@@ -0,0 +1,47 @@
+REQUIRED_NSS_LDAPD_VERSION="nss-pam-ldapd-0.8.13"
+REQUIRED_NSS_LDAPD_URL="http://arthurdejong.org/nss-pam-ldapd/$REQUIRED_NSS_LDAPD_VERSION.tar.gz"
+
+REQUIRED_BINARIES+="
+ mkhomedir_helper
+"
+
+REQUIRED_INSTALLED_PACKAGES="
+ pam
+ pam_krb5
+ pam-devel
+ pam-modules
+ libopenssl-devel
+ openldap2-client
+ nfsidmap
+ nfs-client
+ glibc
+ pam-devel
+ openldap2-devel
+ krb5-devel
+"
+REQUIRED_CONTENT_PACKAGES="
+ pam
+ pam_krb5
+ pam-devel
+ pam-modules
+ nss-mdns
+ openldap2-client
+ nfsidmap
+ nfs-client
+ glibc
+"
+REQUIRED_LIBRARIES+="
+ libnss_compat
+ libnss_db
+ libnss_dns
+ libnss_files
+ libnss_nis
+"
+REQUIRED_DIRECTORIES+="
+ /$LIB64
+ /usr/$LIB64
+"
+REQUIRED_SYSTEM_FILES+="
+ /$LIB64/security
+"
+
diff --git a/remote/modules/pam/module.conf.ubuntu b/remote/modules/pam/module.conf.ubuntu
new file mode 100644
index 00000000..31023197
--- /dev/null
+++ b/remote/modules/pam/module.conf.ubuntu
@@ -0,0 +1,51 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libpam-ldap
+ libnss-ldapd
+ nslcd
+ krb5-user
+ krb5-config
+ libpam-krb5
+ libssl-dev
+ ldap-utils
+ libnfsidmap2
+ nfs-common
+ libpam0g-dev
+ ncpfs
+ 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
+ ncpfs
+ cifs-utils
+"
+REQUIRED_BINARIES+="
+ nwmsg
+ ncpmount
+ ncpumount
+ mount.ncp
+ mount.ncpfs
+ mount.cifs
+"
+REQUIRED_DIRECTORIES+="
+ /lib
+ /usr/lib
+"
+REQUIRED_SYSTEM_FILES+="
+ /etc/pam.conf
+ /etc/default/locale
+ /lib/security
+ /lib/${ARCH_TRIPLET}/security
+ /sbin/mkhomedir_helper
+"
diff --git a/remote/modules/plymouth/module.build b/remote/modules/plymouth/module.build
new file mode 100644
index 00000000..67b7734e
--- /dev/null
+++ b/remote/modules/plymouth/module.build
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+fetch_source() {
+ download_untar "$REQUIRED_URL" "src/"
+}
+
+build() {
+ cd "src/$REQUIRED_VERSION"
+ pinfo "Running configure"
+ ./configure --enable-systemd-integration --disable-gtk --disable-static --prefix="$REQUIRED_PREFIX"|| perror "failed."
+ pinfo "Running make"
+ make || perror "failed"
+ pinfo "Running make install"
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "failed"
+ cd -
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/plymouth/module.conf b/remote/modules/plymouth/module.conf
new file mode 100644
index 00000000..d8827529
--- /dev/null
+++ b/remote/modules/plymouth/module.conf
@@ -0,0 +1,15 @@
+REQUIRED_VERSION="plymouth-0.8.6.1"
+REQUIRED_URL="http://www.freedesktop.org/software/plymouth/releases/${REQUIRED_VERSION}.tar.bz2"
+REQUIRED_PREFIX="/usr"
+REQUIRED_BINARIES="
+ plymouth
+ plymouthd
+"
+REQUIRED_DIRECTORIES="
+ $REQUIRED_PREFIX/bin
+ $REQUIRED_PREFIX/etc
+ $REQUIRED_PREFIX/lib
+ $REQUIRED_PREFIX/sbin
+ $REQUIRED_PREFIX/var/lib
+ $REQUIRED_PREFIX/var/spool
+"
diff --git a/remote/modules/plymouth/module.conf.debian b/remote/modules/plymouth/module.conf.debian
new file mode 100644
index 00000000..0c6e00a4
--- /dev/null
+++ b/remote/modules/plymouth/module.conf.debian
@@ -0,0 +1,7 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libpng-dev
+ libpango1.0-dev
+ libcairo-dev
+ libgtk2.0-dev
+ libdrm-dev
+"
diff --git a/remote/modules/plymouth/module.conf.opensuse b/remote/modules/plymouth/module.conf.opensuse
new file mode 100644
index 00000000..034af2ad
--- /dev/null
+++ b/remote/modules/plymouth/module.conf.opensuse
@@ -0,0 +1,7 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libpng12-devel
+ pango-devel
+ cairo-devel
+ gtk2-devel
+ libdrm-devel
+"
diff --git a/remote/modules/plymouth/module.conf.ubuntu b/remote/modules/plymouth/module.conf.ubuntu
new file mode 100644
index 00000000..0c6e00a4
--- /dev/null
+++ b/remote/modules/plymouth/module.conf.ubuntu
@@ -0,0 +1,7 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libpng-dev
+ libpango1.0-dev
+ libcairo-dev
+ libgtk2.0-dev
+ libdrm-dev
+"
diff --git a/remote/modules/polkit/module.build b/remote/modules/polkit/module.build
new file mode 100644
index 00000000..10203209
--- /dev/null
+++ b/remote/modules/polkit/module.build
@@ -0,0 +1,25 @@
+#tool/distro specific functions for fetching, building and installing dependencies
+
+
+fetch_source () {
+ pinfo "Extracting from running system..."
+}
+
+build () {
+ local COPYLIST="$MODULE_DIR/list_dpkg_output"
+ list_packet_files > "$COPYLIST"
+ [ -n "$REQUIRED_DIR_STRUCT" ] && find $REQUIRED_DIR_STRUCT -type d >> "$COPYLIST"
+ tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}"
+ local POLPATH=$(find "$MODULE_BUILD_DIR" -name polkitd -executable | head -n 1)
+ POLPATH="/${POLPATH#$MODULE_BUILD_DIR}"
+ mkdir -p "$MODULE_BUILD_DIR/etc/systemd/system" "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services" "$MODULE_BUILD_DIR/var/lib/polkit"
+ sed "s,%POLKITD%,${POLPATH},g" "templates/systemd.service" > "$MODULE_BUILD_DIR/etc/systemd/system/polkit.service" || perror "Could not generate polkit.service for systemd"
+ sed "s,%POLKITD%,${POLPATH},g" "templates/dbus.service" > "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service" || perror "Could not generate polkit.service for dbus"
+}
+
+post_copy() {
+ #Add Polkit User/Group/Shadow to Stage3.2, required on opensuse
+ pinfo "Adding polkitd user to target system..."
+ add_user "polkitd"
+}
+
diff --git a/remote/modules/polkit/module.conf b/remote/modules/polkit/module.conf
new file mode 100644
index 00000000..97d4b892
--- /dev/null
+++ b/remote/modules/polkit/module.conf
@@ -0,0 +1,13 @@
+REQUIRED_DIRECTORIES="
+ /etc/pam.d
+ /etc/polkit-1
+ /usr/bin
+ /usr/share/polkit-1
+ /etc/dbus-1/system.d
+"
+REQUIRED_FILES="
+ /usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service
+ /etc/systemd/system/polkit.service
+"
+REQUIRED_LIBRARIES="libmozjs185"
+
diff --git a/remote/modules/polkit/module.conf.debian b/remote/modules/polkit/module.conf.debian
new file mode 100644
index 00000000..5684a504
--- /dev/null
+++ b/remote/modules/polkit/module.conf.debian
@@ -0,0 +1,19 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libmozjs185-1.0
+ policykit-1
+"
+REQUIRED_CONTENT_PACKAGES="
+ libmozjs185-1.0
+ policykit-1
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib/policykit-1
+ /usr/lib/${ARCH_TRIPLET}/polkit-1
+ /var/lib/polkit-1
+"
+# Module specific: Root of dirstructs we need directly from system
+REQUIRED_DIR_STRUCT="
+ /var/lib/polkit-1
+ /etc/polkit-1
+"
+
diff --git a/remote/modules/polkit/module.conf.opensuse b/remote/modules/polkit/module.conf.opensuse
new file mode 100644
index 00000000..e7c1f369
--- /dev/null
+++ b/remote/modules/polkit/module.conf.opensuse
@@ -0,0 +1,12 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libmozjs185-1_0
+"
+REQUIRED_CONTENT_PACKAGES="
+ libmozjs185-1_0
+ polkit
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib/polkit-1
+ /var/lib/polkit
+"
+
diff --git a/remote/modules/polkit/module.conf.ubuntu b/remote/modules/polkit/module.conf.ubuntu
new file mode 100644
index 00000000..eb2f88d1
--- /dev/null
+++ b/remote/modules/polkit/module.conf.ubuntu
@@ -0,0 +1,19 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libmozjs185-1.0
+"
+REQUIRED_CONTENT_PACKAGES="
+ libmozjs185-1.0
+ policykit-1
+ policykit-desktop-privileges
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib/policykit-1
+ /usr${ARCH_LIB_DIR}/polkit-1
+ /var/lib/polkit-1
+"
+# Module specific: Root of dirstructs we need directly from system
+REQUIRED_DIR_STRUCT="
+ /var/lib/polkit-1
+ /etc/polkit-1
+"
+
diff --git a/remote/modules/printergui/module.build b/remote/modules/printergui/module.build
new file mode 100644
index 00000000..2ee49154
--- /dev/null
+++ b/remote/modules/printergui/module.build
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+fetch_source() {
+ git clone "${REQUIRED_GIT}" src
+ cd src
+ git checkout "$REQUIRED_COMMIT"
+ cd ..
+}
+
+build() {
+ local SRCDIR="${MODULE_DIR}/src/"
+ local DESTDIR="$MODULE_BUILD_DIR/opt/openslx/cups"
+
+ mkdir -p "$DESTDIR"
+ cd "$DESTDIR" || perror "Could not cd to $DESTDIR!"
+ pinfo "Running cmake"
+ cmake "$SRCDIR/" || perror "'cmake' failed (e.g. not installed)."
+ pinfo "Running make"
+ make || perror "'make' failed."
+ chmod 0700 "$DESTDIR/printpwgui" # So picky cupsd won't drop privileges to lp
+}
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/printergui/module.conf b/remote/modules/printergui/module.conf
new file mode 100644
index 00000000..17203d3e
--- /dev/null
+++ b/remote/modules/printergui/module.conf
@@ -0,0 +1,9 @@
+REQUIRED_GIT="git://git.openslx.org/openslx-ng/printergui.git"
+REQUIRED_COMMIT="HEAD"
+REQUIRED_BINARIES="
+ printergui
+ printpwgui
+"
+REQUIRED_SYSTEM_FILES="
+"
+
diff --git a/remote/modules/printergui/module.conf.opensuse b/remote/modules/printergui/module.conf.opensuse
new file mode 100644
index 00000000..2d4c7a95
--- /dev/null
+++ b/remote/modules/printergui/module.conf.opensuse
@@ -0,0 +1,7 @@
+REQUIRED_INSTALLED_PACKAGES="
+cups-devel
+libqt4-devel
+"
+REQUIRED_CONTENT_PACKAGES="
+cups-devel
+"
diff --git a/remote/modules/printergui/module.conf.ubuntu b/remote/modules/printergui/module.conf.ubuntu
new file mode 100644
index 00000000..2f679912
--- /dev/null
+++ b/remote/modules/printergui/module.conf.ubuntu
@@ -0,0 +1,7 @@
+REQUIRED_INSTALLED_PACKAGES="
+libcups2-dev
+libqt4-dev
+"
+REQUIRED_CONTENT_PACKAGES="
+libcups2-dev
+"
diff --git a/remote/modules/qemukvm/module.build b/remote/modules/qemukvm/module.build
new file mode 100644
index 00000000..6d8ad7be
--- /dev/null
+++ b/remote/modules/qemukvm/module.build
@@ -0,0 +1,16 @@
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+ list_packet_files >> "$COPYLIST"
+
+
+ tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}"
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/qemukvm/module.conf b/remote/modules/qemukvm/module.conf
new file mode 100644
index 00000000..32df73a5
--- /dev/null
+++ b/remote/modules/qemukvm/module.conf
@@ -0,0 +1,11 @@
+REQUIRED_DIRECTORIES="
+ /etc
+ /lib
+ /usr/bin
+ /usr/sbin
+ /usr/lib
+ /usr/share/lintian
+ /usr/share/qemu
+ /usr/share/seabios
+ /usr/share/vgabios
+"
diff --git a/remote/modules/qemukvm/module.conf.ubuntu b/remote/modules/qemukvm/module.conf.ubuntu
new file mode 100644
index 00000000..d0fdc5f3
--- /dev/null
+++ b/remote/modules/qemukvm/module.conf.ubuntu
@@ -0,0 +1,37 @@
+REQUIRED_INSTALLED_PACKAGES="
+ qemu
+ qemu-kvm
+"
+
+REQUIRED_CONTENT_PACKAGES="
+ qemu
+ qemu-kvm
+ ipxe-qemu
+ qemu-keymaps
+ qemu-system
+ qemu-system-arm
+ qemu-system-common
+ qemu-system-mips
+ qemu-system-misc
+ qemu-system-ppc
+ qemu-system-sparc
+ qemu-system-x86
+ qemu-user
+ qemu-utils
+ seabios
+ vgabios
+ cpu-checker
+ kvm-ipxe
+ libaio1
+ libboost-thread1.49.0
+ libfdt1
+ librados2
+ librbd1
+ libsdl1.2debian
+ libseccomp1
+ libspice-server1
+ libxen-4.2
+ libxenstore3.0
+ msr-tools
+ sharutils
+"
diff --git a/remote/modules/redsocks/module.build b/remote/modules/redsocks/module.build
new file mode 100644
index 00000000..f6a05350
--- /dev/null
+++ b/remote/modules/redsocks/module.build
@@ -0,0 +1,24 @@
+#tool/distro specific functions for fetching, building and installing dependencies
+
+
+fetch_source () {
+ mkdir -p src
+ cd src || perror "Could not cd to src"
+ if [ ! -d "redsocks" ]; then
+ git clone "$REQUIRED_GIT" "redsocks" || perror "Could not clone redoscks from github"
+ fi
+ cd redsocks || perror "Could not cd to src/redsocks"
+ git checkout "$REQUIRED_REVISION" || perror "Could not checkout revision $REQUIRED_REVISION"
+}
+
+build () {
+ cd "$MODULE_DIR/src/redsocks" || perror "src/redsocks not found"
+ make || perror "make failed."
+ mkdir -p "$MODULE_BUILD_DIR/sbin"
+ cp "redsocks" "$MODULE_BUILD_DIR/sbin/" || perror "Could not copy redsocks binary to build dir"
+}
+
+post_copy() {
+ add_user redsocks
+}
+
diff --git a/remote/modules/redsocks/module.conf b/remote/modules/redsocks/module.conf
new file mode 100644
index 00000000..62c15c70
--- /dev/null
+++ b/remote/modules/redsocks/module.conf
@@ -0,0 +1,6 @@
+REQUIRED_GIT="git://github.com/darkk/redsocks.git"
+REQUIRED_REVISION="2e3f648809e27cc19cb7a8702f19b553a7ef9a81"
+REQUIRED_BINARIES="
+ redsocks
+"
+
diff --git a/remote/modules/redsocks/module.conf.debian b/remote/modules/redsocks/module.conf.debian
new file mode 100644
index 00000000..da41b04e
--- /dev/null
+++ b/remote/modules/redsocks/module.conf.debian
@@ -0,0 +1,3 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libevent-dev
+"
diff --git a/remote/modules/redsocks/module.conf.opensuse b/remote/modules/redsocks/module.conf.opensuse
new file mode 100644
index 00000000..fcc0fb45
--- /dev/null
+++ b/remote/modules/redsocks/module.conf.opensuse
@@ -0,0 +1,3 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libevent-devel
+"
diff --git a/remote/modules/redsocks/module.conf.ubuntu b/remote/modules/redsocks/module.conf.ubuntu
new file mode 100644
index 00000000..da41b04e
--- /dev/null
+++ b/remote/modules/redsocks/module.conf.ubuntu
@@ -0,0 +1,3 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libevent-dev
+"
diff --git a/remote/modules/rsyslogd/module.build b/remote/modules/rsyslogd/module.build
new file mode 100644
index 00000000..c35d07b7
--- /dev/null
+++ b/remote/modules/rsyslogd/module.build
@@ -0,0 +1,34 @@
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+ return 0
+}
+
+post_copy() {
+
+
+ # pwd = module's build dir
+ mkdir -p "${TARGET_BUILD_DIR}"/var/spool/rsyslog
+
+ local RSL="$(find /usr/lib/ /lib/ -name rsyslog.service | head -1)"
+ [ -z "$RSL" -o ! -e "$RSL" ] && perror "rsyslog.service not found on vorlage"
+ [ ! -d "$TARGET_BUILD_DIR/etc/systemd/system" ] && mkdir -p "$TARGET_BUILD_DIR/etc/systemd/system"
+ cp -L "$RSL" "$TARGET_BUILD_DIR/etc/systemd/system/"
+ sed -i 's/\/bin\/systemctl/-\/usr\/bin\/systemctl/g' "${TARGET_BUILD_DIR}"/etc/systemd/system/rsyslog.service
+ sed -i 's/^Before=udev/#&/' "${TARGET_BUILD_DIR}"/etc/systemd/system/rsyslog.service
+
+ # activate the service
+ ln -sf rsyslog.service "${TARGET_BUILD_DIR}"/etc/systemd/system/syslog.service
+ [ ! -d "${TARGET_BUILD_DIR}"/etc/systemd/system/basic.target.wants ] && mkdir -p "${TARGET_BUILD_DIR}"/etc/systemd/system/basic.target.wants
+ ln -sf ../syslog.service "${TARGET_BUILD_DIR}"/etc/systemd/system/basic.target.wants/syslog.service
+ # TODO: more checks
+ sed -i.bak '/^After\=var-run.mount/d;/^Requires\=var-run.mount/d;/^Before\=syslog.target/d' "$TARGET_BUILD_DIR/etc/systemd/system/rsyslog.service"
+}
diff --git a/remote/modules/rsyslogd/module.conf b/remote/modules/rsyslogd/module.conf
new file mode 100644
index 00000000..ba36aadf
--- /dev/null
+++ b/remote/modules/rsyslogd/module.conf
@@ -0,0 +1,6 @@
+REQUIRED_BINARIES="
+ rsyslogd
+"
+REQUIRED_FILES="
+ /etc/rsyslog.conf
+"
diff --git a/remote/modules/rsyslogd/module.conf.debian b/remote/modules/rsyslogd/module.conf.debian
new file mode 100644
index 00000000..79aba761
--- /dev/null
+++ b/remote/modules/rsyslogd/module.conf.debian
@@ -0,0 +1,6 @@
+REQUIRED_CONTENT_PACKAGES="
+ rsyslog
+"
+REQUIRED_DIRECTORIES="
+ /usr/lib/rsyslog
+"
diff --git a/remote/modules/rsyslogd/module.conf.opensuse b/remote/modules/rsyslogd/module.conf.opensuse
new file mode 100644
index 00000000..51ce0e47
--- /dev/null
+++ b/remote/modules/rsyslogd/module.conf.opensuse
@@ -0,0 +1,9 @@
+REQUIRED_CONTENT_PACKAGES="
+ rsyslog
+"
+REQUIRED_BINARIES+="
+ rsyslog-service-prepare
+"
+REQUIRED_DIRECTORIES="
+ /usr/$LIB64/rsyslog
+"
diff --git a/remote/modules/rsyslogd/module.conf.ubuntu b/remote/modules/rsyslogd/module.conf.ubuntu
new file mode 100644
index 00000000..79aba761
--- /dev/null
+++ b/remote/modules/rsyslogd/module.conf.ubuntu
@@ -0,0 +1,6 @@
+REQUIRED_CONTENT_PACKAGES="
+ rsyslog
+"
+REQUIRED_DIRECTORIES="
+ /usr/lib/rsyslog
+"
diff --git a/remote/modules/samba/module.build b/remote/modules/samba/module.build
new file mode 100644
index 00000000..a0a60831
--- /dev/null
+++ b/remote/modules/samba/module.build
@@ -0,0 +1,26 @@
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ if [ "x$PACKET_MANAGER" == "xzypper" ]; then
+ if [ $(zypper lr | grep -ci filesystems) -eq 0 ]; then
+ zypper addrepo http://download.opensuse.org/repositories/filesystems/openSUSE_${SYS_VERSION} Filesystems
+ pinfo "Repository added: OpenSuse Build filesystems"
+ fi
+ # Ubuntu writes to /etc, Suse does not:
+ mkdir "$MODULE_BUILD_DIR"/etc/
+ cp /usr/share/doc/packages/smbnetfs/smbnetfs.conf "$MODULE_BUILD_DIR"/etc/
+ fi
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+ return 0
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/samba/module.conf b/remote/modules/samba/module.conf
new file mode 100644
index 00000000..00063187
--- /dev/null
+++ b/remote/modules/samba/module.conf
@@ -0,0 +1,24 @@
+REQUIRED_BINARIES="
+ smbd
+ nmbd
+ smbclient
+ winbindd
+ smbnetfs
+ fusermount
+ keyctl
+ request-key
+ key.dns_resolver
+"
+REQUIRED_FILES="
+ /etc/smbnetfs.conf
+ /etc/request-key.conf
+ /etc/request-key.d
+"
+# TODO dont copy all the binaries, strip the list down.
+REQUIRED_DIRECTORIES="
+ /usr/bin
+"
+# TODO check if the /var/lib/samba/*.tdg can be generated by mltk.
+REQUIRED_SYSTEM_FILES="
+ /var/lib/samba
+"
diff --git a/remote/modules/samba/module.conf.opensuse b/remote/modules/samba/module.conf.opensuse
new file mode 100644
index 00000000..fd06e50a
--- /dev/null
+++ b/remote/modules/samba/module.conf.opensuse
@@ -0,0 +1,24 @@
+REQUIRED_INSTALLED_PACKAGES="
+ samba
+ samba-client
+ samba-winbind
+ krb5-client
+ cifs-utils
+ smbnetfs
+ fuse
+ keyutils
+"
+REQUIRED_CONTENT_PACKAGES="
+ samba
+ samba-client
+ samba-winbind
+ krb5-client
+ cifs-utils
+ smbnetfs
+ fuse
+ keyutils
+"
+
+# This is just a list for grep excludes used in samba.build opensuse branch
+# Please use pipe symbol and backslash (\|) as separator as being used in grep
+REQUIRED_PACKET_FILES_BLACKLIST="/etc/samba/smbpasswd\|/ding/dong"
diff --git a/remote/modules/samba/module.conf.ubuntu b/remote/modules/samba/module.conf.ubuntu
new file mode 100644
index 00000000..20bb46ba
--- /dev/null
+++ b/remote/modules/samba/module.conf.ubuntu
@@ -0,0 +1,20 @@
+REQUIRED_INSTALLED_PACKAGES="
+ samba
+ smbclient
+ winbind
+ krb5-user
+ cifs-utils
+ smbnetfs
+ fuse
+ keyutils
+"
+REQUIRED_CONTENT_PACKAGES="
+ samba
+ smbclient
+ winbind
+ krb5-user
+ cifs-utils
+ smbnetfs
+ fuse
+ keyutils
+"
diff --git a/remote/modules/smartctl/module.build b/remote/modules/smartctl/module.build
new file mode 100644
index 00000000..435a7b10
--- /dev/null
+++ b/remote/modules/smartctl/module.build
@@ -0,0 +1,13 @@
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ list_packet_files > "$COPYLIST"
+ tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}"
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/smartctl/module.conf b/remote/modules/smartctl/module.conf
new file mode 100644
index 00000000..9ea1ed03
--- /dev/null
+++ b/remote/modules/smartctl/module.conf
@@ -0,0 +1,5 @@
+REQUIRED_BINARIES="
+ smartctl
+"
+REQUIRED_LIBRARIES=""
+REQUIRED_DIRECTORIES=""
diff --git a/remote/modules/smartctl/module.conf.opensuse b/remote/modules/smartctl/module.conf.opensuse
new file mode 100644
index 00000000..d699f2f0
--- /dev/null
+++ b/remote/modules/smartctl/module.conf.opensuse
@@ -0,0 +1,6 @@
+REQUIRED_CONTENT_PACKAGES="
+ smartmontools
+"
+REQUIRED_INSTALLED_PACKAGES="
+ smartmontools
+"
diff --git a/remote/modules/smartctl/module.conf.ubuntu b/remote/modules/smartctl/module.conf.ubuntu
new file mode 100644
index 00000000..d699f2f0
--- /dev/null
+++ b/remote/modules/smartctl/module.conf.ubuntu
@@ -0,0 +1,6 @@
+REQUIRED_CONTENT_PACKAGES="
+ smartmontools
+"
+REQUIRED_INSTALLED_PACKAGES="
+ smartmontools
+"
diff --git a/remote/modules/smbclient/module.build b/remote/modules/smbclient/module.build
new file mode 100644
index 00000000..dc28dd26
--- /dev/null
+++ b/remote/modules/smbclient/module.build
@@ -0,0 +1,20 @@
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+ local BIN_LOCATION="$(which smbspool)"
+ if [ ! -z "${BIN_LOCATION}" -a -e "${BIN_LOCATION}" ]; then
+ ln -sf "${BIN_LOCATION}" "${MODULE_BUILD_DIR}/usr/lib/cups/backend/smb"
+ fi
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/modules/smbclient/module.conf b/remote/modules/smbclient/module.conf
new file mode 100644
index 00000000..460c57b5
--- /dev/null
+++ b/remote/modules/smbclient/module.conf
@@ -0,0 +1,10 @@
+REQUIRED_BINARIES="
+ smbspool
+ smbcacls
+ rpcclient
+ smbcquotas
+ smbget
+ smbclient
+ smbtree
+ smbtar
+"
diff --git a/remote/modules/smbclient/module.conf.opensuse b/remote/modules/smbclient/module.conf.opensuse
new file mode 100644
index 00000000..f524d100
--- /dev/null
+++ b/remote/modules/smbclient/module.conf.opensuse
@@ -0,0 +1,9 @@
+REQUIRED_INSTALLED_PACKAGES="
+ samba-client
+"
+REQUIRED_CONTENT_PACKAGES="
+ samba-client
+"
+REQUIRED_FILES="
+ /usr/lib/cups/backend/smb
+"
diff --git a/remote/modules/smbclient/module.conf.ubuntu b/remote/modules/smbclient/module.conf.ubuntu
new file mode 100644
index 00000000..4b33f4bd
--- /dev/null
+++ b/remote/modules/smbclient/module.conf.ubuntu
@@ -0,0 +1,9 @@
+REQUIRED_INSTALLED_PACKAGES="
+ smbclient
+"
+REQUIRED_CONTENT_PACKAGES="
+ smbclient
+"
+REQUIRED_FILES="
+ /usr/lib/cups/backend/smb
+"
diff --git a/remote/modules/splash-openslx/module.build b/remote/modules/splash-openslx/module.build
new file mode 100644
index 00000000..ccb7c4e1
--- /dev/null
+++ b/remote/modules/splash-openslx/module.build
@@ -0,0 +1,13 @@
+
+fetch_source () {
+ :
+}
+
+build () {
+ :
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/splash-openslx/module.conf b/remote/modules/splash-openslx/module.conf
new file mode 100644
index 00000000..6778a258
--- /dev/null
+++ b/remote/modules/splash-openslx/module.conf
@@ -0,0 +1 @@
+# (void)
diff --git a/remote/modules/sshd/module.build b/remote/modules/sshd/module.build
new file mode 100644
index 00000000..ebf42c12
--- /dev/null
+++ b/remote/modules/sshd/module.build
@@ -0,0 +1,20 @@
+fetch_source() {
+ :
+}
+
+build() {
+
+ local BIN_LOCATION="$(which sshd)"
+ [ ! -z "${BIN_LOCATION}" ] && BIN_LOCATION=$(readlink -f "$BIN_LOCATION")
+ if [ ! -z "${BIN_LOCATION}" -a -e "${BIN_LOCATION}" ]; then
+ tarcopy "${BIN_LOCATION}" "${MODULE_BUILD_DIR}"
+ else
+ perror "'sshd' not found on the system! Please install it."
+ fi
+}
+
+post_copy() {
+ mkdir -p "${TARGET_BUILD_DIR}/var/lib/empty" # suse
+
+ chmod go-rwx "${TARGET_BUILD_DIR}/etc/ssh/"* # no space, " before *
+}
diff --git a/remote/modules/sshd/module.conf b/remote/modules/sshd/module.conf
new file mode 100644
index 00000000..25793c72
--- /dev/null
+++ b/remote/modules/sshd/module.conf
@@ -0,0 +1,3 @@
+REQUIRED_BINARIES="sshd"
+REQUIRED_LIBRARIES=""
+REQUIRED_DIRECTORIES=""
diff --git a/remote/modules/swiss/module.build b/remote/modules/swiss/module.build
new file mode 100644
index 00000000..1f016f6b
--- /dev/null
+++ b/remote/modules/swiss/module.build
@@ -0,0 +1,55 @@
+fetch_source() {
+ :
+}
+
+build() {
+ CH_LOCALES="de_CH.UTF-8 fr_CH.UTF-8 it_CH.UTF-8"
+
+ # Debian-like
+ if [ -e "/etc/locale.gen" ] && ! grep -q -E '^\s*de_CH\.UTF-8' "/etc/locale.gen"; then
+ pinfo "Generating locales..."
+ echo 'de_CH.UTF-8 UTF-8' >> "/etc/locale.gen"
+ echo 'fr_CH.UTF-8 UTF-8' >> "/etc/locale.gen"
+ echo 'it_CH.UTF-8 UTF-8' >> "/etc/locale.gen"
+ locale-gen || perror "Could not generate locales (debian style)"
+ fi
+
+ # Ubuntu's version
+ if [ -d "/var/lib/locales/supported.d" ] && [ ! -d /usr/lib/locale/de_CH.utf8 ]; then
+ pinfo "Generating locales..."
+ grep -q -E -r '^\s*de_CH\.UTF-8' "/var/lib/locales/supported.d" || echo 'de_CH.UTF-8 UTF-8' >> "/var/lib/locales/supported.d/openslx"
+ locale-gen --no-archive --purge "de_CH.UTF-8" || perror "Could not generate locales (ubuntu style)"
+ fi
+ if [ -d "/var/lib/locales/supported.d" ] && [ ! -d /usr/lib/locale/fr_CH.utf8 ]; then
+ pinfo "Generating locales..."
+ grep -q -E -r '^\s*fr_CH\.UTF-8' "/var/lib/locales/supported.d" || echo 'fr_CH.UTF-8 UTF-8' >> "/var/lib/locales/supported.d/openslx"
+ locale-gen --no-archive "fr_CH.UTF-8" || perror "Could not generate locales (ubuntu style)"
+ fi
+ if [ -d "/var/lib/locales/supported.d" ] && [ ! -d /usr/lib/locale/it_CH.utf8 ]; then
+ pinfo "Generating locales..."
+ grep -q -E -r '^\s*it_CH\.UTF-8' "/var/lib/locales/supported.d" || echo 'it_CH.UTF-8 UTF-8' >> "/var/lib/locales/supported.d/openslx"
+ locale-gen --no-archive "it_CH.UTF-8" || perror "Could not generate locales (ubuntu style)"
+ fi
+
+
+ # Put everything we build or get from the system in build dir
+ local FILELIST="$MODULE_DIR/list_copy_build"
+ rm -f "$FILELIST"
+
+ # Copy required directories from source system to build dir
+ for FILE in ${REQUIRED_DIRECTORIES}; do
+ [ ! -d "${FILE}" ] && perror "Missing required directory $FILE"
+ echo ${FILE} >> "${FILELIST}"
+ done
+
+ # Done collecting file and directory names, copy everything
+ tarcopy "$(sort -u "$FILELIST")" "$MODULE_BUILD_DIR"
+
+}
+
+post_copy() {
+ for i in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION; do
+ add_env $i de_CH.UTF-8 || perror "$i: add_env function failed."
+ done
+}
+
diff --git a/remote/modules/swiss/module.conf b/remote/modules/swiss/module.conf
new file mode 100644
index 00000000..e2f82123
--- /dev/null
+++ b/remote/modules/swiss/module.conf
@@ -0,0 +1,5 @@
+REQUIRED_BINARIES=""
+REQUIRED_FILES=""
+REQUIRED_DIRECTORIES="
+ /usr/share/X11
+"
diff --git a/remote/modules/swiss/module.conf.debian b/remote/modules/swiss/module.conf.debian
new file mode 100644
index 00000000..a43faea2
--- /dev/null
+++ b/remote/modules/swiss/module.conf.debian
@@ -0,0 +1,10 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libX11-data
+"
+REQUIRED_CONTENT_PACKAGES="
+ libX11-data
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib/locale
+"
+
diff --git a/remote/modules/swiss/module.conf.opensuse b/remote/modules/swiss/module.conf.opensuse
new file mode 100644
index 00000000..1311ac97
--- /dev/null
+++ b/remote/modules/swiss/module.conf.opensuse
@@ -0,0 +1,14 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libX11-data
+ glibc-locale
+"
+REQUIRED_CONTENT_PACKAGES="
+ libX11-data
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib/locale/de_DE.utf8
+ /usr/lib/locale/de_CH.utf8
+"
+REQUIRED_BINARIES=""
+REQUIRED_FILES=""
+
diff --git a/remote/modules/swiss/module.conf.scientific b/remote/modules/swiss/module.conf.scientific
new file mode 100644
index 00000000..88ac0d27
--- /dev/null
+++ b/remote/modules/swiss/module.conf.scientific
@@ -0,0 +1,8 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libX11-data
+ glibc-common
+"
+REQUIRED_CONTENT_PACKAGES="
+ libX11-data"
+REQUIRED_BINARIES=""
+REQUIRED_FILES=""
diff --git a/remote/modules/swiss/module.conf.ubuntu b/remote/modules/swiss/module.conf.ubuntu
new file mode 100644
index 00000000..69694914
--- /dev/null
+++ b/remote/modules/swiss/module.conf.ubuntu
@@ -0,0 +1,17 @@
+REQUIRED_INSTALLED_PACKAGES="
+ libx11-data
+ language-pack-de
+ language-pack-fr
+ language-pack-it
+ language-pack-en
+"
+REQUIRED_CONTENT_PACKAGES="
+ libx11-data
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib/locale/C.UTF-8
+ /usr/lib/locale/de_CH.utf8
+ /usr/lib/locale/fr_CH.utf8
+ /usr/lib/locale/it_CH.utf8
+"
+
diff --git a/remote/modules/systemd/module.build b/remote/modules/systemd/module.build
new file mode 100644
index 00000000..95576548
--- /dev/null
+++ b/remote/modules/systemd/module.build
@@ -0,0 +1,72 @@
+#tool/distro specific functions for fetching, building and installing dependencies
+
+fetch_source () {
+ # systemd
+ download_untar "$REQUIRED_URL" "src/"
+ # Patch PATH, HOME, USER environment
+ # TODO: Newer systemd versions support DefaultEnvironment=xxx in /etc/systemd/system.conf
+ # However, there were lots of changes after systemd 204, so we didn't update yet
+ # See http://cgit.freedesktop.org/systemd/systemd/tree/NEWS for changes.
+ patch -p0 src/systemd-*/src/core/main.c < systemd-openslx.patch || perror "Failed to apply openslx systemd patch."
+
+ # libkmod
+ download_untar "$REQUIRED_LIBKMOD_URL" "src/"
+}
+
+build () {
+ #build libkmod
+ pinfo "Building libkmod"
+ cd "${MODULE_DIR}/src/$REQUIRED_LIBKMOD_VERSION"
+ ./configure || perror "./configure kmod failed."
+ make || perror "kmod make failed."
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "kmod make install failed."
+ cd - &> /dev/null
+
+ #build systemd
+ pinfo "Building systemd"
+ cd "${MODULE_DIR}/src/$REQUIRED_VERSION"
+ pinfo "calling configure"
+
+ # Save potentially pre-used paths/flages
+ OLDLDFLAGS="$LDFLAGS"
+ OLDCPPFLAGS="$CPPFLAGS"
+ OLDPKG_CONFIG_PATH="$PKG_CONFIG_PATH"
+ OLDLD_LIBRARY_PATH="$LD_LIBRARY_PATH"
+
+ export LDFLAGS="$LDFLAGS -L${MODULE_BUILD_DIR}/usr/lib"
+ export CPPFLAGS="-I${MODULE_BUILD_DIR}/usr/include"
+ export PKG_CONFIG_PATH="${MODULE_BUILD_DIR}/usr/lib64/pkgconfig:${MODULE_BUILD_DIR}/usr/lib/pkgconfig"
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${MODULE_BUILD_DIR}/usr/lib:${MODULE_BUILD_DIR}/usr/lib64"
+
+ ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no --disable-nls \
+ --disable-microhttpd --disable-bootchart --disable-quotacheck --disable-hostnamed --disable-timedated \
+ --disable-localed --disable-coredump --disable-keymap --without-python --enable-blkid --enable-acl --enable-pam \
+ --enable-kmod \
+ || perror "configure failed."
+ pinfo "calling make"
+ make || perror "make failed."
+ pinfo "calling make install"
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "make install failed."
+ cd - &> /dev/null
+
+ # Restore used flags/paths:
+ export LDFLAGS="$OLDLDFLAGS"
+ export CPPFLAGS="$OLDCPPFLAGS"
+ export PKG_CONFIG_PATH="$OLDPKG_CONFIG_PATH"
+ export LD_LIBRARY_PATH="$OLDLD_LIBRARY_PATH"
+}
+
+post_copy() {
+ #old agetty version doesn't support --noclear option in getty service
+ if [ "x$(dpkg -s util-linux | grep Version: | cut -d' ' -f2)" == "x2.19.1-2ubuntu3" ]; then
+ sed -i "s/ExecStart=-\/sbin\/agetty --noclear %I 38400 linux/ExecStart=-\/sbin\/agetty %I 38400 linux/g" "${TARGET_BUILD_DIR}/usr/lib/systemd/system/getty@.service"
+ fi
+
+ # add pam_systemd.so to pam modules directory
+ if [ -e "${MODULE_BUILD_DIR}/usr/lib/security/pam_systemd.so" ]; then
+ cp "${MODULE_BUILD_DIR}/usr/lib/security/pam_systemd.so" "${TARGET_BUILD_DIR}/lib/security/"
+ else
+ pdebug "No such file: ${MODULE_BUILD_DIR}/usr/lib/security/pam_systemd.so"
+ fi
+}
+
diff --git a/remote/modules/systemd/module.build.scientific b/remote/modules/systemd/module.build.scientific
new file mode 100644
index 00000000..12170d81
--- /dev/null
+++ b/remote/modules/systemd/module.build.scientific
@@ -0,0 +1,178 @@
+#tool/distro specific functions for fetching, building and installing dependencies
+
+# Please read systemd.build.scientific.README before using this script!
+
+fetch_source () {
+ download_untar "$REQUIRED_URL" "src/"
+ download_untar "$REQUIRED_LIBKMOD_URL" "src/"
+
+ # Another nice hack for Scientific Linux - experimental.
+ if [ "$SYS_DISTRIBUTION" == "scientific" ]; then
+ download_untar "$REQUIRED_UTILLINUX_URL" "src/" || perror "Cannot download util-linux!"
+ download_untar "$REQUIRED_M4_URL" "src/" || perror "Cannot download m4 version $REQUIRED_AUTOMAKE_VERSION!"
+ download_untar "$REQUIRED_AUTOCONF_URL" "src/" || perror "Cannot download autoconf version $REQUIRED_AUTOCONF_VERSION!"
+ download_untar "$REQUIRED_AUTOMAKE_URL" "src/" || perror "Cannot download automake version $REQUIRED_AUTOMAKE_VERSION!"
+ download_untar "$REQUIRED_DBUS_URL" "src/" || perror "Cannot download dbus version $REQUIRED_DBUS_VERSION!"
+ fi
+
+ # Patch PATH environment
+ sed -s -i -r 's#"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin(:/sbin:/bin)?"#& ":/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin"#g' src/systemd-*/src/core/main.c
+ sed -s -i -r 's#"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"#& ":/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin"#g' src/systemd-*/src/nspawn/nspawn.c
+}
+
+build () {
+
+ config_systemd () {
+ pinfo "Building systemd"
+ cd "${MODULE_DIR}/src/$REQUIRED_VERSION"
+ pinfo "calling configure"
+ ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no --disable-nls \
+ --disable-microhttpd --disable-bootchart --disable-quotacheck --disable-hostnamed --disable-timedated \
+ --disable-localed --disable-coredump --disable-keymap --without-python --enable-blkid --enable-acl --enable-pam \
+ || perror "configure systemd failed."
+ }
+
+ #build libkmod
+ pinfo "Building libkmod"
+ cd "${MODULE_DIR}/src/$REQUIRED_LIBKMOD_VERSION"
+ ./configure || perror "./configure kmod failed."
+ make || perror "kmod make failed."
+ make install || perror "kmod make install failed."
+ cd - &> /dev/null
+
+ # Scientific Linux specials
+ if [ "$SYS_DISTRIBUTION" == "scientific" ]; then
+ pinfo "Scientific Linux detected ..." # Freude, schöner Götterfunke!
+
+ # Some path mainpulations for following utilities, save some envvars for later restituting
+ OLDPATH=$PATH
+ export PATH="${MODULE_BUILD_DIR}/sbin:${MODULE_BUILD_DIR}/usr/local/bin/:$PATH" # for stuff installed at BUILD_DIR.
+ OLDPKG_CONFIG_PATH="$PKG_CONFIG_PATH"
+ OLDCPPFLAGS="$CPPFLAGS"
+ OLDLDFLAGS="$LDFLAGS"
+
+ # Utillinux stuff
+ pinfo "Building util-linux"
+ cd "${MODULE_DIR}/src/$REQUIRED_UTILLINUX_VERSION"
+ ./configure --disable-libuuid --disable-libmount --without-ncurses \
+ --disable-mount --disable-losetup --disable-cytune --disable-fsck --disable-partx --disable-uuidd \
+ --disable-mountpoint --disable-fallocate --disable-unshare --disable-nsenter --disable-setpriv \
+ --disable-eject --disable-agetty --disable-cramfs --disable-bfs --disable-fdformat --disable-hwclock \
+ --disable-wdctl --disable-switch_root --disable-pivot_root --disable-kill --disable-utmpdump --disable-raw \
+ --disable-rename --disable-login --disable-sulogin --disable-su --disable-runuser --disable-ul --disable-more \
+ --disable-pg --disable-schedutils --disable-wall --disable-bash-completion \
+ || perror "./configure util-linux failed."
+ make || perror "util-linux make failed."
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "util-linux make install failed."
+ cd - &> /dev/null
+
+ # Let's have some starting fun with m4, as we want systemd, which wants automake 1.13, which wants autoconf,
+ # which wants m4 ...
+ pinfo "Building m4 Version $REQUIRED_M4_VERSION."
+ cd "${MODULE_DIR}/src/$REQUIRED_M4_VERSION"
+ ./configure || perror "./configure m4 failed."
+ make || perror "m4 make failed."
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "m4 make install failed."
+ cd - &> /dev/null
+
+ # And have some more fun with autoconf, chain see above:
+ pinfo "Building autoconf Version $REQUIRED_AUTOCONF_VERSION."
+ cd "${MODULE_DIR}/src/$REQUIRED_AUTOCONF_VERSION"
+ ./configure || perror "./configure autoconf failed."
+ make || perror "autoconf make failed."
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "autoconf make install failed."
+ cd - &> /dev/null
+
+ # Now let's have some fun with automake, as config.log/automake will whine later about SL's automake 1.11:
+ # AUTOMAKE='${SHELL} [...] missing automake-1.13'. We use a newer automake than 1.11, if we are at it.
+ # Link fun, as configure searches in /usr/local/bin, ignores PATH above, also 'share':
+ ln -s "${MODULE_BUILD_DIR}/usr/local/bin/autom4te" /usr/local/bin/autom4te
+ ln -s "${MODULE_BUILD_DIR}/usr/local/share/autoconf" /usr/local/share/autoconf
+ # ... and manipulate perl library path, as else the libs will not be found by (system) perl:
+ OLDPERL5LIB="$PERL5LIB"
+ export PERL5LIB="${MODULE_BUILD_DIR}/usr/local/share/autoconf/:$PERL5LIB"
+
+ pinfo "Building automake Version $REQUIRED_AUTOMAKE_VERSION."
+ cd "${MODULE_DIR}/src/$REQUIRED_AUTOMAKE_VERSION"
+ ./configure || perror "./configure automake failed."
+ make || perror "automake make failed."
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "automake make install failed."
+ cd - &> /dev/null
+
+ # We are having so much compiling fun, why leave out dbus, then?
+ pinfo "Building dbus Version $REQUIRED_AUTOMAKE_VERSION."
+ cd "${MODULE_DIR}/src/$REQUIRED_DBUS_VERSION"
+ ./configure || perror "./configure dbus failed."
+ make || perror "dbus make failed."
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "automake make install failed."
+ cd - &> /dev/null
+
+ # patching configure for Scientific Linux - cave - ugly hack!
+ # pinfo "Scientific Linux detected; patching systemd/configure..."
+ # cd "${MODULE_DIR}/src/$REQUIRED_VERSION"
+ # sed 's/dbus-1 >= 1.3.2/dbus-1 >= 1.2.24/g' configure > configure.patched
+ # mv configure configure.orig
+ # mv configure.patched configure
+ # chmod +x configure
+
+ # For compiling systemd later
+ export PKG_CONFIG_PATH="${MODULE_BUILD_DIR}/usr/lib/pkgconfig/:${MODULE_BUILD_DIR}/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
+ export CPPFLAGS="$CPPFLAGS -I${MODULE_BUILD_DIR}/usr/include/ -I${MODULE_BUILD_DIR}/usr/local/include/ -I${MODULE_BUILD_DIR}/usr/local/include/dbus-1.0 -I${MODULE_BUILD_DIR}/usr/local/lib/dbus-1.0/include/"
+ export LDFLAGS="$LDFLAGS -L${MODULE_BUILD_DIR}/usr/lib/ -L${MODULE_BUILD_DIR}/usr/local/lib/ -ldl"
+ ln -s ${MODULE_BUILD_DIR}/usr/local/include/dbus-1.0 /usr/local/include/dbus-1.0
+ ln -s ${MODULE_BUILD_DIR}/usr/local/lib/dbus-1.0 /usr/local/lib/dbus-1.0
+ cd - &> /dev/null
+
+ config_systemd
+
+ # ... and tidy our manipulations with path, perllib, links etc.
+ export PERL5LIB="$OLDPERL5LIB"
+ export PATH="$OLDPATH"
+ unlink /usr/local/bin/autom4te
+ unlink /usr/local/share/autoconf
+ unlink /usr/local/lib/dbus-1.0
+ unlink /usr/local/include/dbus-1.0
+ else
+ config_systemd # Non-Scientific-Linux branch
+ fi
+
+ pinfo "calling make"
+ make || perror "systemd make failed."
+ pinfo "calling make install"
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "systemd make install failed."
+ cd - &> /dev/null
+
+
+ # Delete unneeded services
+ pinfo "Deleting unneeded services"
+ local SERVICE=
+ local OTHER=
+ for SERVICE in $REQUIRED_DISABLED_SERVICES; do
+ find "${MODULE_BUILD_DIR}" -name "$SERVICE" -exec rm -r {} \;
+ for OTHER in $(grep -l -r "$SERVICE" "$MODULE_BUILD_DIR/usr/lib/systemd/system"); do
+ sed -i -r "s#\s*$SERVICE\s*# #g" "$OTHER"
+ done
+ done
+}
+
+post_copy() {
+ # dont clear systemd log at startup
+ sed -i "s/TTYVTDisallocate=yes/TTYVTDisallocate=no/g" "${TARGET_BUILD_DIR}/usr/lib/systemd/system/getty@.service"
+
+ #old agetty version doesn't support --noclear option in getty service
+ if [ "x$(dpkg -s util-linux | grep Version: | cut -d' ' -f2)" == "x2.19.1-2ubuntu3" ];
+ then
+ sed -i.bak "s/ExecStart=-\/sbin\/agetty --noclear %I 38400 linux/ExecStart=-\/sbin\/agetty %I 38400 linux/g" "${TARGET_BUILD_DIR}/usr/lib/systemd/system/getty@.service"
+ fi
+
+ # add nfs to modules-load list
+ echo "nfs" > "${TARGET_BUILD_DIR}/etc/modules-load.d/nfs.conf"
+
+ # add pam_systemd.so to pam modules directory
+ if [ -e "${MODULE_BUILD_DIR}/usr/lib/security/pam_systemd.so" ]; then
+ cp "${MODULE_BUILD_DIR}/usr/lib/security/pam_systemd.so" "${TARGET_BUILD_DIR}/lib/security/"
+ else
+ pdebug "No such file: ${MODULE_BUILD_DIR}/usr/lib/security/pam_systemd.so"
+ fi
+}
+
diff --git a/remote/modules/systemd/module.build.scientific.README b/remote/modules/systemd/module.build.scientific.README
new file mode 100644
index 00000000..bad5a2d4
--- /dev/null
+++ b/remote/modules/systemd/module.build.scientific.README
@@ -0,0 +1,11 @@
+Building systemd under Scientific Linux 6.4
+
+Unfortunately this is not possible, as, at the end of a long chain
+of prerequisites (compiling autoconf, automake, m4, utillinux (blkid),
+dbus the last requisite cannot be met:
+udev-builtin-input_id.c:166: error: 'BTN_TRIGGER_HAPPY' undeclared.
+
+This 'BTN_TRIGGER_HAPPY' should be provided by kernel headers, but seems
+to be intruduced in the headers of kernel 2.6.34 (linux/input.h).
+
+Scientific Linux uses 2.6.32.
diff --git a/remote/modules/systemd/module.conf b/remote/modules/systemd/module.conf
new file mode 100644
index 00000000..4ca11365
--- /dev/null
+++ b/remote/modules/systemd/module.conf
@@ -0,0 +1,65 @@
+REQUIRED_VERSION="systemd-204"
+REQUIRED_URL="http://www.freedesktop.org/software/systemd/${REQUIRED_VERSION}.tar.xz"
+REQUIRED_LIBKMOD_VERSION="kmod-14"
+REQUIRED_LIBKMOD_URL="http://www.kernel.org/pub/linux/utils/kernel/kmod/${REQUIRED_LIBKMOD_VERSION}.tar.gz"
+REQUIRED_BINARIES="
+ journalctl
+ loginctl
+ systemctl
+ systemd-analyze
+ systemd-ask-password
+ systemd-cat
+ systemd-cgls
+ systemd-cgtop
+ systemd-delta
+ systemd-detect-virt
+ systemd-inhibit
+ systemd-machine-id-setup
+ systemd-notify
+ systemd-nspawn
+ systemd-stdio-bridge
+ systemd-tmpfiles
+ systemd-tty-ask-password-agent
+ udevadm
+ systemd
+ systemd-ac-power
+ systemd-binfmt
+ systemd-cgroups-agent
+ systemd-fsck
+ systemd-initctl
+ systemd-journald
+ systemd-logind
+ systemd-modules-load
+ systemd-multi-seat-x
+ systemd-random-seed
+ systemd-readahead
+ systemd-remount-fs
+ systemd-reply-password
+ systemd-shutdown
+ systemd-shutdownd
+ systemd-sleep
+ systemd-sysctl
+ systemd-timestamp
+ systemd-udevd
+ systemd-update-utmp
+ systemd-user-sessions
+ systemd-vconsole-setup
+ systemd-fstab-generator
+ systemd-getty-generator
+ systemd-rc-local-generator
+ systemd-system-update-generator
+ accelerometer
+ ata_id
+ cdrom_id
+ collect
+ mtd_probe
+ scsi_id
+ v4l_id"
+REQUIRED_DIRECTORIES="
+ /etc
+ /usr/include
+ /usr/share/dbus-1
+ /usr/share/polkit-1
+ /usr/lib/udev
+ /usr/lib/tmpfiles.d
+"
diff --git a/remote/modules/systemd/module.conf.debian b/remote/modules/systemd/module.conf.debian
new file mode 100644
index 00000000..2768b51c
--- /dev/null
+++ b/remote/modules/systemd/module.conf.debian
@@ -0,0 +1,13 @@
+REQUIRED_INSTALLED_PACKAGES="
+ intltool
+ gperf
+ dbus
+ pkg-config
+ libcap-dev
+ libudev-dev
+ libdbus-1-dev
+ xsltproc
+ libblkid-dev
+ libacl1-dev
+ libpam-dev
+"
diff --git a/remote/modules/systemd/module.conf.opensuse b/remote/modules/systemd/module.conf.opensuse
new file mode 100644
index 00000000..9326a7dc
--- /dev/null
+++ b/remote/modules/systemd/module.conf.opensuse
@@ -0,0 +1,11 @@
+REQUIRED_INSTALLED_PACKAGES="
+ intltool
+ gperf
+ pkg-config
+ libcap-devel
+ libudev-devel
+ dbus-1-devel
+ libxslt-tools
+ libblkid-devel
+ libacl-devel
+"
diff --git a/remote/modules/systemd/module.conf.scientific b/remote/modules/systemd/module.conf.scientific
new file mode 100644
index 00000000..54e62b96
--- /dev/null
+++ b/remote/modules/systemd/module.conf.scientific
@@ -0,0 +1,37 @@
+REQUIRED_VERSION="systemd-204"
+REQUIRED_URL="http://www.freedesktop.org/software/systemd/${REQUIRED_VERSION}.tar.xz"
+
+REQUIRED_LIBKMOD_VERSION="kmod-12"
+REQUIRED_LIBKMOD_URL="http://www.kernel.org/pub/linux/utils/kernel/kmod/${REQUIRED_LIBKMOD_VERSION}.tar.gz"
+
+REQUIRED_UTILLINUX_VERSION="util-linux-2.23"
+REQUIRED_UTILLINUX_URL="ftp://ftp.kernel.org/pub/linux/utils/util-linux/v${REQUIRED_UTILLINUX_VERSION}/util-linux-${REQUIRED_UTILLINUX_VERSION}.tar.xz"
+
+REQUIRED_M4_VERSION="m4-1.4.16"
+REQUIRED_M4_URL="ftp://ftp.gnu.org/gnu/m4/${REQUIRED_M4_VERSION}.tar.xz"
+
+REQUIRED_AUTOCONF_VERSION="autoconf-2.69"
+REQUIRED_AUTOCONF_URL="ftp://ftp.gnu.org/gnu/autoconf/${REQUIRED_AUTOCONF_VERSION}.tar.xz"
+
+REQUIRED_AUTOMAKE_VERSION="automake-1.13"
+REQUIRED_AUTOMAKE_URL="ftp://ftp.gnu.org/gnu/automake/${REQUIRED_AUTOMAKE_VERSION}.tar.xz"
+
+REQUIRED_DBUS_VERSION="dbus-1.6.8"
+REQUIRED_DBUS_URL="http://dbus.freedesktop.org/releases/dbus/${REQUIRED_DBUS_VERSION}.tar.gz"
+
+
+
+REQUIRED_INSTALLED_PACKAGES="
+ intltool
+ gperf
+ pkgconfig
+ libcap-devel
+ libudev-devel
+ dbus-devel
+ libxslt
+ libblkid-devel
+ libacl-devel
+ pam-devel
+ glib2-devel
+ expat-devel
+"
diff --git a/remote/modules/systemd/module.conf.ubuntu b/remote/modules/systemd/module.conf.ubuntu
new file mode 100644
index 00000000..2768b51c
--- /dev/null
+++ b/remote/modules/systemd/module.conf.ubuntu
@@ -0,0 +1,13 @@
+REQUIRED_INSTALLED_PACKAGES="
+ intltool
+ gperf
+ dbus
+ pkg-config
+ libcap-dev
+ libudev-dev
+ libdbus-1-dev
+ xsltproc
+ libblkid-dev
+ libacl1-dev
+ libpam-dev
+"
diff --git a/remote/modules/udisks/module.build b/remote/modules/udisks/module.build
new file mode 100644
index 00000000..ab9df016
--- /dev/null
+++ b/remote/modules/udisks/module.build
@@ -0,0 +1,53 @@
+
+fetch_source () {
+ :
+}
+
+build () {
+ COPYLIST="list_dpkg_output"
+ rm -f "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "$MODULE_BUILD_DIR"
+ if [ -d "$MODULE_BUILD_DIR/lib/udev" ]; then
+ cp -a "$MODULE_BUILD_DIR/lib/udev" "$MODULE_BUILD_DIR/usr/lib/" || perror "Could not move /lib/udev to /usr/lib/udev"
+ fi
+ mkdir -p "$MODULE_BUILD_DIR/etc/systemd/system/basic.target.wants" "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services"
+ local FOUND=no
+ local BINARY=$(find "$MODULE_BUILD_DIR" -name udisksd -executable | head -n 1)
+ [ -z "$BINARY" ] && BINARY=$(find "$MODULE_BUILD_DIR" -name udisks2d -executable | head -n 1)
+ [ -z "$BINARY" ] && BINARY=$(find "$MODULE_BUILD_DIR" -name udisksd2 -executable | head -n 1)
+ VER=none
+ if [ -n "$BINARY" ]; then
+ VER=udisks
+ [[ "$BINARY" == *udisks2* || -d "$MODULE_BUILD_DIR/usr/lib/udisks2" ]] && VER=udisks2
+ create_udisks_service "$VER" "$BINARY"
+ FOUND=yes
+ fi
+ if [ "$VER" != "udisks" ]; then
+ BINARY=$(find "$MODULE_BUILD_DIR" -name udisks-daemon -executable | head -n 1)
+ [ "$VER" == "none" -a -z "$BINARY" ] && perror "Could not determine the udisks(1/2) daemon binary from inspecting $MODULE_BUILD_DIR"
+ [ -n "$BINARY" ] && create_udisks_service "udisks" "$BINARY"
+ fi
+}
+
+post_copy () {
+ :
+}
+
+create_udisks_service () {
+ [ $# -ne 2 ] && perror "Call create_udisks_service with TWO params!"
+ local BINARY="/${2#$MODULE_BUILD_DIR}"
+ if [ "$1" == "udisks2" ]; then
+ # assume udisks v2
+ sed "s,%UDISKSD%,$BINARY,g" templates/udisks2.systemd.service > "$MODULE_BUILD_DIR/etc/systemd/system/udisks2.service" || perror "Error creating systemd service for udisks2 $BINARY"
+ sed "s,%UDISKSD%,$BINARY,g" templates/udisks2.dbus.service > "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services/org.freedesktop.UDisks2.service" || perror "Error creating dbus service for udisks2"
+ ln -s "../udisks2.service" "$MODULE_BUILD_DIR/etc/systemd/system/basic.target.wants/udisks2.service"
+ else
+ # assume udisks v1
+ sed "s,%UDISKSD%,$BINARY,g" templates/udisks.systemd.service > "$MODULE_BUILD_DIR/etc/systemd/system/udisks.service" || perror "Error creating systemd service for udisks $BINARY"
+ sed "s,%UDISKSD%,$BINARY,g" templates/udisks.dbus.service > "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services/org.freedesktop.UDisks.service" || perror "Error creating dbus service for udisks"
+ ln -s "../udisks.service" "$MODULE_BUILD_DIR/etc/systemd/system/basic.target.wants/udisks.service"
+ fi
+}
+
diff --git a/remote/modules/udisks/module.conf b/remote/modules/udisks/module.conf
new file mode 100644
index 00000000..8ef6f29c
--- /dev/null
+++ b/remote/modules/udisks/module.conf
@@ -0,0 +1,14 @@
+# This module is a little special, as it's supposed to be compatible
+# with udisks 1 and 2. suse 12.3 and ubuntu 13.04 use udisks2, ubuntu 12.04
+# uses udisks1. The build script looks a little hacky
+REQUIRED_DIRECTORIES="
+ /etc/dbus-1
+ /usr/lib/udev/rules.d
+ /usr/share/dbus-1
+ /usr/share/polkit-1
+ /etc/systemd/system
+"
+REQUIRED_BINARIES="
+ udisksd
+"
+
diff --git a/remote/modules/udisks/module.conf.debian b/remote/modules/udisks/module.conf.debian
new file mode 100644
index 00000000..c32a5f24
--- /dev/null
+++ b/remote/modules/udisks/module.conf.debian
@@ -0,0 +1,32 @@
+REQUIRED_INSTALLED_PACKAGES="
+ udisks
+"
+REQUIRED_CONTENT_PACKAGES="
+ udisks
+"
+# Override: Only udisks1 is available
+REQUIRED_BINARIES="
+ udisks-helper-linux-md-check
+ udisks-daemon
+ udisks-helper-change-luks-password
+ udisks-helper-create-partition-table
+ udisks-helper-mdadm-expand
+ udisks-helper-drive-benchmark
+ udisks-helper-drive-detach
+ udisks-helper-mkfs
+ udisks-helper-ata-smart-collect
+ udisks-helper-change-filesystem-label
+ udisks-helper-modify-partition
+ udisks-helper-delete-partition
+ udisks-helper-create-partition
+ udisks-helper-fstab-mounter
+ udisks-helper-linux-md-remove-component
+ udisks-helper-ata-smart-selftest
+ udisks-helper-drive-poll
+ udisks-dm-export
+ udisks-lvm-pv-export
+ udisks-part-id
+ udisks-probe-ata-smart
+ udisks-probe-sas-expander
+"
+
diff --git a/remote/modules/udisks/module.conf.opensuse b/remote/modules/udisks/module.conf.opensuse
new file mode 100644
index 00000000..abf12be7
--- /dev/null
+++ b/remote/modules/udisks/module.conf.opensuse
@@ -0,0 +1,7 @@
+REQUIRED_INSTALLED_PACKAGES="
+ udisks2
+"
+REQUIRED_CONTENT_PACKAGES="
+ udisks2
+"
+
diff --git a/remote/modules/udisks/module.conf.ubuntu b/remote/modules/udisks/module.conf.ubuntu
new file mode 100644
index 00000000..3d127619
--- /dev/null
+++ b/remote/modules/udisks/module.conf.ubuntu
@@ -0,0 +1,34 @@
+REQUIRED_INSTALLED_PACKAGES="
+ udisks
+ udisks2
+"
+REQUIRED_CONTENT_PACKAGES="
+ udisks
+ udisks2
+"
+# Add these for udisks 1 (required by kde)
+REQUIRED_BINARIES+="
+ udisks-helper-linux-md-check
+ udisks-daemon
+ udisks-helper-change-luks-password
+ udisks-helper-create-partition-table
+ udisks-helper-mdadm-expand
+ udisks-helper-drive-benchmark
+ udisks-helper-drive-detach
+ udisks-helper-mkfs
+ udisks-helper-ata-smart-collect
+ udisks-helper-change-filesystem-label
+ udisks-helper-modify-partition
+ udisks-helper-delete-partition
+ udisks-helper-create-partition
+ udisks-helper-fstab-mounter
+ udisks-helper-linux-md-remove-component
+ udisks-helper-ata-smart-selftest
+ udisks-helper-drive-poll
+ udisks-dm-export
+ udisks-lvm-pv-export
+ udisks-part-id
+ udisks-probe-ata-smart
+ udisks-probe-sas-expander
+"
+
diff --git a/remote/modules/udisks/module.conf.ubuntu.12 b/remote/modules/udisks/module.conf.ubuntu.12
new file mode 100644
index 00000000..b962ec65
--- /dev/null
+++ b/remote/modules/udisks/module.conf.ubuntu.12
@@ -0,0 +1,31 @@
+REQUIRED_INSTALLED_PACKAGES="
+ udisks
+"
+REQUIRED_CONTENT_PACKAGES="
+ udisks
+"
+REQUIRED_BINARIES="
+ udisks-helper-linux-md-check
+ udisks-daemon
+ udisks-helper-change-luks-password
+ udisks-helper-create-partition-table
+ udisks-helper-mdadm-expand
+ udisks-helper-drive-benchmark
+ udisks-helper-drive-detach
+ udisks-helper-mkfs
+ udisks-helper-ata-smart-collect
+ udisks-helper-change-filesystem-label
+ udisks-helper-modify-partition
+ udisks-helper-delete-partition
+ udisks-helper-create-partition
+ udisks-helper-fstab-mounter
+ udisks-helper-linux-md-remove-component
+ udisks-helper-ata-smart-selftest
+ udisks-helper-drive-poll
+ udisks-dm-export
+ udisks-lvm-pv-export
+ udisks-part-id
+ udisks-probe-ata-smart
+ udisks-probe-sas-expander
+"
+
diff --git a/remote/modules/vbox/module.build b/remote/modules/vbox/module.build
new file mode 100644
index 00000000..f095b4e2
--- /dev/null
+++ b/remote/modules/vbox/module.build
@@ -0,0 +1,127 @@
+#!/bin/bash
+
+patch_vbox_scripts() {
+ # patching some virtualbox utility scripts to include openslx-busybox paths. Strange sed-ing, as the added
+ # openslx paths need to be at the end of PATH to not impede with system binaries to not impede with system binaries
+ pinfo "Patching virtual box scripts to include openslx (busybox)-paths ..."
+ # vboxmanage is a link to VBox; will get unlinked. Original link will be vboxmanage.original
+ for i in virtualbox vboxmanage vboxheadless; do
+ pinfo "Patching virtual box script $i ..."
+ SCRIPTPATH=$(grep -m 1 PATH "${MODULE_BUILD_DIR}/usr/bin/$i"|sed 's/"//g') # assume first hit is real path
+ sed -i "-i.original" "/^PATH=/c ${SCRIPTPATH}:/opt/openslx/bin:/opt/openslx/usr/bin:/opt/openslx/sbin"\
+ "${MODULE_BUILD_DIR}/usr/bin/$i" # append openslx paths
+ done
+}
+
+extract_extpack() {
+ pinfo "Unpacking Extension Pack ..."
+ mkdir -p ${MODULE_BUILD_DIR}/usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack
+ cp ${MODULE_DIR}/src/vbox/extpack/[EP][xX][tE]* ${MODULE_BUILD_DIR}/usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack
+ if [ x${AMD64_X86} == "xamd64" ]; then
+ pinfo "Unpacking 64bit branch of Extension Pack ..."
+ cp -r ${MODULE_DIR}/src/vbox/extpack/linux.amd64 ${MODULE_BUILD_DIR}/usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack
+ else # then we assume 32bit x86...
+ pinfo "Unpacking32bit branch of Extension Pack ..."
+ cp -r ${MODULE_DIR}/src/vbox/extpack/linux.x86 ${MODULE_BUILD_DIR}/usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack
+ fi
+}
+
+build_modules() {
+ pinfo "Recompiling VirtualBox kernel modules ..."
+ # Set some variables to use/patch VBox scripts
+ local MODULE_SRC="${MODULE_BUILD_DIR}/usr/share/virtualbox/src/vboxhost"
+ local BUILDINTMP="$MODULE_SRC/build_in_tmp"
+ local BUILDSUBDIR="modules"
+
+ # Some Vars for VBs kernel module makefiles
+ MODULE_DIR_ALT="$MODULE_DIR" # save usual MODULE_DIR
+ export KERN_DIR="${MODULE_DIR}/../kernel/build/lib/modules/$(ls ${MODULE_DIR}/../kernel/build/lib/modules/)/build/"
+ # export MODULE_DIR="${MODULE_DIR}/../kernel/build/lib/modules/$(ls ${MODULE_DIR}/../kernel/build/lib/modules/)/kernel/misc"
+ export MODULE_DIR="${MODULE_DIR}/build/lib/modules/vbox"
+
+ pinfo "Recompiling VirtualBox kernel module vboxdrv ..."
+ if ! $BUILDINTMP \
+ --save-module-symvers /tmp/vboxdrv-Module.symvers \
+ --module-source "$MODULE_SRC/vboxdrv" \
+ --no-print-directory install;
+ then
+ perror "[vbox]: Error compiling VirtualBox kernel module vboxdrv"
+ fi
+ pinfo "Recompiling VirtualBox kernel module vboxnetflt ..."
+ if ! $BUILDINTMP \
+ --use-module-symvers /tmp/vboxdrv-Module.symvers \
+ --module-source "$MODULE_SRC/vboxnetflt" \
+ --no-print-directory install;
+ then
+ perror "[vbox]: Error compiling VirtualBox kernel module vboxnetflt"
+ fi
+ pinfo "Recompiling VirtualBox kernel module vboxnetadp ..."
+ if ! $BUILDINTMP \
+ --use-module-symvers /tmp/vboxdrv-Module.symvers \
+ --module-source "$MODULE_SRC/vboxnetadp" \
+ --no-print-directory install;
+ then
+ perror "[vbox]: Error compiling VirtualBox kernel module vboxnetadp"
+ fi
+ pinfo "Recompiling VirtualBox kernel module vboxpci ..."
+ if ! $BUILDINTMP \
+ --use-module-symvers /tmp/vboxdrv-Module.symvers \
+ --module-source "$MODULE_SRC/vboxpci" \
+ --no-print-directory install;
+ then
+ perror "[vbox]: Error compiling VirtualBox kernel module vboxpci"
+ fi
+ pinfo "Compiled successfully the VirtualBox kernel modules."
+ export MODULE_DIR="$MODULE_DIR_ALT" # re-set MODULE_DIR
+}
+
+
+fetch_source() {
+ mkdir -p "src/vbox"
+ cd src/vbox
+ # pinfo "Downloading $REQUIRED_VBOXBASEURL"
+ download "$REQUIRED_VBOXBASEURL"
+ # pinfo "Downloading $REQUIRED_VBOXEXTURL"
+ download_untar "$REQUIRED_VBOXEXTURL" "extpack" "vbox_extpack.tar.gz"
+ cd -
+}
+
+
+build() {
+ case "$PACKET_HANDLER" in
+ rpm)
+ pinfo "Unpacking rpm ..."
+ cd build || perror "Cannot cd to build directory!"
+ rpm2cpio ../src/vbox/$(basename "$REQUIRED_VBOXBASEURL")|cpio -idmv || perror "Could not unpack rpm-archive!"
+ # it seems that sometimes directories from rpm will be created with 700-permissions,
+ # if that directory is not explicitly mentioned to create. So eg. usr, etc will carry the
+ # permissions 700, which is no fun. So we search for these directories and correct them.
+ find . -type d -perm 700 -exec chmod 755 {} \;
+ ;;
+ dpkg )
+ pinfo "Unpacking deb ..."
+ cd build || perror "Cannot cd to build directory!"
+ dpkg -x ../src/vbox/$(basename "$REQUIRED_VBOXBASEURL") . || perror "Could not unpack deb-archive!"
+ # VirtualBox needs to be suid-root:
+ for i in VBoxHeadless VBoxNetAdpCtl VBoxNetDHCP VBoxSDL VBoxVolInfo VirtualBox; do
+ chmod u+s ${MODULE_BUILD_DIR}/usr/lib/virtualbox/$i || pwarning "(Debian/Ubuntu) Could not suid $i executable!"
+ done
+ ;;
+ *) perror "Unknown Distribution: $SYS_DISTRIBUTION - Please specify its packet manager in remote/setup_target" ;;
+ esac
+
+ build_modules
+ patch_vbox_scripts
+ extract_extpack
+
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+}
+
+post_copy() {
+ # clean a bit, as sometimes there are residual files in /tmp/vbox.*/
+ rm -rf /tmp/vbox.*/
+}
+
diff --git a/remote/modules/vbox/module.conf b/remote/modules/vbox/module.conf
new file mode 100644
index 00000000..29067791
--- /dev/null
+++ b/remote/modules/vbox/module.conf
@@ -0,0 +1,12 @@
+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_DIRECTORIES="
+ /etc
+ /lib
+ /usr
+"
+# REQUIRED_LDD_BLACKLIST: Keep in minde the leading '\|'!
+REQUIRED_LDD_BLACKLIST="\|VBoxVMM"
diff --git a/remote/modules/vbox/module.conf.opensuse b/remote/modules/vbox/module.conf.opensuse
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/remote/modules/vbox/module.conf.opensuse
diff --git a/remote/modules/vbox/module.conf.opensuse.12.3 b/remote/modules/vbox/module.conf.opensuse.12.3
new file mode 100644
index 00000000..ae42e8aa
--- /dev/null
+++ b/remote/modules/vbox/module.conf.opensuse.12.3
@@ -0,0 +1,19 @@
+REQUIRED_VBOXBASEURL="http://download.virtualbox.org/virtualbox/4.2.16/VirtualBox-4.2-4.2.16_86992_openSUSE114-1.${X86_64_I586}.rpm"
+
+# Just for local usage, development:
+# REQUIRED_VBOXBASEURL="http://132.230.8.69/VirtualBox-4.2-4.2.16_86992_openSUSE114-1.${X86_64_I586}.rpm"
+
+REQUIRED_CONTENT_PACKAGES="
+ libSDL-1_2-0
+ libpng12-0
+"
+
+REQUIRED_INSTALLED_PACKAGES="
+ libSDL-1_2-0
+ libpng12-0
+"
+
+REQUIRED_LIBRARIES="
+ libSDL-1.2
+ libpng12
+"
diff --git a/remote/modules/vbox/module.conf.ubuntu b/remote/modules/vbox/module.conf.ubuntu
new file mode 100644
index 00000000..4efbd571
--- /dev/null
+++ b/remote/modules/vbox/module.conf.ubuntu
@@ -0,0 +1,18 @@
+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
+"
+
+REQUIRED_INSTALLED_PACKAGES="
+ libsdl1.2debian
+ libpng12-0
+"
+
+REQUIRED_LIBRARIES="
+ libpng12
+"
diff --git a/remote/modules/vbox/module.conf.ubuntu.13.04 b/remote/modules/vbox/module.conf.ubuntu.13.04
new file mode 100644
index 00000000..fbef8447
--- /dev/null
+++ b/remote/modules/vbox/module.conf.ubuntu.13.04
@@ -0,0 +1,18 @@
+REQUIRED_VBOXBASEURL="http://download.virtualbox.org/virtualbox/4.2.16/virtualbox-4.2_4.2.16-86992~Ubuntu~raring_${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
+"
+
+REQUIRED_INSTALLED_PACKAGES="
+ libsdl1.2debian
+ libpng12-0
+"
+
+REQUIRED_LIBRARIES="
+ libpng12
+"
diff --git a/remote/modules/vmchooser/module.build b/remote/modules/vmchooser/module.build
new file mode 100644
index 00000000..eb0a2d48
--- /dev/null
+++ b/remote/modules/vmchooser/module.build
@@ -0,0 +1,36 @@
+
+fetch_source() {
+ git clone "${REQUIRED_GIT}" src
+}
+
+build() {
+ local SRCDIR="${MODULE_DIR}/src/"
+
+ [ ! -d "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}" ] && mkdir -p "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}"
+ cd "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}"
+
+ # patch globals.cpp and globals.h to use standardised paths /opt/openslx/...
+ if ! grep -q VMCHOOSER_SCRIPTS_PATH "$SRCDIR/src/globals.h"; then
+ sed -i 's/^#define VMCHOOSER_BIN_PATH.*/#define VMCHOOSER_BIN_PATH "\/opt\/openslx\/bin"/g' "${SRCDIR}"/src/globals.h
+ sed -i 's/^#define VMCHOOSER_ETC_BASE_PATH.*/#define VMCHOOSER_ETC_BASE_PATH "\/opt\/openslx\/vmchooser\/config"/g' "${SRCDIR}"/src/globals.h
+ sed -i 's/^#define VMCHOOSER_BIN_PATH.*/#define VMCHOOSER_BIN_PATH "\/opt\/openslx\/bin"\n#define VMCHOOSER_SCRIPTS_PATH "\/opt\/openslx\/scripts"/g' "${SRCDIR}"/src/globals.h
+ sed -i 's/^#define VMCHOOSER_THEME_BASE.*/#define VMCHOOSER_THEME_BASE "\/opt\/openslx\/vmchooser\/themes"/g' "${SRCDIR}"/src/globals.h
+
+ sed -i 's/^QString binPath(VMCHOOSER_BIN_PATH);/QString binPath(VMCHOOSER_BIN_PATH);\nQString scriptsPath(VMCHOOSER_SCRIPTS_PATH);/g' "${SRCDIR}"/src/globals.cpp
+ sed -i 's/^QString runVmScript(binPath + "\/run-virt.sh");/QString runVmScript(scriptsPath + "\/vmchooser-run_virt");/g' "${SRCDIR}"/src/globals.cpp
+ sed -i 's/^QString filterScript(binPath + "\/xmlfilter.sh");/QString filterScript(scriptsPath + "\/vmchooser-xml_filter");/g' "${SRCDIR}"/src/globals.cpp
+ sed -i 's/^#define VMCHOOSER_VMPATH.*/#define VMCHOOSER_VMPATH "\/mnt\/vmstore"/g' "${SRCDIR}"/src/globals.h
+ fi
+
+ pinfo "Running cmake"
+ ln -sf qt4.conf /usr/share/qtchooser/default.conf
+ cmake "$SRCDIR" || perror "'cmake $SRCDIR' failed."
+ make || perror "'make' failed."
+
+ cd - &> /dev/null
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/vmchooser/module.conf b/remote/modules/vmchooser/module.conf
new file mode 100644
index 00000000..686eb8bf
--- /dev/null
+++ b/remote/modules/vmchooser/module.conf
@@ -0,0 +1,3 @@
+REQUIRED_GIT="git://git.openslx.org/openslx/tools/vmchooser.git"
+REQUIRED_PREFIX="/opt/openslx/bin"
+REQUIRED_BINARIES="vmchooser"
diff --git a/remote/modules/vmchooser/module.conf.debian b/remote/modules/vmchooser/module.conf.debian
new file mode 100644
index 00000000..2953ac63
--- /dev/null
+++ b/remote/modules/vmchooser/module.conf.debian
@@ -0,0 +1,4 @@
+REQUIRED_INSTALLED_PACKAGES="
+ cmake
+ libqt4-dev
+"
diff --git a/remote/modules/vmchooser/module.conf.opensuse b/remote/modules/vmchooser/module.conf.opensuse
new file mode 100644
index 00000000..75cb7dd6
--- /dev/null
+++ b/remote/modules/vmchooser/module.conf.opensuse
@@ -0,0 +1,4 @@
+REQUIRED_INSTALLED_PACKAGES="
+ cmake
+ libqt4-devel
+"
diff --git a/remote/modules/vmchooser/module.conf.ubuntu b/remote/modules/vmchooser/module.conf.ubuntu
new file mode 100644
index 00000000..2953ac63
--- /dev/null
+++ b/remote/modules/vmchooser/module.conf.ubuntu
@@ -0,0 +1,4 @@
+REQUIRED_INSTALLED_PACKAGES="
+ cmake
+ libqt4-dev
+"
diff --git a/remote/modules/vmware/module.build b/remote/modules/vmware/module.build
new file mode 100644
index 00000000..98ee2b8d
--- /dev/null
+++ b/remote/modules/vmware/module.build
@@ -0,0 +1,65 @@
+fetch_source() {
+ [ -e "${MODULE_DIR}/src" -a -d "${MODULE_DIR}/src" ] && \
+ { rm -r "${MODULE_DIR}/src" || perror "Could not delete old src dir."; }
+ mkdir -p "${MODULE_DIR}/src" || perror "Could not mkdir src"
+ cd "${MODULE_DIR}/src" || perror "cd fail."
+
+ # Get directory listing
+ wget -O "index.html" "$REQUIRED_DOWNLOAD_BASE" || perror "Could not download vmware dir index"
+
+ VMWARE_BUNDLE_FILE=$(grep -E -o -i "href=\"VMware-$REQUIRED_TYPE-[^\"]+[\._\-]$ARCHREGEX[\._\-][^\"]+\"" "index.html" | head -n 1 | awk -F '"' '{printf $2}')
+ [ -z "$VMWARE_BUNDLE_FILE" ] && perror "Could not determine vmware $REQUIRED_TYPE bundle file for current arch from $MODULE_DIR/src/index.html"
+ # Download file
+ wget -O "$VMWARE_BUNDLE_FILE" "$REQUIRED_DOWNLOAD_BASE/$VMWARE_BUNDLE_FILE" || perror "Could not download $VMWARE_BUNDLE_FILE from $REQUIRED_DOWNLOAD_BASE"
+ if [[ "$VMWARE_BUNDLE_FILE" == *.tar ]]; then
+ tar -x "${VMWARE_BUNDLE_FILE%.tar}" -f "$VMWARE_BUNDLE_FILE" || perror "Could not untar downloaded $VMWARE_BUNDLE_FILE"
+ unlink "$VMWARE_BUNDLE_FILE"
+ VMWARE_BUNDLE_FILE="${VMWARE_BUNDLE_FILE%.tar}"
+ fi
+
+ cd - >/dev/null
+}
+
+build() {
+ local DELETE_FILES
+ 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}"
+
+ # 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?"
+
+ 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) "${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
+
+ # cleanup unneeded files
+ rm -rf -- "${MODULE_BUILD_DIR}/etc/vmware-installer"
+ rm -rf -- "${MODULE_BUILD_DIR}/usr/lib/vmware-installer"
+ rm -rf -- "${MODULE_BUILD_DIR}/usr/lib/vmware-ovftool"
+ unlink "${MODULE_BUILD_DIR}/$VMWARE_BUNDLE_FILE"
+
+}
+
+post_copy() {
+ # FIXME: gconftool is copied without dependencies
+ tarcopy "$(find /usr/lib/ /usr/lib64 -name gconv -type d)" "$TARGET_BUILD_DIR"
+
+ # Update Icon cache for vmplayer
+ gtk-update-icon-cache-3.0 "${TARGET_BUILD_DIR}/usr/share/icons/hicolor/" || pwarning "update-icon-cache-3.0 failed."
+
+ # fix vmware-usbarbitrator bug
+ date +'%Y.%m.%d' >"${TARGET_BUILD_DIR}/etc/arch-release"
+
+ mkdir -p "$TARGET_BUILD_DIR/lib/modules/vmware/"
+ cp "${MODULE_BUILD_DIR}/lib/modules/$SYS_UTS_RELEASE/vmplayer/"* "$TARGET_BUILD_DIR/lib/modules/vmware/" || perror "Could not cp vmware modules to target!"
+}
+
diff --git a/remote/modules/vmware/module.conf b/remote/modules/vmware/module.conf
new file mode 100644
index 00000000..017d1d5b
--- /dev/null
+++ b/remote/modules/vmware/module.conf
@@ -0,0 +1,24 @@
+REQUIRED_DOWNLOAD_BASE="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/10.0.1/1379776/linux/core/"
+REQUIRED_TYPE="workstation"
+REQUIRED_MODULES="kernel"
+REQUIRED_DIRECTORIES="
+ /etc/vmware
+ /usr/sbin
+ /usr/lib/vmware/bin
+ /usr/lib/vmware/hostd
+ /usr/lib/vmware/icu
+ /usr/lib/vmware/lib
+ /usr/lib/vmware/libconf
+ /usr/lib/vmware/licenses
+ /usr/lib/vmware/resources
+ /usr/lib/vmware/scripts
+ /usr/lib/vmware/share
+ /usr/lib/vmware/xkeymap
+"
+REQUIRED_FILES="
+ /usr/lib/vmware/config
+ /usr/bin/vmware-usbarbitrator
+"
+REQUIRED_BINARIES="
+ vmnet-netifup
+"
diff --git a/remote/modules/vmware/module.conf.ubuntu b/remote/modules/vmware/module.conf.ubuntu
new file mode 100644
index 00000000..c75ee906
--- /dev/null
+++ b/remote/modules/vmware/module.conf.ubuntu
@@ -0,0 +1,136 @@
+REQUIRED_VMWARE_DELETIONS="
+ /var/lib/vmware
+ /etc/vmware-vix
+ /etc/rc0.d/K08vmware
+ /etc/rc0.d/K06vmware-workstation-server
+ /etc/rc0.d/K06vmamqpd
+ /etc/pam.d/vmware-authd
+ /etc/rc3.d/S19vmware
+ /etc/rc3.d/S55vmware-workstation-server
+ /etc/rc3.d/S25vmamqpd
+ /etc/rc3.d/K08vmware-USBArbitrator
+ /etc/rc3.d/S50vmware-USBArbitrator
+ /etc/rc5.d/K08vmware-USBArbitrator
+ /etc/rc5.d/S50vmware-USBArbitrator
+ /etc/rc2.d/S19vmware
+ /etc/rc2.d/S55vmware-workstation-server
+ /etc/rc2.d/S25vmamqpd
+ /etc/rc2.d/K08vmware-USBArbitrator
+ /etc/rc2.d/S50vmware-USBArbitrator
+ /etc/xdg/menus/applications-merged
+ /etc/rc6.d/K08vmware
+ /etc/rc6.d/K06vmware-workstation-server
+ /etc/rc6.d/K06vmamqpd
+ /etc/rc4.d/S19vmware
+ /etc/rc4.d/S55vmware-workstation-server
+ /etc/rc4.d/S25vmamqpd
+ /etc/init.d/vmamqpd
+ /etc/init.d/vmware-USBArbitrator
+ /etc/init.d/vmware-workstation-server
+ /etc/init.d/vmware
+ /etc/thnuclnt
+ /etc/vmware-installer
+ /etc/cups/thnuclnt.convs
+ /etc/cups/thnuclnt.types
+ /etc/vmware/netmap.conf
+ /etc/vmware/icu
+ /etc/vmware/hostd
+ /etc/vmware/installer.sh
+ /etc/vmware/bootstrap
+ /etc/vmware/ssl
+ /etc/vmware/config
+ /etc/vmware/locations
+ /etc/modprobe.d/vmware-fuse.conf
+ /lib/modules/3.11.0-13-generic/misc/vmnet.ko
+ /lib/modules/3.11.0-13-generic/misc/vmmon.ko
+ /usr/share/mime/packages/vmware-player.xml
+ /usr/share/applications/vmware-workstation.desktop
+ /usr/share/applications/vmware-player.desktop
+ /usr/share/applications/vmware-netcfg.desktop
+ /usr/share/desktop-directories/vmware-ace-vms.directory
+ /usr/share/man/man1/vmware.1.gz
+ /usr/share/doc/vmware-vix
+ /usr/share/doc/vmware-workstation
+ /usr/share/doc/vmware-player
+ /usr/share/icons/hicolor/32x32/mimetypes/application-certificate.png
+ /usr/share/icons/hicolor/32x32/mimetypes/application-x-vmware-easter-egg.png
+ /usr/share/icons/hicolor/32x32/mimetypes/application-x-vmware-team.png
+ /usr/share/icons/hicolor/32x32/mimetypes/application-x-vmware-vm-legacy.png
+ /usr/share/icons/hicolor/32x32/mimetypes/application-x-vmware-vm-clone.png
+ /usr/share/icons/hicolor/32x32/mimetypes/application-x-vmware-vm.png
+ /usr/share/icons/hicolor/32x32/apps/vmware-player.png
+ /usr/share/icons/hicolor/32x32/apps/vmware-workstation.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-vmfoundry.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-vmdisk.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-easter-egg.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-team.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-vm-legacy.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-vm-clone.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-snapshot.png
+ /usr/share/icons/hicolor/48x48/mimetypes/application-x-vmware-vm.png
+ /usr/share/icons/hicolor/48x48/apps/vmware-player.png
+ /usr/share/icons/hicolor/48x48/apps/vmware-workstation.png
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-easter-egg.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-team.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-vm-clone.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-snapshot.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-vm-legacy.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-vmfoundry.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-certificate.svg
+ /usr/share/icons/hicolor/scalable/mimetypes/application-x-vmware-vm.svg
+ /usr/share/icons/hicolor/scalable/apps/vmware-workstation.svg
+ /usr/share/icons/hicolor/16x16/mimetypes/application-certificate.png
+ /usr/share/icons/hicolor/16x16/mimetypes/application-x-vmware-easter-egg.png
+ /usr/share/icons/hicolor/16x16/mimetypes/application-x-vmware-team.png
+ /usr/share/icons/hicolor/16x16/mimetypes/application-x-vmware-vm-legacy.png
+ /usr/share/icons/hicolor/16x16/mimetypes/application-x-vmware-vm-clone.png
+ /usr/share/icons/hicolor/16x16/mimetypes/application-x-vmware-vm.png
+ /usr/share/icons/hicolor/16x16/apps/vmware-player.png
+ /usr/share/icons/hicolor/16x16/apps/vmware-netcfg.png
+ /usr/share/icons/hicolor/16x16/apps/vmware-workstation.png
+ /usr/share/icons/hicolor/24x24/mimetypes
+ /usr/share/icons/hicolor/24x24/apps/vmware-player.png
+ /usr/share/icons/hicolor/24x24/apps/vmware-netcfg.png
+ /usr/share/icons/hicolor/24x24/apps/vmware-workstation.png
+ /usr/bin/vmnet-dhcpd
+ /usr/bin/vmware-unity-helper
+ /usr/bin/ovftool
+ /usr/bin/vmrun
+ /usr/bin/vmware-vim-cmd
+ /usr/bin/vmware-wssc-adminTool
+ /usr/bin/vmnet-bridge
+ /usr/bin/vmplayer
+ /usr/bin/vmnet-sniffer
+ /usr/bin/vmss2core
+ /usr/bin/vmware-usbarbitrator
+ /usr/bin/vmware-netcfg
+ /usr/bin/vmware-modconfig
+ /usr/bin/vmware-tray
+ /usr/bin/vmware-mount
+ /usr/bin/vm-support
+ /usr/bin/vmware-vdiskmanager
+ /usr/bin/vmware-license-enter.sh
+ /usr/bin/vmware-license-check.sh
+ /usr/bin/vmnet-natd
+ /usr/bin/vmware-uninstall
+ /usr/bin/vmware-vprobe
+ /usr/bin/vmware-fuseUI
+ /usr/bin/vmware-installer
+ /usr/bin/vmware-ping
+ /usr/bin/vmware-gksu
+ /usr/bin/vmnet-netifup
+ /usr/bin/vmware-networks
+ /usr/bin/vmware
+ /usr/bin/vmware-hostd
+ /usr/include/vmware-vix
+ /usr/lib/vmware-vix
+ /usr/lib/vmware-ovftool
+ /usr/lib/vmware-installer
+ /usr/lib/libvixAllProducts.so
+ /usr/lib/cups/filter/thnucups
+ /usr/lib/diskLibWrapper.so
+ /usr/lib/vmware
+ /usr/local/share/applications
+ /usr/sbin/vmware-authdlauncher
+ /usr/sbin/vmware-authd
+"
diff --git a/remote/modules/xorg/module.build b/remote/modules/xorg/module.build
new file mode 100644
index 00000000..16e0bb5b
--- /dev/null
+++ b/remote/modules/xorg/module.build
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+ # copy udev rules to correct location
+ [ -d "${MODULE_BUILD_DIR}/lib/udev" ] && mv "${MODULE_BUILD_DIR}/lib/udev" "${MODULE_BUILD_DIR}/usr/lib/"
+}
+
+post_copy() {
+ mkdir -p "${TARGET_BUILD_DIR}/etc/X11"
+ [ ! -e ${TARGET_BUILD_DIR}/etc/X11/X ] && ln -s /usr/bin/Xorg ${TARGET_BUILD_DIR}/etc/X11/X
+}
+
diff --git a/remote/modules/xorg/module.conf b/remote/modules/xorg/module.conf
new file mode 100644
index 00000000..b99f0e2a
--- /dev/null
+++ b/remote/modules/xorg/module.conf
@@ -0,0 +1,19 @@
+REQUIRED_BINARIES="
+ X
+ Xorg
+ gtf
+ cvt
+ setxkbmap
+ xkbvleds
+ xkbprint
+ xkbwatch
+ xkbbell
+ xkbevd
+ xrandr
+ xkbcomp
+ vmmouse_detect
+"
+REQUIRED_DIRECTORIES="
+ /usr/share/X11
+"
+REQUIRED_FILES=""
diff --git a/remote/modules/xorg/module.conf.debian b/remote/modules/xorg/module.conf.debian
new file mode 100644
index 00000000..2cc9d6f1
--- /dev/null
+++ b/remote/modules/xorg/module.conf.debian
@@ -0,0 +1,40 @@
+REQUIRED_INSTALLED_PACKAGES="
+"
+REQUIRED_CONTENT_PACKAGES="
+ xserver-xorg$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-core$UBUNTU_XORG_PKG_SUFFIX
+ libgl1-mesa-dri$UBUNTU_XORG_PKG_SUFFIX
+ libgl1-mesa-glx$UBUNTU_XORG_PKG_SUFFIX
+ xkb-data
+ x11-xkb-utils
+ x11-xserver-utils
+ xserver-xorg-input-evdev$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-input-mouse$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-input-vmmouse$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-intel$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-ati$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-vesa$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-mga$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-sis$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-vmware$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-fbdev$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-radeon$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-sisusb$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-nouveau$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-openchrome$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-savage$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-trident$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-mach64$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-qxl$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-siliconmotion$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-cirrus$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-r128$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-neomagic$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-geode$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-s3$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-tdfx$UBUNTU_XORG_PKG_SUFFIX
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib
+"
+REQUIRED_FILES=""
diff --git a/remote/modules/xorg/module.conf.opensuse b/remote/modules/xorg/module.conf.opensuse
new file mode 100644
index 00000000..1e6f5ff1
--- /dev/null
+++ b/remote/modules/xorg/module.conf.opensuse
@@ -0,0 +1,59 @@
+# xkbutils, xkbprint, setxkbmap, xkbevd for 64-bit openSuse
+REQUIRED_INSTALLED_PACKAGES="
+"
+REQUIRED_CONTENT_PACKAGES="
+ xorg-x11
+ xorg-x11-server
+ xorg-x11-driver-input
+ xorg-x11-driver-video
+ xorg-x11-driver-video-nouveau
+ xf86-video-vmware
+ xf86-video-ati
+ xf86-video-nv
+ xf86-video-intel
+ xf86-video-i128
+ xf86-video-geode
+ xf86-video-vesa
+ xf86-video-fbdev
+ xf86-video-modesetting
+ xf86-input-vmmouse
+ xf86-input-wacom
+ xf86-input-evdev
+ xf86-input-joystick
+ xf86-input-keyboard
+ xf86-input-mouse
+ xf86-input-synaptics
+ xf86-input-void
+ xkeyboard-config
+ xkbcomp
+ dejavu-fonts
+ libxcb-glx0
+ kdm-branding-openSUSE
+ Mesa
+ xkbutils
+ xkbprint
+ setxkbmap
+ xkbevd
+ libpixman-1-0
+ xrandr
+ vaapi-intel-driver
+"
+REQUIRED_LIBRARIES="
+ libI810XvMC
+ libxcb-glx
+ libIntelXvMC
+ i965_dri
+ vmwgfx_dri
+ i915_dri
+ i965_drv_video
+ libpixman-1
+"
+REQUIRED_DIRECTORIES+="
+ /usr/bin
+ /usr/lib/udev
+ /usr/$LIB64/xorg
+ /usr/share/fonts
+"
+REQUIRED_FILES="
+ /var/adm/fillup-templates/sysconfig.displaymanager-kdm
+"
diff --git a/remote/modules/xorg/module.conf.opensuse.13.1 b/remote/modules/xorg/module.conf.opensuse.13.1
new file mode 100644
index 00000000..6199ed15
--- /dev/null
+++ b/remote/modules/xorg/module.conf.opensuse.13.1
@@ -0,0 +1,95 @@
+# xkbutils, xkbprint, setxkbmap, xkbevd for 64-bit openSuse
+REQUIRED_INSTALLED_PACKAGES="
+ xorg-x11
+ xorg-x11
+ xorg-x11-server
+ xorg-x11-driver-input
+ xorg-x11-driver-video
+ xorg-x11-driver-video-nouveau
+ xf86-video-vmware
+ xf86-video-ati
+ xf86-video-nv
+ xf86-video-intel
+ xf86-video-i128
+ xf86-video-geode
+ xf86-video-vesa
+ xf86-video-fbdev
+ xf86-video-modesetting
+ xf86-input-vmmouse
+ xf86-input-wacom
+ xf86-input-evdev
+ xf86-input-joystick
+ xf86-input-keyboard
+ xf86-input-mouse
+ xf86-input-synaptics
+ xf86-input-void
+ xkeyboard-config
+ xkbcomp
+ dejavu-fonts
+ libxcb-glx0
+ kdm-branding-openSUSE
+ Mesa
+ xkbutils
+ xkbprint
+ setxkbmap
+ xkbevd
+ libpixman-1-0
+ xrandr
+ vaapi-intel-driver
+"
+REQUIRED_CONTENT_PACKAGES="
+ xorg-x11
+ xorg-x11-server
+ xorg-x11-driver-input
+ xorg-x11-driver-video
+ xorg-x11-driver-video-nouveau
+ xf86-video-vmware
+ xf86-video-ati
+ xf86-video-nv
+ xf86-video-intel
+ xf86-video-i128
+ xf86-video-geode
+ xf86-video-vesa
+ xf86-video-fbdev
+ xf86-video-modesetting
+ xf86-input-vmmouse
+ xf86-input-wacom
+ xf86-input-evdev
+ xf86-input-joystick
+ xf86-input-keyboard
+ xf86-input-mouse
+ xf86-input-synaptics
+ xf86-input-void
+ xkeyboard-config
+ xkbcomp
+ dejavu-fonts
+ libxcb-glx0
+ kdm-branding-openSUSE
+ Mesa
+ xkbutils
+ xkbprint
+ setxkbmap
+ xkbevd
+ libpixman-1-0
+ xrandr
+ vaapi-intel-driver
+"
+REQUIRED_LIBRARIES="
+ libI810XvMC
+ libxcb-glx
+ libIntelXvMC
+ i965_dri
+ vmwgfx_dri
+ i915_dri
+ i965_drv_video
+ libpixman-1
+"
+REQUIRED_DIRECTORIES+="
+ /usr/bin
+ /usr/lib/udev
+ /usr/$LIB64/xorg
+ /usr/share/fonts
+"
+REQUIRED_FILES="
+ /var/adm/fillup-templates/sysconfig.displaymanager-kdm
+"
diff --git a/remote/modules/xorg/module.conf.ubuntu b/remote/modules/xorg/module.conf.ubuntu
new file mode 100644
index 00000000..69c3e64c
--- /dev/null
+++ b/remote/modules/xorg/module.conf.ubuntu
@@ -0,0 +1,40 @@
+REQUIRED_INSTALLED_PACKAGES="
+"
+REQUIRED_CONTENT_PACKAGES="
+ xserver-xorg$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-core$UBUNTU_XORG_PKG_SUFFIX
+ libgl1-mesa-dri$UBUNTU_XORG_PKG_SUFFIX
+ libgl1-mesa-glx$UBUNTU_XORG_PKG_SUFFIX
+ xkb-data
+ x11-xkb-utils
+ x11-xserver-utils
+ xserver-xorg-input-evdev$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-input-mouse$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-input-vmmouse$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-intel$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-ati$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-vesa$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-mga$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-sis$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-vmware$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-fbdev$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-radeon$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-sisusb$UBUNTU_XORG_PKG_SUFFIX
+ xserver-xorg-video-nouveau$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-openchrome$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-savage$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-trident$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-mach64$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-qxl$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-siliconmotion$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-cirrus$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-r128$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-neomagic$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-geode$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-s3$UBUNTU_XORG_PKG_SUFFIX
+ @xserver-xorg-video-tdfx$UBUNTU_XORG_PKG_SUFFIX
+"
+REQUIRED_DIRECTORIES+="
+ /usr/lib
+"
+REQUIRED_FILES=""