Date: Thu, 18 Mar 2010 12:58:14 -0700 From: Doug Barton <dougb@FreeBSD.org> To: Renato Botelho <garga@FreeBSD.org> Cc: eksffa@freebsdbrasil.com.br, cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/www Makefile ports/www/thundercache Makefile distinfo pkg-descr pkg-plist ports/www/thundercache/files log.sh.in pkg-message.in thunder-rcNG.in Message-ID: <4BA285D6.7070603@FreeBSD.org> In-Reply-To: <201003181835.o2IIZKkZ059859@repoman.freebsd.org> References: <201003181835.o2IIZKkZ059859@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------060905010005070107050008 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit There are numerous problems with this port, starting with the fact that it installs (most?) everything into /usr/local/thunder. However I've attached a patch that fixes the rc.d-related stuff at least. 1. It's rc.d, not rcng 2. All new ports that use rc.d scripts need to use the USE_RC_SUBR mechanism. 3. The name of the script, PROVIDE, and $name should match the port name. 4. The script itself wasn't too bad, but I've tidied it up a bit: a. Added a $FreeBSD$ b. Added KEYWORD: shutdown since it starts a persistent service. c. Removed _flags from command=, it's spurious and will result in the flags being included twice. d. Moved the default variable assignment to after load_rc_config e. Made the conf file a required_file, and added it to command_args instead of _flags. The last bit about the conf file isn't strictly necessary, but it has advantages that I'd be happy to enumerate if there is interest. This needs to be fixed sooner rather than later, since I would not want users to get entrenched with the existing semantics. Doug On 03/18/10 11:35, Renato Botelho wrote: > garga 2010-03-18 18:35:20 UTC > > FreeBSD ports repository > > Modified files: > www Makefile > Added files: > www/thundercache Makefile distinfo pkg-descr pkg-plist > www/thundercache/files log.sh.in pkg-message.in > thunder-rcNG.in > Log: > ThunderCache 4 is an enhaced standalone high-performance web caching system. > > It's main goal is to be able to cache dynamic contents, the content most > proxing systems are unable to do caching. This is how ThunderCache becomes > high-performance and high-eficiency. > > ThunderCache is freeware up to 50 concurrent sessions, and needs commercial > license to run more than 50 concurrent sessions. It's designed to run on > FreeBSD. Advanced features include TProxy support (IP_BINDANY), ToS/DiffService > marking. > > WWW: http://www.bmsoftware.org > > Submitted by: Patrick Tracanelli <eksffa at freebsdbrasil.com.br> (by email) > > Revision Changes Path > 1.2565 +1 -0 ports/www/Makefile > 1.1 +82 -0 ports/www/thundercache/Makefile (new) > 1.1 +6 -0 ports/www/thundercache/distinfo (new) > 1.1 +27 -0 ports/www/thundercache/files/log.sh.in (new) > 1.1 +39 -0 ports/www/thundercache/files/pkg-message.in (new) > 1.1 +21 -0 ports/www/thundercache/files/thunder-rcNG.in (new) > 1.1 +12 -0 ports/www/thundercache/pkg-descr (new) > 1.1 +65 -0 ports/www/thundercache/pkg-plist (new) > > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/Makefile.diff?&r1=1.2564&r2=1.2565&f=h > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/thundercache/Makefile > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/thundercache/distinfo > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/thundercache/files/log.sh.in > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/thundercache/files/pkg-message.in > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/thundercache/files/thunder-rcNG.in > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/thundercache/pkg-descr > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/thundercache/pkg-plist > -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ --------------060905010005070107050008 Content-Type: text/plain; name="thundercache.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="thundercache.diff" Index: Makefile =================================================================== RCS file: /home/pcvs/ports/www/thundercache/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- Makefile 18 Mar 2010 18:35:19 -0000 1.1 +++ Makefile 18 Mar 2010 19:56:20 -0000 @@ -7,6 +7,7 @@ PORTNAME= thundercache PORTVERSION= 4.0 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://www.bmsoftware.org/freebsd/ \ http://www6.freebsdbrasil.com.br/~eksffa/l/dev/thunder/ \ @@ -23,6 +24,8 @@ ONLY_FOR_ARCHS= i386 amd64 +USE_RC_SUBR= thundercache + NO_BUILD= yes LICENSE= shareware / commercial RESTRICTED= Commercial software with shareware license to 50 threads @@ -49,7 +52,7 @@ postgresql-server>=0:${PORTSDIR}/databases/postgresql${PGSQL_VER}-server \ ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/pdo_pgsql.so:${PORTSDIR}/databases/php5-pdo_pgsql -SUB_FILES= pkg-message thunder-rcNG log.sh +SUB_FILES= pkg-message log.sh pre-everything:: .if !defined(WITH_DEPENDACK) @@ -73,7 +76,6 @@ do-install: @${CP} -r ${WRKSRC} ${PREFIX}/ - ${INSTALL_SCRIPT} ${WRKDIR}/thunder-rcNG ${PREFIX}/etc/rc.d/thunder ${INSTALL_SCRIPT} ${WRKDIR}/log.sh ${PREFIX}/thunder/sbin/ post-install: Index: files/thunder-rcNG.in =================================================================== RCS file: files/thunder-rcNG.in diff -N files/thunder-rcNG.in --- files/thunder-rcNG.in 18 Mar 2010 18:35:20 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,21 +0,0 @@ -#!/bin/sh -# -# PROVIDE: thunder -# REQUIRE: LOGIN -# -# Remember to thunder_enable="YES" in /etc/rc.conf -# -# FreeBSD Brasil LTDA <consultoria@freebsdbrasil.com.br> -# - -. /etc/rc.subr - -name="thunder" -rcvar=`set_rcvar` -command="%%PREFIX%%/thunder/sbin/thunder ${thunder_flags}" -pidfile="/var/run/thunder/thunder.pid" -: ${thunder_enable="NO"} -: ${thunder_flags="-c %%PREFIX%%/thunder/etc/thunder.conf"} -load_rc_config $name -run_rc_command "$1" - Index: files/thundercache.in =================================================================== RCS file: files/thundercache.in diff -N files/thundercache.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/thundercache.in 18 Mar 2010 19:56:20 -0000 @@ -0,0 +1,28 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: thundercache +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Remember to thundercache_enable="YES" in /etc/rc.conf +# You can also add optional flags to thundercache_flags +# +# FreeBSD Brasil LTDA <consultoria@freebsdbrasil.com.br> +# + +. /etc/rc.subr + +name="thundercache" +rcvar=`set_rcvar` + +command="%%PREFIX%%/thunder/sbin/thunder" +required_files="%%PREFIX%%/thunder/etc/thunder.conf" +command_args="-c $required_files" +pidfile="/var/run/thunder/thunder.pid" + +load_rc_config $name +: ${thundercache_enable="NO"} + +run_rc_command "$1" --------------060905010005070107050008--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BA285D6.7070603>