diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-cluster/drbd-utils |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-cluster/drbd-utils')
-rw-r--r-- | sys-cluster/drbd-utils/Manifest | 9 | ||||
-rw-r--r-- | sys-cluster/drbd-utils/drbd-utils-8.9.3.ebuild | 94 | ||||
-rw-r--r-- | sys-cluster/drbd-utils/drbd-utils-8.9.6-r1.ebuild | 94 | ||||
-rw-r--r-- | sys-cluster/drbd-utils/drbd-utils-8.9.6.ebuild | 94 | ||||
-rw-r--r-- | sys-cluster/drbd-utils/files/drbd-utils-8.0.rc | 158 | ||||
-rw-r--r-- | sys-cluster/drbd-utils/files/run-lock.patch | 13 | ||||
-rw-r--r-- | sys-cluster/drbd-utils/metadata.xml | 17 |
7 files changed, 479 insertions, 0 deletions
diff --git a/sys-cluster/drbd-utils/Manifest b/sys-cluster/drbd-utils/Manifest new file mode 100644 index 000000000000..e2a89c45f493 --- /dev/null +++ b/sys-cluster/drbd-utils/Manifest @@ -0,0 +1,9 @@ +AUX drbd-utils-8.0.rc 3073 SHA256 6c81121e5d1543b8ab8ec4aa525bb5afe18f853748c8a8f3d14a697aecc735fc SHA512 9cd9de6d41552f080f3d590630ecd1686ea32b9e9db3b78a132e7fb55318a338331c09af5d80ba885d48a001ee3f7a6f791ddd806e834d2a7c72f01a00ec2f6c WHIRLPOOL 9dda501dff640fd1bfe432711f89dea87ef4ed225413cd51481a71ff2817ab3072084deed64767d170d76ea5b43828a19e9a85ca0ec3558a40c9f22c6f8c9fe9 +AUX run-lock.patch 564 SHA256 37e9485d4bf647fa11a78631965350a3dc0f0e8de1624170dd393a3da7743939 SHA512 779ad53c9f019b9dcc748177d6017ca06f1b450bf0889307c9660c574c09414964e4c5e4d6f2f3e8fc540ba14a1d489d09991b813af1581b2f6cd4ba491455ab WHIRLPOOL 3a361d18c9d83759f121ffb744158f75d8cf2c78400f646d77ac8da4b9d8433b4b0ee37dea0bdb61f21d41c1aa2cb9ba7930dfbf13a09b66ba4b48e63fed7169 +DIST drbd-utils-8.9.3.tar.gz 768700 SHA256 011050578c153bf4fef86e03749304ff9f333b7af3512c5c395e0e870a0445bd SHA512 1b1cb3d1eb7f14f693e8a73b9864257e439e443ce685084c3864da4340113f18355d1e447177956ee0d8edcee35e771442b9f85b89ec5a6eb0ad717738461ca2 WHIRLPOOL f21aec707f06d361ae336d0cf1e55fa546e5f250f869c80829f806eaef7d59c12ff30d1ded39e3624b162a9bff1ffe96cb3cb1acd85ca58ca29a4998740fba85 +DIST drbd-utils-8.9.6.tar.gz 788183 SHA256 297b77c9b3f88de2e7dae459234f2753ea4fc2805282b2d276e35cf51e292913 SHA512 cbdeeb7b298bc21de0d2188566362d7a634a72df243403f4bc91d5836c757f15ee86314b1385860aecda5657be5dc6309f2481b0403012bde841dd0618188938 WHIRLPOOL 4c379ecf15e71f5a504873a5f1c889a561df35eb99488f014085611e1bf804bf7877dba6f21b9e8ebacf26391b9ce0707c1fe07ba55f9b0cd887e34e0b6e2975 +EBUILD drbd-utils-8.9.3.ebuild 2410 SHA256 c957ff28a2f49bb1aed49feecc9d5b8d11e406101989197e02d0fbb409f960fc SHA512 91530010427a1cbc5cc5ae8d6026954b626b21495dfc90c34ae92acead467813f7c7d929d32a3401b01b26cba31199c9ef78ad69d74484d59f924b51faf43928 WHIRLPOOL 9b23730ff214dddba14cdb46239dd215e9cc8b85e60b11b29089fb18d25bbffd7ebe6feeb0b0690ae7bf08a44969a17113d2f211d2f5cb2976b03ea28dc8adff +EBUILD drbd-utils-8.9.6-r1.ebuild 2422 SHA256 0ffd8ffe70d3bb5d3db8fb37e44d3120db934f8f1ab8671410988af7e441b539 SHA512 d2c4b3ccc0ebefc7212a9575a4042770764ad922b6fa99bf25b85df3ccd55e477101b0ea2c9a885aa61800b42041aa0c29460223329f88934aecea5debba53b8 WHIRLPOOL bdd492860c43ba79d5699f0ed8e250f58bc322d3d96f8be5dcba0668856678f0d2a42c34e70f41fb55a2a590ae891f9ce06304c7ef40631a5510e5fb812a8eb6 +EBUILD drbd-utils-8.9.6.ebuild 2422 SHA256 0ffd8ffe70d3bb5d3db8fb37e44d3120db934f8f1ab8671410988af7e441b539 SHA512 d2c4b3ccc0ebefc7212a9575a4042770764ad922b6fa99bf25b85df3ccd55e477101b0ea2c9a885aa61800b42041aa0c29460223329f88934aecea5debba53b8 WHIRLPOOL bdd492860c43ba79d5699f0ed8e250f58bc322d3d96f8be5dcba0668856678f0d2a42c34e70f41fb55a2a590ae891f9ce06304c7ef40631a5510e5fb812a8eb6 +MISC ChangeLog 1959 SHA256 f7fca460fa8385e78b620b0f1063e24d6f4c8a0cd2b05d737caf7ae803699c31 SHA512 3ebfebb34e1d1d73eafb774da9af58355d3f1c6f3d58b18acf1b2a505d14cfe1a50f30b6427194fba1491a11b3e8a3ea65c83b768f23cb35e35941396a68243e WHIRLPOOL 6e197985dd4747a170a942333fb28c412b3f3a394f1dd4671c6bef68dc17b59bd0e3a799ef9c9b945ecffc59f117ab7ec22e6e63b76820d9863b260b5834e1b9 +MISC metadata.xml 684 SHA256 5fc43a01e2ab5a0e1a0ea020fb5f10eb0e8275cf7613ce07b6df6183c02850e9 SHA512 10f563a04424b8d23d6a54b2091c109f14370279bc08a6f489c308e612fba52da888ef152319485749a1807fc5daef7d7b1728ed2aa46dde74f877eff24a4ad5 WHIRLPOOL cdfb81556c277ac6086eafe0ee73f0a14ca9c91cbc5a718c028721b6bcfce4c86f36108144c9e39e84a00e37cc1d85fce2eb6b3ae2f1f47564fdf6b5c717c9d6 diff --git a/sys-cluster/drbd-utils/drbd-utils-8.9.3.ebuild b/sys-cluster/drbd-utils/drbd-utils-8.9.3.ebuild new file mode 100644 index 000000000000..7bb3129097f5 --- /dev/null +++ b/sys-cluster/drbd-utils/drbd-utils-8.9.3.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit bash-completion-r1 eutils multilib udev versionator + +LICENSE="GPL-2" + +DESCRIPTION="mirror/replicate block-devices across a network-connection" +SRC_URI="http://oss.linbit.com/drbd/${P/_/}.tar.gz" +HOMEPAGE="http://www.drbd.org" + +KEYWORDS="~amd64 ~x86" +IUSE="heartbeat pacemaker +udev xen" +SLOT="0" + +DEPEND="heartbeat? ( sys-cluster/heartbeat ) + pacemaker? ( sys-cluster/pacemaker ) + udev? ( virtual/udev ) + !!sys-cluster/drbd" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${P/_/}" + +src_prepare() { + # respect LDFLAGS, #453442 + sed -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" \ + -e "/\$(DESTDIR)\$(localstatedir)\/lock/d" \ + -i 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 (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/global_common.conf || die + sed -i -e "s:\$(sysconfdir)/udev:$(get_udevdir):" scripts/Makefile.in || die + + epatch "${FILESDIR}"/run-lock.patch + + autoreconf +} + +src_configure() { + econf \ + --localstatedir=/var \ + --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/-utils/} + + dodoc scripts/drbd.conf.example + + dosym /usr/sbin/drbdadm /sbin/drbdadm +} + +pkg_postinst() { + einfo + einfo "Please copy and gunzip the configuration file:" + einfo "from /usr/share/doc/${PF}/${PN/-utils/}.conf.example.bz2 to /etc/${PN/-utils/}.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-utils/drbd-utils-8.9.6-r1.ebuild b/sys-cluster/drbd-utils/drbd-utils-8.9.6-r1.ebuild new file mode 100644 index 000000000000..d66c244db4a2 --- /dev/null +++ b/sys-cluster/drbd-utils/drbd-utils-8.9.6-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit bash-completion-r1 eutils multilib udev versionator + +LICENSE="GPL-2" + +DESCRIPTION="mirror/replicate block-devices across a network-connection" +SRC_URI="http://oss.linbit.com/drbd/${P/_/}.tar.gz" +HOMEPAGE="http://www.drbd.org" + +KEYWORDS="~amd64 ~x86" +IUSE="heartbeat pacemaker +udev xen" +SLOT="0" + +DEPEND="heartbeat? ( sys-cluster/heartbeat ) + pacemaker? ( sys-cluster/pacemaker ) + udev? ( virtual/udev ) + !!sys-cluster/drbd" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${P/_/}" + +src_prepare() { + # respect LDFLAGS, #453442 + sed -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" \ + -e "/\$(DESTDIR)\$(localstatedir)\/lock/d" \ + -i 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 (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/global_common.conf || die + sed -i -e "s:\$(sysconfdir)/udev:$(get_udevdir):" scripts/Makefile.in || die + + epatch "${FILESDIR}"/run-lock.patch + + autoreconf +} + +src_configure() { + econf \ + --localstatedir=/var \ + --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 install-doc + dodoc README ChangeLog + + # install our own init script + newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN/-utils/} + + dodoc scripts/drbd.conf.example + + dosym /usr/sbin/drbdadm /sbin/drbdadm +} + +pkg_postinst() { + einfo + einfo "Please copy and gunzip the configuration file:" + einfo "from /usr/share/doc/${PF}/${PN/-utils/}.conf.example.bz2 to /etc/${PN/-utils/}.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-utils/drbd-utils-8.9.6.ebuild b/sys-cluster/drbd-utils/drbd-utils-8.9.6.ebuild new file mode 100644 index 000000000000..d66c244db4a2 --- /dev/null +++ b/sys-cluster/drbd-utils/drbd-utils-8.9.6.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit bash-completion-r1 eutils multilib udev versionator + +LICENSE="GPL-2" + +DESCRIPTION="mirror/replicate block-devices across a network-connection" +SRC_URI="http://oss.linbit.com/drbd/${P/_/}.tar.gz" +HOMEPAGE="http://www.drbd.org" + +KEYWORDS="~amd64 ~x86" +IUSE="heartbeat pacemaker +udev xen" +SLOT="0" + +DEPEND="heartbeat? ( sys-cluster/heartbeat ) + pacemaker? ( sys-cluster/pacemaker ) + udev? ( virtual/udev ) + !!sys-cluster/drbd" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${P/_/}" + +src_prepare() { + # respect LDFLAGS, #453442 + sed -e "s/\$(CC) -o/\$(CC) \$(LDFLAGS) -o/" \ + -e "/\$(DESTDIR)\$(localstatedir)\/lock/d" \ + -i 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 (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/global_common.conf || die + sed -i -e "s:\$(sysconfdir)/udev:$(get_udevdir):" scripts/Makefile.in || die + + epatch "${FILESDIR}"/run-lock.patch + + autoreconf +} + +src_configure() { + econf \ + --localstatedir=/var \ + --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 install-doc + dodoc README ChangeLog + + # install our own init script + newinitd "${FILESDIR}"/${PN}-8.0.rc ${PN/-utils/} + + dodoc scripts/drbd.conf.example + + dosym /usr/sbin/drbdadm /sbin/drbdadm +} + +pkg_postinst() { + einfo + einfo "Please copy and gunzip the configuration file:" + einfo "from /usr/share/doc/${PF}/${PN/-utils/}.conf.example.bz2 to /etc/${PN/-utils/}.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-utils/files/drbd-utils-8.0.rc b/sys-cluster/drbd-utils/files/drbd-utils-8.0.rc new file mode 100644 index 000000000000..e2ced85b146c --- /dev/null +++ b/sys-cluster/drbd-utils/files/drbd-utils-8.0.rc @@ -0,0 +1,158 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +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="" +PATH=${PATH}:/lib/drbd:/lib64/drbd + +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 -n ".. "; + fi + IFS=$IFS_O + eval $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-utils/files/run-lock.patch b/sys-cluster/drbd-utils/files/run-lock.patch new file mode 100644 index 000000000000..5ff7ab21f7c3 --- /dev/null +++ b/sys-cluster/drbd-utils/files/run-lock.patch @@ -0,0 +1,13 @@ +--- configure.ac.orig 2015-01-31 23:19:18.745021931 +0000 ++++ configure.ac 2015-01-31 23:19:38.988027506 +0000 +@@ -353,8 +353,8 @@ + AH_TEMPLATE(DRBD_LEGACY_84, [Include support for drbd-8.4 kernel code]) + + AC_SUBST(DRBD_LIB_DIR, [$localstatedir/lib/$PACKAGE_TARNAME]) +-AC_SUBST(DRBD_RUN_DIR, [$localstatedir/run/$PACKAGE_TARNAME]) +-AC_SUBST(DRBD_LOCK_DIR, [$localstatedir/lock]) ++AC_SUBST(DRBD_RUN_DIR, [/run/$PACKAGE_TARNAME]) ++AC_SUBST(DRBD_LOCK_DIR, [/run/lock]) + AC_SUBST(DRBD_CONFIG_DIR, [$sysconfdir]) + + AC_DEFINE_UNQUOTED(DRBD_LIB_DIR, ["$DRBD_LIB_DIR"]) diff --git a/sys-cluster/drbd-utils/metadata.xml b/sys-cluster/drbd-utils/metadata.xml new file mode 100644 index 000000000000..19706db7b3c0 --- /dev/null +++ b/sys-cluster/drbd-utils/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>cluster@gentoo.org</email> + <name>Gentoo Cluster Project</name> + </maintainer> + <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> |