[34523] trunk/dports/security/aide

reiffert at macports.org reiffert at macports.org
Wed Feb 27 06:54:17 PST 2008


Revision: 34523
          http://trac.macosforge.org/projects/macports/changeset/34523
Author:   reiffert at macports.org
Date:     2008-02-27 06:54:17 -0800 (Wed, 27 Feb 2008)

Log Message:
-----------
Files for port:aide

Added Paths:
-----------
    trunk/dports/security/aide/Portfile
    trunk/dports/security/aide/files/patch-Makefile.in.diff
    trunk/dports/security/aide/files/patch-doc-aide-check.cron.diff
    trunk/dports/security/aide/files/patch-doc-aide.conf.diff
    trunk/dports/security/aide/files/patch-src-Makefile.in.diff

Added: trunk/dports/security/aide/Portfile
===================================================================
--- trunk/dports/security/aide/Portfile	                        (rev 0)
+++ trunk/dports/security/aide/Portfile	2008-02-27 14:54:17 UTC (rev 34523)
@@ -0,0 +1,57 @@
+# $Id: $
+
+PortSystem        1.0
+
+name		aide
+version		0.13.1
+categories	security
+maintainers	julien.touche at touche.fr.st openmaintainer
+description	Advanced Intrusion Detection Environment
+long_description	AIDE (Advanced Intrusion Detection Environment) \
+	is a free replacement for Tripwire. It does the same things as \
+	the semi-free Tripwire and more. \
+	It creates a database from the regular expression rules that it \
+	finds from the config file. Once this database is initialized it \
+	can be used to verify the integrity of the files. It has several \
+	message digest algorithms (md5,sha1,rmd160,tiger,haval,etc.) that \
+	are used to check the integrity of the file. More algorithms can \
+	be added with relative ease. All of the usual file attributes can \
+	also be checked for inconsistencies. It can read databases from \
+	older or newer versions. See the manual pages within the distribution \
+	for further info. There is also a beginning of a manual.
+homepage          http://www.cs.tut.fi/~rammer/aide.html
+master_sites      sourceforge:aide ftp://ftp.cs.tut.fi/pub/src/gnu/ http://www.cs.tut.fi/~rammer/
+platforms         darwin
+checksums         md5 27978cc6bca4f0fbf3f6f5a1b330661c
+configure.args  --mandir=${prefix}/share/man \
+		--with-mhash --with-zlib \
+		--with-locale --disable-static
+
+depends_build     bin:bison:bison
+depends_lib       lib:libmhash:mhash \
+                  lib:libintl:gettext
+
+patchfiles        patch-Makefile.in.diff patch-src-Makefile.in.diff \
+			patch-doc-aide.conf.diff patch-doc-aide-check.cron.diff
+post-patch {
+	reinplace "s|@@LOCALEDIR@@|${prefix}/share/locale|g" \
+		Makefile.in src/Makefile.in
+	reinplace "s|%%PREFIX%%|${prefix}|g" \
+		doc/aide-check.cron doc/aide.conf
+}
+
+post-destroot {
+	file mkdir ${destroot}${prefix}/share/doc/${name}-${version}
+	file mkdir ${destroot}${prefix}/etc/${name}
+	file mkdir ${destroot}${prefix}/libexec/${name}
+
+	system "install -bC ${worksrcpath}/doc/aide.conf \
+		${destroot}${prefix}/share/doc/${name}-${version}/"
+	system "install -bC ${worksrcpath}/doc/manual.html \
+		${destroot}${prefix}/share/doc/${name}-${version}/"
+	system "install -bC ${worksrcpath}/doc/aide.conf \
+		${destroot}${prefix}/etc/${name}/"
+	system "install -bC ${worksrcpath}/doc/aide-check.cron \
+		${destroot}${prefix}/libexec/${name}/"
+}
+


Property changes on: trunk/dports/security/aide/Portfile
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/dports/security/aide/files/patch-Makefile.in.diff
===================================================================
--- trunk/dports/security/aide/files/patch-Makefile.in.diff	                        (rev 0)
+++ trunk/dports/security/aide/files/patch-Makefile.in.diff	2008-02-27 14:54:17 UTC (rev 34523)
@@ -0,0 +1,11 @@
+--- Makefile.in.orig	2008-02-27 14:51:54.000000000 +0100
++++ Makefile.in	2008-02-27 14:52:12.000000000 +0100
+@@ -73,7 +73,7 @@
+ CPPFLAGS = @CPPFLAGS@
+ CRYPTLIB = @CRYPTLIB@
+ CYGPATH_W = @CYGPATH_W@
+-DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
++DEFS = -DLOCALEDIR=\"@@LOCALEDIR@@\" @DEFS@
+ DEPDIR = @DEPDIR@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@

