Adding --chdir to start-stop-daemon because of bug #109707
authorPatrick Kursawe <phosphan@gentoo.org>
Fri, 16 Jun 2006 08:44:04 +0000 (08:44 +0000)
committerPatrick Kursawe <phosphan@gentoo.org>
Fri, 16 Jun 2006 08:44:04 +0000 (08:44 +0000)
Package-Manager: portage-2.1

sci-biology/foldingathome/ChangeLog
sci-biology/foldingathome/Manifest
sci-biology/foldingathome/files/digest-foldingathome-5.0.2-r3
sci-biology/foldingathome/files/digest-foldingathome-5.0.2-r4
sci-biology/foldingathome/files/digest-foldingathome-5.0.2-r5 [new file with mode: 0644]
sci-biology/foldingathome/files/init-5.0.2-r5 [new file with mode: 0644]
sci-biology/foldingathome/foldingathome-5.0.2-r5.ebuild [new file with mode: 0644]

index e01b6217a70ba214dc4083cfac0af648a1ca7fc9..6d944875e16a6daf945a0aac4fe6016a2a6cf048 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for sci-biology/foldingathome
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/ChangeLog,v 1.10 2005/08/14 02:31:39 ribosome Exp $
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/ChangeLog,v 1.11 2006/06/16 08:44:04 phosphan Exp $
+
+*foldingathome-5.0.2-r5 (16 Jun 2006)
+
+  16 Jun 2006; Patrick Kursawe <phosphan@gentoo.org> +files/init-5.0.2-r5,
+  +foldingathome-5.0.2-r5.ebuild:
+  Adding --chdir to start-stop-daemon because of bug #109707
 
 *foldingathome-5.0.2-r4 (14 Aug 2005)
 
index fc5665631d0398a424c06e8b7a102b396851e003..2e1d3086a3d247bb5c9e4053e32ac38516bccc5a 100644 (file)
@@ -1,11 +1,54 @@
-MD5 df316323a2a07c2fcbadd0f502938af6 foldingathome-5.0.2-r4.ebuild 2037
-MD5 f2bac6b14a4b471449216800a9bedbe4 foldingathome-5.0.2-r3.ebuild 2018
-MD5 613c8cffe098124261b92324912f5046 ChangeLog 5922
-MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
-MD5 2f181dd626be0626fc9000536fd0d4c4 files/digest-foldingathome-5.0.2-r3 61
-MD5 2f181dd626be0626fc9000536fd0d4c4 files/digest-foldingathome-5.0.2-r4 61
-MD5 f3a9e0a439c14bd3d328cea6e3af1540 files/initfolding-r2 150
+AUX copy_client_config-5.0.2-r1 393 RMD160 530642f45d1d83612aa6a8048f6ed5fbab67176b SHA1 5a3951b4fe98f62ae3e20269dabd5cfbf3554d77 SHA256 ddfe7ace77006273d1ac64aec4280fdecf52ea0f435dacf2d1bba3de3da42abe
+MD5 71ad6348b9f8b367f2417eddf75417c7 files/copy_client_config-5.0.2-r1 393
+RMD160 530642f45d1d83612aa6a8048f6ed5fbab67176b files/copy_client_config-5.0.2-r1 393
+SHA256 ddfe7ace77006273d1ac64aec4280fdecf52ea0f435dacf2d1bba3de3da42abe files/copy_client_config-5.0.2-r1 393
+AUX folding-conf.d-r1 1172 RMD160 1c76ea630aa18e1078642f198af46a46eeb5ce62 SHA1 e8940c6f63cd86f570ffebeac22a9e265dbde6dd SHA256 48e49f73fd3c5e45f6ffa99c243d0ff5068416db90d5fd3c447f0118dd8ec154
 MD5 3174784abb8ed1da2fc846d722aeffe5 files/folding-conf.d-r1 1172
