From sahil@spartan.hamla.org  Mon Nov 16 04:29:07 2009
Return-Path: <sahil@spartan.hamla.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 24EE81065670
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Nov 2009 04:29:07 +0000 (UTC)
	(envelope-from sahil@spartan.hamla.org)
Received: from spartan.hamla.org (spartan.hamla.org [206.251.255.30])
	by mx1.freebsd.org (Postfix) with ESMTP id 0A3BB8FC15
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Nov 2009 04:29:06 +0000 (UTC)
Received: by spartan.hamla.org (Postfix, from userid 1001)
	id 7441717093; Sun, 15 Nov 2009 23:29:06 -0500 (EST)
Message-Id: <20091116042906.7441717093@spartan.hamla.org>
Date: Sun, 15 Nov 2009 23:29:06 -0500 (EST)
From: Sahil Tandon <sahil@tandon.net>
Reply-To: Sahil Tandon <sahil@tandon.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: wxs@FreeBSD.org 
Subject: [PATCH] sysutils/grok: update to 20091103
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         140593
>Category:       ports
>Synopsis:       [PATCH] sysutils/grok: update to 20091103
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wxs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 16 04:30:01 UTC 2009
>Closed-Date:    Sat Dec 26 02:14:59 UTC 2009
>Last-Modified:  Sat Dec 26 02:30:01 UTC 2009
>Originator:     Sahil Tandon
>Release:        FreeBSD 7.2-RELEASE i386
>Organization:
>Environment:

	
>Description:
- Update to 20091103
- Changes: http://www.semicomplete.com/blog/geekery/grok-20091103.html 

