From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 705161382C5 for ; Wed, 14 Mar 2018 11:12:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 77F82E0894; Wed, 14 Mar 2018 11:12:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 43EABE0894 for ; Wed, 14 Mar 2018 11:12:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C8260335C73 for ; Wed, 14 Mar 2018 11:12:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5B4F01EF for ; Wed, 14 Mar 2018 11:12:28 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1521025931.0c475008c36af250a2b7ae7bcd24db0ed6b1f185.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/aide/, app-forensics/aide/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-forensics/aide/aide-0.16-r1.ebuild app-forensics/aide/files/aide-0.16-support-attr-2.4.48.patch X-VCS-Directories: app-forensics/aide/ app-forensics/aide/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 0c475008c36af250a2b7ae7bcd24db0ed6b1f185 X-VCS-Branch: master Date: Wed, 14 Mar 2018 11:12:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a9e0cf81-9328-4d96-a06a-b1de431a7123 X-Archives-Hash: 70e9d3995168c6918ff3b699325b6915 commit: 0c475008c36af250a2b7ae7bcd24db0ed6b1f185 Author: Ilya Tumaykin gmail com> AuthorDate: Sun Mar 4 15:36:14 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Mar 14 11:12:11 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c475008 app-forensics/aide: fix build with >=sys-apps/attr-2.4.48 Closes: https://bugs.gentoo.org/648966 Closes: https://github.com/gentoo/gentoo/pull/7356 Package-Manager: Portage-2.3.24, Repoman-2.3.6 app-forensics/aide/aide-0.16-r1.ebuild | 142 +++++++++++++++++++++ .../aide/files/aide-0.16-support-attr-2.4.48.patch | 28 ++++ 2 files changed, 170 insertions(+) diff --git a/app-forensics/aide/aide-0.16-r1.ebuild b/app-forensics/aide/aide-0.16-r1.ebuild new file mode 100644 index 00000000000..a263403776c --- /dev/null +++ b/app-forensics/aide/aide-0.16-r1.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools readme.gentoo-r1 + +DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a file integrity checker" +HOMEPAGE="http://aide.sourceforge.net/" +SRC_URI="mirror://sourceforge/aide/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="acl audit curl e2fs mhash postgres prelink selinux static xattr zlib" + +COMMON_DEPEND=" + !mhash? ( + dev-libs/libgcrypt:0= + dev-libs/libgpg-error + ) + mhash? ( app-crypt/mhash ) + dev-libs/libpcre + acl? ( virtual/acl ) + audit? ( sys-process/audit ) + curl? ( net-misc/curl ) + e2fs? ( sys-fs/e2fsprogs ) + postgres? ( dev-db/postgresql:= ) + prelink? ( dev-libs/elfutils ) + selinux? ( sys-libs/libselinux ) + xattr? ( sys-apps/attr ) + zlib? ( sys-libs/zlib ) +" +RDEPEND=" + !static? ( ${COMMON_DEPEND} ) + prelink? ( sys-devel/prelink ) + selinux? ( sec-policy/selinux-aide ) +" +DEPEND="${COMMON_DEPEND} + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + static? ( + !mhash? ( + dev-libs/libgcrypt:0[static-libs] + dev-libs/libgpg-error[static-libs] + ) + mhash? ( app-crypt/mhash[static-libs] ) + dev-libs/libpcre[static-libs] + acl? ( virtual/acl[static-libs] ) + e2fs? ( sys-fs/e2fsprogs[static-libs] ) + prelink? ( dev-libs/elfutils[static-libs] ) + selinux? ( sys-libs/libselinux[static-libs] ) + xattr? ( sys-apps/attr[static-libs] ) + zlib? ( sys-libs/zlib[static-libs] ) + ) +" + +REQUIRED_USE=" + postgres? ( !mhash ) + static? ( !audit !curl !postgres ) +" + +HTML_DOCS=( doc/manual.html ) + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS=" +Example configuration file was installed at '${EPREFIX}/etc/aide/aide.conf'. +Please edit it to meet your needs. Refer to aide.conf(5) manual page +for more information. + +A helper script, aideinit, was installed and can be used to make AIDE +management easier. Please run 'aideinit --help' for more information. +" + +PATCHES=( + "${FILESDIR}/${P}-add-missing-include.patch" + "${FILESDIR}/${P}-fix-LIBS-LDFLAGS-mixing.patch" + "${FILESDIR}/${P}-fix-acl-configure-option.patch" + "${FILESDIR}/${P}-support-attr-2.4.48.patch" +) + +src_prepare() { + default_src_prepare + sed -i -e 's| -Werror||g' configure.ac || die + eautoreconf +} + +src_configure() { + local myeconfargs=( + --sysconfdir="${EPREFIX}/etc/${PN}" + --with-confighmactype="sha512" # Override default weak MD5 hash. + --with-dbhmackey="sha512" # Override default weak MD5 hash. + # Disable broken l10n support: https://sourceforge.net/p/aide/bugs/98/ + # This doesn't affect anything because there are no localizations yet. + --without-locale + $(use_enable static) + $(use_with zlib) + $(use_with curl) + $(use_with acl posix-acl) + $(use_with selinux) + $(use_with prelink prelink "${EPREFIX}/usr/sbin/prelink") + $(use_with xattr) + $(use_with e2fs e2fsattrs) + $(use_with mhash mhash) + $(use_with !mhash gcrypt) + $(use_with postgres psql) + $(use_with audit) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default_src_install + readme.gentoo_create_doc + + insinto /etc/${PN} + doins "${FILESDIR}"/aide.conf + + dosbin "${FILESDIR}"/aideinit + dodoc "${FILESDIR}"/aide.cron + + keepdir /var/{lib,log}/${PN} +} + +pkg_postinst() { + readme.gentoo_print_elog + + if use postgres; then + elog + 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 "in your aide.conf." + elog + fi +} diff --git a/app-forensics/aide/files/aide-0.16-support-attr-2.4.48.patch b/app-forensics/aide/files/aide-0.16-support-attr-2.4.48.patch new file mode 100644 index 00000000000..8acb6e5b56b --- /dev/null +++ b/app-forensics/aide/files/aide-0.16-support-attr-2.4.48.patch @@ -0,0 +1,28 @@ +Fix build against attr >= 2.4.48 + +Drop obsolete attr/xattr.h include as did attr upstream in attr-2.4.48. +See http://git.savannah.nongnu.org/cgit/attr.git/commit/?id=7921157890d07858d092f4003ca4c6bae9fd2c38 + +ENOATTR definition was moved to attr/attributes.h, thus include it. +attr < 2.4.48 keeps ENOATTR definition in attr/xattr.h, so define it +manually if necessary in order to preserve backwards compatibility. + +Bug: https://bugs.gentoo.org/648966 +Upstream-bug: https://sourceforge.net/p/aide/patches/23/ + +diff --git a/include/db_config.h b/include/db_config.h +index e92fe1c..7e5ff0d 100644 +--- a/include/db_config.h ++++ b/include/db_config.h +@@ -62,7 +62,10 @@ typedef struct acl_type { + + #ifdef WITH_XATTR /* Do generic user Xattrs. */ + #include +-#include ++#include ++#ifndef ENOATTR ++# define ENOATTR ENODATA ++#endif + #endif + + typedef struct xattr_node