Skip to contentSkip to conversation

drbd: Add recipes

PATCH Superseded Bian Naimeng 2 participants 3 messages Dec 11, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drbd: Add recipes

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

---
 .../recipes-support/drbd/drbd/drbd.service         | 12 +++++
 meta-networking/recipes-support/drbd/drbd_8.4.4.bb | 55 ++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 meta-networking/recipes-support/drbd/drbd/drbd.service
 create mode 100644 meta-networking/recipes-support/drbd/drbd_8.4.4.bb
meta-networking/recipes-support/drbd/drbd/drbd.service new file +12 -0
new file mode 100644
index 0000000..6b6ab30
@@ -0,0 +1,12 @@
+[Unit]
+Description=DRBD Service
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@LIBEXECDIR@/drbd-helper startxxx
+ExecStop=@LIBEXECDIR@/drbd-helper stop
+
+[Install]
+WantedBy=multi-user.target
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
1.9.1
#1 lore raw
Quoted 19 lines · Bian Naimeng

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

---
.../recipes-support/drbd/drbd/drbd.service | 12 +++++
meta-networking/recipes-support/drbd/drbd_8.4.4.bb | 55 ++++++++++++++++++++++

2 files changed, 67 insertions(+)

create mode 100644 meta-networking/recipes-support/drbd/drbd/drbd.service create mode 100644 meta-networking/recipes-support/drbd/drbd_8.4.4.bb

meta-networking/recipes-support/drbd/drbd/drbd.service new file +0 -0
new file mode 100644
index 0000000..6b6ab30

meta-networking/recipes-support/drbd/drbd/drbd.service line 8

Quoted 8 lines
meta-networking/recipes-support/drbd/drbd/drbd.service new file +8 -0
@@ -0,0 +1,12 @@
+[Unit]
+Description=DRBD Service
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@LIBEXECDIR@/drbd-helper startxxx

is that a typo ? or did you mean startxxx

Quoted 23 lines
meta-networking/recipes-support/drbd/drbd/drbd.service new file +4 -0
+ExecStop=@LIBEXECDIR@/drbd-helper stop
+
+[Install]
+WantedBy=multi-user.target
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +13 -0
new file mode 100644
index 0000000..c7a6973
@@ -0,0 +1,55 @@
+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"
+
+RDEPENDS_${PN} += "bash perl"
+
+LICENSE = "GPLv2+"
+

meta-networking/recipes-support/drbd/drbd_8.4.4.bb line 23

Quoted 10 lines
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +10 -0
+LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
+
+SRC_URI = "http://oss.linbit.com/${BPN}/8.4/${BPN}-${PV}.tar.gz \
+           file://drbd.service \
+          "
+
+SRC_URI[md5sum] = "b51815343c1a9151e2936b3b97520388"
+SRC_URI[sha256sum] = "a056219c5c23b079c3354179f7a1b9f55d47e573a4cd3178f2ef4c15604288f0"
+
+inherit autotools-brokensep systemd

why brokensep ?

Quoted 20 lines
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +20 -0
+
+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

meta-networking/recipes-support/drbd/drbd_8.4.4.bb

Quoted 10 lines
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +10 -0
+        install -m 644 ${WORKDIR}/drbd.service ${D}/${systemd_unitdir}/system
+        install -d ${D}/${libexecdir}
+        install -m 755 ${D}/${sysconfdir}/init.d/drbd ${D}/${libexecdir}/drbd-helper
+
+        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
+            ${D}${systemd_unitdir}/system/drbd.service
+    fi
+}
+
+FILES_${PN} += “run"

should this be relative to prefix or something ?

Quoted 10 lines
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +2 -0
+FILES_${PN} += "${base_libdir}/drbd"
+FILES_${PN}-dbg += "${base_libdir}/drbd/.debug"
Signature · 7 lines
1.9.1

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
#2 lore raw
Quoted 32 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Khem Raj
Sent: Thursday, December 11, 2014 11:28 AM
To: [email protected]
Subject: Re: [oe] [meta-networking][PATCH] drbd: Add recipes

Quoted 23 lines · Bian Naimeng

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

