ports/72714: New port: net/boinc-client Berkeley Open Infrastructure for Network Computing

J.R. Oldroyd fbsd at opal.com
Thu Oct 14 22:10:32 UTC 2004


>Number:         72714
>Category:       ports
>Synopsis:       New port: net/boinc-client Berkeley Open Infrastructure for Network Computing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 14 22:10:31 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     J.R. Oldroyd
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD linwhf.opal.com 6.0-CURRENT FreeBSD 6.0-CURRENT #67: Fri Oct 8 14:11:54 EDT 2004 jr at linwhf.opal.com:/usr/src-current/sys/i386/compile/LINWHF i386

>Description:
BOINC is a software platform for distributed computing using volunteer
computer resources.

Many different projects can use BOINC.  SETI at 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/ 

>How-To-Repeat:

>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	boinc-client
#	boinc-client/pkg-plist
#	boinc-client/pkg-message
#	boinc-client/pkg-install
#	boinc-client/pkg-descr
#	boinc-client/Makefile
#	boinc-client/distinfo
#	boinc-client/files
#	boinc-client/files/boinc-client.1
#	boinc-client/files/patch-api::boinc_gl.h
#	boinc-client/files/boinc.sh
#	boinc-client/files/boinc-client
#
echo c - boinc-client
mkdir -p boinc-client > /dev/null 2>&1
echo x - boinc-client/pkg-plist
sed 's/^X//' >boinc-client/pkg-plist << 'END-of-boinc-client/pkg-plist'
Xbin/boinc-client
Xboinc/client/%%BOINC_BINARY%%
Xetc/rc.d/boinc.sh
Xboinc/Makefile.am
Xboinc/lib/Makefile.am
Xboinc/lib/app_ipc.h
Xboinc/lib/base64.h
Xboinc/lib/boinc_win.h
Xboinc/lib/crypt.h
Xboinc/lib/diagnostics.h
Xboinc/lib/error_numbers.h
Xboinc/lib/exception.h
Xboinc/lib/filesys.h
Xboinc/lib/gui_rpc_client.h
Xboinc/lib/hostinfo.h
Xboinc/lib/language.h
Xboinc/lib/libboinc.a
Xboinc/lib/librsaeuro.a
Xboinc/lib/md5.h
Xboinc/lib/md5_file.h
Xboinc/lib/mfile.h
Xboinc/lib/miofile.h
Xboinc/lib/msg_log.h
Xboinc/lib/msg_queue.h
Xboinc/lib/parse.h
Xboinc/lib/proxy_info.h
Xboinc/lib/result_state.h
Xboinc/lib/shmem.h
Xboinc/lib/stackwalker_win.h
Xboinc/lib/std_fixes.h
Xboinc/lib/synch.h
Xboinc/lib/util.h
Xboinc/api/Makefile.am
Xboinc/api/boinc_api.h
Xboinc/api/boinc_gl.h
Xboinc/api/graphics_api.h
Xboinc/api/graphics_data.h
Xboinc/api/gutil.h
Xboinc/api/mac_app_opengl.h
Xboinc/api/mac_carbon_gl.h
Xboinc/api/reduce.h
Xboinc/api/x_opengl.h
X at dirrm boinc/api
X at dirrm boinc/client
X at dirrm boinc/lib
X at dirrm boinc/projects
X at dirrm boinc
X at unexec if [ -d %%BOINC_HOME%% ]; then echo "If you are deinstalling boinc completely, remove the %%BOINC_HOME%% directory."; fi
X at unexec if [ -d %%BOINC_HOME%% ]; then echo -n "Also, d"; else echo -n "D"; fi
X at unexec echo "on't forget to remove the \"%%BOINC_USER%%\" user."
END-of-boinc-client/pkg-plist
echo x - boinc-client/pkg-message
sed 's/^X//' >boinc-client/pkg-message << 'END-of-boinc-client/pkg-message'
X-------------------------------------------------------------------
XBOINC's boinc-client is now installed.  You now need to register
Xwith and install one or more projects.
X
XRefer to the BOINC web page at
X	http://boinc.berkeley.edu/
Xfor a list of projects and refer to each of their sites for info
Xon how to register with them and how to use them on FreeBSD.
XNote that not all projects support FreeBSD; some do, some let
Xyou download the client source code to install yourself, and some
Xdon't work on FreeBSD at all.
X
XSETI at HOME for FreeBSD is available in port astro/boinc-setiathome.
X-------------------------------------------------------------------
END-of-boinc-client/pkg-message
echo x - boinc-client/pkg-install
sed 's/^X//' >boinc-client/pkg-install << 'END-of-boinc-client/pkg-install'
X#!/bin/sh
X
Xusername=%%BOINC_USER%%
Xgroup=%%BOINC_GROUP%%
Xhome=%%BOINC_HOME%%
Xshell=/bin/sh
X
Xcase $2 in
XPOST-INSTALL)
X    if ! pw usershow ${username} >/dev/null 2>&1; then
X	if ! pw useradd ${username} -g ${group} -c BOINC -d ${home} -s ${shell}; then
X		err=$?
X		echo "WARNING: Unable to create user.  pw returned $err"
X		echo "You will need to create a boinc user and chown the boinc dir."
X		exit $err
X	else
X		echo "boinc user created."
X	fi
X    else
X	echo "boinc user found.  using existing boinc user."
X    fi
X    mkdir -p ${home} ${home}/projects
X    chown ${username}:${group} ${home} ${home}/projects
X    ;;
Xesac
END-of-boinc-client/pkg-install
echo x - boinc-client/pkg-descr
sed 's/^X//' >boinc-client/pkg-descr << 'END-of-boinc-client/pkg-descr'
XBOINC is a software platform for distributed computing using volunteer
Xcomputer resources.
X
XMany different projects can use BOINC.  SETI at HOME, for example, has
Xbeen redesigned to use BOINC and the astro/boinc-setiathome port
Xsupercedes the astro/setiathome port.
X
XWWW: http://boinc.berkeley.edu/ 
END-of-boinc-client/pkg-descr
echo x - boinc-client/Makefile
sed 's/^X//' >boinc-client/Makefile << 'END-of-boinc-client/Makefile'
X# New ports collection makefile for:   boinc
X# Date created:        01 October 2004
X# Whom:                J.R. Oldroyd <fbsd at opal.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	boinc-client
XPORTVERSION=	4.13
XCATEGORIES=	net
XMASTER_SITES=	http://boinc.berkeley.edu/source/nightly/
XDISTNAME=	boinc_public-cvs-2004-10-14
X
XMAINTAINER=	fbsd at opal.com
XCOMMENT=	Berkeley Open Infrastructure for Network Computing client
X
XUSE_REINPLACE=	yes
XGNU_CONFIGURE=	yes
XCONFIGURE_ARGS=	--disable-server
XCONFIGURE_ENV=	CPPFLAGS=-I/usr/X11R6/include CXXFLAGS=-I/usr/X11R6/include
X
XWRKSRC=		${WRKDIR}/boinc_public
XPKGINSTALL=	${WRKDIR}/pkg-install
XPKGPLIST=	${WRKDIR}/pkg-plist
X
XMAN1=		boinc-client.1
X
XFIND_BOINC_BINARY=(cd ${WRKDIR}/boinc_public/client; make -V CLIENT_BIN_FILENAME))
X
XBOINC_USER=	boinc
XBOINC_GROUP=	nobody
XBOINC_HOME=	/var/db/boinc
XBOINC_DATADIR=	${PREFIX}/boinc
X
Xpost-patch:
X	${CHMOD} +x ${WRKDIR}/boinc_public/configure
X
Xdo-build:
X	@(cd ${WRKDIR}/boinc_public/client; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
X	@(cd ${WRKDIR}/boinc_public/api; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
X	@(cd ${WRKDIR}/boinc_public/lib; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
X
Xpost-build:
X	BBIN=`${FIND_BOINC_BINARY}`; \
X	${SED}  -e "s:%%BOINC_BINARY%%:$$BBIN:g" \
X		-e "s:%%BOINC_DATADIR%%:${BOINC_DATADIR}:g" \
X		-e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \
X		-e "s:%%BOINC_USER%%:${BOINC_USER}:g" \
X		-e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \
X		< ${FILESDIR}/boinc-client > ${WRKDIR}/boinc-client; \
X	${SED}  -e "s:%%BOINC_BINARY%%:$$BBIN:g" \
X		-e "s:%%BOINC_DATADIR%%:${BOINC_DATADIR}:g" \
X		-e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \
X		-e "s:%%BOINC_USER%%:${BOINC_USER}:g" \
X		-e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \
X		< ${FILESDIR}/boinc-client.1 > ${WRKDIR}/boinc-client.1; \
X	${SED}  -e "s:%%BOINC_BINARY%%:$$BBIN:g" \
X		-e "s:%%BOINC_DATADIR%%:${BOINC_DATADIR}:g" \
X		-e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \
X		-e "s:%%BOINC_USER%%:${BOINC_USER}:g" \
X		-e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \
X		< ${FILESDIR}/boinc.sh > ${WRKDIR}/boinc.sh
X	${SED}  -e "s:%%BOINC_BINARY%%:$$BBIN:g" \
X		-e "s:%%BOINC_DATADIR%%:${PREFIX}/boinc:g" \
X		-e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \
X		-e "s:%%BOINC_USER%%:${BOINC_USER}:g" \
X		-e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \
X		< ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install
X
Xdo-install:
X	${INSTALL_SCRIPT} ${WRKDIR}/boinc-client ${PREFIX}/bin
X	${INSTALL_MAN} ${WRKDIR}/boinc-client.1 ${PREFIX}/man/man1
X	${MKDIR} ${PREFIX}/boinc/client
X	${INSTALL_PROGRAM} ${WRKDIR}/boinc_public/client/`${FIND_BOINC_BINARY}` ${PREFIX}/boinc/client
X	${MKDIR} ${PREFIX}/boinc/lib
X	${INSTALL} ${WRKDIR}/boinc_public/lib/*.h ${PREFIX}/boinc/lib
X	${INSTALL} ${WRKDIR}/boinc_public/lib/libboinc.a ${PREFIX}/boinc/lib
X	${INSTALL} ${WRKDIR}/boinc_public/RSAEuro/source/librsaeuro.a ${PREFIX}/boinc/lib
X	${MKDIR} ${PREFIX}/boinc/api
X	${INSTALL} ${WRKDIR}/boinc_public/api/*.h ${PREFIX}/boinc/api
X	${TOUCH} ${PREFIX}/boinc/api/Makefile.am
X	${TOUCH} ${PREFIX}/boinc/lib/Makefile.am
X	${TOUCH} ${PREFIX}/boinc/Makefile.am
X	${MKDIR} ${PREFIX}/boinc/projects
X	${MKDIR} ${PREFIX}/etc/rc.d
X	${INSTALL_SCRIPT} ${WRKDIR}/boinc.sh ${PREFIX}/etc/rc.d
X	${CAT} pkg-message
X
Xpost-install:
X	${REINPLACE_CMD} \
X	    -e "s:%%BOINC_BINARY%%:`${FIND_BOINC_BINARY}`:g" \
X	    -e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \
X	    -e "s:%%BOINC_USER%%:${BOINC_USER}:g" \
X	    ${TMPPLIST}
X	@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X
X.include <bsd.port.mk>
END-of-boinc-client/Makefile
echo x - boinc-client/distinfo
sed 's/^X//' >boinc-client/distinfo << 'END-of-boinc-client/distinfo'
XMD5 (boinc_public-cvs-2004-10-14.tar.gz) = e72232372a72b2f851cca989dc1a3e37
XSIZE (boinc_public-cvs-2004-10-14.tar.gz) = 3712753
END-of-boinc-client/distinfo
echo c - boinc-client/files
mkdir -p boinc-client/files > /dev/null 2>&1
echo x - boinc-client/files/boinc-client.1
sed 's/^X//' >boinc-client/files/boinc-client.1 << 'END-of-boinc-client/files/boinc-client.1'
X.TH boinc-client 1 "October 1, 2004" "" "BOINC"
X.SH NAME
Xboinc-client \- client for Berkeley Open Infrastructure for Network Computing
X.SH SYNOPSIS
Xboinc-client [ options ]
X.PP
Xsh /usr/local/etc/rc.d/boinc.sh start|stop|restart|status
X.SH DESCRIPTION
X.I boinc-client
Xis the client for the Berkeley Open Infrastructure for Network
XComputing (BOINC) service.  It is used by projects such as SETI at HOME
Xand ClimatePredictor to offer your spare CPU cycles to such projects.
XBOINC allows you to configure one or more projects to which you offer
Xyour spare CPU cycles for their computations.
X.PP
XBOINC is a scheduler; you configure projects under BOINC and BOINC
Xthen runs each one according to what percentage of time you have
Xspecified for that project.
XWhen a project is run, BOINC runs the project's client program to
Xdownload computational work units from the project, then perform the
Xwork unit computation, and finally upload the results back to the
Xproject.  If no work is available for one of your projects, BOINC
Xwill run another of your projects.
X.PP
XBOINC runs project clients at low priority, with a
X.IR nice (1)
Xvalue of 19, to ensure that as soon as you need your computer for
Xany other work, BOINC projects stop so that you are not delayed
Xby them.
X.PP
XAfter choosing which projects to participate in, you must register
Xwith each on the project's website.  You can find out about BOINC
Xprojects on the BOINC website.  Upon registering with a project,
Xyou will receive an account ID for the project.
XRun
X.I "boinc-client -attach_project"
Xto add new projects to your BOINC configuration using the project
XURL and your account ID.
XDepending on what operating system platforms the project supports
Xyou may be able to immediately start the project or you may need to
Xdownload the project client's source code and compile it.  For
Xfurther information, see the BOINC web site and the project's own
Xwebsite.  Some projects are already available as FreeBSD ports
X(e.g., SETI at HOME in port astro/boinc-setiathome).  Not all projects
Xsupport FreeBSD and some do not make their client's source code
Xavailable.  In such cases, you will not be able to participate in
Xthat project from FreeBSD.
X.PP
XRunning
X.I boinc-client
Xwith no arguments starts the service and any configured projects.
X.PP
XYou can edit both BOINC general preferences and project-specific
Xpreferences on the website of any BOINC projects which you are
Xregistered with.  Preferences will take effect next time BOINC
Xcontacts that project's server, e.g., to download more work or
Xto upload results.
X.PP
X.I /usr/local/etc/rc.d/boinc.sh
Xscript is run automatically at system boot time.
XThe
X.I /etc/rc.conf
Xvariable
X.I boinc_enable
Xmust be set to
X.I boinc_enable="YES"
Xfor this script to start BOINC at boot time.
X.PP
XThe user
X.I %%BOINC_USER%%
Xneeds to exist; all invocations of boinc-client will run as this
Xuser.  If you want users other than root to be able to start
XBOINC, set a password on this account so that anyone can run
X.I boinc_client
Xand supply the password.
X.PP
XIMPORTANT NOTE:  The project clients are programs running
Xon your computer with full access (as the user
X.IR %%BOINC_USER%% )
Xto all files and resources of your computer.  Before running any
Xproject client, you should establish for yourself that the
Xprogram is trustworthy and will not abuse your computer.  The
XBOINC scheduler does not restrict clients in any way other than to
Xrun them as the user
X.IR %%BOINC_USER%% .
X.SH OPTIONS
XThe command-line client has the following command-line options:
X.IP -attach_project
XAttach this computer to a new project.
XYou must have an account with that project.
XYou will be asked for the project URL and the account ID.
X.IP -show_projects
XPrint a list of projects to which this computer is attached.
X.IP -detach_project URL
XDetach this computer from a project.
X.IP -reset_project URL
XClear pending work for a project.
XUse this if there is a problem that is preventing
Xyour computer from working.
X.IP -update_prefs URL
XContact a project's server to obtain new preferences.
XThis will also report completed results
Xand get new work if needed.
X.IP -return_results_immediately
XContact scheduler as soon as any result done.
X.IP -run_cpu_benchmarks
XRun CPU benchmarks.
XDo this if you have modified your computer's hardware.
X.IP -check_all_logins
XIf 'run if user active' preference is off,
Xcheck for input activity on all current logins;
Xdefault is to check only local mouse/keyboard
X.IP -exit_when_idle
XGet, process and report work, then exit.
X.IP -allow_remote_gui_rpc
XAllow GUI RPCs from remote hosts
X.IP -help
XShow client options.
X.IP -version
XShow client version.
X.SH "ENVIRONMENT VARIABLES"
XThe command-line client has the following optional environment variables:
X.IP HTTP_PROXY
XURL of HTTP proxy
X.IP HTTP_USER_NAME
XUser name for proxy authentication
X.IP HTTP_USER_PASSWD
XPassword for proxy authentication
X.IP SOCKS4_SERVER
XURL of SOCKS 4 server
X.IP SOCKS5_SERVER
XURL of SOCKS 5 server
X.IP SOCKS5_USER
XUser name for SOCKS authentication
X.IP SOCKS5_PASSWD
XPassword for SOCKS authentication
X.SH FILES
X.IP %%BOINC_HOME%%
Xdefault home directory for
X.I %%BOINC_USER%%
Xuser
X.IP %%BOINC_HOME%%/*
Xboinc-client configuration files
X.IP %%BOINC_HOME%%/projects/*
XBOINC projects
X.IP %%BOINC_HOME%%/projects/*/*
XBOINC project work unit files
X.IP %%BOINC_DATADIR%%
Xboinc-client and BOINC project programs
X.SH BUGS
XSuspending
X.I boinc-client
Xusing ^Z works, but resuming using
X.I fg
Xor
X.I bg
Xdoes not resume any client processes (e.g., SETI).  These need to be
Xrestarted using
X.I "kill -CONT"
Xfor each process.
X.PP
XPlacing files in %%BOINC_HOME%% or its subdirectories can cause work
Xto fail as those files will be counted in disk usage limit checks.  In
Xaddition to configurable overall disk usage limits, each client may
Xfurther restrict the size of its project or slot directories.
X.PP
XOn a hyperthreadded processor, performance may be limited due to shared
Xuse of processor modules such as the FPU.
X.SH "SEE ALSO"
Xhttp://boinc.berkeley.edu/
END-of-boinc-client/files/boinc-client.1
echo x - boinc-client/files/patch-api::boinc_gl.h
sed 's/^X//' >boinc-client/files/patch-api::boinc_gl.h << 'END-of-boinc-client/files/patch-api::boinc_gl.h'
X--- api/boinc_gl.h.orig	Wed Sep  1 19:15:30 2004
X+++ api/boinc_gl.h	Fri Oct  1 12:06:47 2004
X@@ -54,8 +54,6 @@
X #    include <OpenGL/glu.h>
X #  endif
X 
X-# include "GL/glut.h"
X-/*
X #  if defined(HAVE_GLUT_H)
X #    include "glut.h"
X #  elif defined(HAVE_GL_GLUT_H)
X@@ -65,7 +63,6 @@
X #  elif defined(HAVE_GLUT_GLUT_H)
X #    include <GLUT/glut.h>
X #  endif
X-*/
X 
X #endif // _WIN32
X 
END-of-boinc-client/files/patch-api::boinc_gl.h
echo x - boinc-client/files/boinc.sh
sed 's/^X//' >boinc-client/files/boinc.sh << 'END-of-boinc-client/files/boinc.sh'
X#!/bin/sh
X#
X# $FreeBSD: $
X#
X# Start or stop BOINC
X#
X
X. /etc/rc.subr
X
Xname="boinc"
Xrcvar=`set_rcvar`
X
Xboinc_user=%%BOINC_USER%%
Xboinc_home=%%BOINC_HOME%%
Xprogram_file=%%BOINC_BINARY%%
Xprogram_path=%%BOINC_DATADIR%%/client/${program_file}
X
X[ -z "$boinc_enable" ] && boinc_enable="NO"
X
Xload_rc_config $name
X
Xcase "$1" in
Xstart)
X	if checkyesno boinc_enable
X	then
X		if [ ! -x ${program_path} ]
X		then
X			logger -sp ${syslog_facility} -t ${program_file} \
X				"unable to start: ${program_path} is missing."
X			exit 72
X		fi
X		if ps axo ucomm | egrep ${program_file}; then
X			logger -sp ${syslog_facility} -t ${program_file} \
X			"unable to start: ${program_file} is already running."
X			exit 72
X		fi
X		echo -n "BOINC "
X		idprio 31 su - ${boinc_user} -c "${program_path} >/dev/null &"
X	fi
X	;;
X
Xstop)
X	program=`expr ${program_file} : '^\(...................\).*$'`
X	killall ${program} 2> /dev/null
X	;;
X
Xrestart)
X	$0 stop
X	$0 start
X	;;
X
Xstatus)
X	ps auxww | egrep ${program_file} | egrep -v "($0|egrep)"
X	;;
X
X*)
X	echo "usage: ${name} {start|stop|restart|status}" >&2
X	exit 64
X	;;
Xesac
X
END-of-boinc-client/files/boinc.sh
echo x - boinc-client/files/boinc-client
sed 's/^X//' >boinc-client/files/boinc-client << 'END-of-boinc-client/files/boinc-client'
X#!/bin/sh
X
Xargs="$@"
X
Xexec idprio 31 su - %%BOINC_USER%% -c "%%BOINC_DATADIR%%/client/%%BOINC_BINARY%% $args"
X
END-of-boinc-client/files/boinc-client
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list