This is an update of the net/spread4 port to version 4.2.0. New changes with respect to original source code: * Remove the use of -ldl in a couple of Makefiles, as this library does not exist in FreeBSD, and its functions are included in libc. * Include <sys/stdint.h> in daemon.c as it uses UINT16_MAX, which in Linux must be defined in some of the other header files, but not in FreeBSD. The rest of the patches are the obvious things (download size and sha256, update in the pkg-plist with new shared library versions...) NOTE: in order to download Spread from http://www.spread.org/download/spread-src-4.2.0.tar.gz, you are asked to fill a form. In the current port, the source code is downloaded from LOCAL/wen, and somebody should upload spread-4.2.0.tar.gz there to make it available. Fix: See attached patch file. Patch attached with submission follows: How-To-Repeat: Not applicable.
Responsible Changed From-To: freebsd-ports-bugs->apache Over to maintainer (via the GNATS Auto Assign Tool)
I attach an enhanced startup script (the original one blocks when starting the daemon) --- spread4.orig/files/spread.in 2012-07-20 22:32:20.000000000 +0200 +++ spread4/files/spread.in 2013-01-24 08:39:26.000000000 +0100 @@ -19,15 +19,25 @@ name=spread rcvar=spread_enable +load_rc_config ${name} -command="%%PREFIX%%/sbin/spread" +# set defaults +spread_enable=${spread_enable:-"NO"} +command="%%PREFIX%%/sbin/spread" pidfile=/var/run/${name}.pid required_files=%%PREFIX%%/etc/${name}.conf -# set defaults +start_cmd=spread_start +stop_postcmd=spread_cleanup -spread_enable=${spread_enable:-"NO"} +spread_start() { + echo "Starting spread." + /usr/sbin/daemon -cf -p ${pidfile} ${command} ${spread_flags} +} + +spread_cleanup() { + [ -f ${pidfile} ] && rm -f ${pidfile} +} -load_rc_config ${name} run_rc_command "$1"
Responsible Changed From-To: apache->ohauer I'll take it
Author: ohauer Date: Sun Mar 3 18:12:06 2013 New Revision: 313372 URL: http://svnweb.freebsd.org/changeset/ports/313372 Log: net/spread4 - update spread4 to 4.2.0 - the port has a dedicated user/group, so use them in the rc script (instead root) - use dedicated log directory - assign port to ports@ devel/pecl-spread - bump PORTREVISION PR: 175510 Submitted by: Javier Martin Rueda <jmrueda@diatel.upm.es> Added: head/net/spread4/files/patch-daemon__Makefile.in (contents, props changed) head/net/spread4/files/patch-daemon__monitor.c (contents, props changed) head/net/spread4/files/patch-examples__Makefile.in (contents, props changed) Modified: head/devel/pecl-spread/Makefile (contents, props changed) head/net/spread4/Makefile head/net/spread4/distinfo (contents, props changed) head/net/spread4/files/patch-docs__sample.spread.conf (contents, props changed) head/net/spread4/files/spread.in head/net/spread4/pkg-plist (contents, props changed) Modified: head/devel/pecl-spread/Makefile ============================================================================== --- head/devel/pecl-spread/Makefile Sun Mar 3 17:40:36 2013 (r313371) +++ head/devel/pecl-spread/Makefile Sun Mar 3 18:12:06 2013 (r313372) @@ -1,13 +1,9 @@ -# New ports collection makefile for: pecl-spread -# Date created: 10 June 2008 -# Whom: Wen Heping <wenheping@gmail.com> -# +# Created by: Wen Heping <wenheping@gmail.com> # $FreeBSD$ -# PORTNAME= spread PORTVERSION= 2.1.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel pear MASTER_SITES= http://pecl.php.net/get/ PKGNAMEPREFIX= pecl- Modified: head/net/spread4/Makefile ============================================================================== --- head/net/spread4/Makefile Sun Mar 3 17:40:36 2013 (r313371) +++ head/net/spread4/Makefile Sun Mar 3 18:12:06 2013 (r313372) @@ -1,18 +1,13 @@ -# New ports collection makefile for: spread -# Date created: 11 June 2001 -# Whom: Anders Nordby <anders@fix.no> -# +# Created by: Anders Nordby <anders@fix.no> # $FreeBSD$ -# PORTNAME= spread4 -PORTVERSION= 4.1.0 -PORTREVISION= 1 +PORTVERSION= 4.2.0 CATEGORIES= net perl5 -MASTER_SITES= LOCAL/wen +MASTER_SITES= LOCAL/ohauer DISTNAME= spread-src-${PORTVERSION} -MAINTAINER= apache@FreeBSD.org +MAINTAINER= ports@FreeBSD.org COMMENT= The Spread Group Communication System, a network toolkit GNU_CONFIGURE= yes @@ -26,6 +21,7 @@ GROUPS= spread RUNDIR= /var/run/spread PLIST_SUB+= USERS=${USERS} GROUPS=${GROUPS} RUNDIR=${RUNDIR} +SUB_LIST+= USERS=${USERS} GROUPS=${GROUPS} WRKSRC= ${WRKDIR}/spread-src-${PORTVERSION} @@ -51,18 +47,18 @@ post-extract: ${WRKSRC}/Makefile.in post-install: - ${INSTALL_DATA} ${WRKSRC}/docs/sample.spread.conf \ + ${INSTALL_DATA} -m 644 ${WRKSRC}/docs/sample.spread.conf \ ${PREFIX}/etc/spread.conf.sample - ${INSTALL_DATA} ${WRKSRC}/docs/sample.spread.access_ip \ + ${INSTALL_DATA} -m 644 ${WRKSRC}/docs/sample.spread.access_ip \ ${PREFIX}/etc/spread.access_ip.sample .if !exists(${PREFIX}/etc/spread.conf) - ${INSTALL_DATA} ${WRKSRC}/docs/sample.spread.conf \ + ${INSTALL_DATA} -m 644 ${WRKSRC}/docs/sample.spread.conf \ ${PREFIX}/etc/spread.conf .endif .if !exists(${PREFIX}/etc/spread.access_ip) - ${INSTALL_DATA} ${WRKSRC}/docs/sample.spread.access_ip \ + ${INSTALL_DATA} -m 644 ${WRKSRC}/docs/sample.spread.access_ip \ ${PREFIX}/etc/spread.access_ip .endif Modified: head/net/spread4/distinfo ============================================================================== --- head/net/spread4/distinfo Sun Mar 3 17:40:36 2013 (r313371) +++ head/net/spread4/distinfo Sun Mar 3 18:12:06 2013 (r313372) @@ -1,2 +1,2 @@ -SHA256 (spread-src-4.1.0.tar.gz) = 764d84ecf06877802c805efc1e84bbb362f14c791829e88d62fcba9951a68cdd -SIZE (spread-src-4.1.0.tar.gz) = 641060 +SHA256 (spread-src-4.2.0.tar.gz) = 0f234c211eadc26002e31343bdd1e343f4956f5665edd4db92751ef1d595bb5c +SIZE (spread-src-4.2.0.tar.gz) = 736189 Added: head/net/spread4/files/patch-daemon__Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/spread4/files/patch-daemon__Makefile.in Sun Mar 3 18:12:06 2013 (r313372) @@ -0,0 +1,11 @@ +--- daemon/Makefile.in.orig 2012-03-21 00:26:01.000000000 +0100 ++++ daemon/Makefile.in 2013-01-22 12:02:35.000000000 +0100 +@@ -30,7 +30,7 @@ + LIBSPREADUTIL_DIR=../libspread-util + LIBSPREADUTIL_PATHS=-I$(LIBSPREADUTIL_DIR)/include -I$(top_srcdir)/libspread-util/include + LIBSPREADUTIL_LDFLAGS=-rdynamic +-LIBSPREADUTIL_LIBS=-ldl ++LIBSPREADUTIL_LIBS= + + CC=@CC@ + LD=@LD@ Added: head/net/spread4/files/patch-daemon__monitor.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/spread4/files/patch-daemon__monitor.c Sun Mar 3 18:12:06 2013 (r313372) @@ -0,0 +1,10 @@ +--- daemon/monitor.c.orig 2012-03-21 04:17:52.000000000 +0100 ++++ daemon/monitor.c 2013-01-22 12:21:25.000000000 +0100 +@@ -39,6 +39,7 @@ + #include <string.h> + #include <stdlib.h> + #include <errno.h> ++#include <sys/stdint.h> + + #include "arch.h" + #include "mutex.h" Modified: head/net/spread4/files/patch-docs__sample.spread.conf ============================================================================== --- head/net/spread4/files/patch-docs__sample.spread.conf Sun Mar 3 17:40:36 2013 (r313371) +++ head/net/spread4/files/patch-docs__sample.spread.conf Sun Mar 3 18:12:06 2013 (r313372) @@ -4,7 +4,7 @@ # "spreadlog_machine2.mydomain.com.log" respectively. #EventLogFile = testlog.out -+EventLogFile = /var/log/spread.log ++EventLogFile = /var/log/spread/spread.log #Set whether to add a timestamp in front of all logged events or not. # Default is no timestamps. Default format is "[%a %d %b %Y %H:%M:%S]". Added: head/net/spread4/files/patch-examples__Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/spread4/files/patch-examples__Makefile.in Sun Mar 3 18:12:06 2013 (r313372) @@ -0,0 +1,11 @@ +--- examples/Makefile.in.orig 2012-03-21 00:26:01.000000000 +0100 ++++ examples/Makefile.in 2013-01-22 12:02:41.000000000 +0100 +@@ -30,7 +30,7 @@ + LIBSPREADUTIL_DIR=../libspread-util + LIBSPREADUTIL_PATHS=-I$(LIBSPREADUTIL_DIR)/include -I$(top_srcdir)/libspread-util/include + LIBSPREADUTIL_LDFLAGS=-rdynamic +-LIBSPREADUTIL_LIBS=-ldl ++LIBSPREADUTIL_LIBS= + + CC=@CC@ + LD=@LD@ Modified: head/net/spread4/files/spread.in ============================================================================== --- head/net/spread4/files/spread.in Sun Mar 3 17:40:36 2013 (r313371) +++ head/net/spread4/files/spread.in Sun Mar 3 18:12:06 2013 (r313372) @@ -19,15 +19,29 @@ name=spread rcvar=spread_enable +load_rc_config ${name} -command="%%PREFIX%%/sbin/spread" +# set defaults +spread_enable=${spread_enable:-"NO"} +spread_user=%%USERS%% +spread_group=%%GROUPS%% -pidfile=/var/run/${name}.pid +command="%%PREFIX%%/sbin/spread" required_files=%%PREFIX%%/etc/${name}.conf +pidfile=/var/run/${name}.pid -# set defaults +start_cmd=spread_start +stop_postcmd=spread_cleanup -spread_enable=${spread_enable:-"NO"} +spread_start() { + echo "Starting spread." + /usr/bin/install -o ${spread_user} -g ${spread_group} -d /var/log/spread + /usr/bin/touch ${pidfile} && /usr/sbin/chown ${spread_user}:${spread_group} ${pidfile} + /usr/sbin/daemon -cf -p ${pidfile} -u ${spread_user} ${command} ${spread_flags} +} + +spread_cleanup() { + [ -f ${pidfile} ] && rm -f ${pidfile} +} -load_rc_config ${name} run_rc_command "$1" Modified: head/net/spread4/pkg-plist ============================================================================== --- head/net/spread4/pkg-plist Sun Mar 3 17:40:36 2013 (r313371) +++ head/net/spread4/pkg-plist Sun Mar 3 18:12:06 2013 (r313372) @@ -17,14 +17,14 @@ lib/libspread.a lib/libspread-core.a lib/libtspread-core.a lib/libspread.so -lib/libspread.so.2 -lib/libspread.so.2.0.1 +lib/libspread.so.3 +lib/libspread.so.3.0.0 lib/libspread-core.so -lib/libspread-core.so.2 -lib/libspread-core.so.2.0.1 +lib/libspread-core.so.3 +lib/libspread-core.so.3.0.0 lib/libtspread-core.so -lib/libtspread-core.so.2 -lib/libtspread-core.so.2.0.1 +lib/libtspread-core.so.3 +lib/libtspread-core.so.3.0.0 sbin/spread %%PORTDOCS%%%%DOCSDIR%%/DynamicConfiguration.txt %%PORTDOCS%%%%DOCSDIR%%/Flush_or_SpreadAPI.txt _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed with minor changes, Thanks!