Subject: pkg/20290: pkg: new package: ap-throttle
To: None <gnats-bugs@gnats.netbsd.org>
From: None <eric@cirr.com>
List: netbsd-bugs
Date: 02/10/2003 15:49:02
>Number:         20290
>Category:       pkg
>Synopsis:       new package: ap-throttle
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 10 13:50:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Eric Schnoebelen
>Release:        NetBSD 1.6_STABLE
>Organization:
	Central Iowa (Model) Railroad, Plano, TX
>Environment:
System: NetBSD milo.cirr.com 1.6_STABLE NetBSD 1.6_STABLE (GENERIC) #18: Wed Nov 27 01:26:03 CST 2002 root@milo.cirr.com:/rmt/egsner/work/eric/NetBSD-1.6/obj/alpha/sys/arch/alpha/compile/GENERIC alpha
Architecture: alpha
Machine: alpha
>Description:
	New package -- ap-throttle, allows throttling of http traffic in
	the apache web server.

>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:
#
#	www/ap-throttle
#	www/ap-throttle/DESCR
#	www/ap-throttle/MESSAGE
#	www/ap-throttle/Makefile
#	www/ap-throttle/PLIST
#	www/ap-throttle/distinfo
#	www/ap-throttle/patches
#	www/ap-throttle/patches/patch-aa
#
echo c - www/ap-throttle
mkdir -p www/ap-throttle > /dev/null 2>&1
echo x - www/ap-throttle/DESCR
sed 's/^X//' >www/ap-throttle/DESCR << 'END-of-www/ap-throttle/DESCR'
XAllow throttling of connections to the Apache Web server.
XUses System V shared memory and semaphores to implement the state information.
END-of-www/ap-throttle/DESCR
echo x - www/ap-throttle/MESSAGE
sed 's/^X//' >www/ap-throttle/MESSAGE << 'END-of-www/ap-throttle/MESSAGE'
X===========================================================================
X$NetBSD: MESSAGE,v 1.1.1.1 2003/01/01 07:04:28 jlam Exp $
X
XIn order to use this module in your Apache installation, you need to
Xadd the following to your httpd.conf file:
X
X  LoadModule throttle_module lib/httpd/mod_throttle.so
X  AddModule mod_throttle.c
X
X  # throttle htdocs to 100k/sec
X  <Directory /usr/pkg/share/httpd/htdocs>
X    <IfModule mod_throttle.c>
X      ThrottlePolicy Speed 100k 1
X    </IfModule>
X  </Directory>
X
X===========================================================================
END-of-www/ap-throttle/MESSAGE
echo x - www/ap-throttle/Makefile
sed 's/^X//' >www/ap-throttle/Makefile << 'END-of-www/ap-throttle/Makefile'
X# $NetBSD: $
X
XDISTNAME=	mod_throttle312
XPKGNAME=	ap-throttle-3.1.2
XCATEGORIES=	www net
XMASTER_SITES=	http://www.snert.com/Software/mod_throttle/
XEXTRACT_SUFX=	.tgz
X
XHOME_PAGE=	http://www.snert.com/Software/mod_throttle/
XMAINTAINER=	eric@cirr.com
XCOMMENT=	Apache module for bandwidth limiting.
X
XWRKSRC=         ${WRKDIR}/${PKGNAME:S/ap-/mod_/}
X
XUSE_BUILDLINK2=	# defined
XAPACHE_MODULE=	# defined
X
Xdo-build:
X	cd ${WRKSRC} && ${APXS} -c -o mod_throttle.so mod_throttle.c
X
Xdo-install:
X	cd ${WRKSRC} && ${APXS} -i mod_throttle.so
X
X.include "../../www/apache/buildlink2.mk"
X.include "../../mk/bsd.pkg.mk"
END-of-www/ap-throttle/Makefile
echo x - www/ap-throttle/PLIST
sed 's/^X//' >www/ap-throttle/PLIST << 'END-of-www/ap-throttle/PLIST'
X@comment $NetBSD: PLIST,v 1.1.1.1 2003/01/01 07:04:28 jlam Exp $
Xlib/httpd/mod_throttle.so
END-of-www/ap-throttle/PLIST
echo x - www/ap-throttle/distinfo
sed 's/^X//' >www/ap-throttle/distinfo << 'END-of-www/ap-throttle/distinfo'
X$NetBSD$
X
XSHA1 (mod_throttle312.tgz) = a813beb97d4a23f467e07bcc24d9464d2ee91ef5
XSize (mod_throttle312.tgz) = 41397 bytes
XSHA1 (patch-aa) = 76b0cf5576f4c2235ec66baacc6e995d9e07cdd2
END-of-www/ap-throttle/distinfo
echo c - www/ap-throttle/patches
mkdir -p www/ap-throttle/patches > /dev/null 2>&1
echo x - www/ap-throttle/patches/patch-aa
sed 's/^X//' >www/ap-throttle/patches/patch-aa << 'END-of-www/ap-throttle/patches/patch-aa'
X$NetBSD$
X
X+++ mod_throttle.c
X@@ -719,7 +719,7 @@ critical_release(t_critical *mp)
X #include <sys/ipc.h>
X #include <sys/sem.h>
X 
X-#if (defined(__GNU_LIBRARY__) && (!defined(_SEM_SEMUN_UNDEFINED))) || defined(__FreeBSD__) || defined(__NetBSD__)
X+#if (defined(__GNU_LIBRARY__) && (!defined(_SEM_SEMUN_UNDEFINED))) || defined(__FreeBSD__)
X /* union semun is defined by including <sys/sem.h> */
X #else
X /* X/OPEN says we have to define it ourselves (twits). */
END-of-www/ap-throttle/patches/patch-aa
exit

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