summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2005-01-14 01:53:51 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2005-01-14 01:53:51 +0000
commit862fef16b14487a6fbdfa09408e05f8f1a31b6db (patch)
tree1bbd50734d5015a27a35a7fcaa19ffc361b0c659 /sys-cluster/drbd
parentcorrect md5sum. (diff)
downloadgentoo-2-862fef16b14487a6fbdfa09408e05f8f1a31b6db.tar.gz
gentoo-2-862fef16b14487a6fbdfa09408e05f8f1a31b6db.tar.bz2
gentoo-2-862fef16b14487a6fbdfa09408e05f8f1a31b6db.zip
new version 0.7.7, improved and cleaned ebuild. Fixes #67505, #65407.
Diffstat (limited to 'sys-cluster/drbd')
-rw-r--r--sys-cluster/drbd/ChangeLog14
-rw-r--r--sys-cluster/drbd/Manifest26
-rw-r--r--sys-cluster/drbd/drbd-0.7.7.ebuild75
-rw-r--r--sys-cluster/drbd/files/digest-drbd-0.7.71
-rwxr-xr-xsys-cluster/drbd/files/drbd-0.7-init68
-rw-r--r--sys-cluster/drbd/files/drbd-0.7.7-module-Makefile.patch21
6 files changed, 187 insertions, 18 deletions
diff --git a/sys-cluster/drbd/ChangeLog b/sys-cluster/drbd/ChangeLog
index 12a92fcfe967..b352ae60ae4b 100644
--- a/sys-cluster/drbd/ChangeLog
+++ b/sys-cluster/drbd/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-cluster/drbd
-# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/ChangeLog,v 1.8 2004/09/20 20:50:52 tantive Exp $
+# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/ChangeLog,v 1.9 2005/01/14 01:53:51 xmerlin Exp $
+
+*drbd-0.7.7 (13 Jan 2005)
+
+ 13 Jan 2005; Christian Zoffoli <xmerlin@gentoo.org> +files/drbd-0.7-init,
+ +files/drbd-0.7.7-module-Makefile.patch, +drbd-0.7.7.ebuild:
+ merged Brian Jackson's (iggy@gentoo.org> ebuild (attachment id=40930) with
+ my ebuild, added some additional checks to prevent drbd stop before umount the
+ device, removed unneed /var/lib/drbd dir, fixed "ACCESS DENIED" error in the
+ depmod phase, added Francisco Javier's <ffelix@sshinf.com> suggestions to use
+ the linux-mod eclass (attachment id=48373).
20 Sep 2004; Michael Imhof <tantive@gentoo.org>
-files/0.6.6-Makefile.vars.patch, -files/0.6.6-drbd-Makefile.patch,
diff --git a/sys-cluster/drbd/Manifest b/sys-cluster/drbd/Manifest
index be9ee24ed42d..4eabe5b0cb78 100644
--- a/sys-cluster/drbd/Manifest
+++ b/sys-cluster/drbd/Manifest
@@ -1,19 +1,13 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
+MD5 69a6815e95d71ce723dae24520319782 drbd-0.6.12-r1.ebuild 2100
+MD5 465a8ef005133cc4d7c7d48d5cfc8387 ChangeLog 2299
MD5 a64b9a1937a5cfc2fbaf373521f65d47 metadata.xml 223
-MD5 3fef70195ef808f123d799dff9314b73 ChangeLog 1774
-MD5 8221ca6b8fa8639e09eedc9b2deba9c8 drbd-0.6.12-r1.ebuild 2100
-MD5 f8ceed0b6be2ded4cdb079d38ac0c3d0 files/0.6.12-Makefile.vars.patch 675
-MD5 7416c44daab264a36cc8c5a2c35e757f files/0.6.12-scripts-Makefile.patch 1072
-MD5 3959588a14b9fba5df432a29d00fa63f files/digest-drbd-0.6.12-r1 63
-MD5 4ab78154d6a32d13d416f9915ad4bc28 files/0.6.12-init 701
+MD5 5e195b1649d486f17b150907a6d4ae14 drbd-0.7.7.ebuild 1732
MD5 463c9c89c7d3f156fc5581070abce14d files/0.6.12-conf.d 69
+MD5 4ab78154d6a32d13d416f9915ad4bc28 files/0.6.12-init 701
+MD5 7416c44daab264a36cc8c5a2c35e757f files/0.6.12-scripts-Makefile.patch 1072
MD5 52dc2e272f064349f8f70277159d4a5f files/0.6.12-module-Makefile.patch 776
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.4 (GNU/Linux)
-
-iD8DBQFBT0K7KtJO8LeSoosRAs80AJ9/8q0xhih4bQk6LNcLuf56pkUWagCfTdcU
-ki67zAyb1h+amu8CxsPTvKM=
-=z4WM
------END PGP SIGNATURE-----
+MD5 3959588a14b9fba5df432a29d00fa63f files/digest-drbd-0.6.12-r1 63
+MD5 f8ceed0b6be2ded4cdb079d38ac0c3d0 files/0.6.12-Makefile.vars.patch 675
+MD5 6edd5c82a5013d323beb734e353a676e files/drbd-0.7-init 1176
+MD5 cc42f194896b14c87944e9a5c5aaebf9 files/drbd-0.7.7-module-Makefile.patch 948
+MD5 965d3d560fe5fee18c3fdd1bec9748fd files/digest-drbd-0.7.7 62
diff --git a/sys-cluster/drbd/drbd-0.7.7.ebuild b/sys-cluster/drbd/drbd-0.7.7.ebuild
new file mode 100644
index 000000000000..ca2d50c3fe3e
--- /dev/null
+++ b/sys-cluster/drbd/drbd-0.7.7.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/drbd-0.7.7.ebuild,v 1.1 2005/01/14 01:53:51 xmerlin Exp $
+
+inherit eutils versionator linux-mod
+
+LICENSE="GPL-2"
+KEYWORDS="~x86"
+
+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}/${P}.tar.gz"
+HOMEPAGE="http://www.drbd.org"
+
+IUSE=""
+
+DEPEND="virtual/linux-sources"
+RDEPEND=">=sys-cluster/heartbeat-1.0.4"
+SLOT="0"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${P}-module-Makefile.patch || die
+}
+
+src_compile() {
+ check_KV
+ set_arch_to_kernel
+
+ einfo ""
+ einfo "Your kernel-sources in /usr/src/linux-${KV} must be properly configured"
+ einfo "and match the currently running kernel version ${KV}"
+ einfo "If otherwise -> build will fail."
+ einfo ""
+
+ emake KDIR=${KERNEL_DIR} || die
+}
+
+src_install() {
+ make PREFIX=${D} install
+
+ # gentoo-ish init-script
+ dodir /etc/init.d
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/drbd-0.7-init drbd || die
+
+ # needed by drbd startup script
+ keepdir /var/lib/drbd
+
+ # docs
+ dodoc README ChangeLog COPYING
+ dodoc documentation/NFS-Server-README.txt
+
+ # 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
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ einfo ""
+ einfo "Please remember to re-emerge drbd when you upgrade your kernel!"
+ einfo ""
+ einfo "Please copy and gunzip the configuration file"
+ einfo "from /usr/share/doc/${PF}/drbd.conf.gz 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 ""
+}
diff --git a/sys-cluster/drbd/files/digest-drbd-0.7.7 b/sys-cluster/drbd/files/digest-drbd-0.7.7
new file mode 100644
index 000000000000..59431bbe122a
--- /dev/null
+++ b/sys-cluster/drbd/files/digest-drbd-0.7.7
@@ -0,0 +1 @@
+MD5 b5e171fd1ecccfe8ebfac4f028314aac drbd-0.7.7.tar.gz 275496
diff --git a/sys-cluster/drbd/files/drbd-0.7-init b/sys-cluster/drbd/files/drbd-0.7-init
new file mode 100755
index 000000000000..e1f178a18b8f
--- /dev/null
+++ b/sys-cluster/drbd/files/drbd-0.7-init
@@ -0,0 +1,68 @@
+#!/sbin/runscript
+# Distributed under the terms of the GNU General Public License v2
+#
+# kindly provided by Ron O'Hara, see
+# http://thread.gmane.org/gmane.comp.linux.drbd/6429
+#
+# modified by Christian Zoffoli <xmerlin@gentoo.org>
+#
+
+opts="${opts} reload"
+
+DRBDADM="/sbin/drbdadm"
+PROC_DRBD="/proc/drbd"
+MODPROBE="modprobe"
+RMMOD="rmmod"
+
+depend() {
+ use logger
+ before heartbeat
+ after sshd
+ need net
+}
+
+start() {
+ ebegin "Starting DRBD"
+
+ if [ ! -f $PROC_DRBD ]; then
+ modprobe drbd &> /dev/null
+ fi
+
+ ${DRBDADM} up all
+ eend $ret
+}
+
+stop() {
+ ebegin "Stopping DRBD"
+
+ # Check for mounted drbd devices
+ if ! grep -q '^/dev/drbd' /proc/mounts &>/dev/null; then
+ if [ -f $PROC_DRBD ]; then
+ ${DRBDADM} down all
+ fi
+ eend $?
+ else
+ einfo "drbd devices mounted, please umount them before trying to stop drbd!!!"
+ eend 1
+ fi
+}
+
+status() {
+ # NEEDS to be heartbeat friendly...
+ # so: put some "OK" in the output.
+ ebegin "Status of DRBD"
+ if [ -e $PROC_DRBD ]; then
+ echo "drbd driver OK; device status:"
+ cat "$PROC_DRBD"
+ eend 0
+ else
+ echo >&2 "drbd not loaded"
+ eend 3
+ fi
+}
+
+reload() {
+ ebegin "Reloading DRBD"
+ ${DRBDADM} adjust all
+ eend $?
+}
diff --git a/sys-cluster/drbd/files/drbd-0.7.7-module-Makefile.patch b/sys-cluster/drbd/files/drbd-0.7.7-module-Makefile.patch
new file mode 100644
index 000000000000..ebb5a6695376
--- /dev/null
+++ b/sys-cluster/drbd/files/drbd-0.7.7-module-Makefile.patch
@@ -0,0 +1,21 @@
+--- drbd-0.7.6/drbd/Makefile.chris 2004-12-15 06:26:37.977601576 +0100
++++ drbd-0.7.6/drbd/Makefile 2004-12-15 06:27:02.997797928 +0100
+@@ -154,12 +154,12 @@
+ # install -d $(PREFIX)/var/lib/drbd
+ install -d $(PREFIX)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
+ install -m 644 $(MODOBJ) $(PREFIX)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
+- ifeq ($(shell uname -r),$(KERNELRELEASE))
+- /sbin/depmod -a || /sbin/depmod -e $(MODOBJ) 2>&1 >/dev/null || true
+- else
+- [ -e $(LINUX)/System.map ] && \
+- /sbin/depmod -F $(LINUX)/System.map -e ./$(MODOBJ) 2>&1 >/dev/null || true
+- endif
++# ifeq ($(shell uname -r),$(KERNELRELEASE))
++# /sbin/depmod -a || /sbin/depmod -e $(MODOBJ) 2>&1 >/dev/null || true
++# else
++# [ -e $(LINUX)/System.map ] && \
++# /sbin/depmod -F $(LINUX)/System.map -e ./$(MODOBJ) 2>&1 >/dev/null || true
++# endif
+ else
+ install:
+ @echo "No .kernelrelease found. Do you need to 'make' the module first?"