Added: trunk/dports/security/aide/files/patch-doc-aide-check.cron.diff
===================================================================
--- trunk/dports/security/aide/files/patch-doc-aide-check.cron.diff	                        (rev 0)
+++ trunk/dports/security/aide/files/patch-doc-aide-check.cron.diff	2008-02-27 14:54:17 UTC (rev 34523)
@@ -0,0 +1,73 @@
+--- doc/aide-check.cron.orig	1970-01-01 01:00:00.000000000 +0100
++++ doc/aide-check.cron	2008-02-27 15:29:51.000000000 +0100
+@@ -0,0 +1,70 @@
++#!/bin/sh
++# from debian port
++
++PATH="/bin:/usr/bin:%%PREFIX%%/bin"
++LOGDIR="%%PREFIX%/var/log/aide"
++LOGFILE="$LOGDIR/aide.log"
++CONFFILE="%%PREFIX%%/etc/aide.conf"
++ERRORLOG="$LOGDIR/error.log"
++
++[ -f %%PREFIX%%/bin/aide ] || exit 0
++
++MAILTO=`grep "^@@define MAILTO" $CONFFILE | head -1 | awk '{ print $3 }'`
++DATABASE=`grep "^database=file:/" $CONFFILE | head -1 | cut -d: -f2`
++LINES=`grep "^@@define LINES" $CONFFILE | head -1 | awk '{ print $3 }'`
++FQDN=`hostname -f`
++DATE=`date +"at %X on %x"`
++
++[ -z "$MAILTO" ] && MAILTO="root"
++[ -z "$DATABASE" ] && DATABASE="%%PREFIX%%/var/lib/aide/aide.db"
++[ -z "$LINES" ] && LINES="1000"
++
++
++if [ ! -f $DATABASE ]; then
++	(
++	echo "Fatal error: The AIDE database does not exist!"
++	echo "This may mean you haven't created it, or it may mean that someone has removed it."
++	) | /usr/bin/mail -s "Daily AIDE report for $FQDN" $MAILTO
++	exit 0
++fi
++
++#[ -f $LOGFILE ] && savelog -t -g adm -m 640 -u root -c 7 $LOGFILE > /dev/null
++#[ -f $ERRORLOG ] && savelog -t -g adm -m 640 -u root -c 7 $ERRORLOG > /dev/null
++
++aide --check >$LOGFILE 2>$ERRORLOG
++
++(cat << EOF;
++This is an automated report generated by the Advanced Intrusion Detection
++Environment on $FQDN ${DATE}.
++
++EOF
++if [ -s $LOGFILE ]; then
++	loglines=`wc -l $LOGFILE | awk '{ print $1 }'`
++	if [ ${loglines:=0} -gt $LINES ]; then
++		echo
++		echo "TRUNCATED (!) output of the daily AIDE run:"
++		echo "Output is $loglines lines, truncated to $LINES."
++		head -$LINES $LOGFILE
++		echo "The full output can be found in $LOGFILE."
++	else
++		echo "Output of the daily AIDE run:"
++		cat $LOGFILE
++	fi
++else
++	echo "AIDE detected no changes."
++fi
++if [ -s $ERRORLOG ]; then
++	errorlines=`wc -l $ERRORLOG | awk '{ print $1 }'`
++	if [ ${errorlines:=0} -gt $LINES ]; then
++		echo "TRUNCATED (!) output of errors produced:"
++		echo "Error output is $errorlines lines, truncated to $LINES."
++		head -$LINES $ERRORLOG
++		echo "The full output can be found in $ERRORLOG."
++	else
++		echo "Errors produced:"
++		cat $ERRORLOG
++	fi
++else
++	echo "AIDE produced no errors."
++fi
++) | /usr/bin/mail -s "Daily AIDE report for $FQDN" $MAILTO

