Tue Jan 13 22:20:03 2015 UTC ()
Add a package for tenshi-0.15. By Paul B. Henson in PR pkg/49486.

>From DESCR:
tenshi is a log monitoring program, designed to watch one or more log files for
lines matching user defined regular expressions and report on the matches. The
regular expressions are assigned to queues which have an alert interval and a
list of mail recipients.

Queues can be set to send a notification as soon as there is a log line
assigned to it, or to send periodic reports.


(bsiegert)
diff -r1.621 -r1.622 pkgsrc/sysutils/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/tenshi/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/tenshi/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/tenshi/PLIST
diff -r0 -r1.1 pkgsrc/sysutils/tenshi/distinfo
diff -r0 -r1.1 pkgsrc/sysutils/tenshi/files/smf/manifest.xml
diff -r0 -r1.1 pkgsrc/sysutils/tenshi/patches/patch-Makefile

cvs diff -r1.621 -r1.622 pkgsrc/sysutils/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/Makefile 2014/12/30 17:04:15 1.621
+++ pkgsrc/sysutils/Makefile 2015/01/13 22:20:03 1.622
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.621 2014/12/30 17:04:15 bsiegert Exp $ 1# $NetBSD: Makefile,v 1.622 2015/01/13 22:20:03 bsiegert Exp $
2# 2#
3 3
4COMMENT= System utilities 4COMMENT= System utilities
5 5
6SUBDIR+= 855resolution 6SUBDIR+= 855resolution
7SUBDIR+= 915resolution 7SUBDIR+= 915resolution
8SUBDIR+= 9base 8SUBDIR+= 9base
9SUBDIR+= acpica-utils 9SUBDIR+= acpica-utils
10SUBDIR+= acpidump 10SUBDIR+= acpidump
11SUBDIR+= adtool 11SUBDIR+= adtool
12SUBDIR+= afbinit 12SUBDIR+= afbinit
13SUBDIR+= agedu 13SUBDIR+= agedu
14SUBDIR+= amanda 14SUBDIR+= amanda
@@ -472,26 +472,27 @@ SUBDIR+= sux @@ -472,26 +472,27 @@ SUBDIR+= sux
472SUBDIR+= swapd 472SUBDIR+= swapd
473SUBDIR+= swatch 473SUBDIR+= swatch
474SUBDIR+= sysbuild 474SUBDIR+= sysbuild
475SUBDIR+= sysbuild-user 475SUBDIR+= sysbuild-user
476SUBDIR+= sysgen 476SUBDIR+= sysgen
477SUBDIR+= sysinfo 477SUBDIR+= sysinfo
478SUBDIR+= syslog-ng 478SUBDIR+= syslog-ng
479SUBDIR+= system-tools-backends 479SUBDIR+= system-tools-backends
480SUBDIR+= systester 480SUBDIR+= systester
481SUBDIR+= sysupgrade 481SUBDIR+= sysupgrade
482SUBDIR+= tarsnap 482SUBDIR+= tarsnap
483SUBDIR+= tcx 483SUBDIR+= tcx
484SUBDIR+= tdir 484SUBDIR+= tdir
 485SUBDIR+= tenshi
485SUBDIR+= testdisk 486SUBDIR+= testdisk
486SUBDIR+= tits 487SUBDIR+= tits
487SUBDIR+= tkcron 488SUBDIR+= tkcron
488SUBDIR+= tkdesk 489SUBDIR+= tkdesk
489SUBDIR+= tload 490SUBDIR+= tload
490SUBDIR+= tob 491SUBDIR+= tob
491SUBDIR+= top 492SUBDIR+= top
492SUBDIR+= torsmo 493SUBDIR+= torsmo
493SUBDIR+= toshutils 494SUBDIR+= toshutils
494SUBDIR+= tpb 495SUBDIR+= tpb
495SUBDIR+= tphdisk 496SUBDIR+= tphdisk
496SUBDIR+= tree 497SUBDIR+= tree
497SUBDIR+= ts 498SUBDIR+= ts

File Added: pkgsrc/sysutils/tenshi/DESCR
tenshi is a log monitoring program, designed to watch one or more log files for
lines matching user defined regular expressions and report on the matches. The
regular expressions are assigned to queues which have an alert interval and a
list of mail recipients.

Queues can be set to send a notification as soon as there is a log line
assigned to it, or to send periodic reports.

File Added: pkgsrc/sysutils/tenshi/Makefile
# $NetBSD: Makefile,v 1.1 2015/01/13 22:20:03 bsiegert Exp $
#

DISTNAME=	tenshi-0.15
CATEGORIES=	sysutils
MASTER_SITES=	http://dev.inversepath.com/download/tenshi/

MAINTAINER=	henson@acm.org
HOMEPAGE=	http://www.inversepath.com/tenshi.html
COMMENT=	Log monitoring program to watch and report on log files
LICENSE=	isc

USE_TOOLS+=		perl:run
REPLACE_PERL=		tenshi
EGDIR=			share/examples/${PKGBASE}
CONF_FILES=		${PREFIX}/${EGDIR}/tenshi.conf ${PKG_SYSCONFDIR}/tenshi/tenshi.conf
BUILD_DEFS+=		VARBASE

DEPENDS+=	p5-IO-BufferedSelect>=1.0:../../sysutils/p5-IO-BufferedSelect

