[arch-commits] Commit in snort/trunk (PKGBUILD snort snort.conf.d)

Hugo Doria hugo at archlinux.org
Wed Jul 9 13:40:58 UTC 2008


    Date: Wednesday, July 9, 2008 @ 09:40:57
  Author: hugo
Revision: 4725

upgpkg: snort 2.8.2.1-3
    snort updated! lots of bugs fixed. see FS#10775 and FS#10072 for details

Modified:
  snort/trunk/PKGBUILD
  snort/trunk/snort
  snort/trunk/snort.conf.d

--------------+
 PKGBUILD     |   31 ++++++++++++++++++++++---------
 snort        |    4 ++--
 snort.conf.d |    8 +++++---
 3 files changed, 29 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-07-09 12:31:34 UTC (rev 4724)
+++ PKGBUILD	2008-07-09 13:40:57 UTC (rev 4725)
@@ -1,10 +1,11 @@
 # $Id$
-# Maintainer: Andreas Radke <andyrtr at archlinux.org>
+# Maintainer: Hugo Doria <hugo at archlinux.org>
+# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
 # Contributor: dorphell <dorphell at archlinux.org>
 # Contributor: Gregor Ibic <gregor.ibic at intelicom.si>
 pkgname=snort
 pkgver=2.8.2.1
-pkgrel=1
+pkgrel=3
 pkgdesc="A lightweight network intrusion detection system"
 arch=('i686' 'x86_64')
 license=('GPL')
@@ -12,25 +13,37 @@
 backup=(etc/conf.d/snort
 	etc/snort/{snort,threshold}.conf
 	etc/snort/{confreference,classification}.config)
-source=(http://www.snort.org/dl/current/$pkgname-$pkgver.tar.gz snort snort.conf.d
-	http://www.snort.org/pub-bin/downloads.cgi/Download/comm_rules/Community-Rules-CURRENT.tar.gz) # rules RELEASED: 2007-04-27
+install=snort.install
+source=("http://www.snort.org/dl/current/$pkgname-$pkgver.tar.gz"
+        'snort' 
+	'snort.conf.d' 
+	'http://www.snort.org/pub-bin/downloads.cgi/Download/comm_rules/Community-Rules-CURRENT.tar.gz' 
+	'snort.conf.patch')
 url="http://www.snort.org"
 options=('!makeflags' '!libtool')
 md5sums=('b39e784dd8a5cf180aae20e94a7b52dd'
-         '53284a7996ee41c4c58d13c65d46d776'
-         'e861a59739151ee12798f31e029d43c5'
-         'f236b8a4ac12e99d3e7bd81bf3b5a482')
+         '361b8b9e40b9af0164f6b3e3da2e8277'
+         'b4fb8a68490589cd34df93de7609bfac'
+         'f236b8a4ac12e99d3e7bd81bf3b5a482'
+         'd6ee07e7e23a0b7f5a0dd7d605828946')
 
 build() {
   cd $startdir/src/$pkgname-$pkgver
+
+  patch -Np0 < ${startdir}/snort.conf.patch || return 1
+
   ./configure --prefix=/usr --sysconfdir=/etc/snort --with-libpcap-includes=/usr/include/pcap \
-    --without-mysql --without-postgresql --without-oracle --without-odbc
+  --without-mysql --without-postgresql --without-oracle --without-odbc
   make || return 1
   make DESTDIR=$startdir/pkg install
-  mkdir -p $startdir/pkg/{etc/rc.d,etc/snort/rules,var/log/snort}
+
+  mkdir -p $startdir/pkg/{etc/rc.d,etc/snort/rules}
+
+  install -d -m744 -o snort -g snort $startdir/pkg/var/log/snort
   install -D -m644 etc/{*.conf*,*.map} $startdir/pkg/etc/snort
   install -D -m644 ../../snort.conf.d $startdir/pkg/etc/conf.d/snort
   install -D -m644 $startdir/src/rules/*.rules $startdir/pkg/etc/snort/rules
   install -D -m755 $startdir/snort $startdir/pkg/etc/rc.d/snort
+
   sed 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|' -i $startdir/pkg/etc/snort/snort.conf
 }

Modified: snort
===================================================================
--- snort	2008-07-09 12:31:34 UTC (rev 4724)
+++ snort	2008-07-09 13:40:57 UTC (rev 4725)
@@ -4,14 +4,14 @@
 . /etc/rc.d/functions
 
 # source application-specific settings
-SNORT_ARGS=
 [ -f /etc/conf.d/snort ] && . /etc/conf.d/snort
 
 PID=`pidof -o %PPID /usr/bin/snort`
 case "$1" in
   start)
     stat_busy "Starting Intrusion Database System: SNORT"
-    [ -z "$PID" ] && /usr/bin/snort ${SNORT_ARGS}
+    [ -z "$PID" ] && /usr/bin/snort ${SNORT_OPTIONS} -u ${USER} -g ${GROUP} \
+                    -i ${INTERFACE} -c ${SNORT_CONF}
 	 if [ $? -gt 0 ]; then
       stat_fail
     else

Modified: snort.conf.d
===================================================================
--- snort.conf.d	2008-07-09 12:31:34 UTC (rev 4724)
+++ snort.conf.d	2008-07-09 13:40:57 UTC (rev 4725)
@@ -5,14 +5,17 @@
 # options taken from Fedora
 # http://cvs.fedoraproject.org/viewcvs/devel/snort/sysconfig.snort?rev=1.2&view=markup
 
+# Where is the snort.conf file.
+SNORT_CONF="/etc/snort/snort.conf"
+
 # What user account should we run under.
-USER="root"
+USER="snort"
 
 # What group account should we run under. 
-GROUP="root"
+GROUP="snort"
 
 # define the interface we listen on
 INTERFACE="eth0"
 
 # If you are using prelude, delete the '-A fast' option
-SNORT_OPTIONS="-A fast -b -l /var/log/snort -D -p"
\ No newline at end of file
+SNORT_OPTIONS="-A fast -b -l /var/log/snort -D -p"





More information about the arch-commits mailing list