diff options
author | Matsuu Takuto <matsuu@gentoo.org> | 2008-04-13 16:17:59 +0000 |
---|---|---|
committer | Matsuu Takuto <matsuu@gentoo.org> | 2008-04-13 16:17:59 +0000 |
commit | 63d875ce662ca6bc0e208e111507d3c4c06a629c (patch) | |
tree | 6a771f7e9d8426146ac61434dc85f311cfd4a57d /app-forensics | |
parent | fix 217278 (diff) | |
download | gentoo-2-63d875ce662ca6bc0e208e111507d3c4c06a629c.tar.gz gentoo-2-63d875ce662ca6bc0e208e111507d3c4c06a629c.tar.bz2 gentoo-2-63d875ce662ca6bc0e208e111507d3c4c06a629c.zip |
removed mailx dependency, bug #215637.
(Portage version: 2.1.4.4)
Diffstat (limited to 'app-forensics')
-rw-r--r-- | app-forensics/aide/ChangeLog | 12 | ||||
-rw-r--r-- | app-forensics/aide/aide-0.13.1-r1.ebuild | 4 | ||||
-rw-r--r-- | app-forensics/aide/aide-0.13.1-r2.ebuild | 140 | ||||
-rw-r--r-- | app-forensics/aide/files/aide-0.13.1-configure.patch | 74 | ||||
-rwxr-xr-x | app-forensics/aide/files/aide.cron | 37 |
5 files changed, 253 insertions, 14 deletions
diff --git a/app-forensics/aide/ChangeLog b/app-forensics/aide/ChangeLog index d9af97fb8d70..c48f605b6172 100644 --- a/app-forensics/aide/ChangeLog +++ b/app-forensics/aide/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-forensics/aide -# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-forensics/aide/ChangeLog,v 1.34 2007/12/23 06:37:49 matsuu Exp $ +# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-forensics/aide/ChangeLog,v 1.35 2008/04/13 16:17:59 matsuu Exp $ + +*aide-0.13.1-r2 (13 Apr 2008) + + 13 Apr 2008; MATSUU Takuto <matsuu@gentoo.org> + +files/aide-0.13.1-configure.patch, files/aide.cron, + +aide-0.13.1-r2.ebuild: + Removed mailx dependency, bug #215637. + Clean up. 23 Dec 2007; MATSUU Takuto <matsuu@gentoo.org> +aide-0.13.1-r1.ebuild: Removed /etc/cron.daily/aide.cron, bug #195690. diff --git a/app-forensics/aide/aide-0.13.1-r1.ebuild b/app-forensics/aide/aide-0.13.1-r1.ebuild index bae287f740be..ed6a9268b691 100644 --- a/app-forensics/aide/aide-0.13.1-r1.ebuild +++ b/app-forensics/aide/aide-0.13.1-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-forensics/aide/aide-0.13.1-r1.ebuild,v 1.1 2007/12/23 06:37:49 matsuu Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-forensics/aide/aide-0.13.1-r1.ebuild,v 1.2 2008/04/13 16:17:59 matsuu Exp $ WANT_AUTOCONF='latest' WANT_AUTOMAKE='latest' inherit eutils autotools diff --git a/app-forensics/aide/aide-0.13.1-r2.ebuild b/app-forensics/aide/aide-0.13.1-r2.ebuild new file mode 100644 index 000000000000..afde310507a4 --- /dev/null +++ b/app-forensics/aide/aide-0.13.1-r2.ebuild @@ -0,0 +1,140 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-forensics/aide/aide-0.13.1-r2.ebuild,v 1.1 2008/04/13 16:17:59 matsuu Exp $ + +WANT_AUTOCONF='latest' +WANT_AUTOMAKE='latest' + +inherit eutils autotools multilib + +DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a replacement for Tripwire" +HOMEPAGE="http://aide.sourceforge.net/" +SRC_URI="mirror://sourceforge/aide/${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" +IUSE="acl curl mhash nls postgres selinux static xattr zlib" +#IUSE="acl audit curl mhash nls postgres selinux static xattr zlib" + +DEPEND="acl? ( sys-apps/acl ) + curl? ( net-misc/curl ) + mhash? ( >=app-crypt/mhash-0.9.2 ) + !mhash? ( dev-libs/libgcrypt ) + nls? ( virtual/libintl ) + postgres? ( dev-db/libpq ) + selinux? ( sys-libs/libselinux ) + xattr? ( sys-apps/attr ) + zlib? ( sys-libs/zlib )" +# audit? ( sys-process/audit ) + +RDEPEND="!static? ( ${DEPEND} )" + +DEPEND="${DEPEND} + nls? ( sys-devel/gettext ) + sys-devel/bison + sys-devel/flex" + +pkg_config() { + if use mhash && use postgres ; then + eerror "We cannot emerge aide with mhash and postgres USE flags at the same time." + eerror "Please remove mhash OR postgres USE flags." + die "Please remove either mhash or postgres USE flag." + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-gentoo.patch" + + # fix configure switch + epatch "${FILESDIR}/${P}-configure.patch" + + if ! use mhash ; then + # dev-libs/libgcrypt doesn't support whirlpool algorithm + sed -i -e 's/\+whirlpool//' doc/aide.conf.in || die + fi + + if ! use selinux ; then + sed -i -e 's/\+selinux//' doc/aide.conf.in || die + fi + + if ! use xattr ; then + sed -i -e 's/\+xattrs//' doc/aide.conf.in || die + fi + + if ! use acl ; then + sed -i -e 's/\+acl//' doc/aide.conf.in || die + fi + + eautoreconf +} + +src_compile() { + local myconf=" + $(use_with acl posix-acl) + $(use_with !mhash gcrypt) + $(use_with mhash mhash) + $(use_with nls locale) + $(use_with postgres psql) + $(use_with selinux) + $(use_enable static) + $(use_with xattr) + $(use_with zlib) + --sysconfdir=/etc/aide + --with-extra-lib=/usr/$(get_libdir)" +# $(use_with audit) + + # curl doesn't work with static + use curl && ! use static && myconf="${myconf} --with-curl" + + econf ${myconf} || die "econf failed" + # parallel make borked + emake -j1 || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + keepdir /var/lib/aide + fowners root:0 /var/lib/aide + fperms 0755 /var/lib/aide + + keepdir /var/log/aide + + insinto /etc/aide + doins "${FILESDIR}"/aide.conf + + + dosbin "${FILESDIR}"/aideinit + + dodoc ChangeLog AUTHORS NEWS README "${FILESDIR}"/aide.cron + dohtml doc/manual.html +} + +pkg_postinst() { + elog + elog "A sample configuration file has been installed as" + elog "/etc/aide/aide.conf. Please edit to meet your needs." + elog "Read the aide.conf(5) manual page for more information." + elog "A cron file has been installed in /etc/cron.daily/aide.cron" + elog "A helper script, aideinit, has been installed and can" + elog "be used to make AIDE management easier. Please run" + elog "aideinit --help for more information" + elog + + if use postgres; then + elog "Due to a bad assumption by aide, you must issue the following" + elog "command after the database initialization (aide --init ...):" + elog + elog 'psql -c "update pg_index set indisunique=false from pg_class \\ ' + elog " where pg_class.relname='TABLE_pkey' and \ " + elog ' pg_class.oid=pg_index.indexrelid" -h HOSTNAME -p PORT DBASE USER' + elog + elog "where TABLE, HOSTNAME, PORT, DBASE, and USER are the same as" + elog "your aide.conf." + elog + fi +} diff --git a/app-forensics/aide/files/aide-0.13.1-configure.patch b/app-forensics/aide/files/aide-0.13.1-configure.patch new file mode 100644 index 000000000000..75eb5559ebba --- /dev/null +++ b/app-forensics/aide/files/aide-0.13.1-configure.patch @@ -0,0 +1,74 @@ +--- configure.in.old 2008-01-26 15:07:28.000000000 +0100 ++++ configure.in 2008-01-26 15:14:05.000000000 +0100 +@@ -160,7 +160,9 @@ + fi + + # Check whether static linking has explicitly been disabled +-AC_ARG_ENABLE(static,[ --disable-static Disable static linking (lowers the security of aide)], [aide_static_choice=$enableval], [aide_static_choice=yes]) ++AC_ARG_ENABLE(static, ++ AC_HELP_STRING([--disable-static],[Disable static linking (lowers the security of aide)]), ++ [aide_static_choice=$enableval], [aide_static_choice=yes]) + + if test "$aide_static_choice" != "yes"; then + LD_STATIC_FLAG="" +@@ -190,8 +192,8 @@ + AC_CHECK_FUNCS(stricmp strnstr strnlen) + + AC_ARG_WITH([mmap], +- [AC_HELP_STRING([--with-mmap], +- [use mmap @<:@default=check@:>@])], ++ AC_HELP_STRING([--with-mmap], ++ [use mmap @<:@default=check@:>@]), + [], + [with_mmap=check] + ) +@@ -283,8 +285,8 @@ + AC_CHECK_HEADERS(syslog.h inttypes.h fcntl.h) + + AC_ARG_WITH([locale], +- [AC_HELP_STRING([--with-locale], +- [use locale stuff])], ++ AC_HELP_STRING([--with-locale], ++ [use locale stuff]), + [], + [with_locale=no] + ) +@@ -369,10 +371,10 @@ + [AC_HELP_STRING([--with-posix-acl], + [use POSIX ACLs (no checking)])], + [], +- [with_posix_acl_support=no] ++ [with_posix_acl=no] + ) + +-AS_IF([test "x$with_posix_acl_support" != xno], ++AS_IF([test "x$with_posix_acl" != xno], + [AC_DEFINE(WITH_POSIX_ACL,1,[use POSIX ACLs]) + AC_DEFINE(WITH_ACL,1,[use ACL]) + ACLLIB="-lacl" +@@ -388,10 +390,10 @@ + [AC_HELP_STRING([--with-selinux], + [use SELinux (no checking)])], + [], +- [with_selinux_support=no] ++ [with_selinux=no] + ) + +-AS_IF([test "x$with_selinux_support" != xno], ++AS_IF([test "x$with_selinux" != xno], + [AC_DEFINE(WITH_SELINUX,1,[use SELinux]) + if test -n "$PKG_CONFIG" && $PKG_CONFIG --exists libselinux; then + SELINUXLIB=$(${PKG_CONFIG} --libs libselinux --static) +@@ -410,10 +412,10 @@ + [AC_HELP_STRING([--with-xattr], + [use xattr (no checking)])], + [], +- [with_xattr_support=no] ++ [with_xattr=no] + ) + +-AS_IF([test "x$with_xattr_support" != xno], ++AS_IF([test "x$with_xattr" != xno], + [AC_DEFINE(WITH_XATTR,1,[use xattr]) + ATTRLIB=-lattr + compoptionstring="${compoptionstring}WITH_XATTR\\n" diff --git a/app-forensics/aide/files/aide.cron b/app-forensics/aide/files/aide.cron index 34a24dd25a17..c28b78f8e9db 100755 --- a/app-forensics/aide/files/aide.cron +++ b/app-forensics/aide/files/aide.cron @@ -29,6 +29,7 @@ LOGDIR="/var/log/aide" LOGFILE="aide.log" CONFFILE="/etc/aide/aide.conf" ERRORLOG="aide_error.log" +MAILLOG="aide_mail.log" ERRORTMP=`tempfile --directory "/tmp" --prefix "$ERRORLOG"` [ -f /usr/bin/aide ] || exit 0 @@ -44,10 +45,13 @@ DATABASE="${DATABASE:-/var/lib/aide/aide.db}" AIDEARGS="-V4" 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." - ) | /bin/mail -s "Daily AIDE report for $FQDN" $MAILTO + /usr/sbin/sendmail $MAILTO <<EOF +Subject: Daily AIDE report for $FQDN +From: root@${FQDN} +To: ${MAILTO} +Fatal error: The AIDE database does not exist! +This may mean you haven't created it, or it may mean that someone has removed it. +EOF exit 0 fi @@ -63,7 +67,9 @@ if [ -n "$QUIETREPORTS" ] && [ $QUIETREPORTS -a \! -s $LOGDIR/$LOGFILE -a \! -s exit 0 fi -(cat << EOF; +MAILTMP=`tempfile --directory "/tmp" --prefix "$MAILLOG"` + +(cat << EOF This is an automated report generated by the Advanced Intrusion Detection Environment on $FQDN ${DATE}. @@ -72,7 +78,7 @@ EOF # include error log in daily report e-mail if [ "$RETVAL" != "0" ]; then - cat > "$LOGDIR/$ERRORLOG" << EOF; + cat > "$LOGDIR/$ERRORLOG" << EOF ***************************************************************************** * aide returned a non-zero exit value * @@ -89,7 +95,7 @@ rm -f "$ERRORTMP" if [ -s "$LOGDIR/$ERRORLOG" ]; then errorlines=`wc -l "$LOGDIR/$ERRORLOG" | awk '{ print $1 }'` if [ ${errorlines:=0} -gt $LINES ]; then - cat << EOF; + cat << EOF **************************************************************************** * aide has returned many errors. * @@ -129,7 +135,7 @@ if [ -n "$NOISE" ]; then if [ -s "$NOISETMP" ]; then loglines=`< $NOISETMP wc -l | awk '{ print $1 }'` if [ ${loglines:=0} -gt $LINES ]; then - cat << EOF; + cat << EOF **************************************************************************** * aide has returned long output which has been truncated in this mail * @@ -155,7 +161,7 @@ fi if [ -s "$LOGDIR/$LOGFILE" ]; then loglines=`wc -l "$LOGDIR/$LOGFILE" | awk '{ print $1 }'` if [ ${loglines:=0} -gt $LINES ]; then - cat << EOF; + cat << EOF **************************************************************************** * aide has returned long output which has been truncated in this mail * @@ -172,4 +178,15 @@ EOF else echo "AIDE detected no changes." fi -) | /bin/mail -s "Daily AIDE report for $FQDN" $MAILTO +) > ${MAILTMP} + +( +cat <<EOF +Subject: Daily AIDE report for $FQDN +From: root@${FQDN} +To: ${MAILTO} +EOF +cat ${MAILTMP} +) | /usr/sbin/sendmail $MAILTO + +rm -f "$MAILTMP" |