grok is no longer a perl program and has evolved considerably since the last release in the ports tree.  There is also a Ruby API that can be installed which I have not addressed in this PR (because I do not know how the maintainer wishes to go about it; perhaps it's time for grok-devel and grok-ruby sub-ports).  Happy to help refine this patch as necessary.

Incidentally, the changes (i.e. no default configuration file, a change from Perl -> C, et cetera) in this release may be enough to warrant a note in UPDATING. 
>How-To-Repeat:
	
>Fix:

	



--- grok.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/sysutils/grok/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile	4 Feb 2008 15:35:10 -0000	1.7
+++ Makefile	16 Nov 2009 04:12:19 -0000
@@ -6,50 +6,39 @@
 #
 
 PORTNAME=	grok
-PORTVERSION=	20070915
+PORTVERSION=	20091103
 CATEGORIES=	sysutils
-MASTER_SITES=	http://www.semicomplete.com/files/grok/ \
-		http://www.atarininja.org/~wxs/distfiles/
+MASTER_SITES=	GOOGLE_CODE
 
 MAINTAINER=	wxs@FreeBSD.org
 COMMENT=	An expert system for real-time log analysis
 
-RUN_DEPENDS=	${SITE_PERL}/Regexp/Common.pm:${PORTSDIR}/textproc/p5-Regexp-Common \
-		${SITE_PERL}/Parse/RecDescent.pm:${PORTSDIR}/devel/p5-Parse-RecDescent \
-		${SITE_PERL}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog \
-		${SITE_PERL}/Date/Format.pm:${PORTSDIR}/devel/p5-TimeDate \
-		${SITE_PERL}/URI.pm:${PORTSDIR}/net/p5-URI
-
-USE_PERL5=	yes
-USE_RC_SUBR=	grok.sh
-NO_BUILD=	yes
+BUILD_DEPENDS=	gperf>=3.0.3:${PORTSDIR}/devel/gperf \
+		libevent>=1.3:${PORTSDIR}/devel/libevent \
+		pcre>=7.6:${PORTSDIR}/devel/pcre \
+		tokyocabinet>=1.4.9:${PORTSDIR}/databases/tokyocabinet
+
+MAKE_ENV+=	GPERF=${LOCALBASE}/bin/gperf \
+		EXTRA_CFLAGS=-I${LOCALBASE}/include \
+		EXTRA_LDFLAGS=-L${LOCALBASE}/lib
+
+USE_GMAKE=	yes
+USE_LDCONFIG=	yes
 
 SUB_FILES=	pkg-message
-SUB_LIST=	PERL=${PERL}
 
-PORTDOCS=	CHANGELIST
-PORTEXAMPLES=	line-to-byte-offset.conf
-MAN1=	grok.1
-
-do-install:
-	@${INSTALL_SCRIPT} ${WRKSRC}/grok ${PREFIX}/bin
-	@${INSTALL_SCRIPT} ${WRKSRC}/grok_patfind.pl ${PREFIX}/bin
-	@${INSTALL_DATA} ${WRKSRC}/grok.conf ${PREFIX}/etc/grok.conf.sample
-	@${INSTALL_MAN} ${WRKSRC}/grok.1 ${MANPREFIX}/man/man1
+PROJECTHOST=	semicomplete
+PORTDOCS=	CHANGELIST INSTALL
+
+post-patch:
+	@${REINPLACE_CMD} 's|PREFIX=|PREFIX?=|; s|-g root|-g wheel|' \
+		${WRKSRC}/Makefile
 
 post-install:
-	@if [ ! -f ${PREFIX}/etc/grok.conf ]; then \
-		${CP} -p ${PREFIX}/etc/grok.conf.sample ${PREFIX}/etc/grok.conf ; \
-	fi
 .if !defined(NOPORTDOCS)
 	@${INSTALL} -d ${DOCSDIR}
 	@${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
 .endif
-.if !defined(NOPORTEXAMPLES)
-	@${INSTALL} -d ${EXAMPLESDIR}/
-	@cd ${WRKSRC}/examples/ && \
-		${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR}/
-.endif
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/sysutils/grok/distinfo,v
retrieving revision 1.5
diff -u -r1.5 distinfo
--- distinfo	21 Sep 2007 21:24:58 -0000	1.5
+++ distinfo	16 Nov 2009 04:12:19 -0000
@@ -1,3 +1,3 @@
-MD5 (grok-20070915.tar.gz) = ce19c29d0eca6ed0129286cab9ade282
-SHA256 (grok-20070915.tar.gz) = 8b1c1ef1940b493ebd14ac12fbf16985d277c36e10ad64ae01aed46dc70c3ec6
-SIZE (grok-20070915.tar.gz) = 163840
+MD5 (grok-20091103.tar.gz) = 6e5d325c7943c867fc7918c993c66788
+SHA256 (grok-20091103.tar.gz) = db7e0b42bae831deb010879771c6e1fe9f2d7408d0c59e4d976d38bc0739b7f5
+SIZE (grok-20091103.tar.gz) = 139188
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/sysutils/grok/pkg-plist,v
retrieving revision 1.2
diff -u -r1.2 pkg-plist
--- pkg-plist	21 Sep 2007 21:24:58 -0000	1.2
+++ pkg-plist	16 Nov 2009 04:12:19 -0000
@@ -1,5 +1,9 @@
 bin/grok
-bin/grok_patfind.pl
-@unexec if cmp -s %D/etc/grok.conf.sample %D/etc/grok.conf; then rm -f %D/etc/grok.conf; fi
-etc/grok.conf.sample
-@exec if [ ! -f %D/etc/grok.conf ] ; then cp -p %D/%F %B/grok.conf; fi
+include/grok.h 
+include/grok_capture.h
+include/grok_capture_xdr.h 
+include/grok_logging.h
+include/grok_match.h
+include/grok_pattern.h 
+include/grokre.h
+lib/libgrok.so
Index: files/grok.sh.in
===================================================================
RCS file: files/grok.sh.in
diff -N files/grok.sh.in
--- files/grok.sh.in	21 Sep 2007 21:24:58 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# PROVIDE: grok 
-# REQUIRE: LOGIN
-
-#
-# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable grok:
-# grok_enable (bool):            Set to "NO" by default.
-#                                Set it to "YES" to enable grok 
-# grok_config (path):            Set to "%%PREFIX%%/etc/grok.conf" by default.
-#
-
-. %%RC_SUBR%%
-
-name="grok"
-rcvar=`set_rcvar`
-
-load_rc_config $name
-
-: ${grok_enable="NO"}
-: ${grok_config="%%PREFIX%%/etc/grok.conf"}
-
-command_interpreter=%%PERL%%
-command=%%PREFIX%%/bin/grok
-command_args="-f $grok_config -b -d"
-required_files=%%PREFIX%%/etc/grok.conf
-
-run_rc_command "$1"
Index: files/pkg-message.in
===================================================================
RCS file: /home/ncvs/ports/sysutils/grok/files/pkg-message.in,v
retrieving revision 1.2
diff -u -r1.2 pkg-message.in
--- files/pkg-message.in	6 Apr 2006 08:34:20 -0000	1.2
+++ files/pkg-message.in	16 Nov 2009 04:12:19 -0000
@@ -1,9 +1,7 @@
 ============================================================
-You'll have to edit %%PREFIX%%/etc/grok.conf to your
-liking.  Examples and documentation are available at
-grok(1) and at:
+Examples and documentation are available at:
 
-http://www.semicomplete.com/projects/grok/
+http://code.google.com/p/semicomplete/wiki/Grok
 
 Also, modifications to syslog.conf may be necessary.
 Usually "user.info /var/log/messages" is enough.
--- grok.diff ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->wxs 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Nov 16 04:30:11 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140593 

From: Sahil Tandon <sahil@tandon.net>
To: bug-followup@FreeBSD.org, wxs@FreeBSD.org
Cc:  
Subject: Re: ports/140593: [PATCH] sysutils/grok: update to 20091103
Date: Mon, 16 Nov 2009 00:14:31 -0500

 I should've also included a RUN_DEPENDS; will do so in the next
 iteration of this patch after speaking with wxs@ on some peripheral
 issues related to this port.
 
 -- 
 Sahil Tandon <sahil@tandon.net>

From: Wesley Shields <wxs@FreeBSD.org>
To: Sahil Tandon <sahil@tandon.net>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/140593: [PATCH] sysutils/grok: update to 20091103
Date: Wed, 9 Dec 2009 13:00:03 -0500

 There will be a new version of grok released soon that will add a
 daemon flag and include proper documentation. I'd like to hold off on
 this PR until that is done.

From: Sahil Tandon <sahil@tandon.net>
To: Wesley Shields <wxs@FreeBSD.org>
Cc: "bug-followup@FreeBSD.org" <bug-followup@FreeBSD.org>
Subject: Re: ports/140593: [PATCH] sysutils/grok: update to 20091103
Date: Wed, 9 Dec 2009 13:41:42 -0500

 Ok, thanks.
State-Changed-From-To: open->closed 
State-Changed-By: wxs 
State-Changed-When: Sat Dec 26 02:14:58 UTC 2009 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140593 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/140593: commit references a PR
Date: Sat, 26 Dec 2009 02:23:00 +0000 (UTC)

 wxs         2009-12-26 02:14:41 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/grok        Makefile distinfo pkg-plist 
     sysutils/grok/files  pkg-message.in 
   Added files:
     sysutils/grok/files  patch-Makefile 
   Removed files:
     sysutils/grok/files  grok.sh.in 
   Log:
   - Update to 20091225.01 - This is a complete rewrite in C.
   
   PR:             ports/140593
   Submitted by:   Sahil Tandon <sahil@tandon.net>
   
   Revision  Changes    Path
   1.8       +22 -30    ports/sysutils/grok/Makefile
   1.6       +3 -3      ports/sysutils/grok/distinfo
   1.3       +0 -28     ports/sysutils/grok/files/grok.sh.in (dead)
   1.1       +22 -0     ports/sysutils/grok/files/patch-Makefile (new)
   1.3       +2 -4      ports/sysutils/grok/files/pkg-message.in
   1.3       +8 -4      ports/sysutils/grok/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
