From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Dec 14 17:30:29 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1EBF116A4CE for ; Tue, 14 Dec 2004 17:30:29 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5B7D43D2F for ; Tue, 14 Dec 2004 17:30:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBEHUSja036020 for ; Tue, 14 Dec 2004 17:30:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBEHUSN7036013; Tue, 14 Dec 2004 17:30:28 GMT (envelope-from gnats) Resent-Date: Tue, 14 Dec 2004 17:30:28 GMT Resent-Message-Id: <200412141730.iBEHUSN7036013@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "J.R. Oldroyd" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5015716A4CE for ; Tue, 14 Dec 2004 17:27:10 +0000 (GMT) Received: from smtp.vzavenue.net (smtp.vzavenue.net [66.171.59.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78AA243D46 for ; Tue, 14 Dec 2004 17:27:09 +0000 (GMT) (envelope-from jr@opal.com) Received: from linwhf.opal.com (126.79.171.66.subscriber.vzavenue.net [66.171.79.126]) by smtp.vzavenue.net (MOS 3.4.3-CR) with ESMTP id BNI20968; Tue, 14 Dec 2004 12:17:21 -0500 (EST) Received: from linwhf.opal.com (localhost [127.0.0.1]) by linwhf.opal.com (8.13.1/8.13.1) with ESMTP id iBEHHLQ0016834 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Tue, 14 Dec 2004 12:17:21 -0500 (EST) (envelope-from jr@linwhf.opal.com) Received: (from root@localhost) by linwhf.opal.com (8.13.1/8.13.1/Submit) id iBEHHLtF016833; Tue, 14 Dec 2004 12:17:21 -0500 (EST) (envelope-from jr) Message-Id: <200412141717.iBEHHLtF016833@linwhf.opal.com> Date: Tue, 14 Dec 2004 12:17:21 -0500 (EST) From: "J.R. Oldroyd" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/75062: update port: net/boinc-client - fixes for FreeBSD 4.X and for 64-bit archs X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "J.R. Oldroyd" List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2004 17:30:29 -0000 >Number: 75062 >Category: ports >Synopsis: update port: net/boinc-client - fixes for FreeBSD 4.X and for 64-bit archs >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: Tue Dec 14 17:30:28 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@linwhf.opal.com:/usr/src-current/sys/i386/compile/LINWHF i386 >Description: Update of boinc-client port to address issues with reentrancy problems on FreeBSD 4.x (malloc() called recursively) and also to address differences in rc.d files on 4.X. Update also fixes compilation problems on 64-bit architectures. Files added to port: files/boinc.sh-4.x files/extra-patch-api::boinc_api.C files/patch-client::gui_rpc_server.C files/patch-client::net_xfer.C >How-To-Repeat: >Fix: diff -ruN /usr/ports/net/boinc-client/Makefile boinc-client/Makefile --- /usr/ports/net/boinc-client/Makefile Thu Oct 21 09:05:46 2004 +++ boinc-client/Makefile Tue Dec 14 11:55:48 2004 @@ -7,6 +7,7 @@ PORTNAME= boinc-client PORTVERSION= 4.13 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://boinc.berkeley.edu/source/nightly/ DISTNAME= boinc_public-cvs-2004-10-14 @@ -25,7 +26,7 @@ MAN1= boinc-client.1 -FIND_BOINC_BINARY=(cd ${WRKDIR}/boinc_public/client; make -V CLIENT_BIN_FILENAME)) +FIND_BOINC_BINARY=(cd ${WRKDIR}/boinc_public/client; make -V CLIENT_BIN_FILENAME) BOINC_USER= boinc BOINC_GROUP= nobody @@ -34,8 +35,8 @@ .include -.if ${ARCH} != "i386" -BROKEN= Does not compile on 64-bit architectures +.if ${OSVERSION} < 500000 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-api::boinc_api.C .endif post-patch: @@ -61,17 +62,28 @@ -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%%:${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 +.if ${OSVERSION} >= 500000 + 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.sh > ${WRKDIR}/boinc.sh +.else + BBIN=`${FIND_BOINC_BINARY}`; \ ${SED} -e "s:%%BOINC_BINARY%%:$$BBIN:g" \ - -e "s:%%BOINC_DATADIR%%:${PREFIX}/boinc: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" \ - < ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install + < ${FILESDIR}/boinc.sh-4.x > ${WRKDIR}/boinc.sh +.endif do-install: ${INSTALL_SCRIPT} ${WRKDIR}/boinc-client ${PREFIX}/bin @@ -90,7 +102,7 @@ ${MKDIR} ${PREFIX}/boinc/projects ${MKDIR} ${PREFIX}/etc/rc.d ${INSTALL_SCRIPT} ${WRKDIR}/boinc.sh ${PREFIX}/etc/rc.d - ${CAT} pkg-message + ${CAT} ${PKGMESSAGE} post-install: ${REINPLACE_CMD} \ diff -ruN /usr/ports/net/boinc-client/files/boinc.sh-4.x boinc-client/files/boinc.sh-4.x --- /usr/ports/net/boinc-client/files/boinc.sh-4.x Wed Dec 31 19:00:00 1969 +++ boinc-client/files/boinc.sh-4.x Thu Dec 9 10:50:23 2004 @@ -0,0 +1,61 @@ +#!/bin/sh +# +# $FreeBSD: ports/net/boinc-client/files/boinc.sh,v 1.1 2004/10/16 19:29:30 pav Exp $ +# +# Start or stop BOINC +# + +. /usr/local/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 -ruN /usr/ports/net/boinc-client/files/extra-patch-api::boinc_api.C boinc-client/files/extra-patch-api::boinc_api.C --- /usr/ports/net/boinc-client/files/extra-patch-api::boinc_api.C Wed Dec 31 19:00:00 1969 +++ boinc-client/files/extra-patch-api::boinc_api.C Thu Dec 9 10:24:14 2004 @@ -0,0 +1,11 @@ +--- api/boinc_api.C.orig Sun Sep 5 19:28:46 2004 ++++ api/boinc_api.C Thu Dec 9 10:22:30 2004 +@@ -116,7 +116,7 @@ + options.handle_trickle_ups = true; + options.handle_trickle_downs = true; + options.handle_process_control = true; +- options.send_status_msgs = true; ++ options.send_status_msgs = false; + options.direct_process_action = true; + return boinc_init_options(options); + } diff -ruN /usr/ports/net/boinc-client/files/patch-client::gui_rpc_server.C boinc-client/files/patch-client::gui_rpc_server.C --- /usr/ports/net/boinc-client/files/patch-client::gui_rpc_server.C Wed Dec 31 19:00:00 1969 +++ boinc-client/files/patch-client::gui_rpc_server.C Thu Dec 2 21:08:31 2004 @@ -0,0 +1,17 @@ +--- client/gui_rpc_server.C.orig Mon Sep 27 15:07:29 2004 ++++ client/gui_rpc_server.C Thu Dec 2 20:59:58 2004 +@@ -47,12 +47,10 @@ + + #if defined(_WIN32) + typedef int socklen_t; +-#elif defined ( __APPLE__) ++#elif defined(__APPLE__) + typedef int32_t socklen_t; +-#elif !GETSOCKOPT_SOCKLEN_T +-#ifndef socklen_t ++#elif !defined(GETSOCKOPT_SOCKLEN_T) && !defined(_SOCKLEN_T_DECLARED) && !defined(socklen_t) + typedef size_t socklen_t; +-#endif + #endif + + static void boinc_close_socket(int sock) { diff -ruN /usr/ports/net/boinc-client/files/patch-client::net_xfer.C boinc-client/files/patch-client::net_xfer.C --- /usr/ports/net/boinc-client/files/patch-client::net_xfer.C Wed Dec 31 19:00:00 1969 +++ boinc-client/files/patch-client::net_xfer.C Thu Dec 2 21:08:37 2004 @@ -0,0 +1,17 @@ +--- client/net_xfer.C.orig Mon Sep 27 15:07:30 2004 ++++ client/net_xfer.C Thu Dec 2 21:00:11 2004 +@@ -78,12 +78,10 @@ + + #if defined(_WIN32) + typedef int socklen_t; +-#elif defined ( __APPLE__) ++#elif defined(__APPLE__) + typedef int32_t socklen_t; +-#elif !GETSOCKOPT_SOCKLEN_T +-#ifndef socklen_t ++#elif !defined(GETSOCKOPT_SOCKLEN_T) && !defined(_SOCKLEN_T_DECLARED) && !defined(socklen_t) + typedef size_t socklen_t; +-#endif + #endif + + using std::vector; >Release-Note: >Audit-Trail: >Unformatted: