Skip site navigation (1)Skip section navigation (2)
Date:      7 Oct 2002 14:02:16 -0700
From:      Jim Geovedi <negativetoxic.magnesium.net@magnesium.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/43795: New Port: security/oinkmaster (Perl script to update Snort rules)
Message-ID:  <20021007210216.6857.qmail@magnesium.net>

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

>Number:         43795
>Category:       ports
>Synopsis:       New Port: security/oinkmaster (Perl script to update Snort rules)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 07 14:10:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jim Geovedi
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:
System: FreeBSD toxic.magnesium.net 4.6-STABLE FreeBSD 4.6-STABLE #5: Thu Aug 1 09:24:17 PDT 2002 unfurl@toxic.magnesium.net:/users/world/obj/users/world/src/sys/TOXIC i386


	
>Description:
	
Oinkmaster is simple Perl script released under the BSD license to help you
update your Snort  rules and comment out the unwanted ones after each
update. It will tell you exactly what had changed since the last update,
hence giving you good control of your rules.

>How-To-Repeat:
	
>Fix:

	

--- security_oinkmaster.shar begins here ---
# 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:
#
#	oinkmaster
#	oinkmaster/Makefile
#	oinkmaster/pkg-comment
#	oinkmaster/distinfo
#	oinkmaster/files
#	oinkmaster/files/patch-oinkmaster.pl
#	oinkmaster/pkg-plist
#	oinkmaster/pkg-descr
#
echo c - oinkmaster
mkdir -p oinkmaster > /dev/null 2>&1
echo x - oinkmaster/Makefile
sed 's/^X//' >oinkmaster/Makefile << 'END-of-oinkmaster/Makefile'
X# New ports collection makefile for:	oinkmaster
X# Date created:			Oct 08, 2002
X# Whom:				Jim Geovedi <jim@corebsd.or.id>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	oinkmaster
XPORTVERSION=	0.6
XCATEGORIES=	security
XMASTER_SITES=	ftp://ftp.it.su.se/pub/users/andreas/oinkmaster/
X
XMAINTAINER=	jim@corebsd.or.id
X
XPERLBASE=	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}
XRUN_DEPENDS=	${PERLBASE}/File/Copy.pm:${PORTSDIR}/devel/p5-File-Tools \
X		snort:${PORTSDIR}/security/snort
X
XUSE_PERL5=	Yes
XNO_BUILD=	Yes
XUSE_REINPLACE=	Yes
X
XCONF=		oinkmaster.conf
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's,./oinkmaster.conf,${PREFIX}/${CONF},g' \
X		${WRKSRC}/${CONF}
X
Xdo-install:
X	${INSTALL_SCRIPT} ${WRKSRC}/oinkmaster.pl ${PREFIX}/bin
X	${INSTALL_DATA} ${WRKSRC}/${CONF} ${PREFIX}/etc
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X.for doc in ChangeLog LICENSE UPGRADING INSTALL README
X	${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
X.endfor
X.endif
X
X.include <bsd.port.mk>
END-of-oinkmaster/Makefile
echo x - oinkmaster/pkg-comment
sed 's/^X//' >oinkmaster/pkg-comment << 'END-of-oinkmaster/pkg-comment'
XPerl script to update Snort rules
END-of-oinkmaster/pkg-comment
echo x - oinkmaster/distinfo
sed 's/^X//' >oinkmaster/distinfo << 'END-of-oinkmaster/distinfo'
XMD5 (oinkmaster-0.6.tar.gz) = d447739b8f507282d6c13d951f347cf2
END-of-oinkmaster/distinfo
echo c - oinkmaster/files
mkdir -p oinkmaster/files > /dev/null 2>&1
echo x - oinkmaster/files/patch-oinkmaster.pl
sed 's/^X//' >oinkmaster/files/patch-oinkmaster.pl << 'END-of-oinkmaster/files/patch-oinkmaster.pl'
X--- oinkmaster.pl.orig	Sat Jul  6 23:19:34 2002
X+++ oinkmaster.pl	Tue Oct  8 02:29:30 2002
X@@ -71,18 +71,18 @@ mkdir("$tmpdir", 0700)
X   or die("Could not create temporary directory $tmpdir: $!\nExiting");
X 
X # Pull down the rules archive.
X-# Die if wget doesn't exit with status level 0.
X+# Die if fetch doesn't exit with status level 0.
X print STDERR "Downloading rules archive from $url...\n" unless ($quiet);
X if ($quiet) {
X     clean_exit("Unable to download rules.\n".
X                "Consider running in non-quiet mode if the problem persists.")
X-      if (system("wget","-q","-nv","-O","$tmpdir/$outfile","$url"));   # quiet mode
X+      if (system("fetch","-q","-o","$tmpdir/$outfile","$url"));   # quiet mode
X } elsif ($verbose) {
X     clean_exit("Unable to download rules.")
X-      if (system("wget","-v","-O","$tmpdir/$outfile","$url"));         # verbose mode
X+      if (system("fetch","-v","-o","$tmpdir/$outfile","$url"));         # verbose mode
X } else {
X     clean_exit("Unable to download rules.")
X-      if (system("wget","-nv","-O","$tmpdir/$outfile","$url"));        # normal mode
X+      if (system("fetch","-o","$tmpdir/$outfile","$url"));        # normal mode
X }
X 
X # Verify and unpack archive. This will leave us with a directory
X@@ -438,7 +438,7 @@ sub read_config
X sub sanity_check
X {
X    my @req_config   = qw (path update_files);
X-   my @req_binaries = qw (which gzip rm tar wget);
X+   my @req_binaries = qw (which gzip rm tar fetch);
X 
X   # Can't use both -q and -v.
X     die("Both quiet mode and verbose mode at the same time doesn't make sense.\nExiting")
END-of-oinkmaster/files/patch-oinkmaster.pl
echo x - oinkmaster/pkg-plist
sed 's/^X//' >oinkmaster/pkg-plist << 'END-of-oinkmaster/pkg-plist'
Xbin/oinkmaster.pl
Xetc/oinkmaster.conf
X%%PORTDOCS%%share/doc/oinkmaster/ChangeLog
X%%PORTDOCS%%share/doc/oinkmaster/LICENSE
X%%PORTDOCS%%share/doc/oinkmaster/UPGRADING
X%%PORTDOCS%%share/doc/oinkmaster/INSTALL
X%%PORTDOCS%%share/doc/oinkmaster/README
X%%PORTDOCS%%@dirrm share/doc/oinkmaster
END-of-oinkmaster/pkg-plist
echo x - oinkmaster/pkg-descr
sed 's/^X//' >oinkmaster/pkg-descr << 'END-of-oinkmaster/pkg-descr'
XOinkmaster is simple Perl script released under the BSD license to help you
Xupdate your Snort  rules and comment out the unwanted ones after each
Xupdate. It will tell you exactly what had changed since the last update,
Xhence giving you good control of your rules.
X
XWWW: http://www.algonet.se/~nitzer/oinkmaster/
END-of-oinkmaster/pkg-descr
exit
--- security_oinkmaster.shar ends here ---


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

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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