summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus D. Hanwell <cryos@gentoo.org>2005-04-21 16:25:58 +0000
committerMarcus D. Hanwell <cryos@gentoo.org>2005-04-21 16:25:58 +0000
commit104c6508472dbe4e9609b3e3762f58cc204fcbbc (patch)
tree898cefd3ce540a2dcf6102163003017c1d3990aa /sci-misc/boinc/files
parentStable on x86 per security bug #89862 (diff)
downloadhistorical-104c6508472dbe4e9609b3e3762f58cc204fcbbc.tar.gz
historical-104c6508472dbe4e9609b3e3762f58cc204fcbbc.tar.bz2
historical-104c6508472dbe4e9609b3e3762f58cc204fcbbc.zip
Initial import of ebuild. Many thanks to all who contributed to this, closes bug 54962.
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'sci-misc/boinc/files')
-rw-r--r--sci-misc/boinc/files/boinc-4.32_cmdline_options.patch45
-rw-r--r--sci-misc/boinc/files/boinc-4.32_socket_close_fix.patch44
-rw-r--r--sci-misc/boinc/files/boinc.conf20
-rw-r--r--sci-misc/boinc/files/boinc.init76
-rw-r--r--sci-misc/boinc/files/digest-boinc-4.191
-rw-r--r--sci-misc/boinc/files/digest-boinc-4.321
6 files changed, 187 insertions, 0 deletions
diff --git a/sci-misc/boinc/files/boinc-4.32_cmdline_options.patch b/sci-misc/boinc/files/boinc-4.32_cmdline_options.patch
new file mode 100644
index 000000000000..a020ebe9af85
--- /dev/null
+++ b/sci-misc/boinc/files/boinc-4.32_cmdline_options.patch
@@ -0,0 +1,45 @@
+--- client/cs_cmdline.C.orig 2005-04-19 08:52:35.000000000 -0500
++++ client/cs_cmdline.C 2005-04-19 08:52:48.000000000 -0500
+@@ -35,18 +35,18 @@
+ static void print_options(char* prog) {
+ printf(
+ "Usage: %s [options]\n"
+- " -version show version info\n"
+- " -exit_when_idle Get/process/report work, then exit\n"
+- " -show_projects show attached projects\n"
+- " -return_results_immediately contact server when have results\n"
+- " -detach_project URL detach from a project\n"
+- " -reset_project URL reset (clear) a project\n"
+- " -attach_project attach to a project (will prompt for URL, account key)\n"
+- " -update_prefs URL contact a project to update preferences\n"
+- " -run_cpu_benchmarks run the CPU benchmarks\n"
+- " -check_all_logins check input from remote users\n"
+- " -allow_remote_gui_rpc allow remote GUI RPC connections\n"
+- " -redirectio redirect stdout and stderr to log files\n",
++ " -version show version info\n"
++ " -exit_when_idle Get/process/report work, then exit\n"
++ " -show_projects show attached projects\n"
++ " -return_results_immediately contact server when have results\n"
++ " -detach_project <URL> detach from a project\n"
++ " -reset_project <URL> reset (clear) a project\n"
++ " -attach_project <URL> <key> attach to a project\n"
++ " -update_prefs <URL> contact a project to update preferences\n"
++ " -run_cpu_benchmarks run the CPU benchmarks\n"
++ " -check_all_logins check input from remote users\n"
++ " -allow_remote_gui_rpc allow remote GUI RPC connections\n"
++ " -redirectio redirect stdout and stderr to log files\n",
+ prog
+ );
+ }
+@@ -148,9 +148,8 @@
+ if (i > argc-2) {
+ show_options = true;
+ } else {
+- strcpy(attach_project_url, argv[i+1]);
+- strcpy(attach_project_auth, argv[i+1]);
+- i += 2;
++ strcpy(attach_project_url, argv[++i]);
++ strcpy(attach_project_auth, argv[++i]);
+ }
+ } else if (ARG(version)) {
+ printf(BOINC_VERSION_STRING " " HOSTTYPE "\n");
diff --git a/sci-misc/boinc/files/boinc-4.32_socket_close_fix.patch b/sci-misc/boinc/files/boinc-4.32_socket_close_fix.patch
new file mode 100644
index 000000000000..66b63bbc7895
--- /dev/null
+++ b/sci-misc/boinc/files/boinc-4.32_socket_close_fix.patch
@@ -0,0 +1,44 @@
+--- lib/gui_rpc_client.C.orig 2005-04-19 11:00:04.000000000 -0500
++++ lib/gui_rpc_client.C 2005-04-19 11:12:57.000000000 -0500
+@@ -936,16 +936,15 @@
+ //
+ void RPC_CLIENT::close() {
+ //fprintf(stderr, "RPC_CLIENT::close called\n");
+-#ifdef _WIN32
+- ::closesocket(sock);
+-#else
+- ::close(sock);
+-#endif
+- sock = 0;
++ if (sock) {
++ boinc_close_socket(sock);
++ sock = 0;
++ }
+ }
+
+ int RPC_CLIENT::init(const char* host, bool asynch) {
+ int retval;
++ memset(&addr, 0, sizeof(addr));
+ addr.sin_family = AF_INET;
+ addr.sin_port = htons(GUI_RPC_PORT_ALT);
+
+@@ -957,7 +956,7 @@
+ }
+ addr.sin_addr.s_addr = *(int*)hep->h_addr_list[0];
+ } else {
+- addr.sin_addr.s_addr = htonl(0x7f000001);
++ addr.sin_addr.s_addr = inet_addr("127.0.0.1");
+ }
+
+ retval = boinc_socket(sock);
+@@ -979,6 +978,10 @@
+ } else {
+ retval = connect(sock, (const sockaddr*)(&addr), sizeof(addr));
+ if (retval) {
++ //fprintf(stderr, "connect 2 on %d returned %d\n", sock, retval);
++ perror("connect");
++ boinc_close_socket(sock);
++ boinc_socket(sock);
+ #ifdef _WIN32
+ printf("connect 1: Winsock error '%d'\n", WSAGetLastError());
+ #endif
diff --git a/sci-misc/boinc/files/boinc.conf b/sci-misc/boinc/files/boinc.conf
new file mode 100644
index 000000000000..20f8dfd6b87b
--- /dev/null
+++ b/sci-misc/boinc/files/boinc.conf
@@ -0,0 +1,20 @@
+# Config file for /etc/init.d/boinc
+
+# Owner of BOINC process (must be existing)
+USER="boinc"
+GROUP="boinc"
+
+# Directory with runtime data: Work units, project binaries, user info etc.
+RUNTIMEDIR="/var/lib/boinc"
+
+# Location of the boinc command line binary
+BOINCBIN="/usr/bin/boinc_client"
+
+# Logfile (/dev/null for nowhere)
+LOGFILE="/var/log/boinc.log"
+
+# Allow remote gui RPC yes or no
+ALLOW_REMOTE_RPC="yes"
+
+# nice level
+NICELEVEL="19"
diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init
new file mode 100644
index 000000000000..ac1d0b8ff762
--- /dev/null
+++ b/sci-misc/boinc/files/boinc.init
@@ -0,0 +1,76 @@
+#!/sbin/runscript
+
+opts="${opts} attach"
+
+depend() {
+ use dns
+ need net
+}
+
+start() {
+ ebegin "Starting BOINC"
+ if [ ! -d ${RUNTIMEDIR} ]; then
+ einfo "Directory ${RUNTIMEDIR} not existing, creating now."
+ /bin/mkdir ${RUNTIMEDIR}
+ /bin/chown ${USER}:${GROUP} ${RUNTIMEDIR}
+ if [ ! -d ${RUNTIMEDIR} ]; then
+ eerror "Directory ${RUNTIMEDIR} could not be created!"
+ return 1
+ fi
+ fi
+
+ cd ${RUNTIMEDIR}
+
+ if [ ! -f lockfile ]; then
+ einfo "File ${RUNTIMEDIR}/lockfile does not exist, assuming first run."
+ einfo "You need to setup an account on the BOINC project homepage beforehand! Go to http://boinc.berkeley.edu/ and locate your project."
+ einfo "Then either run /etc/init.d/boinc attach or connect with a gui client and attach to a project with that."
+ fi
+
+ # if the log file doesn't exist, create it with root privs, then change ownership to boinc
+ if [ ! -f ${LOGFILE} ]; then
+ touch ${LOGFILE}
+ chown ${USER}:${GROUP} ${LOGFILE}
+ fi
+
+ if [ ${ALLOW_REMOTE_RPC} = "yes" ]; then
+ ARGS="${ARGS} -allow_remote_gui_rpc"
+ fi
+
+ start-stop-daemon --quiet --start --exec ${BOINCBIN} \
+ --chuid ${USER}:${GROUP} --nicelevel ${NICELEVEL} -- ${ARGS} > ${LOGFILE} 2>&1 &
+
+ eend $?
+}
+
+attach() {
+ printf " Enter the Project URL: "
+ read url
+ printf " Enter your Account Key: "
+ read key
+
+ RC_QUIET_STDOUT="yes" svc_status
+ if [ $? == 0 ]; then
+ ebegin "Attaching to project"
+ # boinc cmd does not return 1 when it fails currently
+ boinc_cmd --project_attach ${url} ${key} &> /dev/null
+ eend $?
+ else
+ ARGS="${ARGS} -attach_project ${url} ${key}" svc_start
+ fi
+
+ sleep 9
+ tail ${LOGFILE}
+}
+
+stop() {
+ ebegin "Stopping BOINC"
+ start-stop-daemon --stop --quiet --exec ${BOINCBIN}
+ eend $?
+}
+
+restart() {
+ svc_stop
+ sleep 6
+ svc_start
+}
diff --git a/sci-misc/boinc/files/digest-boinc-4.19 b/sci-misc/boinc/files/digest-boinc-4.19
new file mode 100644
index 000000000000..efb1e665ff82
--- /dev/null
+++ b/sci-misc/boinc/files/digest-boinc-4.19
@@ -0,0 +1 @@
+MD5 59c8ca1810bd83f58d57ea54c8c27615 boinc_public-cvs-2005-01-26.tar.gz 3845012
diff --git a/sci-misc/boinc/files/digest-boinc-4.32 b/sci-misc/boinc/files/digest-boinc-4.32
new file mode 100644
index 000000000000..865474290bc1
--- /dev/null
+++ b/sci-misc/boinc/files/digest-boinc-4.32
@@ -0,0 +1 @@
+MD5 e729558125dacca3b4c6c659fd491e3e boinc_public-cvs-2005-04-17.tar.gz 5105448