+RMD160 1c76ea630aa18e1078642f198af46a46eeb5ce62 files/folding-conf.d-r1 1172
+SHA256 48e49f73fd3c5e45f6ffa99c243d0ff5068416db90d5fd3c447f0118dd8ec154 files/folding-conf.d-r1 1172
+AUX init-5.0.2-r3 1478 RMD160 06e256fa528abeb7378addbe795efb5d95c71852 SHA1 46fddec47f30e8a850c056327412c335d29a661e SHA256 646c350f9777b0a1df3901f963523d04b01d0997aae4f6b16b97bc9e7b031582
 MD5 b695ee5884feb42cd5678eb977d862cc files/init-5.0.2-r3 1478
+RMD160 06e256fa528abeb7378addbe795efb5d95c71852 files/init-5.0.2-r3 1478
+SHA256 646c350f9777b0a1df3901f963523d04b01d0997aae4f6b16b97bc9e7b031582 files/init-5.0.2-r3 1478
+AUX init-5.0.2-r4 1617 RMD160 4bc1986b4ebd743c55a30540a6bb4f0b82ca5856 SHA1 184dada30bb1875b4d9f745a295979da6026e9bd SHA256 999022edb336d468ab942cce0463ee5555f06fd639a388611f368d2c481335cc
 MD5 cf82a6b9168bb40193cc1ce76a3be340 files/init-5.0.2-r4 1617
