From: Michael Januszewski Date: Sun, 6 Nov 2005 13:38:48 +0000 (+0000) Subject: Updated the initscript to use start-stop-daemon. Added the option to run mprime as... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5ac4d0da9c09e552a62dd96fe0f4865ab5153e67;p=gentoo.git Updated the initscript to use start-stop-daemon. Added the option to run mprime as a non-root user (bug #107168). Package-Manager: portage-2.0.53_rc7 --- diff --git a/sci-mathematics/gimps/ChangeLog b/sci-mathematics/gimps/ChangeLog index 074a78f1ec6d..f3b40a8f0829 100644 --- a/sci-mathematics/gimps/ChangeLog +++ b/sci-mathematics/gimps/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sci-mathematics/gimps # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gimps/ChangeLog,v 1.12 2005/10/12 17:08:47 metalgod Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gimps/ChangeLog,v 1.13 2005/11/06 13:38:48 spock Exp $ + +*gimps-24.14-r1 (06 Nov 2005) + + 06 Nov 2005; Michał Januszewski + +files/gimps-24.14-conf.d, +files/gimps-24.14-init.d, + +gimps-24.14-r1.ebuild: + Updated the initscript to use start-stop-daemon. Added the option to run + mprime as a non-root user (bug #107168). 12 Oct 2005; Luis Medinas gimps-24.14.ebuild: Marked Stable on amd64. Bug #108265. diff --git a/sci-mathematics/gimps/Manifest b/sci-mathematics/gimps/Manifest index ce0940447002..97e579c169ca 100644 --- a/sci-mathematics/gimps/Manifest +++ b/sci-mathematics/gimps/Manifest @@ -1,18 +1,22 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 267ef463c05b267257a0901d0f14184e ChangeLog 2810 +MD5 851ace909b8d15c8fec9da1c3cbf160e ChangeLog 3093 MD5 d84449f9d7cdf190e22c6be4ccd485fa files/digest-gimps-24.13 62 MD5 59b44ec0de10774c77941413d23f7608 files/digest-gimps-24.14 62 +MD5 59b44ec0de10774c77941413d23f7608 files/digest-gimps-24.14-r1 62 +MD5 317ec6140b05f0e8fbb5eab409f0ef4a files/gimps-24.14-conf.d 306 +MD5 b7719db3d3bfe39c0df6d95b34691d5c files/gimps-24.14-init.d 686 MD5 33a08082d7b3dfeef6076ff5a4bdb1d0 files/gimps-conf.d 276 MD5 f7593578a8d077eda7d23c5a894ff1d9 files/gimps-init.d 535 MD5 66ef0bb965fdfd6791cf3ea20a37c5a6 gimps-24.13.ebuild 1565 +MD5 f163430b9e6ca6524881736eff8f8213 gimps-24.14-r1.ebuild 1614 MD5 936cb0c6477a4c19f39342db7a23952a gimps-24.14.ebuild 1600 MD5 d94d306da3804e41296e1bf04c7c9cae metadata.xml 255 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.1 (GNU/Linux) +Version: GnuPG v1.4.2 (GNU/Linux) -iD8DBQFDTVFRwUpWvClEHQoRAmLOAJ4+GKayjNX4SPY3YjUNPp1hp+uXFgCeK1tr -j7OEZyn6JSqUT/09c0It91I= -=nI/8 +iD8DBQFDbgeDchej4aZK9/cRAkZNAJ4hRKXtuHRYrEcXt4qJZSQr8zICSACfZcIL +sTvZzciiP05AvbLB6oVns9M= +=pW7s -----END PGP SIGNATURE----- diff --git a/sci-mathematics/gimps/files/digest-gimps-24.14-r1 b/sci-mathematics/gimps/files/digest-gimps-24.14-r1 new file mode 100644 index 000000000000..29fb25019ab7 --- /dev/null +++ b/sci-mathematics/gimps/files/digest-gimps-24.14-r1 @@ -0,0 +1 @@ +MD5 eddab4e2ac2e79560a327a1768e3943a sprime2414.tar.gz 885581 diff --git a/sci-mathematics/gimps/files/gimps-24.14-conf.d b/sci-mathematics/gimps/files/gimps-24.14-conf.d new file mode 100644 index 000000000000..6b1106d4e1fe --- /dev/null +++ b/sci-mathematics/gimps/files/gimps-24.14-conf.d @@ -0,0 +1,15 @@ +# Config file for /etc/init.d/gimps + +USER="nobody" +GROUP="nobody" + +# the number of CPUs GIMPS will use +GIMPS_CPUS="1" + +# set up any options you want for GIMPS +# for more info, `mprime -h` +# GIMPS_OPTIONS="" + +# this is the directory where GIMPS run-time +# data files will be stored +GIMPS_DIR=/var/lib/gimps diff --git a/sci-mathematics/gimps/files/gimps-24.14-init.d b/sci-mathematics/gimps/files/gimps-24.14-init.d new file mode 100755 index 000000000000..354cc424f97f --- /dev/null +++ b/sci-mathematics/gimps/files/gimps-24.14-init.d @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +checkconfig() { + if [ ! -e "${GIMPS_DIR}" ]; then + einfo "Creating ${GIMPS_DIR}" + /bin/mkdir "${GIMPS_DIR}" + fi + + /bin/chown ${USER}:${GROUP} ${GIMPS_DIR} + /bin/chown ${USER}:${GROUP} ${GIMPS_DIR}/* +} + +start() { + checkconfig + ebegin "Starting GIMPS" + start-stop-daemon --quiet --start --exec /opt/gimps/mprime \ + --chdir ${GIMPS_DIR} --chuid ${USER}:${GROUP} \ + -- -b${GIMPS_CPUS} -w${GIMPS_DIR} ${GIMPS_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping GIMPS" + start-stop-daemon --quiet --stop --exec /opt/gimps/mprime + eend $? +} diff --git a/sci-mathematics/gimps/gimps-24.14-r1.ebuild b/sci-mathematics/gimps/gimps-24.14-r1.ebuild new file mode 100644 index 000000000000..64c87fd332ef --- /dev/null +++ b/sci-mathematics/gimps/gimps-24.14-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gimps/gimps-24.14-r1.ebuild,v 1.1 2005/11/06 13:38:48 spock Exp $ + +IUSE="" +DESCRIPTION="GIMPS - The Great Internet Mersenne Prime Search" +HOMEPAGE="http://mersenne.org/" +SRC_URI="ftp://mersenne.org/gimps/sprime${PV/./}.tar.gz" + +# We have to use the statically linked version since the dynamically +# linked one requires gcc >= 3.4.4 (stdlibc++.so.6 dependency). + +DEPEND=">=sys-apps/baselayout-1.8.0 + >=sys-libs/glibc-2.1" +SLOT="0" +LICENSE="as-is" +KEYWORDS="-* ~amd64 ~x86" + +S="${WORKDIR}" +I="/opt/gimps" + +src_install () { + cd ${S} + + dodir ${I} /var/lib/gimps + cp mprime ${D}/${I} + chmod a-w ${D}/${I}/mprime + chown root:0 ${D}/${I} + chown root:0 ${D}/${I}/mprime + + dodoc license.txt readme.txt stress.txt whatsnew.txt undoc.txt + + exeinto /etc/init.d ; newexe ${FILESDIR}/gimps-24.14-init.d gimps + insinto /etc/conf.d ; newins ${FILESDIR}/gimps-24.14-conf.d gimps +} + +pkg_postinst () { + echo + einfo "You can use \`/etc/init.d/gimps start\` to start a GIMPS client in the" + einfo "background at boot. Have a look at /etc/conf.d/gimps and check some" + einfo "configuration options." + einfo + einfo "If you don't want to use the init script to start gimps, remember to" + einfo "pass it an additional command line parameter specifying where the data" + einfo "files are to be stored, eg.:" + einfo " ${I}/mprime -w/var/lib/gimps" + echo +} + +pkg_postrm () { + echo + einfo "GIMPS data files were not removed." + einfo "Remove them manually from /var/lib/gimps/" + echo +}