From owner-svn-ports-all@FreeBSD.ORG Fri Jul 20 20:32:21 2012 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95107106566C; Fri, 20 Jul 2012 20:32:21 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CD4A8FC12; Fri, 20 Jul 2012 20:32:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6KKWLdA034317; Fri, 20 Jul 2012 20:32:21 GMT (envelope-from ohauer@svn.freebsd.org) Received: (from ohauer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6KKWL2Y034299; Fri, 20 Jul 2012 20:32:21 GMT (envelope-from ohauer@svn.freebsd.org) Message-Id: <201207202032.q6KKWL2Y034299@svn.freebsd.org> From: Olli Hauer Date: Fri, 20 Jul 2012 20:32:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r301241 - in head: . net/spread net/spread/files net/spread4 net/spread4/files X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2012 20:32:21 -0000 Author: ohauer Date: Fri Jul 20 20:32:20 2012 New Revision: 301241 URL: http://svn.freebsd.org/changeset/ports/301241 Log: - use reserverd UID/GID - use ports-framework to create user/group - remove pkg-(de)install - rename patchfiles - rename rc file ( s/.in// ) - bump PORTREVISION with hat apache@ PR: 169953 Submitted by: Marcello Coutinho Added: - copied unchanged from r301234, head/net/spread/files/patch-docs::spmonitor.1 - copied unchanged from r301234, head/net/spread/files/patch-docs::spread.1 - copied unchanged from r301234, head/net/spread/files/patch-perl::Spread::Spread.pm - copied unchanged from r301234, head/net/spread/files/spread.sh.in - copied unchanged from r301234, head/net/spread4/files/patch-docs-sample.spread.conf - copied unchanged from r301234, head/net/spread4/files/patch-docs::spmonitor.1 - copied unchanged from r301234, head/net/spread4/files/patch-docs::spread.1 - copied unchanged from r301234, head/net/spread4/files/spread.sh.in Directory Properties: head/net/spread/files/patch-docs__spmonitor.1 (props changed) head/net/spread/files/patch-docs__spread.1 (props changed) head/net/spread/files/patch-perl__Spread__Spread.pm (props changed) head/net/spread/files/spread.in (props changed) head/net/spread4/files/patch-docs__sample.spread.conf (props changed) head/net/spread4/files/patch-docs__spmonitor.1 (props changed) head/net/spread4/files/patch-docs__spread.1 (props changed) head/net/spread4/files/spread.in (props changed) Deleted: head/net/spread/files/patch-docs::spmonitor.1 head/net/spread/files/patch-docs::spread.1 head/net/spread/files/patch-perl::Spread::Spread.pm head/net/spread/files/spread.sh.in head/net/spread/pkg-deinstall head/net/spread/pkg-install head/net/spread4/files/patch-docs-sample.spread.conf head/net/spread4/files/patch-docs::spmonitor.1 head/net/spread4/files/patch-docs::spread.1 head/net/spread4/files/spread.sh.in head/net/spread4/pkg-deinstall head/net/spread4/pkg-install Modified: head/CHANGES (contents, props changed) head/GIDs (contents, props changed) head/UIDs (contents, props changed) head/net/spread/Makefile (contents, props changed) head/net/spread/files/patch-Makefile.in (contents, props changed) head/net/spread/files/patch-spread.c (contents, props changed) head/net/spread/pkg-plist (contents, props changed) head/net/spread4/Makefile (contents, props changed) head/net/spread4/pkg-plist (contents, props changed) Modified: head/CHANGES ============================================================================== --- head/CHANGES Fri Jul 20 20:21:09 2012 (r301240) +++ head/CHANGES Fri Jul 20 20:32:20 2012 (r301241) @@ -10,6 +10,11 @@ in the release notes and/or placed into All ports committers are allowed to commit to this file. +20120820: +AUTHOR: ohauer@FreeBSD.org + * The ports net/spread and net/spread4 are using now the + reserved UID/GID 282 instead (user|group)next. + 20120715: AUTHOR: beat@FreeBSD.org Modified: head/GIDs ============================================================================== --- head/GIDs Fri Jul 20 20:21:09 2012 (r301240) +++ head/GIDs Fri Jul 20 20:32:20 2012 (r301241) @@ -129,6 +129,7 @@ frontbase:*:276: mrtg:*:279: xymon:*:280: prelude:*:281: +spread:*:282: backuppc:*:300: _sphinx:*:312: dkfilter:*:325: Modified: head/UIDs ============================================================================== --- head/UIDs Fri Jul 20 20:21:09 2012 (r301240) +++ head/UIDs Fri Jul 20 20:32:20 2012 (r301241) @@ -135,6 +135,7 @@ frontbase:*:276:276::0:0:FrontBase Daemo mrtg:*:279:279::0:0:MRTG daemon:/nonexistent:/usr/sbin/nologin xymon:*:280:280::0:0:Xymon Monitor:/nonexistent:/usr/sbin/nologin prelude:*:281:281::0:0:Prelude user:/nonexistent:/usr/sbin/nologin +spread:*:282:282::0:0:Spread user:/nonexistent:/usr/sbin/nologin backuppc:*:300:300::0:0:BackupPC pseudo-user:/nonexistent:/usr/sbin/nologin _sphinx:*:312:312::0:0:Sphinxsearch Owner:/nonexistent:/usr/sbin/nologin dkfilter:*:325:325::0:0:DK Filter Owner:/nonexistent:/usr/sbin/nologin Modified: head/net/spread/Makefile ============================================================================== --- head/net/spread/Makefile Fri Jul 20 20:21:09 2012 (r301240) +++ head/net/spread/Makefile Fri Jul 20 20:32:20 2012 (r301241) @@ -7,6 +7,7 @@ PORTNAME= spread PORTVERSION= 3.17.4 +PORTREVISION= 1 CATEGORIES= net perl5 MASTER_SITES= http://www.edu-linux.org/down/ DISTNAME= ${PORTNAME}-src-${PORTVERSION} @@ -20,9 +21,15 @@ PORTSCOUT= limit:^3 GNU_CONFIGURE= yes USE_PERL5= yes -USE_RC_SUBR= spread.sh +USE_RC_SUBR= spread USE_LDCONFIG= yes +USERS= spread +GROUPS= spread +RUNDIR= /var/run/spread + +PLIST_SUB+= USERS=${USERS} GROUPS=${GROUPS} RUNDIR=${RUNDIR} + MAKE_ARGS+= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS} WRKSRC= ${WRKDIR}/${PORTNAME}-src-${PORTVERSION} @@ -55,9 +62,6 @@ post-build: ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile @cd ${WRKSRC}/perl/Spread && ${MAKE} -pre-install: - ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: .for f in ${HEADERFILES} ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/include @@ -82,7 +86,7 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/Readme.txt ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/license.txt ${DOCSDIR}/LICENSE .endif + @${INSTALL} -m 750 -o ${USERS} -g ${GROUPS} -d ${RUNDIR} @${CAT} ${PKGMESSAGE} - @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include Modified: head/net/spread/files/patch-Makefile.in ============================================================================== --- head/net/spread/files/patch-Makefile.in Fri Jul 20 20:21:09 2012 (r301240) +++ head/net/spread/files/patch-Makefile.in Fri Jul 20 20:32:20 2012 (r301241) @@ -1,5 +1,5 @@ ---- Makefile.in Thu Sep 23 12:12:52 2004 -+++ Makefile.in Tue Oct 4 14:49:56 2005 +--- ./Makefile.in.orig 2004-09-23 19:12:52.000000000 +0200 ++++ ./Makefile.in 2012-07-20 21:55:23.000000000 +0200 @@ -26,7 +26,7 @@ #Rules: major -- inc for incompatible change # : minor -- inc for bugfix or forward compatible change @@ -91,15 +91,15 @@ rm -f config.cache config.log docs/*.out core rm -rf autom4te.cache -@@ -254,11 +262,6 @@ - done +@@ -255,11 +263,6 @@ if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \ $(buildtoolsdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \ -- fi + fi - if [ ! -f $(DESTDIR)$(sysconfdir)/spread.conf ]; then \ - $(INSTALL) -m 644 $(srcdir)/sample.spread.conf $(DESTDIR)$(sysconfdir)/spread.conf; \ - else \ - echo "$(DESTDIR)$(sysconfdir)/spread.conf already exists, install will not overwrite"; \ - fi +- fi uninstallall: uninstall + -rm -f $(DESTDIR)$(sysconfdir)/spread.conf Copied: head/net/spread/files/patch-docs__spmonitor.1 (from r301234, head/net/spread/files/patch-docs::spmonitor.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/spread/files/patch-docs__spmonitor.1 Fri Jul 20 20:32:20 2012 (r301241, copy of r301234, head/net/spread/files/patch-docs::spmonitor.1) @@ -0,0 +1,18 @@ +--- docs/spmonitor.1 Thu Dec 13 02:01:49 2001 ++++ docs/spmonitor.1 Mon Dec 8 00:00:34 2003 +@@ -27,13 +27,11 @@ + Use an alternate configuration file + .I config-file + instead of +-.IR ./spread.conf . ++.IR /etc/spread.conf . + .SH FILES +-.I ./spread.conf ++.I /etc/spread.conf + .RS + The default config file location. +-.I /etc/spread.conf +-is also searched if a local file is not found. + .SH BUGS + The spmonitor works by sending UDP packets to the Spread daemon, so if network + losses occur, commands or status reports can be lost. It can also lose reports Copied: head/net/spread/files/patch-docs__spread.1 (from r301234, head/net/spread/files/patch-docs::spread.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/spread/files/patch-docs__spread.1 Fri Jul 20 20:32:20 2012 (r301241, copy of r301234, head/net/spread/files/patch-docs::spread.1) @@ -0,0 +1,18 @@ +--- docs/spread.1 Thu Dec 13 02:03:19 2001 ++++ docs/spread.1 Mon Dec 8 00:00:20 2003 +@@ -20,13 +20,11 @@ + Use an alternate configuration file + .I config-file + instead of +-.IR ./spread.conf . ++.IR /etc/spread.conf . + .SH FILES +-.I ./spread.conf ++.I /etc/spread.conf + .RS + The default config file location. +-.I /etc/spread.conf +-is also searched if a local file is not found. + .SH DIAGNOSTICS + The daemon will output some startup information to stdout + and any severe errors will also be output to stdout. Redirecting Copied: head/net/spread/files/patch-perl__Spread__Spread.pm (from r301234, head/net/spread/files/patch-perl::Spread::Spread.pm) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/spread/files/patch-perl__Spread__Spread.pm Fri Jul 20 20:32:20 2012 (r301241, copy of r301234, head/net/spread/files/patch-perl::Spread::Spread.pm) @@ -0,0 +1,13 @@ +--- perl/Spread/Spread.pm Mon Dec 8 21:12:18 2003 ++++ perl/Spread/Spread.pm Mon Dec 8 21:15:44 2003 +@@ -177,8 +177,8 @@ + + # Connect + my($mailbox, $private_group) = Spread::connect( +- spread_name => '4444@host.domain.com', +- private_name => 'mrcool', ++ { spread_name => '4803@host.domain.com', ++ private_name => 'mrcool', } + ); + + # Join and leave groups Modified: head/net/spread/files/patch-spread.c ============================================================================== --- head/net/spread/files/patch-spread.c Fri Jul 20 20:21:09 2012 (r301240) +++ head/net/spread/files/patch-spread.c Fri Jul 20 20:32:20 2012 (r301241) @@ -1,5 +1,5 @@ ---- spread.c Thu Jun 19 00:31:23 2003 -+++ spread.c Mon Dec 8 20:55:41 2003 +--- ./spread.c.orig 2006-11-20 05:53:13.000000000 +0100 ++++ ./spread.c 2012-07-20 21:55:23.000000000 +0200 @@ -48,6 +48,8 @@ #include #include @@ -29,12 +29,10 @@ /* initialize each valid authentication protocol */ null_init(); ip_init(); -@@ -193,6 +201,20 @@ - E_handle_events(); - +@@ -195,6 +203,20 @@ return 0; -+} -+ + } + +static void +writepidfile() +{ @@ -47,6 +45,8 @@ + snprintf(pidbuf, sizeof(pidbuf), "%ld\n", (long)getpid()); + write(pidfd, pidbuf, strlen(pidbuf)); + close(pidfd); - } - ++} ++ static void Print_help(void) + { + Alarmp( SPLOG_FATAL, SYSTEM, "Usage: spread\n%s\n%s\n%s\n", Copied: head/net/spread/files/spread.in (from r301234, head/net/spread/files/spread.sh.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/spread/files/spread.in Fri Jul 20 20:32:20 2012 (r301241, copy of r301234, head/net/spread/files/spread.sh.in) @@ -0,0 +1,34 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: spread +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable spread: +# +# spread_enable="YES" +# spread_flags="" +# +# See spread(1) for flags +# + +. /etc/rc.subr + +name=spread +rcvar=spread_enable + +command="%%PREFIX%%/sbin/spread" + +pidfile=/var/run/${name}.pid +required_files=%%PREFIX%%/etc/${name}.conf + +# set defaults + +spread_enable=${spread_enable:-"NO"} + +load_rc_config ${name} +run_rc_command "$1" Modified: head/net/spread/pkg-plist ============================================================================== --- head/net/spread/pkg-plist Fri Jul 20 20:21:09 2012 (r301240) +++ head/net/spread/pkg-plist Fri Jul 20 20:32:20 2012 (r301241) @@ -26,3 +26,5 @@ sbin/spread %%EXAMPLESDIR%%/test.pl @dirrm %%EXAMPLESDIR%% @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Spread +@exec install -m 750 -o %%USERS%% -g %%GROUPS%% -d %%RUNDIR%% +@dirrmtry %%RUNDIR%% Modified: head/net/spread4/Makefile ============================================================================== --- head/net/spread4/Makefile Fri Jul 20 20:21:09 2012 (r301240) +++ head/net/spread4/Makefile Fri Jul 20 20:32:20 2012 (r301241) @@ -7,6 +7,7 @@ PORTNAME= spread4 PORTVERSION= 4.1.0 +PORTREVISION= 1 CATEGORIES= net perl5 MASTER_SITES= LOCAL/wen DISTNAME= spread-src-${PORTVERSION} @@ -16,10 +17,16 @@ COMMENT= The Spread Group Communication GNU_CONFIGURE= yes USE_GMAKE= yes -USE_RC_SUBR= spread.sh +USE_RC_SUBR= spread USE_LDCONFIG= yes ALL_TARGET= all +USERS= spread +GROUPS= spread +RUNDIR= /var/run/spread + +PLIST_SUB+= USERS=${USERS} GROUPS=${GROUPS} RUNDIR=${RUNDIR} + WRKSRC= ${WRKDIR}/spread-src-${PORTVERSION} PKGMESSAGE= ${WRKSRC}/license.txt @@ -43,9 +50,6 @@ post-extract: @${REINPLACE_CMD} -e 's|INSTALLSUBDIRS=daemon docs|INSTALLSUBDIRS=daemon|' \ ${WRKSRC}/Makefile.in -pre-install: - ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: ${INSTALL_DATA} ${WRKSRC}/docs/sample.spread.conf \ ${PREFIX}/etc/spread.conf.sample @@ -76,8 +80,7 @@ post-install: .for f in ${MAN3} ${INSTALL_MAN} ${WRKSRC}/docs/${f} ${LOCALBASE}/man/man3/ .endfor - + @${INSTALL} -m 750 -o ${USERS} -g ${GROUPS} -d ${RUNDIR} @${CAT} ${PKGMESSAGE} - ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include Copied: head/net/spread4/files/patch-docs__sample.spread.conf (from r301234, head/net/spread4/files/patch-docs-sample.spread.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/spread4/files/patch-docs__sample.spread.conf Fri Jul 20 20:32:20 2012 (r301241, copy of r301234, head/net/spread4/files/patch-docs-sample.spread.conf) @@ -0,0 +1,18 @@ +--- docs/sample.spread.conf.orig 2008-10-24 06:06:33.000000000 +0800 ++++ docs/sample.spread.conf 2008-10-24 06:07:28.000000000 +0800 +@@ -63,6 +63,7 @@ + # "spreadlog_machine2.mydomain.com.log" respectively. + + #EventLogFile = testlog.out ++EventLogFile = /var/log/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]". +@@ -75,6 +76,7 @@ + #EventTimeStamp + # or + #EventTimeStamp = "[%a %d %b %Y %H:%M:%S]" ++EventTimeStamp = "[%a %d %b %Y %H:%M:%S]" + + #Set whether to allow dangerous monitor commands + # like "partition, flow_control, or kill" Copied: head/net/spread4/files/patch-docs__spmonitor.1 (from r301234, head/net/spread4/files/patch-docs::spmonitor.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/spread4/files/patch-docs__spmonitor.1 Fri Jul 20 20:32:20 2012 (r301241, copy of r301234, head/net/spread4/files/patch-docs::spmonitor.1) @@ -0,0 +1,18 @@ +--- docs/spmonitor.1 Thu Dec 13 02:01:49 2001 ++++ docs/spmonitor.1 Mon Dec 8 00:00:34 2003 +@@ -27,13 +27,11 @@ + Use an alternate configuration file + .I config-file + instead of +-.IR ./spread.conf . ++.IR /etc/spread.conf . + .SH FILES +-.I ./spread.conf ++.I /etc/spread.conf + .RS + The default config file location. +-.I /etc/spread.conf +-is also searched if a local file is not found. + .SH BUGS + The spmonitor works by sending UDP packets to the Spread daemon, so if network + losses occur, commands or status reports can be lost. It can also lose reports Copied: head/net/spread4/files/patch-docs__spread.1 (from r301234, head/net/spread4/files/patch-docs::spread.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/spread4/files/patch-docs__spread.1 Fri Jul 20 20:32:20 2012 (r301241, copy of r301234, head/net/spread4/files/patch-docs::spread.1) @@ -0,0 +1,18 @@ +--- docs/spread.1 Thu Dec 13 02:03:19 2001 ++++ docs/spread.1 Mon Dec 8 00:00:20 2003 +@@ -20,13 +20,11 @@ + Use an alternate configuration file + .I config-file + instead of +-.IR ./spread.conf . ++.IR /etc/spread.conf . + .SH FILES +-.I ./spread.conf ++.I /etc/spread.conf + .RS + The default config file location. +-.I /etc/spread.conf +-is also searched if a local file is not found. + .SH DIAGNOSTICS + The daemon will output some startup information to stdout + and any severe errors will also be output to stdout. Redirecting Copied: head/net/spread4/files/spread.in (from r301234, head/net/spread4/files/spread.sh.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/spread4/files/spread.in Fri Jul 20 20:32:20 2012 (r301241, copy of r301234, head/net/spread4/files/spread.sh.in) @@ -0,0 +1,33 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: spread +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable spread: +# +# spread_enable="YES" +# spread_flags="" +# +# See spread(1) for flags + +. /etc/rc.subr + +name=spread +rcvar=spread_enable + +command="%%PREFIX%%/sbin/spread" + +pidfile=/var/run/${name}.pid +required_files=%%PREFIX%%/etc/${name}.conf + +# set defaults + +spread_enable=${spread_enable:-"NO"} + +load_rc_config ${name} +run_rc_command "$1" Modified: head/net/spread4/pkg-plist ============================================================================== --- head/net/spread4/pkg-plist Fri Jul 20 20:21:09 2012 (r301240) +++ head/net/spread4/pkg-plist Fri Jul 20 20:32:20 2012 (r301241) @@ -33,3 +33,5 @@ sbin/spread %%PORTDOCS%%%%DOCSDIR%%/TODO %%PORTDOCS%%%%DOCSDIR%%/PORTING %%PORTDOCS%%@dirrm %%DOCSDIR%% +@exec install -m 750 -o %%USERS%% -g %%GROUPS%% -d %%RUNDIR%% +@dirrmtry %%RUNDIR%%