summaryrefslogtreecommitdiff
path: root/sci-mathematics/gimps/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-mathematics/gimps/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-mathematics/gimps/files')
-rw-r--r--sci-mathematics/gimps/files/README.gentoo25
-rw-r--r--sci-mathematics/gimps/files/gimps-25.6-conf.d12
-rw-r--r--sci-mathematics/gimps/files/gimps-28.9-init.d32
-rw-r--r--sci-mathematics/gimps/files/gimps.service14
-rw-r--r--sci-mathematics/gimps/files/gimps.tmpfiles1
5 files changed, 84 insertions, 0 deletions
diff --git a/sci-mathematics/gimps/files/README.gentoo b/sci-mathematics/gimps/files/README.gentoo
new file mode 100644
index 000000000000..f034cd1293d8
--- /dev/null
+++ b/sci-mathematics/gimps/files/README.gentoo
@@ -0,0 +1,25 @@
+Useful documentation for running the GIMPS daemon can be found at:
+http://www.mersenne.org/gettingstarted/
+http://www.mersenneforum.org/forumdisplay.php?f=10
+
+To run the GIMPS daemon as an unprivileged user some steps are required.
+
+1. Before starting the GIMPS service run (as root) the following command:
+ # /opt/gimps/mprime -m -w/var/lib/gimps
+2. Answer 'Y' to the "Join Gimps?" question
+3. Accept default values for the following question (or tweak them as you
+deem necessary)
+4. Stop the running tests with ^C
+5. Exit the client, pressing '5'
+6. Change the owner and group of all the files in /var/lib/gimps to
+nobody:nobody:
+ # chown nobody:nobody /var/lib/gimps/*
+
+Then you can use `/etc/init.d/gimps start` to start a GIMPS client in the
+background at boot. Have a look at /etc/conf.d/gimps and check some
+configuration options.
+
+If you don't want to use the init script to start gimps, remember to
+pass it an additional command line parameter specifying where the data
+files are to be stored, e.g.:
+# /opt/gimps/mprime -w/var/lib/gimps"
diff --git a/sci-mathematics/gimps/files/gimps-25.6-conf.d b/sci-mathematics/gimps/files/gimps-25.6-conf.d
new file mode 100644
index 000000000000..4b98e1dbc28b
--- /dev/null
+++ b/sci-mathematics/gimps/files/gimps-25.6-conf.d
@@ -0,0 +1,12 @@
+# Config file for /etc/init.d/gimps
+
+USER="nobody"
+GROUP="nobody"
+
+# 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-28.9-init.d b/sci-mathematics/gimps/files/gimps-28.9-init.d
new file mode 100644
index 000000000000..00eca8268055
--- /dev/null
+++ b/sci-mathematics/gimps/files/gimps-28.9-init.d
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ checkpath -d -o ${USER}:${GROUP} ${GIMPS_DIR}
+
+ if [ ! -e "${GIMPS_DIR}/local.txt" ]; then
+ eerror "GIMPS has not been configured. Please configure it manually before"
+ eerror "starting this initscript."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting GIMPS"
+ start-stop-daemon --quiet --start -b --exec /opt/gimps/mprime \
+ --chdir ${GIMPS_DIR} --user ${USER}:${GROUP} \
+ -- -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/files/gimps.service b/sci-mathematics/gimps/files/gimps.service
new file mode 100644
index 000000000000..d3436717b175
--- /dev/null
+++ b/sci-mathematics/gimps/files/gimps.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Great Internet Mersenne Prime Search client
+After=network.target local-fs.target
+Wants=local-fs.target
+
+[Service]
+User=nobody
+Group=nobody
+ExecStart=/opt/gimps/mprime -w/var/lib/gimps
+StandardOutput=null
+StandardError=journal
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sci-mathematics/gimps/files/gimps.tmpfiles b/sci-mathematics/gimps/files/gimps.tmpfiles
new file mode 100644
index 000000000000..c965e7de5352
--- /dev/null
+++ b/sci-mathematics/gimps/files/gimps.tmpfiles
@@ -0,0 +1 @@
+d /var/lib/gimps 0755 nobody nobody -