summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@gentoo.org>2005-02-03 17:14:46 +0000
committerBrandon Low <lostlogic@gentoo.org>2005-02-03 17:14:46 +0000
commit99a79d00257d66fea4371cc7186c2fdbbaf7472c (patch)
tree0edbf4ad053f6eacf4fb410e04fbb0f113df6092 /sci-biology/foldingathome
parentupdated to reflect the new jdom slots (diff)
downloadhistorical-99a79d00257d66fea4371cc7186c2fdbbaf7472c.tar.gz
historical-99a79d00257d66fea4371cc7186c2fdbbaf7472c.tar.bz2
historical-99a79d00257d66fea4371cc7186c2fdbbaf7472c.zip
Fix bug 71700 hopefully. Use bash not python for copy_client_config. Update the init script to do more sane things and not fail to stop on multi-cpu systems.
Package-Manager: portage-2.0.51-r15
Diffstat (limited to 'sci-biology/foldingathome')
-rw-r--r--sci-biology/foldingathome/ChangeLog13
-rw-r--r--sci-biology/foldingathome/Manifest22
-rw-r--r--sci-biology/foldingathome/files/copy_client_config-5.0.2-r114
-rw-r--r--sci-biology/foldingathome/files/digest-foldingathome-5.0.2-r11
-rw-r--r--sci-biology/foldingathome/files/init-5.0.2-r145
-rw-r--r--sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild4
-rw-r--r--sci-biology/foldingathome/foldingathome-4.0.0.ebuild4
-rw-r--r--sci-biology/foldingathome/foldingathome-5.0.2-r1.ebuild79
-rw-r--r--sci-biology/foldingathome/foldingathome-5.0.2.ebuild4
9 files changed, 164 insertions, 22 deletions
diff --git a/sci-biology/foldingathome/ChangeLog b/sci-biology/foldingathome/ChangeLog
index b0ac7b9dc743..225fc48ffdad 100644
--- a/sci-biology/foldingathome/ChangeLog
+++ b/sci-biology/foldingathome/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sci-biology/foldingathome
-# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/ChangeLog,v 1.2 2004/12/23 20:17:26 swegener Exp $
+# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/ChangeLog,v 1.3 2005/02/03 17:14:46 lostlogic Exp $
+
+*foldingathome-5.0.2-r1 (03 Feb 2005)
+
+ 03 Feb 2005; Brandon Low <lostlogic@gentoo.org>
+ +files/copy_client_config-5.0.2-r1, +files/init-5.0.2-r1,
+ +foldingathome-5.0.2-r1.ebuild:
+ Fix bug 71700 hopefully. Use bash not python for copy_client_config. Update
+ the init script to do more sane things and not fail to stop on multi-cpu
+ systems.
*foldingathome-4.0.0-r2 (23 Dec 2004)
diff --git a/sci-biology/foldingathome/Manifest b/sci-biology/foldingathome/Manifest
index 06a303e8a6dd..23e400835aff 100644
--- a/sci-biology/foldingathome/Manifest
+++ b/sci-biology/foldingathome/Manifest
@@ -1,13 +1,12 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 a2a811ff13eade173e115364c8a99b86 foldingathome-4.0.0-r2.ebuild 1907
-MD5 f2d6fa644e98fe50c624d6155dbea5fc foldingathome-4.0.0.ebuild 1451
-MD5 ea794ff1917a4d515eead0b4a732edd8 ChangeLog 3746
+MD5 0e1014eb4bdefeb4d6917bac1a827c2a foldingathome-4.0.0-r2.ebuild 1908
+MD5 39f6c517e55816697980342d76e16838 foldingathome-5.0.2-r1.ebuild 2018
+MD5 e5275a69ca715ca6a2fdddf88af0f01e foldingathome-4.0.0.ebuild 1452
+MD5 f6a7b8eee235ea661d3ffaf4d3641560 ChangeLog 4095
MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
-MD5 152f7fdcd3864695551539231e04a476 foldingathome-5.0.2.ebuild 2013
+MD5 27939420baefc20ad8e61e4a533aa7c6 foldingathome-5.0.2.ebuild 2014
MD5 a586f7af900f3c15982e59730e7e082a files/folding-conf.d 1125
MD5 91f88a421f87928d798002ede77fa8f9 files/initfolding 80
+MD5 2f181dd626be0626fc9000536fd0d4c4 files/digest-foldingathome-5.0.2-r1 61
MD5 76b9bbe1167870a4cd58351bc530cc87 files/folding-init.d 538
MD5 cd07557b5a0c08853562d0a5ae204d78 files/copy_client_config 756
MD5 9c93f287339458f575ee4c5d20fffdfe files/initfolding-r1 656
@@ -19,12 +18,7 @@ MD5 91444f1e4aaea5f3561b53789f8596a8 files/folding-init.d-r2 702
MD5 5c608b526b53375ad6003e76b9c8ba19 files/folding-init.d-r3 640
MD5 514c0c505246323c8abb6fa13a8671c7 files/folding-init.d-r4 1160
MD5 aec1f2de50cf95bf1797d61ae94b3b04 files/folding.sh 88
+MD5 c4cfa6b5c8873285eda65eff62c0e26e files/init-5.0.2-r1 1188
MD5 6c633c6cc20e087d9da4585c5d9563dc files/digest-foldingathome-4.0.0 66
MD5 2f181dd626be0626fc9000536fd0d4c4 files/digest-foldingathome-5.0.2 61
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.9.10 (GNU/Linux)
-
-iD8DBQFByyfcI1lqEGTUzyQRApFSAJ9JyEoAicM+Kyg0Wv7gMJkqv+n4NACdFNzS
-hBG8EGR60U4Vp7/w/sB7/1U=
-=eI1v
------END PGP SIGNATURE-----
+MD5 71ad6348b9f8b367f2417eddf75417c7 files/copy_client_config-5.0.2-r1 393
diff --git a/sci-biology/foldingathome/files/copy_client_config-5.0.2-r1 b/sci-biology/foldingathome/files/copy_client_config-5.0.2-r1
new file mode 100644
index 000000000000..3d60b8a32cef
--- /dev/null
+++ b/sci-biology/foldingathome/files/copy_client_config-5.0.2-r1
@@ -0,0 +1,14 @@
+#!/bin/bash
+C="client"
+C1_CFG="${C}1/${C}.cfg"
+cd /opt/foldingathome/
+if [ ! -f ${C1_CFG} ]; then
+ echo "Client not yet configured, exiting"
+ exit 1;
+fi
+sed -i -e 's/^\(team=\)0/\111298/' ${C1_CFG}
+declare -i id=$(sed -e 's/^machineid=\([0-9]*\).*$/\1/p;d' ${C1_CFG})
+for (( i=2; ${i}<=8; i=${i}+1 )); do
+ id=$id+1
+ sed -e "s/^\(machineid=\)[0-9]*/\1${id}/" ${C1_CFG} > ${C}${i}/${C}.cfg
+done
diff --git a/sci-biology/foldingathome/files/digest-foldingathome-5.0.2-r1 b/sci-biology/foldingathome/files/digest-foldingathome-5.0.2-r1
new file mode 100644
index 000000000000..44de62a3f7fd
--- /dev/null
+++ b/sci-biology/foldingathome/files/digest-foldingathome-5.0.2-r1
@@ -0,0 +1 @@
+MD5 4855e808fb94e6d2c5fde345aea0cdc3 FAH502-Linux.exe 249236
diff --git a/sci-biology/foldingathome/files/init-5.0.2-r1 b/sci-biology/foldingathome/files/init-5.0.2-r1
new file mode 100644
index 000000000000..ef2f816bf691
--- /dev/null
+++ b/sci-biology/foldingathome/files/init-5.0.2-r1
@@ -0,0 +1,45 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/init-5.0.2-r1,v 1.1 2005/02/03 17:14:46 lostlogic Exp $
+
+do_config() {
+ if [ -z "${CPU}" ] || [ "${CPU}" == "0" ]; then
+ if [ -r /proc/cpuinfo ]; then
+ CPU=`grep processor </proc/cpuinfo | wc -l`
+ else
+ CPU=1
+ fi
+ fi
+}
+
+start() {
+ do_config
+ su foldingathome -c /opt/foldingathome/copy_client_config
+ for (($CPU; CPU > 0; CPU--)); do
+ ebegin "Starting Folding@Home on CPU ${CPU}"
+ cd /opt/foldingathome/client${CPU}/
+ nice -n 20 su foldingathome -c "/opt/foldingathome/client${CPU}/foldingathome ${FOLD_OPTS}" &>/dev/null &
+ eend $?
+ done
+}
+
+stop() {
+ do_config
+ for (($CPU; CPU > 0; CPU--)); do
+ ebegin "Stopping Folding@Home on CPU ${CPU}"
+ cd /opt/foldingathome/client${CPU}/
+ for I in FahCore*.exe; do
+ if ps ax|grep $I > /dev/null 2>&1; then
+ killall -q $I > /dev/null 2>&1
+ fi
+ done
+ sleep 1
+ if ps ax|grep '[/]opt[/]foldingathome/client${CPU}/' > /dev/null 2>&1; then
+ eend 1
+ else
+ eend 0
+ fi
+ done
+}
+
diff --git a/sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild b/sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild
index 194ddc1f4d1a..2e817bd06d03 100644
--- a/sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild
+++ b/sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild,v 1.2 2005/02/03 17:14:46 lostlogic Exp $
# no version number on this install dir since upgrades will be using same dir
# (data will be stored here too)
diff --git a/sci-biology/foldingathome/foldingathome-4.0.0.ebuild b/sci-biology/foldingathome/foldingathome-4.0.0.ebuild
index 344cf02c3e80..1b30a95adbf3 100644
--- a/sci-biology/foldingathome/foldingathome-4.0.0.ebuild
+++ b/sci-biology/foldingathome/foldingathome-4.0.0.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/foldingathome-4.0.0.ebuild,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/foldingathome-4.0.0.ebuild,v 1.2 2005/02/03 17:14:46 lostlogic Exp $
# no version number on this install dir since upgrades will be using same dir
# (data will be stored here too)
diff --git a/sci-biology/foldingathome/foldingathome-5.0.2-r1.ebuild b/sci-biology/foldingathome/foldingathome-5.0.2-r1.ebuild
new file mode 100644
index 000000000000..bb20624ecf55
--- /dev/null
+++ b/sci-biology/foldingathome/foldingathome-5.0.2-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/foldingathome-5.0.2-r1.ebuild,v 1.1 2005/02/03 17:14:46 lostlogic Exp $
+
+# no version number on this install dir since upgrades will be using same dir
+# (data will be stored here too)
+I="/opt/foldingathome"
+
+inherit eutils
+
+DESCRIPTION="Help simulate protein folding at home"
+HOMEPAGE="http://folding.stanford.edu/"
+SRC_URI="http://www.stanford.edu/group/pandegroup/release/FAH502-Linux.exe"
+RESTRICT="nomirror"
+
+SLOT="0"
+IUSE=""
+LICENSE="as-is"
+KEYWORDS="~x86 ~amd64"
+
+DEPEND=">=sys-apps/baselayout-1.8.0
+ >=sys-libs/glibc-2.3.0
+ amd64? ( app-emulation/emul-linux-x86-baselibs )"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${A}" ${PN}
+}
+
+src_install() {
+ exeinto ${I}
+ newexe ${FILESDIR}/initfolding-r2 initfolding
+ newexe ${FILESDIR}/copy_client_config-${PVR} copy_client_config
+
+ # Clients
+ exeinto ${I}/client1
+ doexe foldingathome
+ exeinto ${I}/client2
+ doexe foldingathome
+ exeinto ${I}/client3
+ doexe foldingathome
+ exeinto ${I}/client4
+ doexe foldingathome
+ exeinto ${I}/client5
+ doexe foldingathome
+ exeinto ${I}/client6
+ doexe foldingathome
+ exeinto ${I}/client7
+ doexe foldingathome
+ exeinto ${I}/client8
+ doexe foldingathome
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/init-${PVR} foldingathome
+
+ insinto /etc/conf.d
+ newins ${FILESDIR}/folding-conf.d-r1 foldingathome
+}
+
+pkg_preinst() {
+ # the bash shell is important for "su -c" in init script
+ enewuser foldingathome -1 /bin/bash /opt/foldingathome
+}
+
+pkg_postinst() {
+ chown -R foldingathome:nogroup /opt/foldingathome
+ einfo "To run Folding@home in the background at boot:"
+ einfo " rc-update add foldingathome default"
+ einfo ""
+ einfo "Please run ${I}/initfolding to configure your client"
+ einfo "and edit /etc/conf.d/foldingathome for options"
+ einfo ""
+}
+
+pkg_postrm() {
+ einfo "Folding@home data files were not removed."
+ einfo " Remove them manually from ${I}"
+ einfo ""
+}
diff --git a/sci-biology/foldingathome/foldingathome-5.0.2.ebuild b/sci-biology/foldingathome/foldingathome-5.0.2.ebuild
index 0f4b250c4950..209fcc921484 100644
--- a/sci-biology/foldingathome/foldingathome-5.0.2.ebuild
+++ b/sci-biology/foldingathome/foldingathome-5.0.2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/foldingathome-5.0.2.ebuild,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/foldingathome-5.0.2.ebuild,v 1.2 2005/02/03 17:14:46 lostlogic Exp $
# no version number on this install dir since upgrades will be using same dir
# (data will be stored here too)