summaryrefslogtreecommitdiffstats
path: root/remote/modules/dnbd3
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/dnbd3
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/dnbd3')
-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
5 files changed, 77 insertions, 0 deletions
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
+"