summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-cluster/drbd
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-cluster/drbd')
-rw-r--r--sys-cluster/drbd/Manifest11
-rw-r--r--sys-cluster/drbd/drbd-8.0.16.ebuild57
-rw-r--r--sys-cluster/drbd/drbd-8.3.10.ebuild75
-rw-r--r--sys-cluster/drbd/drbd-8.3.11-r1.ebuild76
-rw-r--r--sys-cluster/drbd/drbd-8.3.12.ebuild79
-rw-r--r--sys-cluster/drbd/drbd-8.3.13.ebuild79
-rw-r--r--sys-cluster/drbd/drbd-8.3.15.ebuild79
-rw-r--r--sys-cluster/drbd/drbd-8.3.7.ebuild77
-rw-r--r--sys-cluster/drbd/drbd-8.3.8.1-r1.ebuild78
-rw-r--r--sys-cluster/drbd/drbd-8.3.8.1.ebuild77
-rw-r--r--sys-cluster/drbd/drbd-8.4.0.ebuild79
-rw-r--r--sys-cluster/drbd/drbd-8.4.2.ebuild80
-rw-r--r--sys-cluster/drbd/drbd-8.4.3.ebuild81
-rw-r--r--sys-cluster/drbd/files/drbd-8.0.rc158
-rw-r--r--sys-cluster/drbd/files/drbd-8.3.11-kernel3.patch17
-rw-r--r--sys-cluster/drbd/files/drbd-8.3.8.1-implicits.patch12
-rw-r--r--sys-cluster/drbd/metadata.xml14
17 files changed, 1129 insertions, 0 deletions
diff --git a/sys-cluster/drbd/Manifest b/sys-cluster/drbd/Manifest
new file mode 100644
index 000000000000..fae480317107
--- /dev/null
+++ b/sys-cluster/drbd/Manifest
@@ -0,0 +1,11 @@
+DIST drbd-8.0.16.tar.gz 322758 SHA256 3bdb662663d308da9d871cc66ddc9e807a10ad5ab510a33b62877231150bc059
+DIST drbd-8.3.10.tar.gz 521798 SHA256 5dd0e4bda615784bc45b8078c4d44b2d4b4b074f12e98c9bdfd7d40b13f2511a
+DIST drbd-8.3.11.tar.gz 526056 SHA256 bb5d3d0740788e779ba3b3a78c21362969dd0648eaced3ff37d9e52fff1df883
+DIST drbd-8.3.12.tar.gz 530923 SHA256 7385f941bafaebb18da1dadb07e2a8ee06117322bc37fc60a6c35b05f6f91087
+DIST drbd-8.3.13.tar.gz 541477 SHA256 ec3f2a37bd0aaa6783a8935d857bec1fbe55c1fa621fdb47ca9434384c84dbdd SHA512 fff72545ae569dad37d202bd7dcb075e443964e4d2e95ae124bbcac098762bee78f91e4863b56abfca2bdce2baa42bb3fdbdf9bb489f498d84aa679fa43ae702 WHIRLPOOL 21876ee5cb27609a115c852cae262dc233cbaa0d891769eb0704d057e071194928952650e4a6cc676e1facd405942f58db331c0abdc2d5000051da6bfcf1e506
+DIST drbd-8.3.15.tar.gz 550130 SHA256 1f1d35793c77c1356a82cf0c174346925802be73270abfb788cc27cc70646307 SHA512 ca78cddbbb614e90d63cdb3b5ec64ecc6b9c0730aced4348d1464edb5fe9b0f2c0e75fccc2c7cbe18daea454482cf46c847b55fb23e00f364b4f32ae0a3d8dca WHIRLPOOL 625ac74e1fe82f3a57ef183d9ece202c4c806d6600da2f690c9cf2e994d17bcbfcfa943a17d622cacce279ac53fde173987a7ace93cb346a9ef23d16908cec30
+DIST drbd-8.3.7.tar.gz 462659 SHA256 a01a07df88ebdbc20891fcb45c4d0e89b617a89dc19d5cbc8d0bd62bd562d36a
+DIST drbd-8.3.8.1.tar.gz 482582 SHA256 2b7e8a3895e89824d41d7dce8d55d127baba857c509bc2477925b0aecaf5689b
+DIST drbd-8.4.0.tar.gz 650733 SHA256 6f1f91ba2c296258c07cdb67552050cb64604d6606f7978aa076f32b3b97d624
+DIST drbd-8.4.2.tar.gz 675803 SHA256 f3d86bb5645c067bc61e9461a5d570a184912daedfe6f88623bbd920f8b5b5fa SHA512 c32371e1fb89b479bf5136ee1c00d8e07dd15769654977dfcde71fcc24264c1dae2feda82e8f61b4caf57b9ac88e2861ee7270aa8c867f6245b52d65c45ada46 WHIRLPOOL 11f1025f660f00c2e5741590665d27a581682169e4b40b61f053a8634b8419c1d94b93462696008090da9dd45c814dfe8fc8bc326170d016a19b6eaa751ead31
+DIST drbd-8.4.3.tar.gz 688328 SHA256 abeb09309b77b533b8e738a601d703b338dce6e4d6cf59741e2f0693fbf94527 SHA512 cdc90bdd9491fe6d29e3b779d69ba2aac1aacdb336586f1ef414d0a0195d922dbefa8b2d9c4868a2476998a713c893403344a2934c7768ff6f4ba9f13bb7277a WHIRLPOOL 90b8d3295aba124de9092585c5e5f77f50bc7338a943bbcbfa9726abce4aea3655e06bbf2523afb66a58abd3175d361f112e20c9e3b8fd809f3b7b03d0a0ea25
diff --git a/sys-cluster/drbd/drbd-8.0.16.ebuild b/sys-cluster/drbd/drbd-8.0.16.ebuild
new file mode 100644
index 000000000000..519a52eeea5e
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.0.16.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+
+MY_PV="${PV/_/}"
+MY_MAJ_PV="$(get_version_component_range 1-2 ${PV})"
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/${MY_MAJ_PV}/${PN}-${MY_PV}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+PDEPEND="~sys-cluster/drbd-kernel-${PV}"
+
+SLOT="0"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_compile() {
+ emake -j1 tools || die "compile problem"
+}
+
+src_install() {
+ emake PREFIX="${D}" install-tools || die "install problem"
+
+ # gentoo-ish init-script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN} || die
+
+ # docs
+ dodoc README ChangeLog ROADMAP
+
+ # we put drbd.conf into docs
+ # it doesnt make sense to install a default conf in /etc
+ # put it to the docs
+ rm -f "${D}"/etc/drbd.conf
+ dodoc scripts/drbd.conf || die
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "Please copy and gunzip the configuration file"
+ einfo "drbd.conf from /usr/share/doc/${PF} to /etc"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo ""
+}
diff --git a/sys-cluster/drbd/drbd-8.3.10.ebuild b/sys-cluster/drbd/drbd-8.3.10.ebuild
new file mode 100644
index 000000000000..3a60ac67a580
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.10.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="amd64 x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools || die
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools || die
+ dodoc README ChangeLog || die
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN} || die
+
+ dodoc scripts/drbd.conf.example || die
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.11-r1.ebuild b/sys-cluster/drbd/drbd-8.3.11-r1.ebuild
new file mode 100644
index 000000000000..e9c994f13708
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.11-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="amd64 x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ epatch "${FILESDIR}/drbd-8.3.11-kernel3.patch"
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.12.ebuild b/sys-cluster/drbd/drbd-8.3.12.ebuild
new file mode 100644
index 000000000000..0b91cb7a74e3
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.12.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ epatch "${FILESDIR}/drbd-8.3.11-kernel3.patch"
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/Makefile.in || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.13.ebuild b/sys-cluster/drbd/drbd-8.3.13.ebuild
new file mode 100644
index 000000000000..9a4653ca39e9
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.13.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator udev
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="amd64 x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/Makefile.in || die
+ # correct install paths
+ sed -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ -e "s:\$(sysconfdir)/udev:$(get_udevdir):g" \
+ -i scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.15.ebuild b/sys-cluster/drbd/drbd-8.3.15.ebuild
new file mode 100644
index 000000000000..fb6fab1be8e5
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.15.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ #epatch "${FILESDIR}/drbd-8.3.11-kernel3.patch"
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/Makefile.in || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.7.ebuild b/sys-cluster/drbd/drbd-8.3.7.ebuild
new file mode 100644
index 000000000000..bf8f76e7e585
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.7.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools || die
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools || die
+ dodoc README ChangeLog || die
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN} || die
+
+ # it doesnt make sense to install a default conf in /etc,
+ # so we put it to the docs
+ rm -f "${D}"/etc/drbd.conf
+ dodoc scripts/drbd.conf || die
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file"
+ einfo "from /usr/share/doc/${PF}/drbd.conf.bz2 to /etc"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+ elog "Or alternatively emerge sys-cluster/drbd-kernel package."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.8.1-r1.ebuild b/sys-cluster/drbd/drbd-8.3.8.1-r1.ebuild
new file mode 100644
index 000000000000..325af29ec636
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.8.1-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/Makefile.in || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ epatch "${FILESDIR}"/${P}-implicits.patch
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools || die
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools || die
+ dodoc README ChangeLog || die
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN} || die
+
+ dodoc scripts/drbd.conf.example || die
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file"
+ einfo "from /usr/share/doc/${PF}/drbd.conf.bz2 to /etc"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+ elog "Or alternatively emerge sys-cluster/drbd-kernel package."
+}
diff --git a/sys-cluster/drbd/drbd-8.3.8.1.ebuild b/sys-cluster/drbd/drbd-8.3.8.1.ebuild
new file mode 100644
index 000000000000..140455671d65
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.3.8.1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="amd64 x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools || die
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools || die
+ dodoc README ChangeLog || die
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN} || die
+
+ # it doesnt make sense to install a default conf in /etc,
+ # so we put it to the docs
+ rm -f "${D}"/etc/drbd.conf
+ dodoc scripts/drbd.conf || die
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file"
+ einfo "from /usr/share/doc/${PF}/drbd.conf.bz2 to /etc"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+ elog "Or alternatively emerge sys-cluster/drbd-kernel package."
+}
diff --git a/sys-cluster/drbd/drbd-8.4.0.ebuild b/sys-cluster/drbd/drbd-8.4.0.ebuild
new file mode 100644
index 000000000000..741ac75b3cde
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.4.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ epatch "${FILESDIR}/drbd-8.3.11-kernel3.patch"
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/{,legacy/}Makefile.in || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.4.2.ebuild b/sys-cluster/drbd/drbd-8.4.2.ebuild
new file mode 100644
index 000000000000..f21f0d078231
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.4.2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib versionator udev
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="amd64 x86"
+IUSE="bash-completion heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ #epatch "${FILESDIR}/drbd-8.3.11-kernel3.patch"
+ # respect LDFLAGS
+ sed -i -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" user/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/{,legacy/}Makefile.in || die
+ # correct install paths
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:/usr/share/bash-completion:" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+ sed -i -e "s:\$(sysconfdir)/udev:$(get_udevdir):" scripts/Makefile.in || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ $(use_with bash-completion bashcompletion) \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/drbd-8.4.3.ebuild b/sys-cluster/drbd/drbd-8.4.3.ebuild
new file mode 100644
index 000000000000..f80504c35bc2
--- /dev/null
+++ b/sys-cluster/drbd/drbd-8.4.3.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit bash-completion-r1 eutils multilib versionator udev
+
+LICENSE="GPL-2"
+
+DESCRIPTION="mirror/replicate block-devices across a network-connection"
+SRC_URI="http://oss.linbit.com/drbd/$(get_version_component_range 1-2 ${PV})/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="heartbeat pacemaker +udev xen"
+SLOT="0"
+
+src_prepare() {
+ # respect LDFLAGS, #453442
+ sed -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" \
+ -e "/\$(DESTDIR)\$(localstatedir)\/lock/d" \
+ -i user{,/legacy}/Makefile.in || die
+ # respect multilib
+ sed -i -e "s:/lib/:/$(get_libdir)/:g" \
+ Makefile.in scripts/{Makefile.in,global_common.conf,drbd.conf.example} || die
+ sed -e "s:@prefix@/lib:@prefix@/$(get_libdir):" \
+ -e "s:(DESTDIR)/lib:(DESTDIR)/$(get_libdir):" \
+ -i user/{,legacy/}Makefile.in || die
+ # correct install paths (really correct this time)
+ sed -i -e "s:\$(sysconfdir)/bash_completion.d:$(get_bashcompdir):" \
+ scripts/Makefile.in || die
+ # don't participate in user survey bug 360483
+ sed -i -e '/usage-count/ s/yes/no/' scripts/drbd.conf.example || die
+ sed -i -e "s:\$(sysconfdir)/udev:$(get_udevdir):" scripts/Makefile.in || die
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --with-utils \
+ --without-km \
+ --without-rgmanager \
+ $(use_with udev) \
+ $(use_with xen) \
+ $(use_with pacemaker) \
+ $(use_with heartbeat) \
+ --with-bashcompletion \
+ --with-distro=gentoo
+}
+
+src_compile() {
+ # only compile the tools
+ emake OPTFLAGS="${CFLAGS}" tools
+}
+
+src_install() {
+ # only install the tools
+ emake DESTDIR="${D}" install-tools
+ dodoc README ChangeLog
+
+ # install our own init script
+ newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN}
+
+ dodoc scripts/drbd.conf.example
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Please copy and gunzip the configuration file:"
+ einfo "from /usr/share/doc/${PF}/${PN}.conf.example.bz2 to /etc/${PN}.conf"
+ einfo "and edit it to your needs. Helpful commands:"
+ einfo "man 5 drbd.conf"
+ einfo "man 8 drbdsetup"
+ einfo "man 8 drbdadm"
+ einfo "man 8 drbddisk"
+ einfo "man 8 drbdmeta"
+ einfo
+
+ elog "Remember to enable drbd support in kernel."
+}
diff --git a/sys-cluster/drbd/files/drbd-8.0.rc b/sys-cluster/drbd/files/drbd-8.0.rc
new file mode 100644
index 000000000000..ed5abe98d78a
--- /dev/null
+++ b/sys-cluster/drbd/files/drbd-8.0.rc
@@ -0,0 +1,158 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+extra_started_commands="reload"
+
+depend() {
+ use logger
+ need net
+ before heartbeat
+ after sshd
+}
+
+DEFAULTFILE="/etc/conf.d/drbd"
+DRBDADM="/sbin/drbdadm"
+PROC_DRBD="/proc/drbd"
+MODPROBE="/sbin/modprobe"
+RMMOD="/sbin/rmmod"
+UDEV_TIMEOUT=10
+ADD_MOD_PARAM=""
+
+if [ -f $DEFAULTFILE ]; then
+ . $DEFAULTFILE
+fi
+
+# Just in case drbdadm want to display any errors in the configuration
+# file, or we need to ask the user about registering this installation
+# at http://usage.drbd.org, we call drbdadm here without any IO
+# redirection.
+$DRBDADM sh-nop
+
+assure_module_is_loaded() {
+ [ -e "$PROC_DRBD" ] && return
+ ebegin "Loading drbd module"
+ ret=0
+
+ $MODPROBE -s drbd `$DRBDADM sh-mod-parms` $ADD_MOD_PARAM || ret=20
+ eend $ret
+ return $ret
+}
+
+adjust_with_progress() {
+ IFS_O=$IFS
+ NEWLINE='
+'
+ IFS=$NEWLINE
+ local D=0
+ local S=0
+ local N=0
+
+ einfon "Setting drbd parameters "
+ COMMANDS=`$DRBDADM -d adjust all` || {
+ eend 20 "Error executing drbdadm"
+ return 20
+ }
+ echo -n "[ "
+
+ for CMD in $COMMANDS; do
+ if echo $CMD | grep -q disk; then echo -n "d$D "; D=$(( D+1 ));
+ elif echo $CMD | grep -q syncer; then echo -n "s$S "; S=$(( S+1 ));
+ elif echo $CMD | grep -q net; then echo -n "n$N "; N=$(( N+1 ));
+ else echo echo -n ".. ";
+ fi
+ IFS=$IFS_O
+ $CMD || {
+ echo
+ eend 20 "cmd $CMD failed!"
+ return 20
+ }
+ IFS=$NEWLINE
+ done
+ echo "]"
+ eend 0
+
+ IFS=$IFS_O
+}
+
+start() {
+ einfo "Starting DRBD resources:"
+ eindent
+ assure_module_is_loaded || return $?
+ adjust_with_progress || return $?
+
+ # make sure udev has time to create the device files
+ ebegin "Waiting for udev device creation ..."
+ for RESOURCE in `$DRBDADM sh-resources`; do
+ for DEVICE in `$DRBDADM sh-dev $RESOURCE`; do
+ UDEV_TIMEOUT_LOCAL=$UDEV_TIMEOUT
+ while [ ! -e $DEVICE ] && [ $UDEV_TIMEOUT_LOCAL -gt 0 ] ; do
+ sleep 1
+ UDEV_TIMEOUT_LOCAL=$(( $UDEV_TIMEOUT_LOCAL-1 ))
+ done
+ done
+ done
+ eend 0
+
+ einfon "Waiting for connection "
+ $DRBDADM wait-con-int
+ ret=$?
+ echo
+
+ sleep 5
+
+ einfon "Become primary if configured "
+ $DRBDADM sh-b-pri all
+ echo
+
+ eend $ret
+ return $ret
+}
+
+stop() {
+ ebegin "Stopping all DRBD resources"
+
+ # Check for mounted drbd devices
+ if ! grep -q '^/dev/drbd' /proc/mounts &>/dev/null; then
+ if [ -e ${PROC_DRBD} ]; then
+ ${DRBDADM} down all
+ ret=$?
+ sleep 3
+ if [ -e /proc/modules ] && grep -q '^drbd' /proc/modules ; then
+ ${RMMOD} drbd
+ fi
+ fi
+ eend $ret
+ return $ret
+ else
+ einfo "drbd devices mounted, please umount them before trying to stop drbd!"
+ eend 1
+ return 1
+ fi
+}
+
+status() {
+ # NEEDS to be heartbeat friendly...
+ # so: put some "OK" in the output.
+
+ if [ -e $PROC_DRBD ]; then
+ ret=0
+ ebegin "drbd driver loaded OK; device status:"
+ eend $ret
+ cat $PROC_DRBD
+ else
+ ebegin "drbd not loaded"
+ ret=3
+ eend $ret
+ fi
+ return $ret
+}
+
+reload() {
+ ebegin "Reloading DRBD"
+ ${DRBDADM} adjust all
+ ret=$?
+ eend $ret
+ return $ret
+}
diff --git a/sys-cluster/drbd/files/drbd-8.3.11-kernel3.patch b/sys-cluster/drbd/files/drbd-8.3.11-kernel3.patch
new file mode 100644
index 000000000000..1eeca1b1b0ff
--- /dev/null
+++ b/sys-cluster/drbd/files/drbd-8.3.11-kernel3.patch
@@ -0,0 +1,17 @@
+--- a/drbd/Makefile 2011-07-07 12:55:39.000000000 +0200
++++ b/drbd/Makefile 2011-11-03 12:56:42.280603057 +0100
+@@ -77,9 +77,12 @@
+ endif
+ endif
+
++ KDIR_Makefile_VERSION = $(shell test -e $(KDIR)/Makefile && grep "^VERSION = " $(KDIR)/Makefile | cut -d " " -f 3)
+ KDIR_Makefile_PATCHLEVEL = $(shell test -e $(KDIR)/Makefile && grep "^PATCHLEVEL = " $(KDIR)/Makefile | cut -d " " -f 3)
+- ifneq ($(findstring $(KDIR_Makefile_PATCHLEVEL),12345),)
+- $(error "won't compile with this kernel version")
++ ifneq ($(KDIR_Makefile_VERSION),3)
++ ifneq ($(findstring $(KDIR_Makefile_PATCHLEVEL),12345),)
++ $(error "ici won't compile with this kernel version")
++ endif
+ endif
+
+ .PHONY: drbd.o default all greeting clean kbuild install dep tags
diff --git a/sys-cluster/drbd/files/drbd-8.3.8.1-implicits.patch b/sys-cluster/drbd/files/drbd-8.3.8.1-implicits.patch
new file mode 100644
index 000000000000..0fbbb92a2c3f
--- /dev/null
+++ b/sys-cluster/drbd/files/drbd-8.3.8.1-implicits.patch
@@ -0,0 +1,12 @@
+drbdadm_main.c:2525:2: warning: implicit declaration of function ‘stat’
+
+--- a/user/drbdadm_main.c
++++ b/user/drbdadm_main.c
+@@ -33,6 +33,7 @@
+ #include <search.h>
+
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <sys/wait.h>
+ #include <sys/poll.h>
+ #include <sys/socket.h>
diff --git a/sys-cluster/drbd/metadata.xml b/sys-cluster/drbd/metadata.xml
new file mode 100644
index 000000000000..cbfbad5934af
--- /dev/null
+++ b/sys-cluster/drbd/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <use>
+ <flag name='xen'>Enable Xen integration</flag>
+ <flag name='pacemaker'>Enable Pacemaker integration</flag>
+ <flag name='heartbeat'>Enable Heartbeat integration</flag>
+ </use>
+ <longdescription>
+ The user space tools to control, configure the DRBD driver, as well as integration programs and scripts
+ that glues the DRBD system to cluster management software and other system components.
+ </longdescription>
+</pkgmetadata>