Added: trunk/dports/security/aide/files/patch-doc-aide.conf.diff
===================================================================
--- trunk/dports/security/aide/files/patch-doc-aide.conf.diff	                        (rev 0)
+++ trunk/dports/security/aide/files/patch-doc-aide.conf.diff	2008-02-27 14:54:17 UTC (rev 34523)
@@ -0,0 +1,133 @@
+--- doc/aide.conf.orig	1970-01-01 01:00:00.000000000 +0100
++++ doc/aide.conf	2008-02-27 15:29:48.000000000 +0100
+@@ -0,0 +1,130 @@
++# AIDE conf
++
++database=file:%%PREFIX%%/var/lib/aide/aide.db
++database_out=file:%%PREFIX%%/var/lib/aide/aide.db.new
++
++# Change this to "no" or remove it to not gzip output
++# (only useful on systems with few CPU cycles to spare)
++gzip_dbout=yes
++
++warn_dead_symlinks=no
++
++# Here are all the things we can check - these are the default rules 
++#
++#p:      permissions
++#i:      inode
++#n:      number of links
++#u:      user
++#g:      group
++#s:      size
++#b:      block count
++#m:      mtime
++#a:      atime
++#c:      ctime
++#S:      check for growing size
++#md5:    md5 checksum
++#sha1:   sha1 checksum
++#rmd160: rmd160 checksum
++#tiger:  tiger checksum
++#R:      p+i+n+u+g+s+m+c+md5
++#L:      p+i+n+u+g
++#E:      Empty group
++#>:      Growing logfile p+u+g+i+n+S
++#haval:         haval checksum
++#gost:          gost checksum
++#crc32:         crc32 checksum
++
++# This is the email address reports get mailed to
++# It's only used by the cron script and at the moment only the first address
++# specified in this manner will be used.
++@@define MAILTO root
++@@define LINES 1000
++
++# Custom rules
++Binlib = p+i+n+u+g+s+b+m+c+md5+sha1
++ConfFiles = p+i+n+u+g+s+b+m+c+md5+sha1
++Logs = p+i+n+u+g+S
++Devices = p+i+n+u+g+s+b+c+md5+sha1
++Databases = p+n+u+g
++StaticDir = p+i+n+u+g
++ManPages = p+i+n+u+g+s+b+m+c+md5+sha1
++
++# Next decide what directories/files you want in the database
++
++# Kernel, system map, etc.
++#=/boot$ Binlib
++# Binaries
++/bin Binlib
++/sbin Binlib
++/usr/bin Binlib
++/usr/sbin Binlib
++/usr/local/bin Binlib
++/usr/local/sbin Binlib
++#/usr/games Binlib
++# Libraries
++#/lib Binlib
++/usr/lib Binlib
++/usr/local/lib Binlib
++# Log files
++/var/log$ StaticDir
++#/var/log/aide/aide.log(.[0-9])?(.gz)? Databases
++#/var/log/aide/error.log(.[0-9])?(.gz)? Databases
++#/var/log/setuid.changes(.[0-9])?(.gz)? Databases
++#/var/log Logs
++# Devices
++!/dev/pts
++/dev Devices
++# Other miscellaneous files
++/var/run$ StaticDir
++#!/var/run
++# Test only the directory when dealing with /proc
++#/proc$ StaticDir
++#!/proc
++
++# You can look through these examples to get further ideas
++
++# MD5 sum files - especially useful with debsums -g
++#/var/lib/dpkg/info/([^\.]+).md5sums
++
++# Check crontabs
++#/var/spool/anacron/cron.daily Databases
++#/var/spool/anacron/cron.monthly Databases
++#/var/spool/anacron/cron.weekly Databases
++#/var/spool/cron Databases
++#/var/spool/cron/crontabs Databases
++
++# manpages can be trojaned, especially depending on *roff implementation
++#/usr/man ManPages
++/usr/share/man ManPages
++/usr/local/man ManPages
++
++# docs
++#/usr/doc ManPages
++#/usr/share/doc ManPages
++
++# check users' home directories
++#/home Binlib
++
++# check sources for modifications
++#/usr/src L
++#/usr/local/src L
++
++# Check headers for same
++#/usr/include L
++#/usr/local/include L
++
++## MacOS X specific stuff
++/Applications Binlib
++/System Binlib
++/Library Binlib
++/Developer Binlib
++/Volumes StaticDir
++/Users StaticDir
++/Trash StaticDir
++## DP: %%PREFIX%%
++%%PREFIX%%/bin Binlib
++%%PREFIX%%/sbin Binlib
++%%PREFIX%%/etc ConfFiles
++%%PREFIX%%/lib Binlib
++%%PREFIX%%/share/man ManPages
++%%PREFIX%%/var/log Logs

Added: trunk/dports/security/aide/files/patch-src-Makefile.in.diff
===================================================================
--- trunk/dports/security/aide/files/patch-src-Makefile.in.diff	                        (rev 0)
+++ trunk/dports/security/aide/files/patch-src-Makefile.in.diff	2008-02-27 14:54:17 UTC (rev 34523)
@@ -0,0 +1,20 @@
+--- src/Makefile.in.orig	2008-02-27 15:15:01.000000000 +0100
++++ src/Makefile.in	2008-02-27 15:15:26.000000000 +0100
+@@ -76,7 +76,7 @@
+ CPPFLAGS = @CPPFLAGS@
+ CRYPTLIB = @CRYPTLIB@
+ CYGPATH_W = @CYGPATH_W@
+-DEFS = @DEFS@
++DEFS = -DLOCALEDIR=\"@@LOCALEDIR@@\" @DEFS@
+ DEPDIR = @DEPDIR@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+@@ -94,7 +94,7 @@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = lex.yy
+ LIBOBJS = @LIBOBJS@
+-LIBS = @LIBS@
++LIBS = @LIBS@ -lintl
+ LTLIBOBJS = @LTLIBOBJS@
+ MAINT = @MAINT@
+ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080227/b7952c37/attachment-0001.html 


More information about the macports-changes mailing list