diff options
author | pav <pav@FreeBSD.org> | 2004-10-17 03:29:30 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-10-17 03:29:30 +0800 |
commit | d9abbbd33e3d99dc25b4466a7ea3deafc81709a5 (patch) | |
tree | 3982224929ddae2468f805da81fd20527d9e3966 /net | |
parent | 2c65cec4f77f069ff4fa3c8a1fef2faf7fcaa66a (diff) | |
download | freebsd-ports-gnome-d9abbbd33e3d99dc25b4466a7ea3deafc81709a5.tar.gz freebsd-ports-gnome-d9abbbd33e3d99dc25b4466a7ea3deafc81709a5.tar.zst freebsd-ports-gnome-d9abbbd33e3d99dc25b4466a7ea3deafc81709a5.zip |
Add boinc-client, Berkeley Open Infrastructure for Network Computing.
BOINC is a software platform for distributed computing using volunteer
computer resources.
Many different projects can use BOINC. SETI@HOME, for example, has
been redesigned to use BOINC and the astro/boinc-setiathome port
supercedes the astro/setiathome port.
WWW: http://boinc.berkeley.edu/
PR: ports/72714
Submitted by: J.R. Oldroyd <fbsd@opal.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/boinc-client/Makefile | 97 | ||||
-rw-r--r-- | net/boinc-client/distinfo | 2 | ||||
-rw-r--r-- | net/boinc-client/files/boinc-client | 6 | ||||
-rw-r--r-- | net/boinc-client/files/boinc-client.1 | 170 | ||||
-rw-r--r-- | net/boinc-client/files/boinc.sh | 61 | ||||
-rw-r--r-- | net/boinc-client/files/patch-api::boinc_gl.h | 19 | ||||
-rw-r--r-- | net/boinc-client/pkg-descr | 8 | ||||
-rw-r--r-- | net/boinc-client/pkg-install | 25 | ||||
-rw-r--r-- | net/boinc-client/pkg-message | 14 | ||||
-rw-r--r-- | net/boinc-client/pkg-plist | 50 |
11 files changed, 453 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 5742e416d787..f69c10cc1a68 100644 --- a/net/Makefile +++ b/net/Makefile @@ -43,6 +43,7 @@ SUBDIR += bmon SUBDIR += bnbt SUBDIR += boclient + SUBDIR += boinc-client SUBDIR += bounce SUBDIR += bsdproxy SUBDIR += btqueue diff --git a/net/boinc-client/Makefile b/net/boinc-client/Makefile new file mode 100644 index 000000000000..cdc6d7bca044 --- /dev/null +++ b/net/boinc-client/Makefile @@ -0,0 +1,97 @@ +# New ports collection makefile for: boinc +# Date created: 01 October 2004 +# Whom: J.R. Oldroyd <fbsd@opal.com> +# +# $FreeBSD$ +# + +PORTNAME= boinc-client +PORTVERSION= 4.13 +CATEGORIES= net +MASTER_SITES= http://boinc.berkeley.edu/source/nightly/ +DISTNAME= boinc_public-cvs-2004-10-14 + +MAINTAINER= fbsd@opal.com +COMMENT= Berkeley Open Infrastructure for Network Computing client + +USE_REINPLACE= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --disable-server +CONFIGURE_ENV= CPPFLAGS=-I/usr/X11R6/include CXXFLAGS=-I/usr/X11R6/include + +WRKSRC= ${WRKDIR}/boinc_public +PKGINSTALL= ${WRKDIR}/pkg-install +PKGPLIST= ${WRKDIR}/pkg-plist + +MAN1= boinc-client.1 + +FIND_BOINC_BINARY=(cd ${WRKDIR}/boinc_public/client; make -V CLIENT_BIN_FILENAME)) + +BOINC_USER= boinc +BOINC_GROUP= nobody +BOINC_HOME= /var/db/boinc +BOINC_DATADIR= ${PREFIX}/boinc + +post-patch: + ${CHMOD} +x ${WRKDIR}/boinc_public/configure + +do-build: + @(cd ${WRKDIR}/boinc_public/client; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) + @(cd ${WRKDIR}/boinc_public/api; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) + @(cd ${WRKDIR}/boinc_public/lib; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) + +post-build: + BBIN=`${FIND_BOINC_BINARY}`; \ + ${SED} -e "s:%%BOINC_BINARY%%:$$BBIN:g" \ + -e "s:%%BOINC_DATADIR%%:${BOINC_DATADIR}:g" \ + -e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \ + -e "s:%%BOINC_USER%%:${BOINC_USER}:g" \ + -e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \ + < ${FILESDIR}/boinc-client > ${WRKDIR}/boinc-client; \ + ${SED} -e "s:%%BOINC_BINARY%%:$$BBIN:g" \ + -e "s:%%BOINC_DATADIR%%:${BOINC_DATADIR}:g" \ + -e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \ + -e "s:%%BOINC_USER%%:${BOINC_USER}:g" \ + -e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \ + < ${FILESDIR}/boinc-client.1 > ${WRKDIR}/boinc-client.1; \ + ${SED} -e "s:%%BOINC_BINARY%%:$$BBIN:g" \ + -e "s:%%BOINC_DATADIR%%:${BOINC_DATADIR}:g" \ + -e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \ + -e "s:%%BOINC_USER%%:${BOINC_USER}:g" \ + -e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \ + < ${FILESDIR}/boinc.sh > ${WRKDIR}/boinc.sh + ${SED} -e "s:%%BOINC_BINARY%%:$$BBIN:g" \ + -e "s:%%BOINC_DATADIR%%:${PREFIX}/boinc:g" \ + -e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \ + -e "s:%%BOINC_USER%%:${BOINC_USER}:g" \ + -e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \ + < ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install + +do-install: + ${INSTALL_SCRIPT} ${WRKDIR}/boinc-client ${PREFIX}/bin + ${INSTALL_MAN} ${WRKDIR}/boinc-client.1 ${PREFIX}/man/man1 + ${MKDIR} ${PREFIX}/boinc/client + ${INSTALL_PROGRAM} ${WRKDIR}/boinc_public/client/`${FIND_BOINC_BINARY}` ${PREFIX}/boinc/client + ${MKDIR} ${PREFIX}/boinc/lib + ${INSTALL} ${WRKDIR}/boinc_public/lib/*.h ${PREFIX}/boinc/lib + ${INSTALL} ${WRKDIR}/boinc_public/lib/libboinc.a ${PREFIX}/boinc/lib + ${INSTALL} ${WRKDIR}/boinc_public/RSAEuro/source/librsaeuro.a ${PREFIX}/boinc/lib + ${MKDIR} ${PREFIX}/boinc/api + ${INSTALL} ${WRKDIR}/boinc_public/api/*.h ${PREFIX}/boinc/api + ${TOUCH} ${PREFIX}/boinc/api/Makefile.am + ${TOUCH} ${PREFIX}/boinc/lib/Makefile.am + ${TOUCH} ${PREFIX}/boinc/Makefile.am + ${MKDIR} ${PREFIX}/boinc/projects + ${MKDIR} ${PREFIX}/etc/rc.d + ${INSTALL_SCRIPT} ${WRKDIR}/boinc.sh ${PREFIX}/etc/rc.d + ${CAT} pkg-message + +post-install: + ${REINPLACE_CMD} \ + -e "s:%%BOINC_BINARY%%:`${FIND_BOINC_BINARY}`:g" \ + -e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \ + -e "s:%%BOINC_USER%%:${BOINC_USER}:g" \ + ${TMPPLIST} + @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.mk> diff --git a/net/boinc-client/distinfo b/net/boinc-client/distinfo new file mode 100644 index 000000000000..7efa3fd8cb50 --- /dev/null +++ b/net/boinc-client/distinfo @@ -0,0 +1,2 @@ +MD5 (boinc_public-cvs-2004-10-14.tar.gz) = e72232372a72b2f851cca989dc1a3e37 +SIZE (boinc_public-cvs-2004-10-14.tar.gz) = 3712753 diff --git a/net/boinc-client/files/boinc-client b/net/boinc-client/files/boinc-client new file mode 100644 index 000000000000..43b01c2a39d3 --- /dev/null +++ b/net/boinc-client/files/boinc-client @@ -0,0 +1,6 @@ +#!/bin/sh + +args="$@" + +exec idprio 31 su - %%BOINC_USER%% -c "%%BOINC_DATADIR%%/client/%%BOINC_BINARY%% $args" + diff --git a/net/boinc-client/files/boinc-client.1 b/net/boinc-client/files/boinc-client.1 new file mode 100644 index 000000000000..7f712dc506a9 --- /dev/null +++ b/net/boinc-client/files/boinc-client.1 @@ -0,0 +1,170 @@ +.TH boinc-client 1 "October 1, 2004" "" "BOINC" +.SH NAME +boinc-client \- client for Berkeley Open Infrastructure for Network Computing +.SH SYNOPSIS +boinc-client [ options ] +.PP +sh /usr/local/etc/rc.d/boinc.sh start|stop|restart|status +.SH DESCRIPTION +.I boinc-client +is the client for the Berkeley Open Infrastructure for Network +Computing (BOINC) service. It is used by projects such as SETI@HOME +and ClimatePredictor to offer your spare CPU cycles to such projects. +BOINC allows you to configure one or more projects to which you offer +your spare CPU cycles for their computations. +.PP +BOINC is a scheduler; you configure projects under BOINC and BOINC +then runs each one according to what percentage of time you have +specified for that project. +When a project is run, BOINC runs the project's client program to +download computational work units from the project, then perform the +work unit computation, and finally upload the results back to the +project. If no work is available for one of your projects, BOINC +will run another of your projects. +.PP +BOINC runs project clients at low priority, with a +.IR nice (1) +value of 19, to ensure that as soon as you need your computer for +any other work, BOINC projects stop so that you are not delayed +by them. +.PP +After choosing which projects to participate in, you must register +with each on the project's website. You can find out about BOINC +projects on the BOINC website. Upon registering with a project, +you will receive an account ID for the project. +Run +.I "boinc-client -attach_project" +to add new projects to your BOINC configuration using the project +URL and your account ID. +Depending on what operating system platforms the project supports +you may be able to immediately start the project or you may need to +download the project client's source code and compile it. For +further information, see the BOINC web site and the project's own +website. Some projects are already available as FreeBSD ports +(e.g., SETI@HOME in port astro/boinc-setiathome). Not all projects +support FreeBSD and some do not make their client's source code +available. In such cases, you will not be able to participate in +that project from FreeBSD. +.PP +Running +.I boinc-client +with no arguments starts the service and any configured projects. +.PP +You can edit both BOINC general preferences and project-specific +preferences on the website of any BOINC projects which you are +registered with. Preferences will take effect next time BOINC +contacts that project's server, e.g., to download more work or +to upload results. +.PP +.I /usr/local/etc/rc.d/boinc.sh +script is run automatically at system boot time. +The +.I /etc/rc.conf +variable +.I boinc_enable +must be set to +.I boinc_enable="YES" +for this script to start BOINC at boot time. +.PP +The user +.I %%BOINC_USER%% +needs to exist; all invocations of boinc-client will run as this +user. If you want users other than root to be able to start +BOINC, set a password on this account so that anyone can run +.I boinc_client +and supply the password. +.PP +IMPORTANT NOTE: The project clients are programs running +on your computer with full access (as the user +.IR %%BOINC_USER%% ) +to all files and resources of your computer. Before running any +project client, you should establish for yourself that the +program is trustworthy and will not abuse your computer. The +BOINC scheduler does not restrict clients in any way other than to +run them as the user +.IR %%BOINC_USER%% . +.SH OPTIONS +The command-line client has the following command-line options: +.IP -attach_project +Attach this computer to a new project. +You must have an account with that project. +You will be asked for the project URL and the account ID. +.IP -show_projects +Print a list of projects to which this computer is attached. +.IP -detach_project URL +Detach this computer from a project. +.IP -reset_project URL +Clear pending work for a project. +Use this if there is a problem that is preventing +your computer from working. +.IP -update_prefs URL +Contact a project's server to obtain new preferences. +This will also report completed results +and get new work if needed. +.IP -return_results_immediately +Contact scheduler as soon as any result done. +.IP -run_cpu_benchmarks +Run CPU benchmarks. +Do this if you have modified your computer's hardware. +.IP -check_all_logins +If 'run if user active' preference is off, +check for input activity on all current logins; +default is to check only local mouse/keyboard +.IP -exit_when_idle +Get, process and report work, then exit. +.IP -allow_remote_gui_rpc +Allow GUI RPCs from remote hosts +.IP -help +Show client options. +.IP -version +Show client version. +.SH "ENVIRONMENT VARIABLES" +The command-line client has the following optional environment variables: +.IP HTTP_PROXY +URL of HTTP proxy +.IP HTTP_USER_NAME +User name for proxy authentication +.IP HTTP_USER_PASSWD +Password for proxy authentication +.IP SOCKS4_SERVER +URL of SOCKS 4 server +.IP SOCKS5_SERVER +URL of SOCKS 5 server +.IP SOCKS5_USER +User name for SOCKS authentication +.IP SOCKS5_PASSWD +Password for SOCKS authentication +.SH FILES +.IP %%BOINC_HOME%% +default home directory for +.I %%BOINC_USER%% +user +.IP %%BOINC_HOME%%/* +boinc-client configuration files +.IP %%BOINC_HOME%%/projects/* +BOINC projects +.IP %%BOINC_HOME%%/projects/*/* +BOINC project work unit files +.IP %%BOINC_DATADIR%% +boinc-client and BOINC project programs +.SH BUGS +Suspending +.I boinc-client +using ^Z works, but resuming using +.I fg +or +.I bg +does not resume any client processes (e.g., SETI). These need to be +restarted using +.I "kill -CONT" +for each process. +.PP +Placing files in %%BOINC_HOME%% or its subdirectories can cause work +to fail as those files will be counted in disk usage limit checks. In +addition to configurable overall disk usage limits, each client may +further restrict the size of its project or slot directories. +.PP +On a hyperthreadded processor, performance may be limited due to shared +use of processor modules such as the FPU. +.SH "SEE ALSO" +http://boinc.berkeley.edu/ diff --git a/net/boinc-client/files/boinc.sh b/net/boinc-client/files/boinc.sh new file mode 100644 index 000000000000..77fc535ab612 --- /dev/null +++ b/net/boinc-client/files/boinc.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/net/boinc-client/files/Attic/boinc.sh,v 1.1 2004-10-16 19:29:30 pav Exp $ +# +# Start or stop BOINC +# + +. /etc/rc.subr + +name="boinc" +rcvar=`set_rcvar` + +boinc_user=%%BOINC_USER%% +boinc_home=%%BOINC_HOME%% +program_file=%%BOINC_BINARY%% +program_path=%%BOINC_DATADIR%%/client/${program_file} + +[ -z "$boinc_enable" ] && boinc_enable="NO" + +load_rc_config $name + +case "$1" in +start) + if checkyesno boinc_enable + then + if [ ! -x ${program_path} ] + then + logger -sp ${syslog_facility} -t ${program_file} \ + "unable to start: ${program_path} is missing." + exit 72 + fi + if ps axo ucomm | egrep ${program_file}; then + logger -sp ${syslog_facility} -t ${program_file} \ + "unable to start: ${program_file} is already running." + exit 72 + fi + echo -n "BOINC " + idprio 31 su - ${boinc_user} -c "${program_path} >/dev/null &" + fi + ;; + +stop) + program=`expr ${program_file} : '^\(...................\).*$'` + killall ${program} 2> /dev/null + ;; + +restart) + $0 stop + $0 start + ;; + +status) + ps auxww | egrep ${program_file} | egrep -v "($0|egrep)" + ;; + +*) + echo "usage: ${name} {start|stop|restart|status}" >&2 + exit 64 + ;; +esac + diff --git a/net/boinc-client/files/patch-api::boinc_gl.h b/net/boinc-client/files/patch-api::boinc_gl.h new file mode 100644 index 000000000000..a9c41321c9cc --- /dev/null +++ b/net/boinc-client/files/patch-api::boinc_gl.h @@ -0,0 +1,19 @@ +--- api/boinc_gl.h.orig Wed Sep 1 19:15:30 2004 ++++ api/boinc_gl.h Fri Oct 1 12:06:47 2004 +@@ -54,8 +54,6 @@ + # include <OpenGL/glu.h> + # endif + +-# include "GL/glut.h" +-/* + # if defined(HAVE_GLUT_H) + # include "glut.h" + # elif defined(HAVE_GL_GLUT_H) +@@ -65,7 +63,6 @@ + # elif defined(HAVE_GLUT_GLUT_H) + # include <GLUT/glut.h> + # endif +-*/ + + #endif // _WIN32 + diff --git a/net/boinc-client/pkg-descr b/net/boinc-client/pkg-descr new file mode 100644 index 000000000000..cbcc724ae59d --- /dev/null +++ b/net/boinc-client/pkg-descr @@ -0,0 +1,8 @@ +BOINC is a software platform for distributed computing using volunteer +computer resources. + +Many different projects can use BOINC. SETI@HOME, for example, has +been redesigned to use BOINC and the astro/boinc-setiathome port +supercedes the astro/setiathome port. + +WWW: http://boinc.berkeley.edu/ diff --git a/net/boinc-client/pkg-install b/net/boinc-client/pkg-install new file mode 100644 index 000000000000..8acfe233d2db --- /dev/null +++ b/net/boinc-client/pkg-install @@ -0,0 +1,25 @@ +#!/bin/sh + +username=%%BOINC_USER%% +group=%%BOINC_GROUP%% +home=%%BOINC_HOME%% +shell=/bin/sh + +case $2 in +POST-INSTALL) + if ! pw usershow ${username} >/dev/null 2>&1; then + if ! pw useradd ${username} -g ${group} -c BOINC -d ${home} -s ${shell}; then + err=$? + echo "WARNING: Unable to create user. pw returned $err" + echo "You will need to create a boinc user and chown the boinc dir." + exit $err + else + echo "boinc user created." + fi + else + echo "boinc user found. using existing boinc user." + fi + mkdir -p ${home} ${home}/projects + chown ${username}:${group} ${home} ${home}/projects + ;; +esac diff --git a/net/boinc-client/pkg-message b/net/boinc-client/pkg-message new file mode 100644 index 000000000000..503e472e858e --- /dev/null +++ b/net/boinc-client/pkg-message @@ -0,0 +1,14 @@ +------------------------------------------------------------------- +BOINC's boinc-client is now installed. You now need to register +with and install one or more projects. + +Refer to the BOINC web page at + http://boinc.berkeley.edu/ +for a list of projects and refer to each of their sites for info +on how to register with them and how to use them on FreeBSD. +Note that not all projects support FreeBSD; some do, some let +you download the client source code to install yourself, and some +don't work on FreeBSD at all. + +SETI@HOME for FreeBSD is available in port astro/boinc-setiathome. +------------------------------------------------------------------- diff --git a/net/boinc-client/pkg-plist b/net/boinc-client/pkg-plist new file mode 100644 index 000000000000..5d1d64b7d9a5 --- /dev/null +++ b/net/boinc-client/pkg-plist @@ -0,0 +1,50 @@ +bin/boinc-client +boinc/client/%%BOINC_BINARY%% +etc/rc.d/boinc.sh +boinc/Makefile.am +boinc/lib/Makefile.am +boinc/lib/app_ipc.h +boinc/lib/base64.h +boinc/lib/boinc_win.h +boinc/lib/crypt.h +boinc/lib/diagnostics.h +boinc/lib/error_numbers.h +boinc/lib/exception.h +boinc/lib/filesys.h +boinc/lib/gui_rpc_client.h +boinc/lib/hostinfo.h +boinc/lib/language.h +boinc/lib/libboinc.a +boinc/lib/librsaeuro.a +boinc/lib/md5.h +boinc/lib/md5_file.h +boinc/lib/mfile.h +boinc/lib/miofile.h +boinc/lib/msg_log.h +boinc/lib/msg_queue.h +boinc/lib/parse.h +boinc/lib/proxy_info.h +boinc/lib/result_state.h +boinc/lib/shmem.h +boinc/lib/stackwalker_win.h +boinc/lib/std_fixes.h +boinc/lib/synch.h +boinc/lib/util.h +boinc/api/Makefile.am +boinc/api/boinc_api.h +boinc/api/boinc_gl.h +boinc/api/graphics_api.h +boinc/api/graphics_data.h +boinc/api/gutil.h +boinc/api/mac_app_opengl.h +boinc/api/mac_carbon_gl.h +boinc/api/reduce.h +boinc/api/x_opengl.h +@dirrm boinc/api +@dirrm boinc/client +@dirrm boinc/lib +@dirrm boinc/projects +@dirrm boinc +@unexec if [ -d %%BOINC_HOME%% ]; then echo "If you are deinstalling boinc completely, remove the %%BOINC_HOME%% directory."; fi +@unexec if [ -d %%BOINC_HOME%% ]; then echo -n "Also, d"; else echo -n "D"; fi +@unexec echo "on't forget to remove the \"%%BOINC_USER%%\" user." |