-MD5 71ad6348b9f8b367f2417eddf75417c7 files/copy_client_config-5.0.2-r1 393
+RMD160 4bc1986b4ebd743c55a30540a6bb4f0b82ca5856 files/init-5.0.2-r4 1617
+SHA256 999022edb336d468ab942cce0463ee5555f06fd639a388611f368d2c481335cc files/init-5.0.2-r4 1617
+AUX init-5.0.2-r5 1602 RMD160 4680d24496b69512d6223fb420258ad5184241fa SHA1 db3112edc993c69cd285ac0fc1bee41107c7075b SHA256 99e3eae808935333432becf04095063872e3c9c4aeb834beb88e82f3e8627c9c
+MD5 b6f1780a9b3a2c0694d3e77e6517f36d files/init-5.0.2-r5 1602
+RMD160 4680d24496b69512d6223fb420258ad5184241fa files/init-5.0.2-r5 1602
+SHA256 99e3eae808935333432becf04095063872e3c9c4aeb834beb88e82f3e8627c9c files/init-5.0.2-r5 1602
+AUX initfolding-r2 150 RMD160 160f6f4c8e15b5e5694cdbe53f08adcfd51c4f20 SHA1 8a57653fe7ac194cdb72d2ed9058436408529e0b SHA256 52375ccd65d9f7cbf09e0b2915f54a882726bf7c377353747fa3ff8fc2cedacb
+MD5 f3a9e0a439c14bd3d328cea6e3af1540 files/initfolding-r2 150
+RMD160 160f6f4c8e15b5e5694cdbe53f08adcfd51c4f20 files/initfolding-r2 150
+SHA256 52375ccd65d9f7cbf09e0b2915f54a882726bf7c377353747fa3ff8fc2cedacb files/initfolding-r2 150
+DIST FAH502-Linux.exe 249236 RMD160 e63be66c70447095eb7054d855316f42e0364971 SHA1 eb480011f3aaf1cea92b001ff15634670142674c SHA256 02e2d3665a6e8f8fc89c7751b8faadff6885d34860643bdd4107d92825754d33
+EBUILD foldingathome-5.0.2-r3.ebuild 2018 RMD160 f9984900da57e3141de1081d4c6da06fe139657b SHA1 01a83ee2cc3006b0fb80932219b8622d6386be0b SHA256 19e5f7577a111ff36668855004675f732a83569fa4b2ae01c0badc3f094d88b9
+MD5 f2bac6b14a4b471449216800a9bedbe4 foldingathome-5.0.2-r3.ebuild 2018
+RMD160 f9984900da57e3141de1081d4c6da06fe139657b foldingathome-5.0.2-r3.ebuild 2018
+SHA256 19e5f7577a111ff36668855004675f732a83569fa4b2ae01c0badc3f094d88b9 foldingathome-5.0.2-r3.ebuild 2018
+EBUILD foldingathome-5.0.2-r4.ebuild 2037 RMD160 7b232d381b4f89d088fff6bdc33a0cd594e31e6f SHA1 4251e268b9c310473683862af1b64e37f3208e6f SHA256 94c23c8fa41adfe369f8443955399a01e9667bc4faf62f2042e53ff51ea0c44b
+MD5 df316323a2a07c2fcbadd0f502938af6 foldingathome-5.0.2-r4.ebuild 2037
+RMD160 7b232d381b4f89d088fff6bdc33a0cd594e31e6f foldingathome-5.0.2-r4.ebuild 2037
+SHA256 94c23c8fa41adfe369f8443955399a01e9667bc4faf62f2042e53ff51ea0c44b foldingathome-5.0.2-r4.ebuild 2037
+EBUILD foldingathome-5.0.2-r5.ebuild 2037 RMD160 bdb8e2bd742007837efaaf2927b2030aa675b953 SHA1 7b60a9bbbc9aa9535f1ee6a94a452f0f631237e5 SHA256 76f8966c91f2ec1457147b4cfb94bf3197380db88a92f6d7a66cbc9fe0a731c5
+MD5 d15b1b10ed58b74abc86b5d38162bc77 foldingathome-5.0.2-r5.ebuild 2037
+RMD160 bdb8e2bd742007837efaaf2927b2030aa675b953 foldingathome-5.0.2-r5.ebuild 2037
+SHA256 76f8966c91f2ec1457147b4cfb94bf3197380db88a92f6d7a66cbc9fe0a731c5 foldingathome-5.0.2-r5.ebuild 2037
+MISC ChangeLog 6132 RMD160 cbdc575c9481135f02f695be92e32a34ff86d355 SHA1 a80ed84a2f4be6c4010a886c8d1de0d14a9bf089 SHA256 53311260c51e75b8edf8e435fc3c6cc8e2af5117fb1c6d59d93338f9e74586f7
+MD5 e7a06446fb3daa7aa7f2f06f49dc2d49 ChangeLog 6132
+RMD160 cbdc575c9481135f02f695be92e32a34ff86d355 ChangeLog 6132
+SHA256 53311260c51e75b8edf8e435fc3c6cc8e2af5117fb1c6d59d93338f9e74586f7 ChangeLog 6132
+MISC metadata.xml 156 RMD160 dc078172bfebcb25d69bdf8731714f9cce9d3e36 SHA1 da2b240a255820145b7c83a5c48e45b96b7e9ee6 SHA256 5d22100902db7507a5b5493dd4a66cdb08025faf80a2c0b75e6392315c47f900
+MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
+RMD160 dc078172bfebcb25d69bdf8731714f9cce9d3e36 metadata.xml 156
+SHA256 5d22100902db7507a5b5493dd4a66cdb08025faf80a2c0b75e6392315c47f900 metadata.xml 156
+MD5 d39886a997a5021a1cb3be852aa0d2de files/digest-foldingathome-5.0.2-r3 229
+RMD160 a1ba0061fa5cf60fc4d9e4e4762025e8ec481d25 files/digest-foldingathome-5.0.2-r3 229
+SHA256 bb8544c52290ebf517fbd3ebd292bb4108f89bb4b667420fad3e9ae4e3b019c9 files/digest-foldingathome-5.0.2-r3 229
+MD5 d39886a997a5021a1cb3be852aa0d2de files/digest-foldingathome-5.0.2-r4 229
+RMD160 a1ba0061fa5cf60fc4d9e4e4762025e8ec481d25 files/digest-foldingathome-5.0.2-r4 229
+SHA256 bb8544c52290ebf517fbd3ebd292bb4108f89bb4b667420fad3e9ae4e3b019c9 files/digest-foldingathome-5.0.2-r4 229
+MD5 d39886a997a5021a1cb3be852aa0d2de files/digest-foldingathome-5.0.2-r5 229
+RMD160 a1ba0061fa5cf60fc4d9e4e4762025e8ec481d25 files/digest-foldingathome-5.0.2-r5 229
+SHA256 bb8544c52290ebf517fbd3ebd292bb4108f89bb4b667420fad3e9ae4e3b019c9 files/digest-foldingathome-5.0.2-r5 229
index 44de62a3f7fdea7caf9106edb4d9e4e20a5c4668..f8fd9750603a6a7397184ad81b5441955dc261db 100644 (file)
@@ -1 +1,3 @@
 MD5 4855e808fb94e6d2c5fde345aea0cdc3 FAH502-Linux.exe 249236
