diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2008-03-17 16:59:57 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2008-03-17 16:59:57 +0000 |
commit | 5e0070ccfb80bfde0193dfba8096802651cf2a91 (patch) | |
tree | 17143981c13f1165ea8040c7f5623b274a8c469c /sys-cluster | |
parent | Version bump. 1.0x.00 is scheduled to be removed soon. (diff) | |
download | historical-5e0070ccfb80bfde0193dfba8096802651cf2a91.tar.gz historical-5e0070ccfb80bfde0193dfba8096802651cf2a91.tar.bz2 historical-5e0070ccfb80bfde0193dfba8096802651cf2a91.zip |
Version bump. 1.0x.00 is scheduled to be removed soon.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/gnbd/ChangeLog | 16 | ||||
-rw-r--r-- | sys-cluster/gnbd/Manifest | 32 | ||||
-rw-r--r-- | sys-cluster/gnbd/files/gnbd-client-1.0x.conf (renamed from sys-cluster/gnbd/files/gnbd-client.conf) | 2 | ||||
-rwxr-xr-x | sys-cluster/gnbd/files/gnbd-client-1.0x.rc (renamed from sys-cluster/gnbd/files/gnbd-client.rc) | 2 | ||||
-rw-r--r-- | sys-cluster/gnbd/files/gnbd-client-2.0x.conf | 5 | ||||
-rwxr-xr-x | sys-cluster/gnbd/files/gnbd-client-2.0x.rc | 100 | ||||
-rw-r--r-- | sys-cluster/gnbd/files/gnbd-srv-1.0x.conf (renamed from sys-cluster/gnbd/files/gnbd-srv.conf) | 2 | ||||
-rwxr-xr-x | sys-cluster/gnbd/files/gnbd-srv-1.0x.rc (renamed from sys-cluster/gnbd/files/gnbd-srv.rc) | 2 | ||||
-rw-r--r-- | sys-cluster/gnbd/files/gnbd-srv-2.0x.conf | 5 | ||||
-rwxr-xr-x | sys-cluster/gnbd/files/gnbd-srv-2.0x.rc | 81 | ||||
-rw-r--r-- | sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild | 22 | ||||
-rw-r--r-- | sys-cluster/gnbd/gnbd-1.03.00.ebuild | 18 | ||||
-rw-r--r-- | sys-cluster/gnbd/gnbd-1.04.00.ebuild | 18 | ||||
-rw-r--r-- | sys-cluster/gnbd/gnbd-2.02.00.ebuild | 67 |
14 files changed, 329 insertions, 43 deletions
diff --git a/sys-cluster/gnbd/ChangeLog b/sys-cluster/gnbd/ChangeLog index 6b0d77606cca..d44cf585bb6a 100644 --- a/sys-cluster/gnbd/ChangeLog +++ b/sys-cluster/gnbd/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for sys-cluster/gnbd -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/ChangeLog,v 1.23 2007/05/12 13:32:43 xmerlin Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/ChangeLog,v 1.24 2008/03/17 16:59:56 xmerlin Exp $ + +*gnbd-2.02.00 (17 Mar 2008) + + 17 Mar 2008; Christian Zoffoli <xmerlin@gentoo.org> + +files/gnbd-client-1.0x.conf, +files/gnbd-srv-1.0x.conf, + +files/gnbd-client-1.0x.rc, +files/gnbd-srv-1.0x.rc, + +files/gnbd-client-2.0x.conf, +files/gnbd-srv-2.0x.conf, + +files/gnbd-client-2.0x.rc, +files/gnbd-srv-2.0x.rc, + -files/gnbd-client.conf, -files/gnbd-client.rc, -files/gnbd-srv.conf, + -files/gnbd-srv.rc, gnbd-1.02.00-r1.ebuild, gnbd-1.03.00.ebuild, + gnbd-1.04.00.ebuild, +gnbd-2.02.00.ebuild: + Version bump. 1.0x.00 is scheduled to be removed soon. 12 May 2007; Christian Zoffoli <xmerlin@gentoo.org> gnbd-1.03.00.ebuild: Stable on x86. diff --git a/sys-cluster/gnbd/Manifest b/sys-cluster/gnbd/Manifest index 8df21f74ac01..9a00373f950d 100644 --- a/sys-cluster/gnbd/Manifest +++ b/sys-cluster/gnbd/Manifest @@ -1,15 +1,31 @@ -AUX gnbd-client.conf 243 RMD160 5f1a4f31dbf4d03810a31ffa55002d27aa5b09e6 SHA1 be20eec99ac56f00973036529869e8b937a72f32 SHA256 76358bdea27d3e882a2319d91138483695c27c83a17f65b663f88003daffd923 -AUX gnbd-client.rc 2761 RMD160 107536c6dc7e7d2219acc144ad6341ea4646dfc4 SHA1 64ab75192b2c40991593137f281f2ad6b803c934 SHA256 ca0ef5ecca2922c95206f0c2a9432e0ae8bd37d387e74346b90bf8364faae55e -AUX gnbd-srv.conf 237 RMD160 6ec652c59c093d623147b21a4232b3fea571e0fc SHA1 bf04fe9de5fa269cbd98483d797d5a17337880a3 SHA256 88ba08bdd9c272fcf27edf29d507b39f2db95b3c36ab3e0331e7b20774919218 -AUX gnbd-srv.rc 1967 RMD160 1088e923547df8a63dc7a0a792c81a389164c2c7 SHA1 57dde9c402407a3078711fcb70ffa3868ab4904a SHA256 7a076c909e6358c2cce062a508ca9a56a7230488e77e82025e0dd4bd749c9d49 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX gnbd-client-1.0x.conf 248 RMD160 31571aa4c32728bc131e0af714b7591d83aa31eb SHA1 5bf17af9a31bba327662b61521e920d60961d969 SHA256 3831db69bc1b092f019d51f952d74f4f1e1c585014ff674851ac33d9a2dea498 +AUX gnbd-client-1.0x.rc 2766 RMD160 3207ff76d087cd1aa52a3df84e27632db3132f01 SHA1 5e9c6384b79539bea83104d48a8fb7352601250c SHA256 1e30471a26ce52e4effb1bd7e2e67404910755bc9c1a52d9fd45820a176f213e +AUX gnbd-client-2.0x.conf 248 RMD160 c24dfeeb546f2ad58f63bf1a776cf78f021b0dcb SHA1 135f16705101f4b2f47ca0b71f5f2876eb3b0ba3 SHA256 045c9af6236fd3dcaaa96faf8477cd6d154228755b6ed465c70ed2d80299dbf8 +AUX gnbd-client-2.0x.rc 2789 RMD160 21e65237ab2d1af6afab59162e3e6e7202cafd38 SHA1 81eca7c5facaaa293063d7f000343a274a8a97cb SHA256 12abe553131c142ab151975ce34fa387849932c826e8a38ff61be61705701ac2 +AUX gnbd-srv-1.0x.conf 242 RMD160 eba961749867be35b5274b03bf67f7e8fbe334a3 SHA1 55fe78251ef779452d0f52c31f4525777fdb9e7f SHA256 3e9c1c3904e4a293164c2b2656b5e525d68d32ad09e9b06a6ebc0faadfb9c998 +AUX gnbd-srv-1.0x.rc 1972 RMD160 770ae1923613b31010b2f66720fe4a7c5021a18e SHA1 3f20cfd8b35fb85787105f0fe4ea41de4352e99a SHA256 53d342addec5414a014ca0c3bf05e60337cd0d3907be1c64ff250c8ed4282068 +AUX gnbd-srv-2.0x.conf 242 RMD160 97ffaf3641fb64c874c5ca285ec353654bce46b3 SHA1 750c15f28f5028fc8c36106f2b83dc09e6bef56e SHA256 d1bc310481ab4005c45623d1d57e1c4ee429865af4788e5f685122dd73f8e9e4 +AUX gnbd-srv-2.0x.rc 1970 RMD160 52a630cb0caca235ee8ce86a6469e4f486e7864d SHA1 5da33a8592076083a062d4cf893f0ec454a902c8 SHA256 6165a67efd4b0db836607d6a371204853f99bfc53085c0d08796243021666a36 AUX gnbd.devfs 332 RMD160 d811c80610b0b1618e70cac0af588f3f7d0d04ff SHA1 a44dc1c955b13b4268843c64d63d0dcd4b0fd6a0 SHA256 8a67ac6ad801178db5783595642f54f97fb6ecf5a23aebc631b6e33930c9d06e AUX gnbdtab 177 RMD160 69bddcac6110f5ac127dcec937361dc2551a9c02 SHA1 e43b0c3f68bc994531f017d6094c2eae72c216ae SHA256 271f519506eda3a4630ac6870bc2b5ad1e9b6ff01f063d63c6970e1ed9fd47a1 DIST cluster-1.02.00.tar.gz 1356451 RMD160 e9c0cdd1f5a7542c8a4ea38ccf6d057767269dc5 SHA1 d74cadb1ef21d1cfda333b20d7ef20272e0002d6 SHA256 de45885146f1481808f7a34af5e6b7e2042895a4e3844eaa6161f942345c7849 DIST cluster-1.03.00.tar.gz 1658274 RMD160 6fc16e2edba73dd1a83ecfad749b1553eca6d938 SHA1 c205d8ec034433c33f26724f7f69b0028d2a63d4 SHA256 e61c2438c7ee8d546aec9dd86ee1851c9a71f127c25ad1fb0c59eb4ed534e97b DIST cluster-1.04.00.tar.gz 1663798 RMD160 5b241f38123c9ad65faf2a9eda7aa3e2dabee839 SHA1 af3bb244a11a6a26c31b142009f6c1f771799337 SHA256 6f4b48e67383681ea6ad6e2907b56e755049816186375c4f2bcb9482da31c2c2 +DIST cluster-2.02.00.tar.gz 8316680 RMD160 3d054699b91f57d8b07d7013dd718a7662d712aa SHA1 8471618222882427ca395f098695c33d2466559c SHA256 c68a62b49780a59dcf075e57fc2aac4524dd27e63ad80c8a2f1313307bca9498 DIST gnbd-1.02.00-20060713-cvs.patch.gz 5191 RMD160 a87ae833bb486a10d84771c09b81c8ce50e3c5ba SHA1 ef959b7fab4b47a4a78cdd0dcac379efee2923ac SHA256 ae877ec5d3665da985e59605f2358bddbc6e77bd282a4dd85a9db1aab5068ef3 -EBUILD gnbd-1.02.00-r1.ebuild 1463 RMD160 be7a9a26dfb7772699619c89433f0b862513e7b0 SHA1 da2027538aebdef2cc3d320f499e73ce08e1ff55 SHA256 ce757f0452282d54f8fe45867aba2d51cf2b90004962ff3359a1fa1b14cd8d20 -EBUILD gnbd-1.03.00.ebuild 1185 RMD160 2bb91038e3978e8afba55b08fe23b980cec19a6c SHA1 462a2be803ef1b305c785e0534986432dca6c269 SHA256 d70b3f1ea261247adfa52f742dc3feade638a81b5112425c1a4c039f91ace5a9 -EBUILD gnbd-1.04.00.ebuild 1186 RMD160 1167f198b84a9ee74592f7c9445bf9c752c0e715 SHA1 919f217ac867ea5413d9ad5da9b89bbcff46c3ec SHA256 5d4a0f982d71ecd8f15a0bc2b7c01f43c45fb4322e82696a226d070d16385079 -MISC ChangeLog 3626 RMD160 b476c3cc159aa2ed666722432a66c3d00997056c SHA1 6393432c5ecaab2838d9a96ee456e65c8e74e6ba SHA256 88083a7e4502ab80a16eb5638c481a19ac8a75a7c3c3a56935d809ac6b157d6f +EBUILD gnbd-1.02.00-r1.ebuild 1501 RMD160 04528a2047fafa0eb026bba570bb3425dbb7b36a SHA1 de261df603c82ed39aa6a8d91675cf823ac6a405 SHA256 556f7324d28b668fb88158ab3b29a11e05f751a9e6de18b03642f9d3f5ed43b0 +EBUILD gnbd-1.03.00.ebuild 1219 RMD160 1d329a6b85868f3d9bf3ba4142d493b6511a39cd SHA1 9cd328a5a89b80a502d9a014a44eb70f154688c9 SHA256 fad891d516c14704c758ab8042889fd796fa2c7b52b6ccf40890fd2774dd6283 +EBUILD gnbd-1.04.00.ebuild 1220 RMD160 f0be805e4bcc8d34c890293ef2158c9b46f5b670 SHA1 e7db605867501810587b32fea4f13e674104869b SHA256 204ac708bc8f6e11dba104868f17836a25de9bea3e8cb2bea1b4cb1cad6fa6da +EBUILD gnbd-2.02.00.ebuild 1720 RMD160 32a81a1c527ccb6e7df2c5c4ce46b83ca45f3a81 SHA1 48e94c17ea4d377a9592a3fdbece2e23bfe321d0 SHA256 49fa669a6373fb90de902463af9b3345d7f207573773f053fe5dd3533f29bdc6 +MISC ChangeLog 4179 RMD160 238fd8d5af3fe7b6f4923570da6af25b0fb1d95a SHA1 e5b87df9555b3f3680c16c5621f17a491fe43827 SHA256 0c25055a539cd1f61c62348ae7f1392a596f2e60b5f6b95519a00f03657bd03f MISC metadata.xml 229 RMD160 4dcf17b88c5f4db2e817f473f3e8269b0bff2e6e SHA1 e6315be43241c55bdc0d12a42fa05632c5ff9b79 SHA256 49e13d2d49bef7298e3bb665ebeceeff9b0880fae5ff639cb8405993504f244f +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.7 (GNU/Linux) + +iD8DBQFH3qOXgMUyd/cdjWsRAttqAKCFTjgNymh2ucOz6E1FzGOla879SACffV7U +vIxLBVeSzcehWNoMAf8rs3w= +=Wsx5 +-----END PGP SIGNATURE----- diff --git a/sys-cluster/gnbd/files/gnbd-client.conf b/sys-cluster/gnbd/files/gnbd-client-1.0x.conf index 5952f4e7af5d..77590695b69f 100644 --- a/sys-cluster/gnbd/files/gnbd-client.conf +++ b/sys-cluster/gnbd/files/gnbd-client-1.0x.conf @@ -1,5 +1,5 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client.conf,v 1.1 2005/10/07 19:48:57 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client-1.0x.conf,v 1.1 2008/03/17 16:59:57 xmerlin Exp $ GNBD_CLIENT_OPTS="" diff --git a/sys-cluster/gnbd/files/gnbd-client.rc b/sys-cluster/gnbd/files/gnbd-client-1.0x.rc index b83bdac3f186..e14cc30bf829 100755 --- a/sys-cluster/gnbd/files/gnbd-client.rc +++ b/sys-cluster/gnbd/files/gnbd-client-1.0x.rc @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client.rc,v 1.6 2007/03/12 19:55:57 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client-1.0x.rc,v 1.1 2008/03/17 16:59:57 xmerlin Exp $ depend() { use dns logger diff --git a/sys-cluster/gnbd/files/gnbd-client-2.0x.conf b/sys-cluster/gnbd/files/gnbd-client-2.0x.conf new file mode 100644 index 000000000000..751342e41abc --- /dev/null +++ b/sys-cluster/gnbd/files/gnbd-client-2.0x.conf @@ -0,0 +1,5 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client-2.0x.conf,v 1.1 2008/03/17 16:59:57 xmerlin Exp $ + +GNBD_CLIENT_OPTS="" diff --git a/sys-cluster/gnbd/files/gnbd-client-2.0x.rc b/sys-cluster/gnbd/files/gnbd-client-2.0x.rc new file mode 100755 index 000000000000..fbe8eb2d1d10 --- /dev/null +++ b/sys-cluster/gnbd/files/gnbd-client-2.0x.rc @@ -0,0 +1,100 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client-2.0x.rc,v 1.1 2008/03/17 16:59:57 xmerlin Exp $ + +depend() { + use dns logger + need net + need cman +} + +load_modules() { + local module modules + modules=$1 + + for module in ${modules}; do + ebegin "Loading ${module} kernel module" + modprobe ${module} + eend $? "Failed to load ${module} kernel module" + done +} + +unload_modules() { + local module modules + modules=$1 + + for module in ${modules}; do + ebegin "Unloading ${module} kernel module" + modprobe -r ${module} + eend $? "Failed to unload ${module} kernel module" + done +} + + +start() { + if [ ! -f /etc/gnbdtab ] ; then + eerror "Please create /etc/gnbdtab" + eerror "Sample conf: /etc/gnbdtab" + return 1 + fi + + load_modules gnbd + + GNBD=`cat /etc/gnbdtab | egrep '^import'` + if [ -n "$GNBD" ] ; then + ebegin "Importing all GNBDs devices" + einfo "$(awk '/^import/ { print "--> server:", $2 }' /etc/gnbdtab )" + cat /etc/gnbdtab | awk '/^import/ { print "-i", $2 }' | xargs -l gnbd_import ${GNBD_CLIENT_OPTS} > /dev/null + eend $? "Failed to import gnbd devices" + fi +} + +stop() { + # umount manually mounted gfs filesystems + local sig retry + local remaining="$(awk '( $3 == "gfs" || $3 == "gfs2" ) && $1 ~ /\/dev\/gnbd\// { if ($2 != "/") print $2 }' /proc/mounts | sort -r)" + + if [ -z "${remaining}" ] + then + ebegin "Unmounting GFS filesystems (GNBDs imported devices)" + eend 0 + else + sig= + retry=3 + while [ -n "${remaining}" -a "${retry}" -gt 0 ] + do + if [ "${retry}" -lt 3 ] + then + ebegin "Unmounting GFS filesystems (retry)" + umount ${remaining} &>/dev/null + eend $? "Failed to unmount GFS filesystems this retry" + else + ebegin "Unmounting GFS filesystems" + umount ${remaining} &>/dev/null + eend $? "Failed to unmount GFS filesystems" + fi + remaining="$(awk '( $3 == "gfs" || $3 == "gfs2" ) && $1 ~ /\/dev\/gnbd\// { if ($2 != "/") print $2 }' /proc/mounts | sort -r)" + [ -z "${remaining}" ] && break + /bin/fuser -k -m ${sig} ${remaining} &>/dev/null + sleep 5 + retry=$((${retry} -1)) + sig=-9 + done + fi + + local GNBD_MONITOR_PROC + + ebegin "Unimporting all GNBDs devices" + gnbd_import -q -R &> /dev/null + eend $? + + GNBD_MONITOR_PROC="$(pgrep gnbd_clusterd)" + if [ -n "${GNBD_MONITOR_PROC}" ]; then + ebegin "Stopping gnbd_monitor" + killall gnbd_monitor &> /dev/null + eend $? + fi + + unload_modules gnbd +} diff --git a/sys-cluster/gnbd/files/gnbd-srv.conf b/sys-cluster/gnbd/files/gnbd-srv-1.0x.conf index e3511f425b4a..f6cabbce3ca6 100644 --- a/sys-cluster/gnbd/files/gnbd-srv.conf +++ b/sys-cluster/gnbd/files/gnbd-srv-1.0x.conf @@ -1,5 +1,5 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv.conf,v 1.1 2005/10/07 19:48:57 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv-1.0x.conf,v 1.1 2008/03/17 16:59:57 xmerlin Exp $ GNBD_SRV_OPTS="" diff --git a/sys-cluster/gnbd/files/gnbd-srv.rc b/sys-cluster/gnbd/files/gnbd-srv-1.0x.rc index 4000e8fd11c7..b057ef3e329a 100755 --- a/sys-cluster/gnbd/files/gnbd-srv.rc +++ b/sys-cluster/gnbd/files/gnbd-srv-1.0x.rc @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv.rc,v 1.4 2005/10/07 19:48:57 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv-1.0x.rc,v 1.1 2008/03/17 16:59:57 xmerlin Exp $ depend() { use dns logger diff --git a/sys-cluster/gnbd/files/gnbd-srv-2.0x.conf b/sys-cluster/gnbd/files/gnbd-srv-2.0x.conf new file mode 100644 index 000000000000..179b5971247b --- /dev/null +++ b/sys-cluster/gnbd/files/gnbd-srv-2.0x.conf @@ -0,0 +1,5 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv-2.0x.conf,v 1.1 2008/03/17 16:59:57 xmerlin Exp $ + +GNBD_SRV_OPTS="" diff --git a/sys-cluster/gnbd/files/gnbd-srv-2.0x.rc b/sys-cluster/gnbd/files/gnbd-srv-2.0x.rc new file mode 100755 index 000000000000..7d396a327cde --- /dev/null +++ b/sys-cluster/gnbd/files/gnbd-srv-2.0x.rc @@ -0,0 +1,81 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-srv-2.0x.rc,v 1.1 2008/03/17 16:59:57 xmerlin Exp $ + +depend() { + use dns logger + need net + need cman +} + +GNBD_SRV_TIMEOUT=5 + +start() { + local GNBD + + if [ ! -f /etc/gnbdtab ] ; then + eerror "Please create /etc/gnbdtab" + eerror "Sample conf: /etc/gnbdtab" + return 1 + fi + + ebegin "Loading needed kernel modules for gnbd" + modprobe gnbd + eend $? "Failed to load needed kernel modules for gnbd" + + ebegin "Starting gnbd_serv" + start-stop-daemon --start --quiet --exec /sbin/gnbd_serv -- -q + eend $? "Failed to start gnbd_serv" + + GNBD=`cat /etc/gnbdtab | egrep '^export'` + if [ -n "$GNBD" ] ; then + ebegin "Exporting all GNBDs devices" + einfo "$(awk '/^export/ { print "--> device:", $4, "as", $3 }' /etc/gnbdtab )" + cat /etc/gnbdtab | awk '/^export/ { print "-d", $4, "-e", $3 }' | xargs -l gnbd_export ${GNBD_SRV_OPTS} > /dev/null + eend $? "Failed to export gnbd devices" + fi +} + +stop() { + + local GNBD_SRV_PROCS GNBD_CLUSTERD_PROC + + ebegin "Unexporting all GNBDs devices" + gnbd_export -q -R &> /dev/null + eend $? + + if [ "$?" -ne 0 ] + then + ewend 1 "Failed to unexport all gnbd devices" + else + eend 0 + + fi + + ebegin "Stopping gnbd_serv" + + GNBD_SRV_PROCS="$(pgrep gnbd_serv)" + while [ -n "${GNBD_SRV_PROCS}" ] && [ ${GNBD_SRV_TIMEOUT} -gt 0 ] ; do + gnbd_serv -k &> /dev/null + sleep 1 + GNBD_SRV_TIMEOUT=$(( ${GNBD_SRV_TIMEOUT}-1 )) + GNBD_SRV_PROCS="$(pgrep gnbd_serv)" + done + + if [ -n "${GNBD_SRV_PROCS}" ]; then + gnbd_serv -K &> /dev/null + fi + eend $? "Failed to stop gnbd_serv" + + GNBD_CLUSTERD_PROC="$(pgrep gnbd_clusterd)" + if [ -n "${GNBD_CLUSTERD_PROC}" ]; then + ebegin "Stopping gnbd_clusterd" + killall gnbd_clusterd &> /dev/null + eend $? + fi + + ebegin "Unloading gnbd kernel module" + modprobe -r gnbd + eend $? "Failed to unload gnbd kernel module" +} diff --git a/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild b/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild index ff3709388ddc..da34c6f647e7 100644 --- a/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild +++ b/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild,v 1.5 2007/03/09 11:19:32 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.02.00-r1.ebuild,v 1.6 2008/03/17 16:59:56 xmerlin Exp $ inherit eutils @@ -29,8 +29,8 @@ S="${WORKDIR}/${MY_P}/${PN}" src_unpack() { unpack ${A} - cd ${S} - epatch ${WORKDIR}/${PN}-${PV}-${CVS_RELEASE}-cvs.patch || die + cd "${S}" + epatch "${WORKDIR}"/${PN}-${PV}-${CVS_RELEASE}-cvs.patch || die } src_compile() { @@ -39,19 +39,19 @@ src_compile() { } src_install() { - emake DESTDIR=${D} install || die "install problem" + emake DESTDIR="${D}" install || die "install problem" - newinitd ${FILESDIR}/${PN}-client.rc ${PN}-client || die - newinitd ${FILESDIR}/${PN}-srv.rc ${PN}-srv || die + newinitd "${FILESDIR}"/${PN}-client-1.0x.rc ${PN}-client || die + newinitd "${FILESDIR}"/${PN}-srv-1.0x.rc ${PN}-srv || die - doconfd ${FILESDIR}/${PN}-client.conf || die - doconfd ${FILESDIR}/${PN}-srv.conf || die + doconfd "${FILESDIR}"/${PN}-client-1.0x.conf || die + doconfd "${FILESDIR}"/${PN}-srv-1.0x.conf || die insinto /etc - doins ${FILESDIR}/gnbdtab + doins "${FILESDIR}"/gnbdtab if $(has_version sys-fs/devfsd ) ; then insinto /etc/devfs.d/ - newins ${FILESDIR}/gnbd.devfs gnbd + newins "${FILESDIR}"/gnbd.devfs gnbd fi } diff --git a/sys-cluster/gnbd/gnbd-1.03.00.ebuild b/sys-cluster/gnbd/gnbd-1.03.00.ebuild index acc8b81a921e..8bcb7ee64938 100644 --- a/sys-cluster/gnbd/gnbd-1.03.00.ebuild +++ b/sys-cluster/gnbd/gnbd-1.03.00.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.03.00.ebuild,v 1.5 2007/05/12 13:32:43 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.03.00.ebuild,v 1.6 2008/03/17 16:59:56 xmerlin Exp $ CLUSTER_RELEASE="1.03.00" MY_P="cluster-${CLUSTER_RELEASE}" @@ -28,19 +28,19 @@ src_compile() { } src_install() { - emake DESTDIR=${D} install || die "install problem" + emake DESTDIR="${D}" install || die "install problem" - newinitd ${FILESDIR}/${PN}-client.rc ${PN}-client || die - newinitd ${FILESDIR}/${PN}-srv.rc ${PN}-srv || die + newinitd "${FILESDIR}"/${PN}-client-1.0x.rc ${PN}-client || die + newinitd "${FILESDIR}"/${PN}-srv-1.0x.rc ${PN}-srv || die - doconfd ${FILESDIR}/${PN}-client.conf || die - doconfd ${FILESDIR}/${PN}-srv.conf || die + doconfd "${FILESDIR}"/${PN}-client-1.0x.conf || die + doconfd "${FILESDIR}"/${PN}-srv-1.0x.conf || die insinto /etc - doins ${FILESDIR}/gnbdtab + doins "${FILESDIR}"/gnbdtab if $(has_version sys-fs/devfsd ) ; then insinto /etc/devfs.d/ - newins ${FILESDIR}/gnbd.devfs gnbd + newins "${FILESDIR}"/gnbd.devfs gnbd fi } diff --git a/sys-cluster/gnbd/gnbd-1.04.00.ebuild b/sys-cluster/gnbd/gnbd-1.04.00.ebuild index 64b42940b590..b41c6ad7efa2 100644 --- a/sys-cluster/gnbd/gnbd-1.04.00.ebuild +++ b/sys-cluster/gnbd/gnbd-1.04.00.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.04.00.ebuild,v 1.1 2007/03/09 11:19:32 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.04.00.ebuild,v 1.2 2008/03/17 16:59:56 xmerlin Exp $ CLUSTER_RELEASE="1.04.00" MY_P="cluster-${CLUSTER_RELEASE}" @@ -28,19 +28,19 @@ src_compile() { } src_install() { - emake DESTDIR=${D} install || die "install problem" + emake DESTDIR="${D}" install || die "install problem" - newinitd ${FILESDIR}/${PN}-client.rc ${PN}-client || die - newinitd ${FILESDIR}/${PN}-srv.rc ${PN}-srv || die + newinitd "${FILESDIR}"/${PN}-client-1.0x.rc ${PN}-client || die + newinitd "${FILESDIR}"/${PN}-srv-1.0x.rc ${PN}-srv || die - doconfd ${FILESDIR}/${PN}-client.conf || die - doconfd ${FILESDIR}/${PN}-srv.conf || die + doconfd "${FILESDIR}"/${PN}-client-1.0x.conf || die + doconfd "${FILESDIR}"/${PN}-srv-1.0x.conf || die insinto /etc - doins ${FILESDIR}/gnbdtab + doins "${FILESDIR}"/gnbdtab if $(has_version sys-fs/devfsd ) ; then insinto /etc/devfs.d/ - newins ${FILESDIR}/gnbd.devfs gnbd + newins "${FILESDIR}"/gnbd.devfs gnbd fi } diff --git a/sys-cluster/gnbd/gnbd-2.02.00.ebuild b/sys-cluster/gnbd/gnbd-2.02.00.ebuild new file mode 100644 index 000000000000..3a4355457786 --- /dev/null +++ b/sys-cluster/gnbd/gnbd-2.02.00.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-2.02.00.ebuild,v 1.1 2008/03/17 16:59:56 xmerlin Exp $ + +inherit eutils versionator + +CLUSTER_RELEASE="${PV}" +MY_P="cluster-${CLUSTER_RELEASE}" + +MAJ_PV="$(get_major_version)" +MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)" + +DESCRIPTION="GFS Network Block Devices" +HOMEPAGE="http://sources.redhat.com/cluster/" +SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="=sys-cluster/cman-lib-${CLUSTER_RELEASE}*" +DEPEND="${RDEPEND}" + + +S="${WORKDIR}/${MY_P}/${PN}" + +src_compile() { + (cd "${WORKDIR}"/${MY_P}; + ./configure \ + --cc=$(tc-getCC) \ + --cflags="-Wall" \ + --disable_kernel_check \ + --release_major="$MAJ_PV" \ + --release_minor="$MIN_PV" \ + --dlmlibdir=/usr/lib \ + --dlmincdir=/usr/include \ + --cmanlibdir=/usr/lib \ + --cmanincdir=/usr/include \ + ) || die "configure problem" + + # fix the manual pages have executable bit + sed -i -e ' + /\tinstall -d/s/install/& -m 0755/; t + /\tinstall/s/install/& -m 0644/' \ + man/Makefile + + emake clean all || die "compile problem" +} + +src_install() { + emake DESTDIR="${D}" install || die "install problem" + + newinitd "${FILESDIR}"/${PN}-client-2.0x.rc ${PN}-client || die + newinitd "${FILESDIR}"/${PN}-srv-2.0x.rc ${PN}-srv || die + + doconfd "${FILESDIR}"/${PN}-client-2.0x.conf || die + doconfd "${FILESDIR}"/${PN}-srv-2.0x.conf || die + + insinto /etc + doins "${FILESDIR}"/gnbdtab + + if $(has_version sys-fs/devfsd ) ; then + insinto /etc/devfs.d/ + newins "${FILESDIR}"/gnbd.devfs gnbd + fi +} |