SUBST_CLASSES+= 	tenshi
SUBST_STAGE.tenshi=	pre-build
SUBST_FILES.tenshi=	tenshi tenshi.conf tenshi.8
SUBST_SED.tenshi=	-e 's,/etc/tenshi/tenshi.conf,${PKG_SYSCONFDIR}/tenshi.conf,g'
SUBST_SED.tenshi+=	-e 's,/var/run/tenshi.pid,${VARBASE}/lib/tenshi/tenshi.pid,g'

PKG_GROUPS=		tenshi
PKG_USERS=		tenshi:tenshi
PKG_HOME.tenshi=	${VARBASE}/lib/tenshi
OWN_DIRS_PERMS+=	${VARBASE}/lib/tenshi tenshi tenshi 0700
OWN_DIRS+=		${PKG_SYSCONFDIR}/tenshi

USE_LANGUAGES=	# none

.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/sysutils/tenshi/PLIST
@comment $NetBSD: PLIST,v 1.1 2015/01/13 22:20:03 bsiegert Exp $
man/man8/tenshi.8
sbin/tenshi
share/doc/${PKGNAME}/CREDITS
share/doc/${PKGNAME}/Changelog
share/doc/${PKGNAME}/FAQ
share/doc/${PKGNAME}/INSTALL
share/doc/${PKGNAME}/LICENSE
share/doc/${PKGNAME}/README
share/examples/tenshi/tenshi.conf

File Added: pkgsrc/sysutils/tenshi/distinfo
$NetBSD: distinfo,v 1.1 2015/01/13 22:20:03 bsiegert Exp $

SHA1 (tenshi-0.15.tar.gz) = 7728ce5194079d44b9daf9778d363d940565ebd0
RMD160 (tenshi-0.15.tar.gz) = 4f95ccf0b9b80df12656dd128023e9a3d48fbcef
Size (tenshi-0.15.tar.gz) = 28405 bytes
SHA1 (patch-Makefile) = d310900d30adf55019ad2d27951d900ecc638904

File Added: pkgsrc/sysutils/tenshi/files/smf/manifest.xml
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='@SMF_NAME@'>
  <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
    <create_default_instance enabled="false" />
    <single_instance />
    <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/system/filesystem/local' />
    </dependency>
    <dependency name='system-log' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/system/system-log' />
    </dependency>
    <dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
      <service_fmri value='file://@PKG_SYSCONFDIR@/tenshi/tenshi.conf' />
    </dependency>
    <exec_method name='start' type='method' exec='@PREFIX@/sbin/tenshi -c @PKG_SYSCONFDIR@/tenshi/tenshi.conf -P @VARBASE@/lib/tenshi/tenshi.pid' timeout_seconds='60' />
    <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60' />
    <exec_method name='refresh' type='method' exec=':kill -HUP' timeout_seconds='60' />
    <property_group name='startd' type='framework'>
        <propval name='ignore_error' type='astring' value='signal' />
    </property_group>
    <template>
      <common_name>
        <loctext xml:lang='C'>tenshi log analysis and reporting tool</loctext>
      </common_name>
      <documentation>
        <manpage title='tenshi' section='8' />
        <doc_link name='tenshi' uri='http://www.inversepath.com/tenshi.html' />
      </documentation>
    </template>
  </service>
</service_bundle>

File Added: pkgsrc/sysutils/tenshi/patches/patch-Makefile
$NetBSD: patch-Makefile,v 1.1 2015/01/13 22:20:03 bsiegert Exp $

Fix install locations.

--- Makefile.orig	2015-01-12 22:03:23.993870619 +0000
+++ Makefile
@@ -3,11 +3,11 @@
 
 VERSION = 0.15
 
-bindir = /usr/sbin
-sysconfdir = /etc
-docdir = /usr/share/doc/tenshi-${VERSION}
-mandir = /usr/share/man
-libdir = /var/lib/tenshi
+bindir = ${PREFIX}/sbin
+sysconfdir = ${PREFIX}/share/examples
+docdir = ${PREFIX}/share/doc
+mandir = ${PREFIX}/${PKGMANDIR}
+
 
 DOCS = README INSTALL CREDITS LICENSE Changelog FAQ
 SAMPLES = tenshi.conf tenshi.debian-init tenshi.gentoo-init tenshi.solaris-init tenshi.redhat-init tenshi.suse-init tenshi.redhat-spec tenshi.suse-spec
@@ -33,12 +33,11 @@ ${TARBALL}:
 	rm -rf ${DIST_DIR}
 
 install:
-	install -D tenshi ${DESTDIR}${bindir}/tenshi
-	[ -f ${DESTDIR}${sysconfdir}/tenshi/tenshi.conf ] || \
-		install -g root -m 0644 -D tenshi.conf ${DESTDIR}${sysconfdir}/tenshi/tenshi.conf
-	install -d ${DESTDIR}${docdir}
-	install -m 0644 ${DOCS} ${DESTDIR}${docdir}/
-	[ -d ${DESTDIR}${mandir}/man8 ] || \
-		install -d ${DESTDIR}${mandir}/man8
-	install -g root -m 0644 tenshi.8 ${DESTDIR}${mandir}/man8/
-	install -g root -m 755 -d ${DESTDIR}${libdir}
+	install -d ${DESTDIR}${bindir}
+	install tenshi ${DESTDIR}${bindir}
+	install -d ${DESTDIR}${sysconfdir}/tenshi
+	install tenshi.conf ${DESTDIR}${sysconfdir}/tenshi
+	install -d ${DESTDIR}${docdir}/tenshi-${VERSION}
+	install ${DOCS} ${DESTDIR}${docdir}/tenshi-${VERSION}/
+	install -d ${DESTDIR}${mandir}/man8
+	install tenshi.8 ${DESTDIR}${mandir}/man8/