+RMD160 e63be66c70447095eb7054d855316f42e0364971 FAH502-Linux.exe 249236
+SHA256 02e2d3665a6e8f8fc89c7751b8faadff6885d34860643bdd4107d92825754d33 FAH502-Linux.exe 249236
index 44de62a3f7fdea7caf9106edb4d9e4e20a5c4668..f8fd9750603a6a7397184ad81b5441955dc261db 100644 (file)
@@ -1 +1,3 @@
 MD5 4855e808fb94e6d2c5fde345aea0cdc3 FAH502-Linux.exe 249236
+RMD160 e63be66c70447095eb7054d855316f42e0364971 FAH502-Linux.exe 249236
+SHA256 02e2d3665a6e8f8fc89c7751b8faadff6885d34860643bdd4107d92825754d33 FAH502-Linux.exe 249236
diff --git a/sci-biology/foldingathome/files/digest-foldingathome-5.0.2-r5 b/sci-biology/foldingathome/files/digest-foldingathome-5.0.2-r5
new file mode 100644 (file)
index 0000000..f8fd975
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 4855e808fb94e6d2c5fde345aea0cdc3 FAH502-Linux.exe 249236
+RMD160 e63be66c70447095eb7054d855316f42e0364971 FAH502-Linux.exe 249236
+SHA256 02e2d3665a6e8f8fc89c7751b8faadff6885d34860643bdd4107d92825754d33 FAH502-Linux.exe 249236
diff --git a/sci-biology/foldingathome/files/init-5.0.2-r5 b/sci-biology/foldingathome/files/init-5.0.2-r5
new file mode 100644 (file)
index 0000000..87fe45d
--- /dev/null
@@ -0,0 +1,59 @@
+#!/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-r5,v 1.1 2006/06/16 08:44:04 phosphan Exp $
+
+opts="${opts} unitinfo"
+
+do_config() {
+       if [ -z "${CPU}" ] || [ "${CPU}" == "0" ]; then
+               if [ -r /proc/cpuinfo ]; then
+                       CPU=`grep "^processor[[:space:]]*:" /proc/cpuinfo | wc -l`
+                       if (( $CPU > 8 )); then
+                               CPU=8
+                       fi
+               else
+                       CPU=1
+               fi
+       fi
+}
+
+unitinfo() {
+       do_config
+       for (($CPU; CPU > 0; CPU--)); do
+               einfo "CPU ${CPU} $(head -n1 /opt/foldingathome/client${CPU}/unitinfo.txt):"
+               sed -e '1,2d' /opt/foldingathome/client${CPU}/unitinfo.txt
+       done
+}
+
+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}/
+               start-stop-daemon --chdir ${PWD} --chuid foldingathome --nicelevel 19 --start --background --exec ./foldingathome -- ${FOLD_OPTS}
+               eend $?
+       done
+}
+
+stop() {
+       do_config
+       for (($CPU; CPU > 0; CPU--)); do
+               ebegin "Stopping Folding@Home on CPU ${CPU}"
+               start-stop-daemon --stop --user foldingathome --exec /opt/foldingathome/client${CPU}/foldingathome
+               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-5.0.2-r5.ebuild b/sci-biology/foldingathome/foldingathome-5.0.2-r5.ebuild
new file mode 100644 (file)
index 0000000..b58c108
--- /dev/null
@@ -0,0 +1,79 @@
+# Copyright 1999-2006 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-r5.ebuild,v 1.1 2006/06/16 08:44:04 phosphan 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 nostrip"
+
+SLOT="0"
+IUSE=""
+LICENSE="folding-at-home"
+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-${PV}-r1 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 ""
+}