---
.../recipes-support/drbd/drbd/drbd.service | 12 +++++
meta-networking/recipes-support/drbd/drbd_8.4.4.bb | 55
++++++++++++++++++++++

2 files changed, 67 insertions(+)

create mode 100644 meta-networking/recipes-support/drbd/drbd/drbd.service create mode 100644 meta-networking/recipes-support/drbd/drbd_8.4.4.bb

meta-networking/recipes-support/drbd/drbd/drbd.service new file +2 -0
new file mode 100644
index 0000000..6b6ab30
@@ -0,0 +1,12 @@
+[Unit]
+Description=DRBD Service
Quoted 8 lines

meta-networking/recipes-support/drbd/drbd/drbd.service line 8

Quoted 6 lines
meta-networking/recipes-support/drbd/drbd/drbd.service new file +6 -0
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@LIBEXECDIR@/drbd-helper startxxx

is that a typo ? or did you mean startxxx

Sorry, and thanks for your review.
I will fix it in the next version.

Quoted 34 lines
Quoted 23 lines
meta-networking/recipes-support/drbd/drbd/drbd.service new file +4 -0
+ExecStop=@LIBEXECDIR@/drbd-helper stop
+
+[Install]
+WantedBy=multi-user.target
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +11 -0
new file mode 100644
index 0000000..c7a6973
@@ -0,0 +1,55 @@
+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"
+
+RDEPENDS_${PN} += "bash perl"
+

meta-networking/recipes-support/drbd/drbd_8.4.4.bb line 21

Quoted 10 lines
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +10 -0
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
+
+SRC_URI = "http://oss.linbit.com/${BPN}/8.4/${BPN}-${PV}.tar.gz \
+           file://drbd.service \
+          "
+
+SRC_URI[md5sum] = "b51815343c1a9151e2936b3b97520388"
+SRC_URI[sha256sum] =

"a056219c5c23b079c3354179f7a1b9f55d47e573a4cd3178f2ef4c15604288f0"

Quoted 4 lines

meta-networking/recipes-support/drbd/drbd_8.4.4.bb line 23

Quoted 2 lines
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +2 -0
+
+inherit autotools-brokensep systemd

why brokensep ?

The makefile.in of drbd uses the relative path to point source files. Compile errors will be caught if we build it on ${B} such as following.
---------------------------------------------------------------------

| NOTE: make -j 4
| /bin/sed: can't read drbd/linux/drbd_config.h: No such file or directory
| make -C drbd drbd_buildtag.c
| make: *** drbd: No such file or directory.  Stop.
| make: *** [drbd/drbd_buildtag.c] Error 2

----------------------------------------------------------------------

Quoted 24 lines
Quoted 10 lines
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +9 -0
+
+EXTRA_OECONF = "--with-utils                  \
+                --without-km                  \
+                --with-initdir=/etc/init.d    \
+                --without-pacemaker           \
+                --without-rgmanager           \
+                --without-bashcompletion      \
+                --with-distro debian          \
+               "

meta-networking/recipes-support/drbd/drbd_8.4.4.bb

Quoted 10 lines
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +10 -0
+
+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

meta-networking/recipes-support/drbd/drbd_8.4.4.bb line 44

Quoted 2 lines
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +2 -0
+        install -d ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/drbd.service

${D}/${systemd_unitdir}/system

Quoted 12 lines

meta-networking/recipes-support/drbd/drbd_8.4.4.bb

Quoted 10 lines
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +10 -0
+        install -d ${D}/${libexecdir}
+        install -m 755 ${D}/${sysconfdir}/init.d/drbd
+${D}/${libexecdir}/drbd-helper
+
+        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
+            ${D}${systemd_unitdir}/system/drbd.service
+    fi
+}
+
+FILES_${PN} += “run"

should this be relative to prefix or something ?

Sorry, it should be "/run".
I will fix it in the next version.

Thanks,
Bian

Quoted 17 lines
Quoted 11 lines
meta-networking/recipes-support/drbd/drbd_8.4.4.bb new file +2 -1
+FILES_${PN} += "${base_libdir}/drbd"
+FILES_${PN}-dbg += "${base_libdir}/drbd/.debug"
--

1.9.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel