[oe-commits] Bian Naimeng : drbd: add recipe

git at git.openembedded.org git at git.openembedded.org
Mon Dec 1 13:29:16 UTC 2014


Module: meta-openembedded.git
Branch: master-next
Commit: 31c214afc8d181dc3529c7b31bd61b2ea59bb663
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=31c214afc8d181dc3529c7b31bd61b2ea59bb663

Author: Bian Naimeng <biannm at cn.fujitsu.com>
Date:   Fri Nov 28 16:49:45 2014 +0800

drbd: add recipe

DRBD is a block device which is designed to build high availability clusters.

Signed-off-by: Bian Naimeng <biannm at cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 meta-oe/recipes-extended/drbd/drbd_8.4.4.bb      | 57 ++++++++++++++++++++++++
 meta-oe/recipes-extended/drbd/files/drbd.service | 12 +++++
 2 files changed, 69 insertions(+)

diff --git a/meta-oe/recipes-extended/drbd/drbd_8.4.4.bb b/meta-oe/recipes-extended/drbd/drbd_8.4.4.bb
new file mode 100644
index 0000000..5439bac
--- /dev/null
+++ b/meta-oe/recipes-extended/drbd/drbd_8.4.4.bb
@@ -0,0 +1,57 @@
+SUMMARY = "BD driver for Linux"
+DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\
+DRBD mirrors a block device over the network to another machine.\
+Think of it as networked raid 1. It is a building block for\
+setting up high availability (HA) clusters."
+
+HOMEPAGE = "http://www.drbd.org/"
+
+SECTION = "kernel/userland"
+
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
+
+PR = "r0"
+#PR = "r1001"
+
+SRC_URI = "http://oss.linbit.com/${BPN}/8.4/${BPN}-${PV}.tar.gz \
+           file://drbd.service \
+          "
+
+#SRC_URI[md5sum] = "ef4e6db51cda1898c597a3d61fcb9e1e"
+#SRC_URI[sha256sum] = "7c1558459614fbdc1b3209f1b9e5767a443d9bdfe681a49c652b5f392799d58d"
+
+SRC_URI[md5sum] = "b51815343c1a9151e2936b3b97520388"
+SRC_URI[sha256sum] = "a056219c5c23b079c3354179f7a1b9f55d47e573a4cd3178f2ef4c15604288f0"
+
+inherit autotools-brokensep systemd
+
+EXTRA_OECONF = "--with-utils                  \
+                --without-km                  \
+                --with-initdir=/etc/init.d    \
+                --without-pacemaker           \
+                --without-rgmanager           \
+                --without-bashcompletion      \
+                --with-distro debian          \
+               "
+
+do_configure (){
+    oe_runconf
+}
+
+SYSTEMD_SERVICE_${PN} = "drbd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install_append() {
+    if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/drbd.service ${D}/${systemd_unitdir}/system
+        install -d ${D}/${libexecdir}
+        install -m 755 ${D}/etc/init.d/drbd ${D}/${libexecdir}/drbd-helper
+    fi
+}
+
+FILES_${PN} += "run"
+FILES_${PN} += "${base_libdir}/drbd"
+FILES_${PN}-dbg += "${base_libdir}/drbd/.debug"
diff --git a/meta-oe/recipes-extended/drbd/files/drbd.service b/meta-oe/recipes-extended/drbd/files/drbd.service
new file mode 100644
index 0000000..22f853f
--- /dev/null
+++ b/meta-oe/recipes-extended/drbd/files/drbd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=DRBD Service
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/drbd/drbd-helper start
+ExecStop=/usr/lib/drbd/drbd-helper stop
+
+[Install]
+WantedBy=multi-user.target



More information about the Openembedded-commits mailing list