summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-forensics/aide
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-forensics/aide')
-rw-r--r--app-forensics/aide/Manifest3
-rw-r--r--app-forensics/aide/aide-0.13.1-r3.ebuild146
-rw-r--r--app-forensics/aide/aide-0.13.1-r5.ebuild152
-rw-r--r--app-forensics/aide/aide-0.13.1.ebuild141
-rw-r--r--app-forensics/aide/aide-0.14.2.ebuild114
-rw-r--r--app-forensics/aide/aide-0.15.1.ebuild115
-rw-r--r--app-forensics/aide/files/aide-0.13.1-as-needed.patch36
-rw-r--r--app-forensics/aide/files/aide-0.13.1-configure.patch74
-rw-r--r--app-forensics/aide/files/aide-0.13.1-equ-matching.patch83
-rw-r--r--app-forensics/aide/files/aide-0.13.1-gentoo.patch36
-rw-r--r--app-forensics/aide/files/aide-0.13.1-libgrypt_init.patch49
-rw-r--r--app-forensics/aide/files/aide-0.13.1-zlib.patch12
-rw-r--r--app-forensics/aide/files/aide-0.14-as-needed.patch20
-rw-r--r--app-forensics/aide/files/aide-0.14-configure.patch38
-rw-r--r--app-forensics/aide/files/aide-0.14-gentoo.patch26
-rw-r--r--app-forensics/aide/files/aide-0.15.1-gentoo.patch26
-rw-r--r--app-forensics/aide/files/aide.conf115
-rwxr-xr-xapp-forensics/aide/files/aide.cron192
-rwxr-xr-xapp-forensics/aide/files/aideinit145
-rw-r--r--app-forensics/aide/metadata.xml12
20 files changed, 1535 insertions, 0 deletions
diff --git a/app-forensics/aide/Manifest b/app-forensics/aide/Manifest
new file mode 100644
index 000000000000..fa9310f77a57
--- /dev/null
+++ b/app-forensics/aide/Manifest
@@ -0,0 +1,3 @@
+DIST aide-0.13.1.tar.gz 285400 SHA256 b55065413bad3c24af51a551e6ab7cd4a9ecd9f449929261a45fc2f53e040021 SHA512 ac0e49c49d1a4229cf473a60e9acd8e7dc7c3ee7c2d436a3b3d486131753fd914a73695675de6e7f9bb5cdadb2ed64760a9e834c935fb1a5c65bae0d7efa2946 WHIRLPOOL 5d7ee3b2a062c2c91e603c72ed1d76a1fc9d16f13e8253bab0b5f6335de239ef7e44c453ffe22da86f5b0bc8a69e0bf6276a4a52a1928339899298f07f1769df
+DIST aide-0.14.2.tar.gz 418098 SHA256 bf4cd417b0f4778b4f9a618d23e0b0b7db10349ba6a0129394dc82fbc2fa8b9b SHA512 4ef96078fde057a54dda467fb55711e30d947969873715a02052362c57112f5bfd3155460ef353f70ce69fea3a3c491b7925bebbdb7034dbf618c63c360347df WHIRLPOOL fa91e4493bcac4cf11a8fedfd5e3c490752936f9ea04871d812b831f33089b694892e32ed19cef273926d3a8c091fb15a7b98a5e5303f08609f164773475d142
+DIST aide-0.15.1.tar.gz 424970 SHA256 303e5c186257df8c86e418193199f4ea2183fc37d3d4a9098a614f61346059ef SHA512 6afe327474858c697ba017b02bd40717c33874e69b801c171c2496ff9042b557e840bef4a151bda0e4d835ddb0d972b88790237a72f250525dc1fc6b8fa673e7 WHIRLPOOL 4c21221cfbaeff3aa00a3f22c4e31c1fffd3f00d112828540ab6ab94dd019086244de71e5d19d1120078acc7b81b9efa5a36d55937292f523bcb4e064830ba6a
diff --git a/app-forensics/aide/aide-0.13.1-r3.ebuild b/app-forensics/aide/aide-0.13.1-r3.ebuild
new file mode 100644
index 000000000000..341e5d33f884
--- /dev/null
+++ b/app-forensics/aide/aide-0.13.1-r3.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools eutils
+
+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="amd64 x86"
+IUSE="acl curl mhash nls postgres selinux static xattr zlib"
+#IUSE="acl audit curl mhash nls postgres selinux static xattr zlib"
+
+# libsandbox: Can't dlopen libc: (null)
+RESTRICT="test"
+
+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/postgresql )
+ selinux? (
+ sys-libs/libselinux
+ sec-policy/selinux-aide
+ )
+ 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_setup() {
+ 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"
+
+ # fix equal match issue, bug #204217
+ epatch "${FILESDIR}/${P}-equ-matching.patch"
+
+ # fix libgcrypt issue, bug #266175
+ epatch "${FILESDIR}/${P}-libgrypt_init.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"
+# $(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 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/aide-0.13.1-r5.ebuild b/app-forensics/aide/aide-0.13.1-r5.ebuild
new file mode 100644
index 000000000000..9acd68a1b2af
--- /dev/null
+++ b/app-forensics/aide/aide-0.13.1-r5.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools eutils
+
+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="~amd64 ~x86"
+IUSE="acl curl mhash nls postgres selinux static xattr zlib"
+#IUSE="acl audit curl mhash nls postgres selinux static xattr zlib"
+
+# libsandbox: Can't dlopen libc: (null)
+RESTRICT="test"
+
+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/postgresql )
+ selinux? (
+ sys-libs/libselinux
+ sec-policy/selinux-aide
+ )
+ 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_setup() {
+ 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"
+
+ # fix equal match issue, bug #204217
+ epatch "${FILESDIR}/${P}-equ-matching.patch"
+
+ # fix libgcrypt issue, bug #266175
+ epatch "${FILESDIR}/${P}-libgrypt_init.patch"
+
+ # fix as-need issue, bug #271326
+ epatch "${FILESDIR}/${P}-as-needed.patch"
+
+ # fix zlib issue, bug #316665
+ epatch "${FILESDIR}/${P}-zlib.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"
+# $(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 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/aide-0.13.1.ebuild b/app-forensics/aide/aide-0.13.1.ebuild
new file mode 100644
index 000000000000..8b43d61c4b86
--- /dev/null
+++ b/app-forensics/aide/aide-0.13.1.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils autotools
+
+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="amd64 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/postgresql )
+ selinux? (
+ sys-libs/libselinux
+ sec-policy/selinux-aide
+ )
+ xattr? ( sys-apps/attr )
+ zlib? ( sys-libs/zlib )"
+# audit? ( sys-process/audit )
+
+RDEPEND="!static? ( ${DEPEND} )
+ virtual/mailx"
+
+DEPEND="${DEPEND}
+ nls? ( sys-devel/gettext )
+ sys-devel/bison
+ sys-devel/flex"
+
+pkg_setup() {
+ 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
+
+ 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="--sysconfdir=/etc/aide $(use_enable static)"
+
+ # --without-* borked
+ use zlib && myconf="${myconf} --with-zlib"
+ use nls && myconf="${myconf} --with-locale"
+ use postgres && myconf="${myconf} --with-psql"
+ use selinux && myconf="${myconf} --with-selinux"
+ use acl && myconf="${myconf} --with-posix-acl"
+ use xattr && myconf="${myconf} --with-xattr"
+# use audit && myconf="${myconf} --with-audit"
+
+ # curl doesn't work with static
+ use curl && ! use static && myconf="${myconf} --with-curl"
+
+ # If you use dev-libs/libgcrypt, --without-mhash is needed.
+ use mhash \
+ && myconf="${myconf} --with-mhash" \
+ || myconf="${myconf} --with-gcrypt --without-mhash"
+
+ econf ${myconf} || die
+ # parallel make borked
+ emake -j1 || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ keepdir /var/lib/aide
+ keepdir /var/log/aide
+
+ insinto /etc/aide
+ doins "${FILESDIR}"/aide.conf
+ # doins doc/aide.conf
+
+ dosbin "${FILESDIR}"/aideinit
+
+ exeinto /etc/cron.daily
+ doexe "${FILESDIR}"/aide.cron
+
+ dodoc ChangeLog AUTHORS NEWS README
+ dohtml doc/manual.html
+}
+
+pkg_postinst() {
+ chown root:0 /var/lib/aide
+ chmod 0755 /var/lib/aide
+
+ 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/aide-0.14.2.ebuild b/app-forensics/aide/aide-0.14.2.ebuild
new file mode 100644
index 000000000000..cfb3e18e0842
--- /dev/null
+++ b/app-forensics/aide/aide-0.14.2.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit autotools confutils eutils
+
+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="amd64 x86"
+IUSE="acl audit curl mhash nls postgres prelink selinux static xattr zlib"
+
+CDEPEND="acl? ( virtual/acl )
+ audit? ( sys-process/audit )
+ curl? ( net-misc/curl )
+ mhash? ( >=app-crypt/mhash-0.9.2 )
+ !mhash? ( dev-libs/libgcrypt:0 )
+ nls? ( virtual/libintl )
+ postgres? ( dev-db/postgresql )
+ prelink? ( sys-devel/prelink )
+ selinux? (
+ sys-libs/libselinux
+ )
+ xattr? ( sys-apps/attr )
+ zlib? ( sys-libs/zlib )"
+
+RDEPEND="!static? ( ${CDEPEND} )
+ selinux? ( sec-policy/selinux-aide )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ sys-devel/bison
+ sys-devel/flex"
+
+pkg_setup() {
+ confutils_use_conflict mhash postgres
+ confutils_use_conflict static curl postgres
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.14-gentoo.patch"
+
+ # fix as-need issue, bug #271326
+ epatch "${FILESDIR}/${PN}-0.14-as-needed.patch"
+
+ # fix configure issue, bug #323187
+ epatch "${FILESDIR}/${PN}-0.14-configure.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with acl posix-acl) \
+ $(use_with audit) \
+ $(use_with curl) \
+ $(use_with !mhash gcrypt) \
+ $(use_with mhash mhash) \
+ $(use_with nls locale) \
+ $(use_with postgres psql) \
+ $(use_with prelink) \
+ $(use_with selinux) \
+ $(use_enable static) \
+ $(use_with xattr) \
+ $(use_with zlib) \
+ --sysconfdir="${EPREFIX}/etc/aide" || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-man || die "emake install failed"
+
+ keepdir /var/lib/aide || die
+ fowners root:0 /var/lib/aide || die
+ fperms 0755 /var/lib/aide || die
+
+ keepdir /var/log/aide || die
+
+ insinto /etc/aide
+ doins "${FILESDIR}"/aide.conf || die
+
+ dosbin "${FILESDIR}"/aideinit || die
+
+ dodoc AUTHORS ChangeLog NEWS README Todo "${FILESDIR}"/aide.cron || die
+ dohtml doc/manual.html || die
+}
+
+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 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/aide-0.15.1.ebuild b/app-forensics/aide/aide-0.15.1.ebuild
new file mode 100644
index 000000000000..c1fda4679b4b
--- /dev/null
+++ b/app-forensics/aide/aide-0.15.1.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit autotools confutils eutils
+
+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="~amd64 ~x86"
+IUSE="acl audit curl mhash nls postgres prelink selinux static xattr zlib"
+
+CDEPEND="acl? ( virtual/acl )
+ audit? ( sys-process/audit )
+ curl? ( net-misc/curl )
+ mhash? ( >=app-crypt/mhash-0.9.2 )
+ !mhash? ( dev-libs/libgcrypt:0 )
+ nls? ( virtual/libintl )
+ postgres? ( dev-db/postgresql )
+ prelink? ( sys-devel/prelink )
+ selinux? (
+ sys-libs/libselinux
+ )
+ xattr? ( sys-apps/attr )
+ zlib? ( sys-libs/zlib )"
+
+RDEPEND="!static? ( ${CDEPEND} )
+ selinux? ( sec-policy/selinux-aide )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ sys-devel/bison
+ sys-devel/flex"
+
+pkg_setup() {
+ confutils_use_conflict mhash postgres
+ confutils_use_conflict static curl postgres
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.15.1-gentoo.patch"
+
+ # fix as-need issue, bug #271326
+ epatch "${FILESDIR}/${PN}-0.14-as-needed.patch"
+
+ # fix configure issue, bug #323187
+ epatch "${FILESDIR}/${PN}-0.14-configure.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with acl posix-acl) \
+ $(use_with audit) \
+ $(use_with curl) \
+ $(use_with !mhash gcrypt) \
+ $(use_with mhash mhash) \
+ $(use_with nls locale) \
+ $(use_with postgres psql) \
+ $(use_with prelink) \
+ $(use_with selinux) \
+ $(use_enable static) \
+ $(use_with xattr) \
+ $(use_with zlib) \
+ --sysconfdir="${EPREFIX}/etc/aide" || die "econf failed"
+# $(use_with e2fsattrs) \
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-man || die "emake install failed"
+
+ keepdir /var/lib/aide || die
+ fowners root:0 /var/lib/aide || die
+ fperms 0755 /var/lib/aide || die
+
+ keepdir /var/log/aide || die
+
+ insinto /etc/aide
+ doins "${FILESDIR}"/aide.conf || die
+
+ dosbin "${FILESDIR}"/aideinit || die
+
+ dodoc AUTHORS ChangeLog NEWS README Todo "${FILESDIR}"/aide.cron || die
+ dohtml doc/manual.html || die
+}
+
+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 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-as-needed.patch b/app-forensics/aide/files/aide-0.13.1-as-needed.patch
new file mode 100644
index 000000000000..9e0ec4d73aff
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.13.1-as-needed.patch
@@ -0,0 +1,36 @@
+diff -Naur aide-0.13.1.orig/configure.in aide-0.13.1/configure.in
+--- aide-0.13.1.orig/configure.in 2006-12-09 06:49:21.000000000 +0900
++++ aide-0.13.1/configure.in 2009-12-16 19:30:17.000000000 +0900
+@@ -546,12 +546,12 @@
+ if test x$with_zlib = xyes; then
+ AC_CHECK_HEADERS(zlib.h,,
+ [AC_MSG_ERROR([You don't have zlib properly installed. Install it or try --without-zlib.])])
+- save_LDFLAGS=$LDFLAGS
+- LDFLAGS="$LDFLAGS $LD_STATIC_FLAG"
++# saveLIBS=$LIBS
++ LIBS="$LIBS -lz $LD_STATIC_FLAG"
+ AC_CHECK_LIB(z,gzdopen,,
+ [AC_MSG_ERROR([You don't have zlib properly installed. Install it or try --without-zlib.])]
+ )
+- LDFLAGS=$save_LDFLAGS
++# LIBS=$saveLIBS
+ AC_DEFINE(WITH_ZLIB,1,[use zlib])
+ fi
+
+@@ -565,13 +565,13 @@
+ fi
+ AC_CHECK_HEADERS(curl/curl.h,,
+ [AC_MSG_ERROR([You don't have curl properly installed. Install it or try --without-curl.])])
+-# save_LDFLAGS=$LDFLAGS
++# saveLIBS=$LIBS
+ CFLAGS="$CFLAGS $CURL_CFLAGS"
+- LDFLAGS="$LDFLAGS $CURL_LIBS $LD_STATIC_FLAG"
++ LIBS="$LIBS $CURL_LIBS $LD_STATIC_FLAG"
+ AC_CHECK_LIB(curl,curl_easy_init,havecurl=yes,
+ [AC_MSG_ERROR([You don't have curl properly installed. Install it or try --without-curl.])]
+ )
+-# LDFLAGS=$save_LDFLAGS
++# LIBS=$saveLIBS
+ AC_DEFINE(WITH_CURL,1,[use curl])
+ compoptionstring="${compoptionstring}WITH_CURL\\n"],
+ 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-0.13.1-equ-matching.patch b/app-forensics/aide/files/aide-0.13.1-equ-matching.patch
new file mode 100644
index 000000000000..e5d02a5ea7d5
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.13.1-equ-matching.patch
@@ -0,0 +1,83 @@
+--- src/gen_list.c.orig 2007-12-19 15:37:13.000000000 -0800
++++ src/gen_list.c 2007-12-19 16:19:43.000000000 -0800
+@@ -732,33 +732,6 @@
+ return retval;
+ }
+
+-//this is used to check if $text if equal to a node in $rxrlist
+-//should be used to check equ_rx_lst only
+-int check_list_for_equal(list* rxrlist,char* text,DB_ATTR_TYPE* attr)
+-{
+- list* r=NULL;
+- int retval=1;
+- char *temp;
+-
+- for(r=rxrlist;r;r=r->next){
+- temp=((rx_rule*)r->data)->rx;
+-
+- //FIXME, if rx not begin with ^, may need to do something else
+- if(temp[0]=='^') //^ is for reg exp, we can ignore this character
+- temp++;
+-
+- //we don't need to worry about buff-overflow, so strcmp is safe
+- if((retval=strcmp(temp, text))==0){
+- *attr=((rx_rule*)r->data)->attr;
+- error(231,"\"%s\" matches string from line #%ld: %s\n",text,((rx_rule*)r->data)->conf_lineno,((rx_rule*)r->data)->rx);
+- break;
+- } else {
+- error(231,"\"%s\" doesn't match string from line #%ld: %s\n",text,((rx_rule*)r->data)->conf_lineno,((rx_rule*)r->data)->rx);
+- }
+- }
+- return retval;
+-}
+-
+ /*
+ * Function check_node_for_match()
+ * calls itself recursively to go to the top and then back down.
+@@ -783,35 +756,24 @@
+ return retval;
+ }
+
+- /* We need this to check whether this was the first one *
+- * to be called and not a recursive call */
+- if(!((retval&16)==16)){
+- retval|=16;
++ /* if this call is not recursive we check the equals list and we set top *
++ * and retval so we know following calls are recursive */
++ if(!(retval&16)){
+ top=1;
+- } else {
+- top=0;
+- }
+-
+- /* if no deeper match found */
+- if(!((retval&8)==8)&&!((retval&4)==4)){
++ retval|=16;
++
+ if(!check_list_for_match(node->equ_rx_lst,text,attr)){
+- /*
+- Zhi Wen Wong added this line to fix bug that equ not work for
+- compare
+- if we do "=/bin", we should only check /bin
+- so, /bin/bash or /bin/something should return 0 as neg
+- */
+- if(!check_list_for_equal(node->equ_rx_lst,text,attr))
+- retval|=(2|4);
+- };
+- };
++ retval|=2|4;
++ }
++ }
+ /* We'll use retval to pass information on whether to recurse
+ * the dir or not */
+
+
+- if(!((retval&8)==8)&&!((retval&4)==4)){
++ /* If 4 and 8 are not set, we will check for matches */
++ if(!(retval&(4|8))){
+ if(!check_list_for_match(node->sel_rx_lst,text,attr))
+- retval|=(1|8);
++ retval|=1|8;
+ }
+
+ /* Now let's check the ancestors */
diff --git a/app-forensics/aide/files/aide-0.13.1-gentoo.patch b/app-forensics/aide/files/aide-0.13.1-gentoo.patch
new file mode 100644
index 000000000000..9c1c07b5ce5f
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.13.1-gentoo.patch
@@ -0,0 +1,36 @@
+diff -Naur aide-0.13.1.orig/Makefile.am aide-0.13.1/Makefile.am
+--- aide-0.13.1.orig/Makefile.am 2006-10-11 03:39:01.000000000 +0900
++++ aide-0.13.1/Makefile.am 2007-09-27 01:35:39.000000000 +0900
+@@ -33,7 +33,7 @@
+ src/aide -c doc/aide.conf -V20
+
+ update-db: all
+- src/aide -B "database_out=file://$(top_srcdir)/doc/aide.db" -c doc/aide.conf -i
++ src/aide -B "database_out=file://$(abs_top_srcdir)/doc/aide.db" -c doc/aide.conf -i
+
+ dist-hook: configure
+ mkdir $(distdir)/include
+diff -Naur aide-0.13.1.orig/doc/aide.conf.in aide-0.13.1/doc/aide.conf.in
+--- aide-0.13.1.orig/doc/aide.conf.in 2006-11-25 04:53:56.000000000 +0900
++++ aide-0.13.1/doc/aide.conf.in 2007-09-27 01:35:39.000000000 +0900
+@@ -19,7 +19,7 @@
+ # corresponding line.
+ #
+
+-@@define TOPDIR @top_srcdir@
++@@define TOPDIR @abs_top_srcdir@
+
+ @@ifndef TOPDIR
+ @@define TOPDIR /
+diff -Naur aide-0.13.1.orig/src/Makefile.am aide-0.13.1/src/Makefile.am
+--- aide-0.13.1.orig/src/Makefile.am 2006-10-28 06:10:38.000000000 +0900
++++ aide-0.13.1/src/Makefile.am 2007-09-27 01:35:39.000000000 +0900
+@@ -20,6 +20,8 @@
+ # This is no longer needed
+ # SUBDIRS = crypt
+
++DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
++
+ bin_PROGRAMS = aide
+
+ aide_SOURCES = \
diff --git a/app-forensics/aide/files/aide-0.13.1-libgrypt_init.patch b/app-forensics/aide/files/aide-0.13.1-libgrypt_init.patch
new file mode 100644
index 000000000000..56b39693f4ff
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.13.1-libgrypt_init.patch
@@ -0,0 +1,49 @@
+diff -urp aide-0.13.1.orig/doc/aide.1 aide-0.13.1/doc/aide.1
+--- aide-0.13.1.orig/doc/aide.1 2009-04-14 15:46:20.000000000 -0700
++++ aide-0.13.1/doc/aide.1 2009-04-14 15:49:18.000000000 -0700
+@@ -67,6 +67,7 @@ conditions:
+ .IP "16 Unimplemented function error"
+ .IP "17 Invalid configureline error"
+ .IP "18 IO error"
++.IP "19 Version mismatch error"
+ .PP
+ .SH NOTES
+ Please note that due to mmap issues, aide cannot be terminated with
+diff -urp aide-0.13.1.orig/doc/aide.1.in aide-0.13.1/doc/aide.1.in
+--- aide-0.13.1.orig/doc/aide.1.in 2009-04-14 15:46:20.000000000 -0700
++++ aide-0.13.1/doc/aide.1.in 2009-04-14 15:49:56.000000000 -0700
+@@ -67,6 +67,7 @@ conditions:
+ .IP "16 Unimplemented function error"
+ .IP "17 Invalid configureline error"
+ .IP "18 IO error"
++.IP "19 Version mismatch error"
+ .PP
+ .SH NOTES
+ Please note that due to mmap issues, aide cannot be terminated with
+diff -urp aide-0.13.1.orig/include/report.h aide-0.13.1/include/report.h
+--- aide-0.13.1.orig/include/report.h 2009-04-14 15:46:20.000000000 -0700
++++ aide-0.13.1/include/report.h 2009-04-14 15:46:28.000000000 -0700
+@@ -31,6 +31,7 @@
+ #define UNIMPLEMENTED_FUNCTION_ERROR 16
+ #define INVALID_CONFIGURELINE_ERROR 17
+ #define IO_ERROR 18
++#define VERSION_MISMATCH_ERROR 19
+
+ /* Errorcodes */
+ #define HASH_ALGO_ERROR 30
+diff -urp aide-0.13.1.orig/src/md.c aide-0.13.1/src/md.c
+--- aide-0.13.1.orig/src/md.c 2009-04-14 15:46:20.000000000 -0700
++++ aide-0.13.1/src/md.c 2009-04-14 15:46:28.000000000 -0700
+@@ -201,6 +201,12 @@ int init_md(struct md_container* md) {
+ #endif
+ #ifdef WITH_GCRYPT
+ error(255,"Gcrypt library initialization\n");
++ if(!gcry_check_version(GCRYPT_VERSION)) {
++ error(0,"libgcrypt version mismatch\n");
++ exit(VERSION_MISMATCH_ERROR);
++ }
++ gcry_control(GCRYCTL_DISABLE_SECMEM, 0);
++ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
+ if(gcry_md_open(&md->mdh,0,0)!=GPG_ERR_NO_ERROR){
+ error(0,"gcrypt_md_open failed\n");
+ exit(IO_ERROR);
diff --git a/app-forensics/aide/files/aide-0.13.1-zlib.patch b/app-forensics/aide/files/aide-0.13.1-zlib.patch
new file mode 100644
index 000000000000..0ca5af25275d
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.13.1-zlib.patch
@@ -0,0 +1,12 @@
+diff -Naur aide-0.13.1.orig//src/be.c aide-0.13.1//src/be.c
+--- aide-0.13.1.orig//src/be.c 2006-12-15 01:09:24.000000000 +0900
++++ aide-0.13.1//src/be.c 2010-05-26 20:08:10.000000000 +0900
+@@ -161,7 +161,7 @@
+ #endif
+ #ifdef WITH_ZLIB
+ if(iszipped && !inout){
+- fh=gzdopen(fd,"wb9+");
++ fh=gzdopen(fd,"wb9");
+ if(fh==NULL){
+ error(0,_("Couldn't open file %s for %s"),u->value,
+ inout?"reading\n":"writing\n");
diff --git a/app-forensics/aide/files/aide-0.14-as-needed.patch b/app-forensics/aide/files/aide-0.14-as-needed.patch
new file mode 100644
index 000000000000..7a90b4e25079
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.14-as-needed.patch
@@ -0,0 +1,20 @@
+--- aide-0.14.orig/configure.in 2010-02-26 17:25:29.000000000 +0900
++++ aide-0.14/configure.in 2010-05-27 00:11:34.000000000 +0900
+@@ -42,7 +42,7 @@
+ AC_ARG_WITH(extra-libs,
+ AC_HELP_STRING([--with-extra-libs],
+ [Specify additional paths with -L to find libraries]),
+- [LDFLAGS="$LDFLAGS $withval"]
++ [LIBS="$LIBS $withval"]
+ )
+ AC_ARG_WITH(extra-link-libs,
+ AC_HELP_STRING([--with-extra-link-libs],
+@@ -671,7 +671,7 @@
+ AC_CHECK_HEADERS(curl/curl.h,,
+ [AC_MSG_ERROR([You don't have curl properly installed. Install it or try --without-curl.])])
+ CFLAGS="$CFLAGS $CURL_CFLAGS"
+- LDFLAGS="$LDFLAGS $CURL_LIBS"
++ LIBS="$LIBS $CURL_LIBS"
+ AC_CHECK_LIB(curl,curl_easy_init,havecurl=yes,
+ [AC_MSG_ERROR([You don't have curl properly installed. Install it or try --without-curl.])]
+ )
diff --git a/app-forensics/aide/files/aide-0.14-configure.patch b/app-forensics/aide/files/aide-0.14-configure.patch
new file mode 100644
index 000000000000..54afd8c4f4c6
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.14-configure.patch
@@ -0,0 +1,38 @@
+diff -Naur aide-0.14.orig/configure.in aide-0.14/configure.in
+--- aide-0.14.orig/configure.in 2010-02-26 17:25:29.000000000 +0900
++++ aide-0.14/configure.in 2010-06-09 14:24:43.000000000 +0900
+@@ -407,14 +407,14 @@
+ AC_ARG_WITH([zlib],
+ AC_HELP_STRING([--with-zlib],
+ [use zlib compression]),
+- ,
++ [with_zlib="$withval"],
+ [with_zlib=yes]
+ )
+
+ AC_ARG_WITH([curl],
+ AC_HELP_STRING([--with-curl],
+ [use curl for http,https and ftp backends]),
+- ,
++ [with_curl="$withval"],
+ [with_curl=no]
+ )
+
+@@ -422,7 +422,7 @@
+ AC_ARG_WITH([sun-acl],
+ [AC_HELP_STRING([--with-sun-acl],
+ [use ACL on solaris (no checking)])],
+- [],
++ [with_sun_acl="$withval"],
+ [with_sun_acl=no]
+ )
+
+@@ -440,7 +440,7 @@
+ AC_ARG_WITH([posix-acl],
+ [AC_HELP_STRING([--with-posix-acl],
+ [use POSIX ACLs (no checking)])],
+- [],
++ [with_posix_acl_support="$withval"],
+ [with_posix_acl_support=no]
+ )
+
diff --git a/app-forensics/aide/files/aide-0.14-gentoo.patch b/app-forensics/aide/files/aide-0.14-gentoo.patch
new file mode 100644
index 000000000000..f2c8156ed161
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.14-gentoo.patch
@@ -0,0 +1,26 @@
+diff -Naur aide-0.14.orig//src/Makefile.am aide-0.14//src/Makefile.am
+--- aide-0.14.orig//src/Makefile.am 2010-02-20 04:23:08.000000000 +0900
++++ aide-0.14//src/Makefile.am 2010-05-26 23:56:47.000000000 +0900
+@@ -26,7 +26,7 @@
+ LEX_OUTPUT_ROOT = lex.yy
+
+ LDADD = -lm @CRYPTLIB@ @ACLLIB@ @SELINUXLIB@ @AUDITLIB@ @ATTRLIB@ @ELFLIB@
+-AM_CFLAGS = @AIDE_DEFS@ -W -Wall -g
++AM_CFLAGS = -DLOCALEDIR=\"$(localedir)\" @AIDE_DEFS@ -W -Wall -g
+
+ CLEANFILES = conf_yacc.h conf_yacc.c conf_lex.c db_lex.c *~
+
+diff -Naur aide-0.14.orig//src/db.c aide-0.14//src/db.c
+--- aide-0.14.orig//src/db.c 2010-02-18 05:06:57.000000000 +0900
++++ aide-0.14//src/db.c 2010-05-27 00:16:07.000000000 +0900
+@@ -26,6 +26,10 @@
+ #include "db_file.h"
+ #include "db_disk.h"
+
++#ifdef WITH_CURL
++#include "fopen.h"
++#endif
++
+ #ifdef WITH_PSQL
+ #include "db_sql.h"
+ #endif
diff --git a/app-forensics/aide/files/aide-0.15.1-gentoo.patch b/app-forensics/aide/files/aide-0.15.1-gentoo.patch
new file mode 100644
index 000000000000..01c06f72387e
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.15.1-gentoo.patch
@@ -0,0 +1,26 @@
+diff -Naur aide-0.15.1.orig//src/Makefile.am aide-0.15.1//src/Makefile.am
+--- aide-0.15.1.orig//src/Makefile.am 2010-08-02 03:23:44.000000000 +0900
++++ aide-0.15.1//src/Makefile.am 2010-10-28 01:22:49.897871135 +0900
+@@ -26,7 +26,7 @@
+ LEX_OUTPUT_ROOT = lex.yy
+
+ LDADD = -lm @CRYPTLIB@ @ACLLIB@ @SELINUXLIB@ @AUDITLIB@ @ATTRLIB@ @E2FSATTRSLIB@ @ELFLIB@
+-AM_CFLAGS = @AIDE_DEFS@ -W -Wall -g
++AM_CFLAGS = -DLOCALEDIR=\"$(localedir)\" @AIDE_DEFS@ -W -Wall -g
+
+ CLEANFILES = conf_yacc.h conf_yacc.c conf_lex.c db_lex.c *~
+
+diff -Naur aide-0.15.1.orig//src/db.c aide-0.15.1//src/db.c
+--- aide-0.15.1.orig//src/db.c 2010-08-09 02:39:31.000000000 +0900
++++ aide-0.15.1//src/db.c 2010-10-28 01:22:12.930091842 +0900
+@@ -27,6 +27,10 @@
+ #include "db_file.h"
+ #include "db_disk.h"
+
++#ifdef WITH_CURL
++#include "fopen.h"
++#endif
++
+ #ifdef WITH_PSQL
+ #include "db_sql.h"
+ #endif
diff --git a/app-forensics/aide/files/aide.conf b/app-forensics/aide/files/aide.conf
new file mode 100644
index 000000000000..cef1813db9f8
--- /dev/null
+++ b/app-forensics/aide/files/aide.conf
@@ -0,0 +1,115 @@
+# AIDE conf
+
+database=file:/var/lib/aide/aide.db
+database_out=file:/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
+
+# 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
+
+# Defines formerly set here have been moved to /etc/default/aide.
+
+# 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/ksymoops
+/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/aide
+/var/log Logs
+# Devices
+!/dev/pts
+# If you get spurious warnings about being unable to mmap() /dev/cpu/mtrr,
+# you may uncomment this to get rid of them. They're harmless but sometimes
+# annoying.
+#!/dev/cpu/mtrr
+#!/dev/xconsole
+/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 u+g+s+m+md5+sha1
+
+# 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
diff --git a/app-forensics/aide/files/aide.cron b/app-forensics/aide/files/aide.cron
new file mode 100755
index 000000000000..c28b78f8e9db
--- /dev/null
+++ b/app-forensics/aide/files/aide.cron
@@ -0,0 +1,192 @@
+#!/bin/bash
+# Modified: Benjamin Smee
+# Date: Fri Sep 10 11:35:41 BST 2004
+
+# This is the email address reports get mailed to
+MAILTO=root@localhost
+
+# Set this to suppress mailings when there's nothing to report
+QUIETREPORTS=1
+
+# This parameter defines which aide command to run from the cron script.
+# Sensible values are "update" and "check".
+# Default is "check", ensuring backwards compatibility.
+# Since "update" does not take any longer, it is recommended to use "update",
+# so that a new database is created every day. The new database needs to be
+# manually copied over the current one, though.
+COMMAND=update
+
+# This parameter defines how many lines to return per e-mail. Output longer
+# than this value will be truncated in the e-mail sent out.
+LINES=1000
+
+# This parameter gives a grep regular expression. If given, all output lines
+# that _don't_ match the regexp are listed first in the script's output. This
+# allows to easily remove noise from the aide report.
+NOISE="(/var/cache/|/var/lib/|/var/tmp)"
+PATH="/bin:/usr/bin:/sbin:/usr/sbin"
+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
+
+DATABASE=`grep "^database=file:/" $CONFFILE | head -n 1 | cut --delimiter=: --fields=2`
+FQDN=`hostname -f`
+DATE=`date +"at %Y-%m-%d %H:%M"`
+
+# default values
+
+DATABASE="${DATABASE:-/var/lib/aide/aide.db}"
+
+AIDEARGS="-V4"
+
+if [ ! -f $DATABASE ]; then
+ /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
+
+# Removed so no deps on debianutils - strerror
+#[ -f "$LOGDIR/$LOGFILE" ] && savelog -j -t -g adm -m 640 -u root -c 7 "$LOGDIR/$LOGFILE" > /dev/null
+#[ -f "$LOGDIR/$ERRORLOG" ] && savelog -j -t -g adm -m 640 -u root -c 7 "$LOGDIR/$ERRORLOG" > /dev/null
+
+aide $AIDEARGS --$COMMAND >"$LOGDIR/$LOGFILE" 2>"$ERRORTMP"
+RETVAL=$?
+
+if [ -n "$QUIETREPORTS" ] && [ $QUIETREPORTS -a \! -s $LOGDIR/$LOGFILE -a \! -s $ERRORTMP ]; then
+ # Bail now because there was no output and QUIETREPORTS is set
+ exit 0
+fi
+
+MAILTMP=`tempfile --directory "/tmp" --prefix "$MAILLOG"`
+
+(cat << EOF
+This is an automated report generated by the Advanced Intrusion Detection
+Environment on $FQDN ${DATE}.
+
+EOF
+
+# include error log in daily report e-mail
+
+if [ "$RETVAL" != "0" ]; then
+ cat > "$LOGDIR/$ERRORLOG" << EOF
+
+*****************************************************************************
+* aide returned a non-zero exit value *
+*****************************************************************************
+
+EOF
+ echo "exit value is: $RETVAL" >> "$LOGDIR/$ERRORLOG"
+else
+ touch "$LOGDIR/$ERRORLOG"
+fi
+< "$ERRORTMP" cat >> "$LOGDIR/$ERRORLOG"
+rm -f "$ERRORTMP"
+
+if [ -s "$LOGDIR/$ERRORLOG" ]; then
+ errorlines=`wc -l "$LOGDIR/$ERRORLOG" | awk '{ print $1 }'`
+ if [ ${errorlines:=0} -gt $LINES ]; then
+ cat << EOF
+
+****************************************************************************
+* aide has returned many errors. *
+* the error log output has been truncated in this mail *
+****************************************************************************
+
+EOF
+ echo "Error output is $errorlines lines, truncated to $LINES."
+ head -$LINES "$LOGDIR/$ERRORLOG"
+ echo "The full output can be found in $LOGDIR/$ERRORLOG."
+ else
+ echo "Errors produced ($errorlines lines):"
+ cat "$LOGDIR/$ERRORLOG"
+ fi
+else
+ echo "AIDE produced no errors."
+fi
+
+# include de-noised log
+
+if [ -n "$NOISE" ]; then
+ NOISETMP=`tempfile --directory "/tmp" --prefix "aidenoise"`
+ NOISETMP2=`tempfile --directory "/tmp" --prefix "aidenoise"`
+ sed -n '1,/^Detailed information about changes:/p' "$LOGDIR/$LOGFILE" | \
+ grep '^\(changed\|removed\|added\):' | \
+ grep -v "^added: THERE WERE ALSO [0-9]\+ FILES ADDED UNDER THIS DIRECTORY" > $NOISETMP2
+
+ if [ -n "$NOISE" ]; then
+ < $NOISETMP2 grep -v "^\(changed\|removed\|added\):$NOISE" > $NOISETMP
+ rm -f $NOISETMP2
+ echo "De-Noised output removes everything matching $NOISE."
+ else
+ mv $NOISETMP2 $NOISETMP
+ echo "No noise expression was given."
+ fi
+
+ if [ -s "$NOISETMP" ]; then
+ loglines=`< $NOISETMP wc -l | awk '{ print $1 }'`
+ if [ ${loglines:=0} -gt $LINES ]; then
+ cat << EOF
+
+****************************************************************************
+* aide has returned long output which has been truncated in this mail *
+****************************************************************************
+
+EOF
+ echo "De-Noised output is $loglines lines, truncated to $LINES."
+ < $NOISETMP head -$LINES
+ echo "The full output can be found in $LOGDIR/$LOGFILE."
+ else
+ echo "De-Noised output of the daily AIDE run ($loglines lines):"
+ cat $NOISETMP
+ fi
+ else
+ echo "AIDE detected no changes after removing noise."
+ fi
+ rm -f $NOISETMP
+ echo "============================================================================"
+fi
+
+# include non-de-noised log
+
+if [ -s "$LOGDIR/$LOGFILE" ]; then
+ loglines=`wc -l "$LOGDIR/$LOGFILE" | awk '{ print $1 }'`
+ if [ ${loglines:=0} -gt $LINES ]; then
+ cat << EOF
+
+****************************************************************************
+* aide has returned long output which has been truncated in this mail *
+****************************************************************************
+
+EOF
+ echo "Output is $loglines lines, truncated to $LINES."
+ head -$LINES "$LOGDIR/$LOGFILE"
+ echo "The full output can be found in $LOGDIR/$LOGFILE."
+ else
+ echo "Output of the daily AIDE run ($loglines lines):"
+ cat "$LOGDIR/$LOGFILE"
+ fi
+else
+ echo "AIDE detected no changes."
+fi
+) > ${MAILTMP}
+
+(
+cat <<EOF
+Subject: Daily AIDE report for $FQDN
+From: root@${FQDN}
+To: ${MAILTO}
+EOF
+cat ${MAILTMP}
+) | /usr/sbin/sendmail $MAILTO
+
+rm -f "$MAILTMP"
diff --git a/app-forensics/aide/files/aideinit b/app-forensics/aide/files/aideinit
new file mode 100755
index 000000000000..6a3c60c37837
--- /dev/null
+++ b/app-forensics/aide/files/aideinit
@@ -0,0 +1,145 @@
+#!/bin/sh
+# Copyright 2003 Mike Markley <mike@markley.org>
+# This script is free for any purpose whatseoever so long as the above
+# copyright notice remains in place.
+#
+# Modified for Gentoo: Benjamin Smee
+# Date: Fri Sep 10 11:36:04 BST 2004
+
+# This is the email address reports get mailed to
+MAILTO=root@localhost
+
+# Defaults
+#MAILTO="${MAILTO:-root}"
+
+# Options
+opt_f=0
+opt_y=0
+opt_c=0
+opt_b=0
+config="/etc/aide/aide.conf"
+
+aideinit_usage() {
+ echo "Usage: $0 [options] -- [aide options]"
+ echo " -y|--yes Overwrite output file"
+ echo " -f|--force Force overwrite of database"
+ echo " -c|--config Specify alternate config file"
+ echo " -o|--output Specify alternate output file"
+ echo " -d|--database Specify alternate database file"
+ echo " -b|--background Run in the background"
+}
+
+while [ -n "$1" ]; do
+ case "$1" in
+ -h|--help)
+ aideinit_usage
+ exit 0
+ ;;
+ -f|--force)
+ opt_f=1
+ shift
+ ;;
+ -y|--yes)
+ opt_y=1
+ shift
+ ;;
+ -b|--background)
+ opt_b=1
+ shift
+ ;;
+ -o|--output)
+ shift
+ [ -z "$1" ] && aideinit_usage && exit 1
+ outfile=$1
+ shift
+ ;;
+ -d|--database)
+ shift
+ [ -z "$1" ] && aideinit_usage && exit 1
+ dbfile=$1
+ shift
+ ;;
+ -c|--config)
+ opt_c=1
+ shift
+ [ -z "$1" ] && aideinit_usage && exit 1
+ config=$1
+ shift
+ ;;
+ --)
+ shift
+ break 2
+ ;;
+ *)
+ echo "Unknown option $1 (use -- to delimit aideinit and aide options)"
+ exit
+ ;;
+ esac
+done
+
+if [ ! -f "$config" ]; then
+ echo "$0: $config: file not found"
+ exit 1
+fi
+
+if [ -z "$outfile" ]; then
+ outfile=`egrep "database_out=file:" $config | cut -d: -f2`
+ [ -z "$outfile" ] && outfile="/var/lib/aide/aide.db.new"
+fi
+if [ -z "$dbfile" ]; then
+ dbfile=`egrep "database=file:" $config | cut -d: -f2`
+ [ -z "$dbfile" ] && dbfile="/var/lib/aide/aide.db"
+fi
+
+if [ -f $outfile ]; then
+ if [ $opt_y -eq 0 ]; then
+ echo -n "Overwrite existing $outfile [Yn]? "
+ read yn
+ case "$yn" in
+ [Nn]*)
+ exit 0
+ ;;
+ esac
+ fi
+fi
+
+extraflags=""
+
+if [ $opt_c -eq 1 ]; then
+ extraflags="$extraflags --config $config"
+fi
+
+if [ $opt_b -eq 1 ]; then
+ (aide --init $extraflags $@ >/var/log/aide/aideinit.log 2>/var/log/aide/aideinit.errors
+ if [ -f "$dbfile" -a $opt_f -eq 0 ]; then
+ echo "$dbfile exists and -f was not specified" >> /var/log/aide/aideinit.errors
+ fi
+ lines=`wc -l /var/log/aide/aideinit.errors | awk '{ print $1 }'`
+ if [ "$lines" -gt 0 ]; then
+ (echo "AIDE init errors:"; cat /var/log/aide/aideinit.errors) | /bin/mail -s "AIDE initialization problem" $MAILTO
+ else
+ cp -f $outfile $dbfile
+ fi) &
+ exit 0
+fi
+
+echo "Running aide --init..."
+aide --init $extraflags $@
+
+return=$?
+if [ $return -ne 0 ]; then
+ echo "Something didn't quite go right; see $outfile for details" >&2
+ exit $return
+fi
+
+if [ -f "$dbfile" -a $opt_f -eq 0 ]; then
+ echo -n "Overwrite $dbfile [yN]? "
+ read yn
+ case "$yn" in
+ [yY]*)
+ cp -f $outfile $dbfile
+ ;;
+ esac
+else
+ cp -f $outfile $dbfile
+fi
diff --git a/app-forensics/aide/metadata.xml b/app-forensics/aide/metadata.xml
new file mode 100644
index 000000000000..5771cd3beb4d
--- /dev/null
+++ b/app-forensics/aide/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>forensics</herd>
+ <use>
+ <flag name="audit">Enable support for <pkg>sys-process/audit</pkg></flag>
+ <flag name="prelink">Enable support for <pkg>sys-devel/prelink</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">aide</remote-id>
+ </upstream>
+</pkgmetadata>