Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Oct 2003 22:28:00 +0900 (JST)
From:      Toshiya SAITOH <toshiya@saitoh.nu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Toshiya SAITOH <toshiya@saitoh.nu>
Subject:   ports/57865: New ports: www/mod_watch4
Message-ID:  <20031011132800.25C284AF@ns.saitoh.nu>
Resent-Message-ID: <200310111430.h9BEUBd2009817@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         57865
>Category:       ports
>Synopsis:       New ports: www/mod_watch4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 11 07:30:11 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Toshiya SAITOH
>Release:        FreeBSD 4.9-RC i386
>Organization:
>Environment:
System: FreeBSD ns.saitoh.nu 4.9-RC FreeBSD 4.9-RC #6: Tue Oct 7 21:27:16 JST 2003 root@ns.saitoh.nu:/usr/obj/usr/src/sys/AKAFUKU i386


>Description:
	I would like to contribute a new ports collection named 'mod_watch4'.
	<http://www.snert.com/Software/mod_watch/>;
	mod_watch4 is apache module for Apache2.x monitoring with mrtg.
	please check this.

>How-To-Repeat:
	

>Fix:



# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	mod_watch4
#	mod_watch4/files
#	mod_watch4/files/patch-SharedHash.c
#	mod_watch4/pkg-descr
#	mod_watch4/Makefile
#	mod_watch4/distinfo
#	mod_watch4/pkg-plist
#	mod_watch4/pkg-install
#	mod_watch4/pkg-message
#
echo c - mod_watch4
mkdir -p mod_watch4 > /dev/null 2>&1
echo c - mod_watch4/files
mkdir -p mod_watch4/files > /dev/null 2>&1
echo x - mod_watch4/files/patch-SharedHash.c
sed 's/^X//' >mod_watch4/files/patch-SharedHash.c << 'END-of-mod_watch4/files/patch-SharedHash.c'
X--- SharedHash.c.orig	Fri Mar 14 18:56:44 2003
X+++ SharedHash.c	Sat Oct 11 05:43:46 2003
X@@ -522,6 +522,14 @@
X 	}
X 
X #if defined(__unix__)
X+	if (chown(tp->lockfile, unixd_config.user_id, unixd_config.group_id) && errno != 0 && errno != ENOENT) {
X+		ap_log_error(
X+			APLOG_MARK, APLOG_ERR, APR_SUCCESS, watchMainServer,
X+			"chown() failed to %s: %s (%d)",
X+			tp->lockfile, strerror(errno), errno
X+		);
X+		goto error1;
X+	}
X 	unixd_set_global_mutex_perms((apr_global_mutex_t *) tp->mutex);
X #endif
X 
END-of-mod_watch4/files/patch-SharedHash.c
echo x - mod_watch4/pkg-descr
sed 's/^X//' >mod_watch4/pkg-descr << 'END-of-mod_watch4/pkg-descr'
XThis Apache module will watch and collect the bytes in & out per virtual host,
Xper file owner, and the web server as a whole. It was designed for use with
XMRTG, which will make nice graphical representations of the data, but is
Xgeneral enough that it can be applied to other purposes.
X
XWWW: http://www.snert.com/Software/mod_watch/
X
X- Toshiya Saitoh <toshiya@saitoh.nu>
END-of-mod_watch4/pkg-descr
echo x - mod_watch4/Makefile
sed 's/^X//' >mod_watch4/Makefile << 'END-of-mod_watch4/Makefile'
X# New ports collection makefile for:	mod_watch4
X# Date created:			11 Octber 2003
X# Whom:				Toshiya SAITOH <toshiya@saitoh.nu>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	mod_watch
XPORTVERSION=	4.03
XCATEGORIES=	www
XMASTER_SITES=	http://www.snert.com/Software/mod_watch/ \
X		ftp://ftp.nuug.no/pub/anders/distfiles/
XDISTNAME=	${PORTNAME}${PORTVERSION:S/.//g}
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	toshiya@saitoh.nu
XCOMMENT=	An Apache2 module to monitor bandwidth usage, for use with MRTG etc
X
XBUILD_DEPENDS=	${APXS}:${PORTSDIR}/www/apache2
XRUN_DEPENDS=	${APXS}:${PORTSDIR}/www/apache2
X
XUSE_PERL5=	yes
X
XWRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:S/0//g}
XMAKEFILE=	Makefile.dso
X
XAPXS?=		${LOCALBASE}/sbin/apxs
XMAKE_ARGS+=	APXS="${APXS}"
X
XALL_TARGET=	build
X
XDOCS=	apache2mrtg.shtml index.shtml mailto.js mod_watch.shtml style.css
XDOCS_HTMLIMAGES=	apache-header-476-62.png mrpixel.gif mrtg-bar.png \
X			sun-logo.jpg wave1.jpg
X
Xpost-patch:
X	${PERL} -pi -e "s@^APXS.*@@" ${WRKSRC}/${MAKEFILE}
X
Xdo-install:
X	${APXS} -i -a -n watch ${WRKSRC}/mod_watch.la
X	${INSTALL_SCRIPT} ${WRKSRC}/apache2mrtg.pl ${PREFIX}/sbin
X	${INSTALL_SCRIPT} ${WRKSRC}/mod_watch.pl ${PREFIX}/sbin
X	${INSTALL_SCRIPT} ${WRKSRC}/nfields.pl ${PREFIX}/sbin
X.if !defined(NOPORTDOCS)
X	@${INSTALL} -d -m 0755 ${DOCSDIR}/html/Img
X	${INSTALL_DATA} ${WRKSRC}/CHANGES.TXT ${DOCSDIR}/
X	${INSTALL_DATA} ${WRKSRC}/LICENSE.TXT ${DOCSDIR}/
X.for f in ${DOCS}
X	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/html/
X.endfor
X.for f in ${DOCS_HTMLIMAGES}
X	${INSTALL_DATA} ${WRKSRC}/Img/${f} ${DOCSDIR}/html/Img/
X.endfor
X.endif
X	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-mod_watch4/Makefile
echo x - mod_watch4/distinfo
sed 's/^X//' >mod_watch4/distinfo << 'END-of-mod_watch4/distinfo'
XMD5 (mod_watch403.tgz) = 06d57713adb935f16596d22256bca913
END-of-mod_watch4/distinfo
echo x - mod_watch4/pkg-plist
sed 's/^X//' >mod_watch4/pkg-plist << 'END-of-mod_watch4/pkg-plist'
Xsbin/apache2mrtg.pl
Xsbin/mod_watch.pl
Xsbin/nfields.pl
Xlibexec/apache2/mod_watch.so
X@exec %D/sbin/apxs -e -A -n watch %D/%F
X@unexec %D/sbin/apxs -e -A -n watch %D/%F
X%%PORTDOCS%%share/doc/mod_watch/html/Img/apache-header-476-62.png
X%%PORTDOCS%%share/doc/mod_watch/html/Img/mrpixel.gif
X%%PORTDOCS%%share/doc/mod_watch/html/Img/mrtg-bar.png
X%%PORTDOCS%%share/doc/mod_watch/html/Img/sun-logo.jpg
X%%PORTDOCS%%share/doc/mod_watch/html/Img/wave1.jpg
X%%PORTDOCS%%share/doc/mod_watch/html/apache2mrtg.shtml
X%%PORTDOCS%%share/doc/mod_watch/html/index.shtml
X%%PORTDOCS%%share/doc/mod_watch/html/mailto.js
X%%PORTDOCS%%share/doc/mod_watch/html/mod_watch.shtml
X%%PORTDOCS%%share/doc/mod_watch/html/style.css
X%%PORTDOCS%%share/doc/mod_watch/CHANGES.TXT
X%%PORTDOCS%%share/doc/mod_watch/LICENSE.TXT
X%%PORTDOCS%%@dirrm share/doc/mod_watch/html/Img
X%%PORTDOCS%%@dirrm share/doc/mod_watch/html
X%%PORTDOCS%%@dirrm share/doc/mod_watch
END-of-mod_watch4/pkg-plist
echo x - mod_watch4/pkg-install
sed 's/^X//' >mod_watch4/pkg-install << 'END-of-mod_watch4/pkg-install'
X#!/bin/sh
X
Xcase $2 in
X    PRE-INSTALL)
X	;;
X    POST-INSTALL)
X	install -d -o www -g www -m 0755 /var/spool/mod_watch
X	;;
X    *)
X	echo "Unexpected Argument $2."
X	exit 1
X	;;
Xesac
Xexit 0
END-of-mod_watch4/pkg-install
echo x - mod_watch4/pkg-message
sed 's/^X//' >mod_watch4/pkg-message << 'END-of-mod_watch4/pkg-message'
X************************************************************
XYou've installed mod_watch, a module to monitor bandwidth
Xusage.
X
X/var/spool/mod_watch has been created. It's owned by user 
Xwww and group www. For mod_watch to work, the Apache
Xuser/group must be able to create and update files in this
Xdirectory.
X
XEdit your apache.conf or httpd.conf to enable and setup this
Xmodule. Have a look at the files in
X${PREFIX}/share/doc/mod_watch/html for information on how to
Xconfigure it etc.
X
XThen do this to make it work effective:
X
X# apachectl configtest (see if there are any config errors)
X# apachectl restart
X
X************************************************************
END-of-mod_watch4/pkg-message
exit


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031011132800.25C284AF>