From 7d395e30e9536dee74451322d0f6daf6635e54af Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 11 Mar 2022 12:13:27 +0000 Subject: app-forensics/aide: restore automagic ACL patch Still needed for 0.17.x, just not master. Signed-off-by: Sam James --- app-forensics/aide/aide-0.17.4-r1.ebuild | 104 +++++++++++++++++++++ app-forensics/aide/aide-0.17.4.ebuild | 103 -------------------- .../files/aide-0.16-fix-acl-configure-option.patch | 2 + app-forensics/aide/files/aide-0.17.4-bashism.patch | 2 + 4 files changed, 108 insertions(+), 103 deletions(-) create mode 100644 app-forensics/aide/aide-0.17.4-r1.ebuild delete mode 100644 app-forensics/aide/aide-0.17.4.ebuild diff --git a/app-forensics/aide/aide-0.17.4-r1.ebuild b/app-forensics/aide/aide-0.17.4-r1.ebuild new file mode 100644 index 000000000000..6b3fb2f5f72d --- /dev/null +++ b/app-forensics/aide/aide-0.17.4-r1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools readme.gentoo-r1 + +DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a file integrity checker" +HOMEPAGE="https://aide.github.io/ https://github.com/aide/aide" +SRC_URI="https://github.com/aide/aide/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="acl audit curl e2fs mhash selinux xattr zlib" + +DEPEND="dev-libs/libpcre + acl? ( virtual/acl ) + audit? ( sys-process/audit ) + curl? ( net-misc/curl ) + e2fs? ( sys-fs/e2fsprogs ) + !mhash? ( + dev-libs/libgcrypt:0= + dev-libs/libgpg-error + ) + mhash? ( app-crypt/mhash ) + selinux? ( sys-libs/libselinux ) + xattr? ( sys-apps/attr ) + zlib? ( sys-libs/zlib )" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-aide )" +BDEPEND="sys-devel/bison + sys-devel/flex + virtual/pkgconfig" + +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}"/${PN}-0.16-fix-acl-configure-option.patch + "${FILESDIR}"/${PN}-0.17.4-bashism.patch +) + +src_prepare() { + default + + sed -i -e 's| -Werror||g' configure.ac || die + + # Only needed for snapshots. + if [[ ${PV} == *_p* ]] ; then + echo "m4_define([AIDE_VERSION], [${PV}])" > version.m4 || die + fi + + # Can be dropped once Bashism patch is gone + eautoreconf +} + +src_configure() { + local myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/${PN} + + # Disable broken l10n support: https://sourceforge.net/p/aide/bugs/98/ + # This doesn't affect anything because there are no localizations yet. + --without-locale + + --without-prelink + $(use_with zlib) + $(use_with curl) + $(use_with acl posix-acl) + $(use_with selinux) + $(use_with xattr) + $(use_with e2fs e2fsattrs) + $(use_with mhash mhash) + $(use_with !mhash gcrypt) + $(use_with audit) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + readme.gentoo_create_doc + + insinto /etc/${PN} + insopts -m0600 + newins "${FILESDIR}"/aide.conf-r1 aide.conf + + dosbin "${FILESDIR}"/aideinit + dodoc -r contrib/ "${FILESDIR}"/aide.cron + + keepdir /var/{lib,log}/${PN} +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/app-forensics/aide/aide-0.17.4.ebuild b/app-forensics/aide/aide-0.17.4.ebuild deleted file mode 100644 index 7666d39604f9..000000000000 --- a/app-forensics/aide/aide-0.17.4.ebuild +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools readme.gentoo-r1 - -DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a file integrity checker" -HOMEPAGE="https://aide.github.io/ https://github.com/aide/aide" -SRC_URI="https://github.com/aide/aide/releases/download/v${PV}/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="acl audit curl e2fs mhash selinux xattr zlib" - -DEPEND="dev-libs/libpcre - acl? ( virtual/acl ) - audit? ( sys-process/audit ) - curl? ( net-misc/curl ) - e2fs? ( sys-fs/e2fsprogs ) - !mhash? ( - dev-libs/libgcrypt:0= - dev-libs/libgpg-error - ) - mhash? ( app-crypt/mhash ) - selinux? ( sys-libs/libselinux ) - xattr? ( sys-apps/attr ) - zlib? ( sys-libs/zlib )" -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-aide )" -BDEPEND="sys-devel/bison - sys-devel/flex - virtual/pkgconfig" - -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}"/aide-0.17.4-bashism.patch -) - -src_prepare() { - default - - sed -i -e 's| -Werror||g' configure.ac || die - - # Only needed for snapshots. - if [[ ${PV} == *_p* ]] ; then - echo "m4_define([AIDE_VERSION], [${PV}])" > version.m4 || die - fi - - # Can be dropped once Bashism patch is gone - eautoreconf -} - -src_configure() { - local myeconfargs=( - --sysconfdir="${EPREFIX}"/etc/${PN} - - # Disable broken l10n support: https://sourceforge.net/p/aide/bugs/98/ - # This doesn't affect anything because there are no localizations yet. - --without-locale - - --without-prelink - $(use_with zlib) - $(use_with curl) - $(use_with acl posix-acl) - $(use_with selinux) - $(use_with xattr) - $(use_with e2fs e2fsattrs) - $(use_with mhash mhash) - $(use_with !mhash gcrypt) - $(use_with audit) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - default - - readme.gentoo_create_doc - - insinto /etc/${PN} - insopts -m0600 - newins "${FILESDIR}"/aide.conf-r1 aide.conf - - dosbin "${FILESDIR}"/aideinit - dodoc -r contrib/ "${FILESDIR}"/aide.cron - - keepdir /var/{lib,log}/${PN} -} - -pkg_postinst() { - readme.gentoo_print_elog -} diff --git a/app-forensics/aide/files/aide-0.16-fix-acl-configure-option.patch b/app-forensics/aide/files/aide-0.16-fix-acl-configure-option.patch index a989e379039c..b860b39d73ee 100644 --- a/app-forensics/aide/files/aide-0.16-fix-acl-configure-option.patch +++ b/app-forensics/aide/files/aide-0.16-fix-acl-configure-option.patch @@ -1,3 +1,5 @@ +Fixes upstream in master but not 0.17.x. + commit 3d9746bccbb50809e4c3de90ab5145a17af39aeb Author: Ilya Tumaykin Date: Thu May 25 14:38:02 2017 +0300 diff --git a/app-forensics/aide/files/aide-0.17.4-bashism.patch b/app-forensics/aide/files/aide-0.17.4-bashism.patch index 050d218cf1ba..e25463dbf772 100644 --- a/app-forensics/aide/files/aide-0.17.4-bashism.patch +++ b/app-forensics/aide/files/aide-0.17.4-bashism.patch @@ -1,6 +1,8 @@ Fixed upstream, so backport to 0.17.4 of https://github.com/aide/aide/commit/5161886c49060228811eee6da319844ef62dff6d https://github.com/aide/aide/commit/007eb4f32e8874ce457b4f15d9789c2a9d61731b + +Fixed in master but not 0.17.x. --- a/configure.ac +++ b/configure.ac @@ -329,7 +329,7 @@ fi -- cgit v1.2.3-65-gdbad