* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/, sys-process/audit/files/
@ 2017-01-15 11:20 Pacho Ramos
0 siblings, 0 replies; 7+ messages in thread
From: Pacho Ramos @ 2017-01-15 11:20 UTC (permalink / raw
To: gentoo-commits
commit: 77aca0ef3f94bb4dd7ca1ef81671a1cfef148581
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 15 11:11:00 2017 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Jan 15 11:20:22 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77aca0ef
sys-process/audit: Drop old
Package-Manager: Portage-2.3.3, Repoman-2.3.1
sys-process/audit/Manifest | 7 -
sys-process/audit/audit-1.7.18.ebuild | 132 ------------
sys-process/audit/audit-2.0.5.ebuild | 177 ----------------
sys-process/audit/audit-2.1.3-r1.ebuild | 189 -----------------
sys-process/audit/audit-2.2.2-r2.ebuild | 195 ------------------
sys-process/audit/audit-2.2.2-r3.ebuild | 195 ------------------
sys-process/audit/audit-2.4.1-r1.ebuild | 187 -----------------
sys-process/audit/audit-2.4.1.ebuild | 187 -----------------
sys-process/audit/audit-2.4.3-r1.ebuild | 225 ---------------------
sys-process/audit/audit-2.4.3.ebuild | 221 --------------------
sys-process/audit/audit-2.4.4.ebuild | 225 ---------------------
sys-process/audit/files/audit-1.7.17-python.patch | 12 --
.../audit/files/audit-1.7.18-as-needed.patch | 30 ---
| 13 --
sys-process/audit/files/audit-2.0.5-python.patch | 22 --
sys-process/audit/files/audit-2.1.3-python.patch | 24 ---
sys-process/audit/files/audit-2.4.1-python.patch | 22 --
17 files changed, 2063 deletions(-)
diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
index 1f324b6..871369d 100644
--- a/sys-process/audit/Manifest
+++ b/sys-process/audit/Manifest
@@ -1,8 +1 @@
-DIST audit-1.7.18.tar.gz 1566698 SHA256 c3e9e7df9e0776c3f90acfde7432ed362ff3ae5c40488391789bc8262f97f17c SHA512 15d27602dcb8d5a0dac2eb299a96d4d34b36fd303c90bd1cee6d6151bc1c6b83f09e7437029bee54f4435afd1386be0a1351bde1fb705ac24749b9e31c75919f WHIRLPOOL fc38a5668fdd72c11269000f384abb1d783bbec36c20df9bd266a4dfccd0363d9616bff46c708882c3b66520d141f298346add3637ae1a5db5e646a7bd1db539
-DIST audit-2.0.5.tar.gz 810519 SHA256 1ef85e606a0fda21596577f5c205c0df7eb56d7cffbb84aeeeb72ce44e61a83b SHA512 5e5e7f6af79792aa4f8577b6a5975440167b19e35d555c7c60c51d0af20f6bfeafb78a89f8b546efe9b9c79296ee5872fa0056f34a61650c66f34ceedc8b15c4 WHIRLPOOL d5ec4d00555858f8d8e5d42400ce0775b9db1d7fc1efc995dbfb45fc59c34d2b0268879d2fd35b60af3b07498e166b2afc6dbbc23f5943a50e1da9898d7aeb4b
-DIST audit-2.1.3.tar.gz 833647 SHA256 1c61858d8ed299128aa6bd8e85bac758bfe33e61358d259e52acb7d961fee90e SHA512 0f5c02ee3eb35687e85cfea0cae2bc11c35d2de5c44347f8f3cde4d268aeef215547cfb4b577afffc737ce5944219f46b4594ac122479d8b2e185efe3cdb069b WHIRLPOOL c83ac2bf929f524c4bc34ffcd503db9687a2c8affe3b5bb0a908e40ba8e98beced6fee6f3212db7267cf11cef3dbd13915a1ee09334f2cf58a686a1acfff0946
-DIST audit-2.2.2.tar.gz 907066 SHA256 8bc2b45a5f08f5df6cebcd5543f24b7e68e28b64da4b23f08de2c6616384302b SHA512 98d83162e69816611dfac3d3ecc19235403ea5809d7a5cd9f13444c2085f03e46657802addb58ee31c251749f89417926ae40bcd99a77d64f062712830fde9bb WHIRLPOOL f127d3b9645d4e679a83767d688b83c7d59d4a35a166bc9f5038df89852768b695bc0c30e26fea0930aa29fed4583aa5218a42d5898d2a7c542e04cf58b9a9e9
-DIST audit-2.4.1.tar.gz 942147 SHA256 059346fa0e922faf4dcc054382b21f4845cd8c4942e82cfd0d4cd52bd2b03026 SHA512 4ca29ee2c784861f75f9e05f5c4dfc3d3ebb9d51e454e8a069ef4d08db3754fb19189714935351e70b26ed44347a266ae6c31e68361d5e9efd89f657f91dbd50 WHIRLPOOL 49ecfdd2363eb8bcf25d40b36bf228c8bd31611804b284dde004d42a250a39c387bd0abff223cf4041f62805d5bb189a19375f5806385344ca219d823d267f2e
-DIST audit-2.4.3.tar.gz 998974 SHA256 9c914704fecc602e143e37152f3efbab2469692684c1a8cc1b801c1b49c7abc6 SHA512 2bbaa11ed5e2d8138711df325ec1997c4eb955123699fd330b5272b7f3475ca61c9753e1c103abfc9c49e1fc8aaf52dbd55545e3f1874214979ddece64ad79aa WHIRLPOOL 1a0c0a273fddc49d15322a2423d4038488738d6597d0641182befab91646355bbee393a5d09d446dc4cf2f4579dd7ea99928cadd77bc72c355db0a10d4964da5
-DIST audit-2.4.4.tar.gz 1004024 SHA256 25f57f465f3230d7b1166b615ffd6748818a3dc225d0e8b396c5b2e951674e23 SHA512 752fa75fdf3406c0a61b57d05cf048e2b79c48589d881a231cb410c8b6031ec50c56b694c7f545c8d78000d4969933cb965016ef5b4a54a9391ad3ea6a55ee40 WHIRLPOOL 3656d6610409f5d2097b8d145c81cfb16104460d1eb14718315aa04d101cbac9952f6d168225bf768eb0b3786a1fdbe26798c0980d729a96c82891ca1720d0f2
DIST audit-2.6.4.tar.gz 1078677 SHA256 b5a79cecd9593c368c9e42d5af72fcd14f046676657e906970b6c4a1aa5d06c7 SHA512 69b5d3987d2b8b189d1242fde639af3d7d366e901733133e47ee71223caf73aa7da40b7811298f0af861969b0ab482c5ef9830b711bdd15bd5f4d0ebc88a1224 WHIRLPOOL bda2f7bb754620b003c9c7df2e29d169e0421a9f0a1cf11396539fc3cae1d3907dc4265c3941e24a30eb206032a894989e74b803f2c4a7558057b879c41b2642
diff --git a/sys-process/audit/audit-1.7.18.ebuild b/sys-process/audit/audit-1.7.18.ebuild
deleted file mode 100644
index aa3c304..00000000
--- a/sys-process/audit/audit-1.7.18.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="3"
-PYTHON_DEPEND="2"
-
-inherit autotools eutils multilib toolchain-funcs python eutils
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="ldap"
-# Testcases are pretty useless as they are built for RedHat users/groups and
-# kernels.
-RESTRICT="test"
-
-RDEPEND="ldap? ( net-nds/openldap )"
-DEPEND="${RDEPEND}
- dev-lang/swig
- >=sys-kernel/linux-headers-2.6.23"
-# Do not use os-headers as this is linux specific
-
-pkg_setup() {
- python_set_active_version 2
- python_pkg_setup
-}
-
-src_prepare() {
- # Old patch applies fine
- #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch
-
- # Applied by upstream
- #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch
-
- # Do not build GUI tools
- sed -i \
- -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
- "${S}"/configure.ac
- sed -i \
- -e 's,system-config-audit,,g' \
- -e '/^SUBDIRS/s,\\$,,g' \
- "${S}"/Makefile.am
- rm -rf "${S}"/system-config-audit
-
- # Probably goes away in 1.6.9
- #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch
-
- if ! use ldap; then
- sed -i \
- -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
- "${S}"/configure.ac
- sed -i \
- -e '/^SUBDIRS/s,zos-remote,,g' \
- "${S}"/audisp/plugins/Makefile.am
- fi
-
- # Don't build static version of Python module.
- epatch "${FILESDIR}"/${PN}-1.7.17-python.patch
- # bug #405887
- epatch "${FILESDIR}"/audit-1.7.18-as-needed.patch
- epatch "${FILESDIR}"/audit-1.7.18-missing_headers.patch
-
- # Regenerate autotooling
- eautoreconf
-
- # Disable byte-compilation of Python modules.
- echo "#!/bin/sh" > py-compile
-
- # Bug 352198: Avoid parallel build fail
- cd "${S}"/src/mt
- [[ ! -s private.h ]] && ln -s ../../lib/private.h .
-}
-
-src_configure() {
- #append-flags -D'__attribute__(x)='
- econf --sbindir=/sbin --without-prelude
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
- dodoc AUTHORS ChangeLog README* THANKS TODO
- docinto contrib
- dodoc contrib/*
- docinto contrib/plugin
- dodoc contrib/plugin/*
-
- newinitd "${FILESDIR}"/auditd-init.d-1.7.17 auditd
- newconfd "${FILESDIR}"/auditd-conf.d-1.2.3 auditd
-
- # things like shadow use this so we need to be in /
- dodir /$(get_libdir)
- mv "${D}"/usr/$(get_libdir)/lib*.so* "${D}"/$(get_libdir)/ || die
- gen_usr_ldscript libaudit.so libauparse.so
-
- # remove RedHat garbage
- rm -r "${D}"/etc/{rc.d,sysconfig} || die
-
- # Gentoo rules
- insinto /etc/audit/
- doins "${FILESDIR}"/audit.rules*
-
- # audit logs go here
- keepdir /var/log/audit/
-
- # Security
- lockdown_perms "${D}"
-
- # Don't install .la files in Python directories.
- python_clean_installation_image
-}
-
-pkg_postinst() {
- lockdown_perms "${ROOT}"
- python_mod_optimize audit.py
-}
-
-pkg_postrm() {
- python_mod_cleanup audit.py
-}
-
-lockdown_perms() {
- # upstream wants these to have restrictive perms
- basedir="$1"
- chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
- chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
- chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
-}
diff --git a/sys-process/audit/audit-2.0.5.ebuild b/sys-process/audit/audit-2.0.5.ebuild
deleted file mode 100644
index a7790c6..00000000
--- a/sys-process/audit/audit-2.0.5.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="3"
-PYTHON_DEPEND="2"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
-
-inherit autotools multilib toolchain-funcs python linux-info eutils
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="ldap prelude"
-# Testcases are pretty useless as they are built for RedHat users/groups and
-# kernels.
-RESTRICT="test"
-
-RDEPEND="ldap? ( net-nds/openldap )
- prelude? ( dev-libs/libprelude )
- sys-libs/libcap-ng"
-DEPEND="${RDEPEND}
- dev-lang/swig
- >=sys-kernel/linux-headers-2.6.34"
-# Do not use os-headers as this is linux specific
-
-CONFIG_CHECK="~AUDIT"
-
-pkg_setup() {
- linux-info_pkg_setup
- python_pkg_setup
- PYTHON_DIRS="bindings/python swig"
-}
-
-src_prepare() {
- # Old patch applies fine
- #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch
-
- # Applied by upstream
- #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch
-
- # Do not build GUI tools
- sed -i \
- -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
- "${S}"/configure.ac || die
- sed -i \
- -e 's,system-config-audit,,g' \
- -e '/^SUBDIRS/s,\\$,,g' \
- "${S}"/Makefile.am || die
- rm -rf "${S}"/system-config-audit
-
- # Probably goes away in 1.6.9
- #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch
-
- if ! use ldap; then
- sed -i \
- -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
- "${S}"/configure.ac || die
- sed -i \
- -e '/^SUBDIRS/s,zos-remote,,g' \
- "${S}"/audisp/plugins/Makefile.am || die
- fi
-
- # Don't build static version of Python module.
- epatch "${FILESDIR}"/${P}-python.patch
-
- # Python bindings are built/installed manually.
- sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am
- sed -e "/^SUBDIRS =/s/ swig//" -i Makefile.am
-
- # Regenerate autotooling
- eautoreconf
-
- # Disable byte-compilation of Python modules.
- echo "#!/bin/sh" > py-compile
-
- # Bug 352198: Avoid parallel build fail
- cd "${S}"/src/mt
- [[ ! -s private.h ]] && ln -s ../../lib/private.h .
-}
-
-src_configure() {
- #append-flags -D'__attribute__(x)='
- econf --sbindir=/sbin $(use_with prelude)
-}
-
-src_compile() {
- default
-
- python_copy_sources ${PYTHON_DIRS}
-
- building() {
- emake \
- PYTHON_VERSION="$(python_get_version)" \
- pyexecdir="$(python_get_sitedir)"
- }
- local dir
- for dir in ${PYTHON_DIRS}; do
- python_execute_function -s --source-dir ${dir} building
- done
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
-
- installation() {
- emake \
- DESTDIR="${D}" \
- PYTHON_VERSION="$(python_get_version)" \
- pyexecdir="$(python_get_sitedir)" \
- install
- }
- local dir
- for dir in ${PYTHON_DIRS}; do
- python_execute_function -s --source-dir ${dir} installation
- done
-
- dodoc AUTHORS ChangeLog README* THANKS TODO
- docinto contrib
- dodoc contrib/*
- docinto contrib/plugin
- dodoc contrib/plugin/*
-
- newinitd "${FILESDIR}"/auditd-init.d-1.7.17 auditd
- newconfd "${FILESDIR}"/auditd-conf.d-1.2.3 auditd
-
- # things like shadow use this so we need to be in /
- dodir /$(get_libdir)
- mv "${D}"/usr/$(get_libdir)/lib*.so* "${D}"/$(get_libdir)/ || die
- gen_usr_ldscript libaudit.so libauparse.so
-
- # remove RedHat garbage
- rm -r "${D}"/etc/{rc.d,sysconfig} || die
-
- # Gentoo rules
- insinto /etc/audit/
- doins "${FILESDIR}"/audit.rules*
-
- # audit logs go here
- keepdir /var/log/audit/
-
- # Security
- lockdown_perms "${D}"
-
- # Don't install .la files in Python directories.
- python_clean_installation_image
-}
-
-pkg_preinst() {
- default
- # Preserve from the audit-1 series
- preserve_old_lib /$(get_libdir)/libau{dit,parse}.so.0
-}
-
-pkg_postinst() {
- lockdown_perms "${ROOT}"
- python_mod_optimize audit.py
- # Preserve from the audit-1 series
- preserve_old_lib_notify /$(get_libdir)/libau{dit,parse}.so.0
-}
-
-pkg_postrm() {
- python_mod_cleanup audit.py
-}
-
-lockdown_perms() {
- # upstream wants these to have restrictive perms
- basedir="$1"
- chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
- chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
- chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
-}
diff --git a/sys-process/audit/audit-2.1.3-r1.ebuild b/sys-process/audit/audit-2.1.3-r1.ebuild
deleted file mode 100644
index 613825a..00000000
--- a/sys-process/audit/audit-2.1.3-r1.ebuild
+++ /dev/null
@@ -1,189 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="3"
-PYTHON_DEPEND="python? 2"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
-
-inherit autotools multilib toolchain-funcs python linux-info eutils
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 s390 sparc x86"
-IUSE="ldap prelude python"
-# Testcases are pretty useless as they are built for RedHat users/groups and
-# kernels.
-RESTRICT="test"
-
-RDEPEND="ldap? ( net-nds/openldap )
- prelude? ( dev-libs/libprelude )
- sys-libs/libcap-ng"
-DEPEND="${RDEPEND}
- python? ( dev-lang/swig )
- >=sys-kernel/linux-headers-2.6.34"
-# Do not use os-headers as this is linux specific
-
-CONFIG_CHECK="~AUDIT"
-PYTHON_DIRS="bindings/python swig"
-
-pkg_setup() {
- linux-info_pkg_setup
- use python && python_pkg_setup
-}
-
-src_prepare() {
- # Old patch applies fine
- #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch
-
- # Applied by upstream
- #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch
-
- # Do not build GUI tools
- sed -i \
- -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
- "${S}"/configure.ac || die
- sed -i \
- -e 's,system-config-audit,,g' \
- "${S}"/Makefile.am || die
- rm -rf "${S}"/system-config-audit
-
- # Probably goes away in 1.6.9
- #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch
-
- if ! use ldap; then
- sed -i \
- -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
- "${S}"/configure.ac || die
- sed -i \
- -e '/^SUBDIRS/s,zos-remote,,g' \
- "${S}"/audisp/plugins/Makefile.am || die
- fi
-
- # Don't build static version of Python module.
- epatch "${FILESDIR}"/${PN}-2.1.3-python.patch
-
- # glibc/kernel upstreams suck with both defining ia64_fpreg
- # This patch is a horribly workaround that is only valid as long as you
- # don't need the OTHER definitions in fpu.h.
- epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
-
- # Python bindings are built/installed manually.
- sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am
- sed -e "/^SUBDIRS .*=/s/ swig//" -i Makefile.am
-
- # Regenerate autotooling
- eautoreconf
-
- # Disable byte-compilation of Python modules.
- echo "#!/bin/sh" > py-compile
-
- # Bug 352198: Avoid parallel build fail
- cd "${S}"/src/mt
- [[ ! -s private.h ]] && ln -s ../../lib/private.h .
-}
-
-src_configure() {
- #append-flags -D'__attribute__(x)='
- econf --sbindir=/sbin $(use_with prelude)
-}
-
-src_compile_python() {
- python_copy_sources ${PYTHON_DIRS}
-
- building() {
- emake \
- PYTHON_VERSION="$(python_get_version)" \
- pyexecdir="$(python_get_sitedir)"
- }
- local dir
- for dir in ${PYTHON_DIRS}; do
- python_execute_function -s --source-dir ${dir} building
- done
-}
-
-src_compile() {
- default
- use python && src_compile_python
-}
-
-src_install_python() {
- installation() {
- emake \
- DESTDIR="${D}" \
- PYTHON_VERSION="$(python_get_version)" \
- pyexecdir="$(python_get_sitedir)" \
- install
- }
- local dir
- for dir in ${PYTHON_DIRS}; do
- python_execute_function -s --source-dir ${dir} installation
- done
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
- use python && src_install_python
-
- dodoc AUTHORS ChangeLog README* THANKS TODO
- docinto contrib
- dodoc contrib/{*.rules,avc_snap,skeleton.c}
- docinto contrib/plugin
- dodoc contrib/plugin/*
-
- newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd
- newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
-
- # things like shadow use this so we need to be in /
- gen_usr_ldscript -a audit auparse
-
- [ -f "${D}"/sbin/audisp-remote ] && \
- dodir /usr/sbin && \
- mv "${D}"/{sbin,usr/sbin}/audisp-remote || die
-
- # remove RedHat garbage
- rm -r "${D}"/etc/{rc.d,sysconfig} || die
-
- # Gentoo rules
- insinto /etc/audit/
- newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
- doins "${FILESDIR}"/audit.rules.stop*
-
- # audit logs go here
- keepdir /var/log/audit/
-
- # Security
- lockdown_perms "${D}"
-
- # Don't install .la files in Python directories.
- use python && python_clean_installation_image
-}
-
-pkg_preinst() {
- # Preserve from the audit-1 series
- preserve_old_lib /$(get_libdir)/libau{dit,parse}.so.0
-}
-
-pkg_postinst() {
- lockdown_perms "${ROOT}"
- use python && python_mod_optimize audit.py
- # Preserve from the audit-1 series
- preserve_old_lib_notify /$(get_libdir)/libau{dit,parse}.so.0
-}
-
-pkg_postrm() {
- use python && python_mod_cleanup audit.py
-}
-
-lockdown_perms() {
- # upstream wants these to have restrictive perms
- basedir="$1"
- chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
- chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
- chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
-}
diff --git a/sys-process/audit/audit-2.2.2-r2.ebuild b/sys-process/audit/audit-2.2.2-r2.ebuild
deleted file mode 100644
index 1e04b62..00000000
--- a/sys-process/audit/audit-2.2.2-r2.ebuild
+++ /dev/null
@@ -1,195 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~s390 sparc x86"
-IUSE="ldap prelude python"
-# Testcases are pretty useless as they are built for RedHat users/groups and
-# kernels.
-RESTRICT="test"
-
-RDEPEND="ldap? ( net-nds/openldap )
- prelude? ( dev-libs/libprelude )
- sys-libs/libcap-ng"
-DEPEND="${RDEPEND}
- python? ( dev-lang/swig )
- >=sys-kernel/linux-headers-2.6.34"
-# Do not use os-headers as this is linux specific
-
-CONFIG_CHECK="~AUDIT"
-
-pkg_setup() {
- linux-info_pkg_setup
-}
-
-src_prepare() {
- # Old patch applies fine
- #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch
-
- # Applied by upstream
- #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch
-
- # Do not build GUI tools
- sed -i \
- -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
- "${S}"/configure.ac || die
- sed -i \
- -e 's,system-config-audit,,g' \
- "${S}"/Makefile.am || die
- rm -rf "${S}"/system-config-audit
-
- # Probably goes away in 1.6.9
- #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch
-
- if ! use ldap; then
- sed -i \
- -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
- "${S}"/configure.ac || die
- sed -i \
- -e '/^SUBDIRS/s,zos-remote,,g' \
- "${S}"/audisp/plugins/Makefile.am || die
- fi
-
- # Don't build static version of Python module.
- epatch "${FILESDIR}"/${PN}-2.1.3-python.patch
-
- # glibc/kernel upstreams suck with both defining ia64_fpreg
- # This patch is a horribly workaround that is only valid as long as you
- # don't need the OTHER definitions in fpu.h.
- epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
-
- # Python bindings are built/installed manually.
- sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am
- sed -e "/^SUBDIRS .*=/s/ swig//" -i Makefile.am
-
- # Regenerate autotooling
- eautoreconf
-
- # Bug 352198: Avoid parallel build fail
- cd "${S}"/src/mt
- [[ ! -s private.h ]] && ln -s ../../lib/private.h .
-}
-
-multilib_src_configure() {
- local ECONF_SOURCE=${S}
- #append-flags -D'__attribute__(x)='
- econf \
- --sbindir=/sbin \
- --enable-systemd \
- --without-python \
- $(multilib_native_use_with prelude)
-
- if multilib_is_native_abi; then
- python_configure() {
- mkdir -p "${BUILD_DIR}" || die
- cd "${BUILD_DIR}" || die
- econf --with-python
- }
-
- use python && python_foreach_impl python_configure
- fi
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
-
- python_compile() {
- emake -C "${BUILD_DIR}"/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la"
- emake -C "${BUILD_DIR}"/bindings/python \
- VPATH="${S}/bindings/python:${native_build}/bindings/python" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la"
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_compile
- else
- emake -C lib
- emake -C auparse
- fi
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install
-
- python_install() {
- emake -C "${BUILD_DIR}"/swig \
- VPATH="${native_build}/lib" \
- DESTDIR="${D}" install
- emake -C "${BUILD_DIR}"/bindings/python \
- VPATH="${S}/bindings/python:${native_build}/bindings/python" \
- DESTDIR="${D}" install
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_install
-
- # things like shadow use this so we need to be in /
- gen_usr_ldscript -a audit auparse
- else
- emake -C lib DESTDIR="${D}" install
- emake -C auparse DESTDIR="${D}" install
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS ChangeLog README* THANKS TODO
- docinto contrib
- dodoc contrib/{*.rules,avc_snap,skeleton.c}
- docinto contrib/plugin
- dodoc contrib/plugin/*
-
- newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd
- newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
-
- [ -f "${D}"/sbin/audisp-remote ] && \
- dodir /usr/sbin && \
- mv "${D}"/{sbin,usr/sbin}/audisp-remote || die
-
- # Gentoo rules
- insinto /etc/audit/
- newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
- doins "${FILESDIR}"/audit.rules.stop*
-
- # audit logs go here
- keepdir /var/log/audit/
-
- # Security
- lockdown_perms "${D}"
-
- prune_libtool_files --modules
-}
-
-pkg_preinst() {
- # Preserve from the audit-1 series
- preserve_old_lib /$(get_libdir)/libau{dit,parse}.so.0
-}
-
-pkg_postinst() {
- lockdown_perms "${ROOT}"
- # Preserve from the audit-1 series
- preserve_old_lib_notify /$(get_libdir)/libau{dit,parse}.so.0
-}
-
-lockdown_perms() {
- # upstream wants these to have restrictive perms
- basedir="$1"
- chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
- chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
- chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
-}
diff --git a/sys-process/audit/audit-2.2.2-r3.ebuild b/sys-process/audit/audit-2.2.2-r3.ebuild
deleted file mode 100644
index 20450b7..00000000
--- a/sys-process/audit/audit-2.2.2-r3.ebuild
+++ /dev/null
@@ -1,195 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="ldap prelude python"
-# Testcases are pretty useless as they are built for RedHat users/groups and
-# kernels.
-RESTRICT="test"
-
-RDEPEND="ldap? ( net-nds/openldap )
- prelude? ( dev-libs/libprelude )
- sys-libs/libcap-ng"
-DEPEND="${RDEPEND}
- python? ( dev-lang/swig )
- >=sys-kernel/linux-headers-2.6.34"
-# Do not use os-headers as this is linux specific
-
-CONFIG_CHECK="~AUDIT"
-
-pkg_setup() {
- linux-info_pkg_setup
-}
-
-src_prepare() {
- # Old patch applies fine
- #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch
-
- # Applied by upstream
- #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch
-
- # Do not build GUI tools
- sed -i \
- -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
- "${S}"/configure.ac || die
- sed -i \
- -e 's,system-config-audit,,g' \
- "${S}"/Makefile.am || die
- rm -rf "${S}"/system-config-audit
-
- # Probably goes away in 1.6.9
- #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch
-
- if ! use ldap; then
- sed -i \
- -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
- "${S}"/configure.ac || die
- sed -i \
- -e '/^SUBDIRS/s,zos-remote,,g' \
- "${S}"/audisp/plugins/Makefile.am || die
- fi
-
- # Don't build static version of Python module.
- epatch "${FILESDIR}"/${PN}-2.1.3-python.patch
-
- # glibc/kernel upstreams suck with both defining ia64_fpreg
- # This patch is a horribly workaround that is only valid as long as you
- # don't need the OTHER definitions in fpu.h.
- epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
-
- # Python bindings are built/installed manually.
- sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am
- sed -e "/^SUBDIRS .*=/s/ swig//" -i Makefile.am
-
- # Regenerate autotooling
- eautoreconf
-
- # Bug 352198: Avoid parallel build fail
- cd "${S}"/src/mt
- [[ ! -s private.h ]] && ln -s ../../lib/private.h .
-}
-
-multilib_src_configure() {
- local ECONF_SOURCE=${S}
- #append-flags -D'__attribute__(x)='
- econf \
- --sbindir=/sbin \
- --enable-systemd \
- --without-python \
- $(multilib_native_use_with prelude)
-
- if multilib_is_native_abi; then
- python_configure() {
- mkdir -p "${BUILD_DIR}" || die
- cd "${BUILD_DIR}" || die
- econf --with-python
- }
-
- use python && python_foreach_impl python_configure
- fi
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
-
- python_compile() {
- emake -C "${BUILD_DIR}"/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la"
- emake -C "${BUILD_DIR}"/bindings/python \
- VPATH="${S}/bindings/python:${native_build}/bindings/python" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la"
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_compile
- else
- emake -C lib
- emake -C auparse
- fi
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install
-
- python_install() {
- emake -C "${BUILD_DIR}"/swig \
- VPATH="${native_build}/lib" \
- DESTDIR="${D}" install
- emake -C "${BUILD_DIR}"/bindings/python \
- VPATH="${S}/bindings/python:${native_build}/bindings/python" \
- DESTDIR="${D}" install
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_install
-
- # things like shadow use this so we need to be in /
- gen_usr_ldscript -a audit auparse
- else
- emake -C lib DESTDIR="${D}" install
- emake -C auparse DESTDIR="${D}" install
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS ChangeLog README* THANKS TODO
- docinto contrib
- dodoc contrib/{*.rules,avc_snap,skeleton.c}
- docinto contrib/plugin
- dodoc contrib/plugin/*
-
- newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd
- newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
-
- [ -f "${D}"/sbin/audisp-remote ] && \
- dodir /usr/sbin && \
- mv "${D}"/{sbin,usr/sbin}/audisp-remote || die
-
- # Gentoo rules
- insinto /etc/audit/
- newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
- doins "${FILESDIR}"/audit.rules.stop*
-
- # audit logs go here
- keepdir /var/log/audit/
-
- # Security
- lockdown_perms "${D}"
-
- prune_libtool_files --modules
-}
-
-pkg_preinst() {
- # Preserve from the audit-1 series
- preserve_old_lib /$(get_libdir)/libaudit.so.0
-}
-
-pkg_postinst() {
- lockdown_perms "${ROOT}"
- # Preserve from the audit-1 series
- preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
-}
-
-lockdown_perms() {
- # upstream wants these to have restrictive perms
- basedir="$1"
- chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
- chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
- chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
-}
diff --git a/sys-process/audit/audit-2.4.1-r1.ebuild b/sys-process/audit/audit-2.4.1-r1.ebuild
deleted file mode 100644
index 3602fe8..00000000
--- a/sys-process/audit/audit-2.4.1-r1.ebuild
+++ /dev/null
@@ -1,187 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="ldap python"
-# Testcases are pretty useless as they are built for RedHat users/groups and
-# kernels.
-RESTRICT="test"
-
-RDEPEND="ldap? ( net-nds/openldap )
- sys-libs/libcap-ng"
-DEPEND="${RDEPEND}
- python? ( ${PYTHON_DEPS}
- dev-lang/swig )
- >=sys-kernel/linux-headers-2.6.34"
-# Do not use os-headers as this is linux specific
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CONFIG_CHECK="~AUDIT"
-
-pkg_setup() {
- linux-info_pkg_setup
-}
-
-src_prepare() {
- # Do not build GUI tools
- sed -i \
- -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
- "${S}"/configure.ac || die
- sed -i \
- -e 's,system-config-audit,,g' \
- "${S}"/Makefile.am || die
- rm -rf "${S}"/system-config-audit
-
- if ! use ldap; then
- sed -i \
- -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
- "${S}"/configure.ac || die
- sed -i \
- -e '/^SUBDIRS/s,zos-remote,,g' \
- "${S}"/audisp/plugins/Makefile.am || die
- fi
-
- # Don't build static version of Python module.
- epatch "${FILESDIR}"/${PN}-2.4.1-python.patch
-
- # glibc/kernel upstreams suck with both defining ia64_fpreg
- # This patch is a horribly workaround that is only valid as long as you
- # don't need the OTHER definitions in fpu.h.
- epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
-
- # Python bindings are built/installed manually.
- sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am
- sed -e "/^SUBDIRS .*=/s/ swig//" -i Makefile.am
-
- # Regenerate autotooling
- eautoreconf
-
- # Bug 352198: Avoid parallel build fail
- cd "${S}"/src/mt
- [[ ! -s private.h ]] && ln -s ../../lib/private.h .
-}
-
-multilib_src_configure() {
- local ECONF_SOURCE=${S}
- #append-flags -D'__attribute__(x)='
- econf \
- --sbindir=/sbin \
- --enable-systemd \
- --without-python
-
- if multilib_is_native_abi; then
- python_configure() {
- mkdir -p "${BUILD_DIR}" || die
- cd "${BUILD_DIR}" || die
- econf --with-python
- }
-
- use python && python_foreach_impl python_configure
- fi
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
-
- python_compile() {
- emake -C "${BUILD_DIR}"/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la"
- emake -C "${BUILD_DIR}"/bindings/python \
- VPATH="${S}/bindings/python:${native_build}/bindings/python" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la"
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_compile
- else
- emake -C lib
- emake -C auparse
- fi
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install
-
- python_install() {
- emake -C "${BUILD_DIR}"/swig \
- VPATH="${native_build}/lib" \
- DESTDIR="${D}" install
- emake -C "${BUILD_DIR}"/bindings/python \
- VPATH="${S}/bindings/python:${native_build}/bindings/python" \
- DESTDIR="${D}" install
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_install
-
- # things like shadow use this so we need to be in /
- gen_usr_ldscript -a audit auparse
- else
- emake -C lib DESTDIR="${D}" install
- emake -C auparse DESTDIR="${D}" install
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS ChangeLog README* THANKS TODO
- docinto contrib
- dodoc contrib/{*.rules,avc_snap,skeleton.c}
- docinto contrib/plugin
- dodoc contrib/plugin/*
-
- newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd
- newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
-
- [ -f "${D}"/sbin/audisp-remote ] && \
- dodir /usr/sbin && \
- mv "${D}"/{sbin,usr/sbin}/audisp-remote || die
-
- # Gentoo rules
- insinto /etc/audit/
- newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
- doins "${FILESDIR}"/audit.rules.stop*
-
- # audit logs go here
- keepdir /var/log/audit/
-
- # Security
- lockdown_perms "${D}"
-
- prune_libtool_files --modules
-}
-
-pkg_preinst() {
- # Preserve from the audit-1 series
- preserve_old_lib /$(get_libdir)/libaudit.so.0
-}
-
-pkg_postinst() {
- lockdown_perms "${ROOT}"
- # Preserve from the audit-1 series
- preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
-}
-
-lockdown_perms() {
- # upstream wants these to have restrictive perms
- basedir="$1"
- chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
- chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
- chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
-}
diff --git a/sys-process/audit/audit-2.4.1.ebuild b/sys-process/audit/audit-2.4.1.ebuild
deleted file mode 100644
index 73901d5..00000000
--- a/sys-process/audit/audit-2.4.1.ebuild
+++ /dev/null
@@ -1,187 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="ldap python"
-# Testcases are pretty useless as they are built for RedHat users/groups and
-# kernels.
-RESTRICT="test"
-
-RDEPEND="ldap? ( net-nds/openldap )
- sys-libs/libcap-ng"
-DEPEND="${RDEPEND}
- python? ( ${PYTHON_DEPS}
- dev-lang/swig )
- >=sys-kernel/linux-headers-2.6.34"
-# Do not use os-headers as this is linux specific
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CONFIG_CHECK="~AUDIT"
-
-pkg_setup() {
- linux-info_pkg_setup
-}
-
-src_prepare() {
- # Do not build GUI tools
- sed -i \
- -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
- "${S}"/configure.ac || die
- sed -i \
- -e 's,system-config-audit,,g' \
- "${S}"/Makefile.am || die
- rm -rf "${S}"/system-config-audit
-
- if ! use ldap; then
- sed -i \
- -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
- "${S}"/configure.ac || die
- sed -i \
- -e '/^SUBDIRS/s,zos-remote,,g' \
- "${S}"/audisp/plugins/Makefile.am || die
- fi
-
- # Don't build static version of Python module.
- epatch "${FILESDIR}"/${PN}-2.4.1-python.patch
-
- # glibc/kernel upstreams suck with both defining ia64_fpreg
- # This patch is a horribly workaround that is only valid as long as you
- # don't need the OTHER definitions in fpu.h.
- epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
-
- # Python bindings are built/installed manually.
- sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am
- sed -e "/^SUBDIRS .*=/s/ swig//" -i Makefile.am
-
- # Regenerate autotooling
- eautoreconf
-
- # Bug 352198: Avoid parallel build fail
- cd "${S}"/src/mt
- [[ ! -s private.h ]] && ln -s ../../lib/private.h .
-}
-
-multilib_src_configure() {
- local ECONF_SOURCE=${S}
- #append-flags -D'__attribute__(x)='
- econf \
- --sbindir=/sbin \
- --enable-systemd \
- --without-python
-
- if multilib_is_native_abi; then
- python_configure() {
- mkdir -p "${BUILD_DIR}" || die
- cd "${BUILD_DIR}" || die
- econf --with-python
- }
-
- use python && python_foreach_impl python_configure
- fi
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
-
- python_compile() {
- emake -C "${BUILD_DIR}"/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la"
- emake -C "${BUILD_DIR}"/bindings/python \
- VPATH="${S}/bindings/python:${native_build}/bindings/python" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la"
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_compile
- else
- emake -C lib
- emake -C auparse
- fi
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install
-
- python_install() {
- emake -C "${BUILD_DIR}"/swig \
- VPATH="${native_build}/lib" \
- DESTDIR="${D}" install
- emake -C "${BUILD_DIR}"/bindings/python \
- VPATH="${S}/bindings/python:${native_build}/bindings/python" \
- DESTDIR="${D}" install
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_install
-
- # things like shadow use this so we need to be in /
- gen_usr_ldscript -a audit auparse
- else
- emake -C lib DESTDIR="${D}" install
- emake -C auparse DESTDIR="${D}" install
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS ChangeLog README* THANKS TODO
- docinto contrib
- dodoc contrib/{*.rules,avc_snap,skeleton.c}
- docinto contrib/plugin
- dodoc contrib/plugin/*
-
- newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd
- newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
-
- [ -f "${D}"/sbin/audisp-remote ] && \
- dodir /usr/sbin && \
- mv "${D}"/{sbin,usr/sbin}/audisp-remote || die
-
- # Gentoo rules
- insinto /etc/audit/
- newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
- doins "${FILESDIR}"/audit.rules.stop*
-
- # audit logs go here
- keepdir /var/log/audit/
-
- # Security
- lockdown_perms "${D}"
-
- prune_libtool_files --modules
-}
-
-pkg_preinst() {
- # Preserve from the audit-1 series
- preserve_old_lib /$(get_libdir)/libau{dit,parse}.so.0
-}
-
-pkg_postinst() {
- lockdown_perms "${ROOT}"
- # Preserve from the audit-1 series
- preserve_old_lib_notify /$(get_libdir)/libau{dit,parse}.so.0
-}
-
-lockdown_perms() {
- # upstream wants these to have restrictive perms
- basedir="$1"
- chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
- chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
- chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
-}
diff --git a/sys-process/audit/audit-2.4.3-r1.ebuild b/sys-process/audit/audit-2.4.3-r1.ebuild
deleted file mode 100644
index e1fd1a1..00000000
--- a/sys-process/audit/audit-2.4.3-r1.ebuild
+++ /dev/null
@@ -1,225 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-PYTHON_COMPAT=( python{2_7,3_4} )
-
-inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86"
-IUSE="ldap python"
-# Testcases are pretty useless as they are built for RedHat users/groups and
-# kernels.
-RESTRICT="test"
-
-RDEPEND="ldap? ( net-nds/openldap )
- sys-libs/libcap-ng"
-DEPEND="${RDEPEND}
- >=sys-kernel/linux-headers-2.6.34
- python? (
- ${PYTHON_DEPS}
- dev-lang/swig:0
- )"
-# Do not use os-headers as this is linux specific
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CONFIG_CHECK="~AUDIT"
-
-pkg_setup() {
- linux-info_pkg_setup
-}
-
-src_prepare() {
- epatch_user
-
- # Do not build GUI tools
- sed -i \
- -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
- "${S}"/configure.ac || die
- sed -i \
- -e 's,system-config-audit,,g' \
- "${S}"/Makefile.am || die
- rm -rf "${S}"/system-config-audit
-
- if ! use ldap; then
- sed -i \
- -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
- "${S}"/configure.ac || die
- sed -i \
- -e '/^SUBDIRS/s,zos-remote,,g' \
- "${S}"/audisp/plugins/Makefile.am || die
- fi
-
- # Don't build static version of Python module.
- epatch "${FILESDIR}"/${PN}-2.4.3-python.patch
-
- # glibc/kernel upstreams suck with both defining ia64_fpreg
- # This patch is a horribly workaround that is only valid as long as you
- # don't need the OTHER definitions in fpu.h.
- epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
-
- # there is no --without-golang conf option
- sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
-
- # Regenerate autotooling
- eautoreconf
-
- # Bug 352198: Avoid parallel build fail
- cd "${S}"/src/mt
- [[ ! -s private.h ]] && ln -s ../../lib/private.h .
-}
-
-multilib_src_configure() {
- local ECONF_SOURCE=${S}
- econf \
- --sbindir=/sbin \
- --enable-systemd \
- --without-python \
- --without-python3
-
- if multilib_is_native_abi; then
- python_configure() {
- mkdir -p "${BUILD_DIR}" || die
- cd "${BUILD_DIR}" || die
-
- if python_is_python3; then
- econf --without-python --with-python3
- else
- econf --with-python --without-python3
- fi
- }
-
- use python && python_foreach_impl python_configure
- fi
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
-
- python_compile() {
- local pysuffix pydef
- if python_is_python3; then
- pysuffix=3
- pydef='USE_PYTHON3=true'
- else
- pysuffix=2
- pydef='HAVE_PYTHON=true'
- fi
-
- emake -C "${BUILD_DIR}"/bindings/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la" \
- _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
- _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
- ${pydef}
- emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
- VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
- ${pydef}
- }
-
- local native_build="${BUILD_DIR}"
- use python && python_foreach_impl python_compile
- else
- emake -C lib
- emake -C auparse
- fi
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install
-
- python_install() {
- local pysuffix pydef
- if python_is_python3; then
- pysuffix=3
- pydef='USE_PYTHON3=true'
- else
- pysuffix=2
- pydef='HAVE_PYTHON=true'
- fi
-
- emake -C "${BUILD_DIR}"/bindings/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la" \
- _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
- _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
- ${pydef} \
- DESTDIR="${D}" install
- emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
- VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
- ${pydef} \
- DESTDIR="${D}" install
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_install
-
- # things like shadow use this so we need to be in /
- gen_usr_ldscript -a audit auparse
- else
- emake -C lib DESTDIR="${D}" install
- emake -C auparse DESTDIR="${D}" install
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS ChangeLog README* THANKS TODO
- docinto contrib
- dodoc contrib/{*.rules,avc_snap,skeleton.c}
- docinto contrib/plugin
- dodoc contrib/plugin/*
-
- newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
- newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
-
- chmod 644 "${D}/$(systemd_get_unitdir)"/auditd.service || die # 556436
-
- [ -f "${D}"/sbin/audisp-remote ] && \
- dodir /usr/sbin && \
- mv "${D}"/{sbin,usr/sbin}/audisp-remote || die
-
- # Gentoo rules
- insinto /etc/audit/
- newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
- doins "${FILESDIR}"/audit.rules.stop*
-
- # audit logs go here
- keepdir /var/log/audit/
-
- # Security
- lockdown_perms "${D}"
-
- prune_libtool_files --modules
-}
-
-pkg_preinst() {
- # Preserve from the audit-1 series
- preserve_old_lib /$(get_libdir)/libaudit.so.0
-}
-
-pkg_postinst() {
- lockdown_perms "${ROOT}"
- # Preserve from the audit-1 series
- preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
-}
-
-lockdown_perms() {
- # upstream wants these to have restrictive perms
- basedir="$1"
- chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
- chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
- chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
-}
diff --git a/sys-process/audit/audit-2.4.3.ebuild b/sys-process/audit/audit-2.4.3.ebuild
deleted file mode 100644
index f1495bd..00000000
--- a/sys-process/audit/audit-2.4.3.ebuild
+++ /dev/null
@@ -1,221 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-PYTHON_COMPAT=( python{2_7,3_4} )
-
-inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="ldap python"
-# Testcases are pretty useless as they are built for RedHat users/groups and
-# kernels.
-RESTRICT="test"
-
-RDEPEND="ldap? ( net-nds/openldap )
- sys-libs/libcap-ng"
-DEPEND="${RDEPEND}
- python? ( ${PYTHON_DEPS}
- dev-lang/swig )
- >=sys-kernel/linux-headers-2.6.34"
-# Do not use os-headers as this is linux specific
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CONFIG_CHECK="~AUDIT"
-
-pkg_setup() {
- linux-info_pkg_setup
-}
-
-src_prepare() {
- epatch_user
-
- # Do not build GUI tools
- sed -i \
- -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
- "${S}"/configure.ac || die
- sed -i \
- -e 's,system-config-audit,,g' \
- "${S}"/Makefile.am || die
- rm -rf "${S}"/system-config-audit
-
- if ! use ldap; then
- sed -i \
- -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
- "${S}"/configure.ac || die
- sed -i \
- -e '/^SUBDIRS/s,zos-remote,,g' \
- "${S}"/audisp/plugins/Makefile.am || die
- fi
-
- # Don't build static version of Python module.
- epatch "${FILESDIR}"/${PN}-2.4.3-python.patch
-
- # glibc/kernel upstreams suck with both defining ia64_fpreg
- # This patch is a horribly workaround that is only valid as long as you
- # don't need the OTHER definitions in fpu.h.
- epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
-
- # there is no --without-golang conf option
- sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
-
- # Regenerate autotooling
- eautoreconf
-
- # Bug 352198: Avoid parallel build fail
- cd "${S}"/src/mt
- [[ ! -s private.h ]] && ln -s ../../lib/private.h .
-}
-
-multilib_src_configure() {
- local ECONF_SOURCE=${S}
- econf \
- --sbindir=/sbin \
- --enable-systemd \
- --without-python \
- --without-python3
-
- if multilib_is_native_abi; then
- python_configure() {
- mkdir -p "${BUILD_DIR}" || die
- cd "${BUILD_DIR}" || die
-
- if python_is_python3; then
- econf --without-python --with-python3
- else
- econf --with-python --without-python3
- fi
- }
-
- use python && python_foreach_impl python_configure
- fi
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
-
- python_compile() {
- local pysuffix pydef
- if python_is_python3; then
- pysuffix=3
- pydef='USE_PYTHON3=true'
- else
- pysuffix=2
- pydef='HAVE_PYTHON=true'
- fi
-
- emake -C "${BUILD_DIR}"/bindings/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la" \
- _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
- _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
- ${pydef}
- emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
- VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
- ${pydef}
- }
-
- local native_build="${BUILD_DIR}"
- use python && python_foreach_impl python_compile
- else
- emake -C lib
- emake -C auparse
- fi
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install
-
- python_install() {
- local pysuffix pydef
- if python_is_python3; then
- pysuffix=3
- pydef='USE_PYTHON3=true'
- else
- pysuffix=2
- pydef='HAVE_PYTHON=true'
- fi
-
- emake -C "${BUILD_DIR}"/bindings/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la" \
- _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
- _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
- ${pydef} \
- DESTDIR="${D}" install
- emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
- VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
- ${pydef} \
- DESTDIR="${D}" install
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_install
-
- # things like shadow use this so we need to be in /
- gen_usr_ldscript -a audit auparse
- else
- emake -C lib DESTDIR="${D}" install
- emake -C auparse DESTDIR="${D}" install
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS ChangeLog README* THANKS TODO
- docinto contrib
- dodoc contrib/{*.rules,avc_snap,skeleton.c}
- docinto contrib/plugin
- dodoc contrib/plugin/*
-
- newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd
- newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
-
- [ -f "${D}"/sbin/audisp-remote ] && \
- dodir /usr/sbin && \
- mv "${D}"/{sbin,usr/sbin}/audisp-remote || die
-
- # Gentoo rules
- insinto /etc/audit/
- newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
- doins "${FILESDIR}"/audit.rules.stop*
-
- # audit logs go here
- keepdir /var/log/audit/
-
- # Security
- lockdown_perms "${D}"
-
- prune_libtool_files --modules
-}
-
-pkg_preinst() {
- # Preserve from the audit-1 series
- preserve_old_lib /$(get_libdir)/libaudit.so.0
-}
-
-pkg_postinst() {
- lockdown_perms "${ROOT}"
- # Preserve from the audit-1 series
- preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
-}
-
-lockdown_perms() {
- # upstream wants these to have restrictive perms
- basedir="$1"
- chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
- chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
- chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
-}
diff --git a/sys-process/audit/audit-2.4.4.ebuild b/sys-process/audit/audit-2.4.4.ebuild
deleted file mode 100644
index a1b47a8..00000000
--- a/sys-process/audit/audit-2.4.4.ebuild
+++ /dev/null
@@ -1,225 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-PYTHON_COMPAT=( python{2_7,3_4} )
-
-inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="ldap python"
-# Testcases are pretty useless as they are built for RedHat users/groups and
-# kernels.
-RESTRICT="test"
-
-RDEPEND="ldap? ( net-nds/openldap )
- sys-libs/libcap-ng"
-DEPEND="${RDEPEND}
- >=sys-kernel/linux-headers-2.6.34
- python? (
- ${PYTHON_DEPS}
- dev-lang/swig:0
- )"
-# Do not use os-headers as this is linux specific
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CONFIG_CHECK="~AUDIT"
-
-pkg_setup() {
- linux-info_pkg_setup
-}
-
-src_prepare() {
- epatch_user
-
- # Do not build GUI tools
- sed -i \
- -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
- "${S}"/configure.ac || die
- sed -i \
- -e 's,system-config-audit,,g' \
- "${S}"/Makefile.am || die
- rm -rf "${S}"/system-config-audit
-
- if ! use ldap; then
- sed -i \
- -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
- "${S}"/configure.ac || die
- sed -i \
- -e '/^SUBDIRS/s,zos-remote,,g' \
- "${S}"/audisp/plugins/Makefile.am || die
- fi
-
- # Don't build static version of Python module.
- epatch "${FILESDIR}"/${PN}-2.4.3-python.patch
-
- # glibc/kernel upstreams suck with both defining ia64_fpreg
- # This patch is a horribly workaround that is only valid as long as you
- # don't need the OTHER definitions in fpu.h.
- epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
-
- # there is no --without-golang conf option
- sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
-
- # Regenerate autotooling
- eautoreconf
-
- # Bug 352198: Avoid parallel build fail
- cd "${S}"/src/mt
- [[ ! -s private.h ]] && ln -s ../../lib/private.h .
-}
-
-multilib_src_configure() {
- local ECONF_SOURCE=${S}
- econf \
- --sbindir=/sbin \
- --enable-systemd \
- --without-python \
- --without-python3
-
- if multilib_is_native_abi; then
- python_configure() {
- mkdir -p "${BUILD_DIR}" || die
- cd "${BUILD_DIR}" || die
-
- if python_is_python3; then
- econf --without-python --with-python3
- else
- econf --with-python --without-python3
- fi
- }
-
- use python && python_foreach_impl python_configure
- fi
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
-
- python_compile() {
- local pysuffix pydef
- if python_is_python3; then
- pysuffix=3
- pydef='USE_PYTHON3=true'
- else
- pysuffix=2
- pydef='HAVE_PYTHON=true'
- fi
-
- emake -C "${BUILD_DIR}"/bindings/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la" \
- _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
- _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
- ${pydef}
- emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
- VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
- ${pydef}
- }
-
- local native_build="${BUILD_DIR}"
- use python && python_foreach_impl python_compile
- else
- emake -C lib
- emake -C auparse
- fi
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install
-
- python_install() {
- local pysuffix pydef
- if python_is_python3; then
- pysuffix=3
- pydef='USE_PYTHON3=true'
- else
- pysuffix=2
- pydef='HAVE_PYTHON=true'
- fi
-
- emake -C "${BUILD_DIR}"/bindings/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la" \
- _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
- _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
- ${pydef} \
- DESTDIR="${D}" install
- emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
- VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
- ${pydef} \
- DESTDIR="${D}" install
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_install
-
- # things like shadow use this so we need to be in /
- gen_usr_ldscript -a audit auparse
- else
- emake -C lib DESTDIR="${D}" install
- emake -C auparse DESTDIR="${D}" install
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS ChangeLog README* THANKS TODO
- docinto contrib
- dodoc contrib/{*.rules,avc_snap,skeleton.c}
- docinto contrib/plugin
- dodoc contrib/plugin/*
-
- newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
- newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
-
- chmod 644 "${D}/$(systemd_get_unitdir)"/auditd.service || die # 556436
-
- [ -f "${D}"/sbin/audisp-remote ] && \
- dodir /usr/sbin && \
- mv "${D}"/{sbin,usr/sbin}/audisp-remote || die
-
- # Gentoo rules
- insinto /etc/audit/
- newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
- doins "${FILESDIR}"/audit.rules.stop*
-
- # audit logs go here
- keepdir /var/log/audit/
-
- # Security
- lockdown_perms "${D}"
-
- prune_libtool_files --modules
-}
-
-pkg_preinst() {
- # Preserve from the audit-1 series
- preserve_old_lib /$(get_libdir)/libaudit.so.0
-}
-
-pkg_postinst() {
- lockdown_perms "${ROOT}"
- # Preserve from the audit-1 series
- preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
-}
-
-lockdown_perms() {
- # upstream wants these to have restrictive perms
- basedir="$1"
- chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
- chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
- chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
-}
diff --git a/sys-process/audit/files/audit-1.7.17-python.patch b/sys-process/audit/files/audit-1.7.17-python.patch
deleted file mode 100644
index 13fed4a..00000000
--- a/sys-process/audit/files/audit-1.7.17-python.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- swig/Makefile.am
-+++ swig/Makefile.am
-@@ -28,7 +28,8 @@
- pyexec_PYTHON = audit.py
- pyexec_LTLIBRARIES = _audit.la
- pyexec_SOLIBRARIES = _audit.so
--_audit_la_LDFLAGS = -module -avoid-version
-+_audit_la_CFLAGS = -shared
-+_audit_la_LDFLAGS = -module -avoid-version -shared
- _audit_la_HEADERS: $(top_builddir)/config.h
- _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la
- nodist__audit_la_SOURCES = audit_wrap.c
diff --git a/sys-process/audit/files/audit-1.7.18-as-needed.patch b/sys-process/audit/files/audit-1.7.18-as-needed.patch
deleted file mode 100644
index 2e951d0..00000000
--- a/sys-process/audit/files/audit-1.7.18-as-needed.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- audit-1.7.13.orig/src/Makefile.in
-+++ audit-1.7.13/src/Makefile.in
-@@ -273,10 +273,10 @@
- AM_CFLAGS = -D_REENTRANT -D_GNU_SOURCE
- noinst_HEADERS = auditd-config.h auditd-event.h auditd-listen.h ausearch-llist.h ausearch-options.h auditctl-llist.h aureport-options.h ausearch-parse.h aureport-scan.h ausearch-lookup.h ausearch-int.h auditd-dispatch.h ausearch-string.h ausearch-nvpair.h ausearch-common.h ausearch-avc.h ausearch-time.h ausearch-lol.h
- auditd_SOURCES = auditd.c auditd-event.c auditd-config.c auditd-reconfig.c auditd-sendmail.c auditd-dispatch.c auditd-listen.c
--auditd_CFLAGS = -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
--auditd_LDFLAGS = -pie -Wl,-z,relro
-+auditd_CFLAGS = -pthread -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-+auditd_LDFLAGS = -pthread -pie -Wl,-z,relro
- auditd_DEPENDENCIES = mt/libauditmt.a libev/libev.a
- auditd_LDADD = @LIBWRAP_LIBS@ @libev_LIBS@ -Llibev -lev -lrt -lm $(gss_libs)
- auditctl_SOURCES = auditctl.c auditctl-llist.c delete_all.c
- auditctl_DEPENDENCIES = mt/libauditmt.a
- aureport_SOURCES = aureport.c auditd-config.c ausearch-llist.c aureport-options.c ausearch-string.c ausearch-parse.c aureport-scan.c aureport-output.c ausearch-lookup.c ausearch-int.c ausearch-time.c ausearch-nvpair.c ausearch-avc.c ausearch-lol.c
---- audit-1.7.13.orig/src/Makefile.am
-+++ audit-1.7.13/src/Makefile.am
-@@ -31,10 +31,10 @@
- noinst_HEADERS = auditd-config.h auditd-event.h auditd-listen.h ausearch-llist.h ausearch-options.h auditctl-llist.h aureport-options.h ausearch-parse.h aureport-scan.h ausearch-lookup.h ausearch-int.h auditd-dispatch.h ausearch-string.h ausearch-nvpair.h ausearch-common.h ausearch-avc.h ausearch-time.h ausearch-lol.h
-
- auditd_SOURCES = auditd.c auditd-event.c auditd-config.c auditd-reconfig.c auditd-sendmail.c auditd-dispatch.c auditd-listen.c
--auditd_CFLAGS = -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
--auditd_LDFLAGS = -pie -Wl,-z,relro
-+auditd_CFLAGS = -pthread -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-+auditd_LDFLAGS = -pthread -pie -Wl,-z,relro
- auditd_DEPENDENCIES = mt/libauditmt.a libev/libev.a
- auditd_LDADD = @LIBWRAP_LIBS@ @libev_LIBS@ -Llibev -lev -lrt -lm $(gss_libs)
-
- auditctl_SOURCES = auditctl.c auditctl-llist.c delete_all.c
- auditctl_DEPENDENCIES = mt/libauditmt.a
diff --git a/sys-process/audit/files/audit-1.7.18-missing_headers.patch b/sys-process/audit/files/audit-1.7.18-missing_headers.patch
deleted file mode 100644
index 120b173..00000000
--- a/sys-process/audit/files/audit-1.7.18-missing_headers.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: audit-1.7.13/lib/libaudit.c
-===========================================
---- audit-1.7.13.orig/lib/libaudit.c
-+++ audit-1.7.13/lib/libaudit.c
-@@ -36,6 +36,8 @@
- #include <sys/utsname.h>
- #include <fcntl.h> /* O_NOFOLLOW needs gnu defined */
- #include <limits.h> /* for PATH_MAX */
-+#include <sys/stat.h>
-+#include <sys/types.h>
-
- #include "libaudit.h"
- #include "private.h"
diff --git a/sys-process/audit/files/audit-2.0.5-python.patch b/sys-process/audit/files/audit-2.0.5-python.patch
deleted file mode 100644
index 29742ab..00000000
--- a/sys-process/audit/files/audit-2.0.5-python.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- bindings/python/Makefile.am
-+++ bindings/python/Makefile.am
-@@ -27,5 +27,6 @@
-
- auparse_la_SOURCES = auparse_python.c
- auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I/usr/include/python$(PYTHON_VERSION) -fno-strict-aliasing
--auparse_la_LDFLAGS = -module -avoid-version
-+auparse_la_CFLAGS = -shared
-+auparse_la_LDFLAGS = -module -avoid-version -shared
- auparse_la_LIBADD = ../../auparse/libauparse.la ../../lib/libaudit.la
---- swig/Makefile.am
-+++ swig/Makefile.am
-@@ -28,7 +28,8 @@
- pyexec_PYTHON = audit.py
- pyexec_LTLIBRARIES = _audit.la
- pyexec_SOLIBRARIES = _audit.so
--_audit_la_LDFLAGS = -module -avoid-version
-+_audit_la_CFLAGS = -shared
-+_audit_la_LDFLAGS = -module -avoid-version -shared
- _audit_la_HEADERS: $(top_builddir)/config.h
- _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la
- nodist__audit_la_SOURCES = audit_wrap.c
diff --git a/sys-process/audit/files/audit-2.1.3-python.patch b/sys-process/audit/files/audit-2.1.3-python.patch
deleted file mode 100644
index a9feec1..00000000
--- a/sys-process/audit/files/audit-2.1.3-python.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Nuar --exclude '*.orig' audit-2.1.3.orig/bindings/python/Makefile.am audit-2.1.3/bindings/python/Makefile.am
---- audit-2.1.3.orig/bindings/python/Makefile.am 2011-08-15 17:31:01.000000000 +0000
-+++ audit-2.1.3/bindings/python/Makefile.am 2011-09-10 19:01:36.974983756 +0000
-@@ -27,5 +27,6 @@
-
- auparse_la_SOURCES = auparse_python.c
- auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I/usr/include/python$(PYTHON_VERSION) -fno-strict-aliasing
--auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
-+auparse_la_CFLAGS = -shared
-+auparse_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
- auparse_la_LIBADD = ../../auparse/libauparse.la ../../lib/libaudit.la
-diff -Nuar --exclude '*.orig' audit-2.1.3.orig/swig/Makefile.am audit-2.1.3/swig/Makefile.am
---- audit-2.1.3.orig/swig/Makefile.am 2011-08-15 17:31:03.000000000 +0000
-+++ audit-2.1.3/swig/Makefile.am 2011-09-10 19:02:14.095067690 +0000
-@@ -28,7 +28,8 @@
- pyexec_PYTHON = audit.py
- pyexec_LTLIBRARIES = _audit.la
- pyexec_SOLIBRARIES = _audit.so
--_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
-+_audit_la_CFLAGS = -shared
-+_audit_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
- _audit_la_HEADERS: $(top_builddir)/config.h
- _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la
- nodist__audit_la_SOURCES = audit_wrap.c
diff --git a/sys-process/audit/files/audit-2.4.1-python.patch b/sys-process/audit/files/audit-2.4.1-python.patch
deleted file mode 100644
index 6c27396..00000000
--- a/sys-process/audit/files/audit-2.4.1-python.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- audit-2.4.1/bindings/python/Makefile.am
-+++ audit-2.4.1/bindings/python/Makefile.am
-@@ -27,5 +27,6 @@
-
- auparse_la_SOURCES = auparse_python.c
- auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I@PYINCLUDEDIR@ -fno-strict-aliasing
--auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
-+auparse_la_CFLAGS = -shared
-+auparse_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
- auparse_la_LIBADD = ${top_builddir}/auparse/libauparse.la ${top_builddir}/lib/libaudit.la
---- audit-2.4.1/swig/Makefile.am
-+++ audit-2.4.1/swig/Makefile.am
-@@ -27,7 +27,8 @@
- pyexec_PYTHON = audit.py
- pyexec_LTLIBRARIES = _audit.la
- pyexec_SOLIBRARIES = _audit.so
--_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
-+_audit_la_CFLAGS = -shared
-+_audit_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
- _audit_la_HEADERS: $(top_builddir)/config.h
- _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la
- nodist__audit_la_SOURCES = audit_wrap.c
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/, sys-process/audit/files/
@ 2018-12-13 17:16 Thomas Deutschmann
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Deutschmann @ 2018-12-13 17:16 UTC (permalink / raw
To: gentoo-commits
commit: c6f83e607235596b3e7531a1cc2413c930f0abe4
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 13 17:15:45 2018 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Dec 13 17:15:56 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6f83e60
sys-process/audit: bump to v2.8.4
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
sys-process/audit/Manifest | 1 +
sys-process/audit/audit-2.8.4.ebuild | 230 +++++++++++++++++++++
.../audit/files/audit-2.8.4-ia64-compile-fix.patch | 195 +++++++++++++++++
3 files changed, 426 insertions(+)
diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
index b95d1676625..d262ad0fcb5 100644
--- a/sys-process/audit/Manifest
+++ b/sys-process/audit/Manifest
@@ -2,3 +2,4 @@ DIST audit-2.6.4.tar.gz 1078677 BLAKE2B 056d9f269926d9b0d74f7187f833f1e94d4e03a5
DIST audit-2.7.1.tar.gz 1099083 BLAKE2B 10f72ac3273ce9e23e1fb8ad8d57dcae772ba1f861f519867399d95e14f4809897637969de45566d62a73a35e5674260155773daf8de00481fcbd1b9c3138f96 SHA512 37964d81deee8608fde5f90d5d096727d3eb009e084be34749adcb0662e607e35c49c80bd83ce38b17161f11363b691721c8a8aa5dea832d320c53ab0ebb7483
DIST audit-2.8.2.tar.gz 1121970 BLAKE2B bbec694ed1177a8590d035c2d6d197e49343fc370b101589e58736042c3b12cabb68fe796422f3133feb79068ab7d5931efa5414d22edead10c8871fefcd2549 SHA512 888ebf5e8e9d285b82d87377fc8836886d7a8b089c1be4091420a77a0250c9baf09aebb7a6330ff5043fb35f51eb6baf8d4491e26da7ad0811f0087e395b5012
DIST audit-2.8.3.tar.gz 1107583 BLAKE2B 21c2b8543a31c0ca4319af40b844f4400615108a59195a95ea79499ff2923d7dbbc840716d60dfba311bfc451983cd4cd0f7cb27c2444825df2c0dfb50f9614f SHA512 aa939b81a66111f4e466208d7a38414bd186d00ccd374b420439764905b4707bbfcdc2331a6179a080fca981d19171696ecabd26674205b2f9339c44954db933
+DIST audit-2.8.4.tar.gz 1123889 BLAKE2B b80272b1984942d3c38bde30d22c736a8cc8896a2e42a9bf286446129313ce57a2a117ce26a0a5f1a4a06b4a48ddde463b8837b8c98273051be0c90e5bbebd42 SHA512 5795c565effab995cee447a2dc457ef6a6f15201fb185d7104992ac373a3cb5cfc865dd661c0896a895c96f452eff392d455064d0eead55cd7364d96e0d15c4a
diff --git a/sys-process/audit/audit-2.8.4.ebuild b/sys-process/audit/audit-2.8.4.ebuild
new file mode 100644
index 00000000000..b15890c509b
--- /dev/null
+++ b/sys-process/audit/audit-2.8.4.ebuild
@@ -0,0 +1,230 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit autotools multilib multilib-minimal toolchain-funcs preserve-libs python-r1 linux-info systemd
+
+DESCRIPTION="Userspace utilities for storing and processing auditing records"
+HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
+SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="gssapi ldap python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+# Testcases are pretty useless as they are built for RedHat users/groups and kernels.
+RESTRICT="test"
+
+RDEPEND="gssapi? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ sys-libs/libcap-ng
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.34
+ python? ( dev-lang/swig:0 )"
+# Do not use os-headers as this is linux specific
+
+CONFIG_CHECK="~AUDIT"
+
+pkg_setup() {
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ # Do not build GUI tools
+ sed -i \
+ -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
+ "${S}"/configure.ac || die
+ sed -i \
+ -e 's,system-config-audit,,g' \
+ "${S}"/Makefile.am || die
+ rm -rf "${S}"/system-config-audit
+
+ if ! use ldap; then
+ sed -i \
+ -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
+ "${S}"/configure.ac || die
+ sed -i \
+ -e '/^SUBDIRS/s,zos-remote,,g' \
+ "${S}"/audisp/plugins/Makefile.am || die
+ fi
+
+ # Don't build static version of Python module.
+ eapply "${FILESDIR}"/${PN}-2.4.3-python.patch
+
+ # glibc/kernel upstreams suck with both defining ia64_fpreg
+ # This patch is a horribly workaround that is only valid as long as you
+ # don't need the OTHER definitions in fpu.h.
+ eapply "${FILESDIR}"/${PN}-2.8.4-ia64-compile-fix.patch
+
+ # there is no --without-golang conf option
+ sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
+
+ eapply_user
+
+ # Regenerate autotooling
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local ECONF_SOURCE=${S}
+ econf \
+ --sbindir="${EPREFIX}/sbin" \
+ $(use_enable gssapi gssapi-krb5) \
+ $(use_enable static-libs static) \
+ --enable-systemd \
+ --without-python \
+ --without-python3
+
+ if multilib_is_native_abi; then
+ python_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ if python_is_python3; then
+ econf --without-python --with-python3
+ else
+ econf --with-python --without-python3
+ fi
+ }
+
+ use python && python_foreach_impl python_configure
+ fi
+}
+
+src_configure() {
+ tc-export_build_env BUILD_{CC,CPP}
+ export CC_FOR_BUILD="${BUILD_CC}"
+ export CPP_FOR_BUILD="${BUILD_CPP}"
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+
+ python_compile() {
+ local pysuffix pydef
+ if python_is_python3; then
+ pysuffix=3
+ pydef='USE_PYTHON3=true'
+ else
+ pysuffix=2
+ pydef='HAVE_PYTHON=true'
+ fi
+
+ emake -C "${BUILD_DIR}"/bindings/swig \
+ VPATH="${native_build}/lib" \
+ LIBS="${native_build}/lib/libaudit.la" \
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
+ ${pydef}
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
+ ${pydef}
+ }
+
+ local native_build="${BUILD_DIR}"
+ use python && python_foreach_impl python_compile
+ else
+ emake -C lib
+ emake -C auparse
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
+
+ python_install() {
+ local pysuffix pydef
+ if python_is_python3; then
+ pysuffix=3
+ pydef='USE_PYTHON3=true'
+ else
+ pysuffix=2
+ pydef='HAVE_PYTHON=true'
+ fi
+
+ emake -C "${BUILD_DIR}"/bindings/swig \
+ VPATH="${native_build}/lib" \
+ LIBS="${native_build}/lib/libaudit.la" \
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
+ ${pydef} \
+ DESTDIR="${D}" install
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
+ ${pydef} \
+ DESTDIR="${D}" install
+ }
+
+ local native_build=${BUILD_DIR}
+ use python && python_foreach_impl python_install
+
+ # things like shadow use this so we need to be in /
+ gen_usr_ldscript -a audit auparse
+ else
+ emake -C lib DESTDIR="${D}" install
+ emake -C auparse DESTDIR="${D}" install
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS ChangeLog README* THANKS
+ docinto contrib
+ dodoc contrib/{avc_snap,skeleton.c}
+ docinto contrib/plugin
+ dodoc contrib/plugin/*
+ docinto rules
+ dodoc rules/*
+
+ newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
+ newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
+
+ fperms 644 "$(systemd_get_systemunitdir)"/auditd.service # 556436
+
+ [ -f "${ED}"/sbin/audisp-remote ] && \
+ dodir /usr/sbin && \
+ mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die
+
+ # Gentoo rules
+ insinto /etc/audit/
+ newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
+ doins "${FILESDIR}"/audit.rules.stop*
+
+ # audit logs go here
+ keepdir /var/log/audit/
+
+ find "${D}" -name '*.la' -delete || die
+
+ # Security
+ lockdown_perms "${ED}"
+}
+
+pkg_preinst() {
+ # Preserve from the audit-1 series
+ preserve_old_lib /$(get_libdir)/libaudit.so.0
+}
+
+pkg_postinst() {
+ lockdown_perms "${EROOT}"
+ # Preserve from the audit-1 series
+ preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
+}
+
+lockdown_perms() {
+ # Upstream wants these to have restrictive perms.
+ # Should not || die as not all paths may exist.
+ local basedir="$1"
+ chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
+ chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
+ chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
+}
diff --git a/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch b/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch
new file mode 100644
index 00000000000..ef04f720495
--- /dev/null
+++ b/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch
@@ -0,0 +1,195 @@
+--- a/audisp/audispd.c
++++ b/audisp/audispd.c
+@@ -21,6 +21,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+--- a/audisp/plugins/prelude/audisp-prelude.c
++++ b/audisp/plugins/prelude/audisp-prelude.c
+@@ -21,6 +21,8 @@
+ *
+ */
+
++#include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <signal.h>
+--- a/audisp/plugins/remote/audisp-remote.c
++++ b/audisp/plugins/remote/audisp-remote.c
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <signal.h>
+ #include <syslog.h>
+--- a/configure.ac
++++ b/configure.ac
+@@ -216,6 +216,9 @@ AC_ARG_ENABLE(zos-remote,
+ AM_CONDITIONAL(ENABLE_ZOS_REMOTE, test "x$enable_zos_remote" != "xno")
+ AC_MSG_RESULT($enable_zos_remote)
+
++AC_CHECK_HEADER([asm/ptrace.h], [AC_DEFINE([HAVE_ASM_PTRACE_H],[],[Define to 1 if you have asm/ptrace.h])], [])
++AC_CHECK_HEADER([linux/ptrace.h], [AC_DEFINE([HAVE_LINUX_PTRACE_H],[],[Define to 1 if you have linux/ptrace.h])], [])
++
+ #gssapi
+ AC_ARG_ENABLE(gssapi_krb5,
+ [AS_HELP_STRING([--enable-gssapi-krb5],[Enable GSSAPI Kerberos 5 support @<:@default=no@:>@])],
+--- a/contrib/plugin/audisp-example.c
++++ b/contrib/plugin/audisp-example.c
+@@ -37,6 +37,8 @@
+ */
+
+ #define _GNU_SOURCE
++#include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <signal.h>
+ #include <string.h>
+--- a/contrib/skeleton.c
++++ b/contrib/skeleton.c
+@@ -13,6 +13,8 @@
+ * gcc skeleton.c -o skeleton -laudit
+ */
+
++#include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/uio.h>
+--- /dev/null
++++ b/lib/fixup.h
+@@ -0,0 +1,17 @@
++#ifndef _AUDIT_IA64_FIXUP_H_
++#define _AUDIT_IA64_FIXUP_H_
++
++#ifdef __ia64__ /* what a pos */
++# include <linux/types.h>
++# define _ASM_IA64_FPU_H
++#endif
++#include <signal.h>
++/*
++#ifdef HAVE_ASM_PTRACE_H
++# include <asm/ptrace.h>
++#endif
++#ifdef HAVE_LINUX_PTRACE_H
++# include <linux/ptrace.h>
++#endif
++*/
++#endif
+--- a/src/auditctl.c
++++ b/src/auditctl.c
+@@ -23,6 +23,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stdbool.h>
+--- a/src/auditd-config.c
++++ b/src/auditd-config.c
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/stat.h>
+--- a/src/auditd-dispatch.c
++++ b/src/auditd-dispatch.c
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <unistd.h>
+ #include <sys/uio.h>
+ #include <fcntl.h>
+--- a/src/auditd-event.c
++++ b/src/auditd-event.c
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <pthread.h>
+--- a/src/auditd-listen.c
++++ b/src/auditd-listen.c
+@@ -23,6 +23,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/stat.h>
+--- a/src/auditd-reconfig.c
++++ b/src/auditd-reconfig.c
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <pthread.h>
+ #include <signal.h>
+ #include <stdlib.h>
+--- a/src/auditd-sendmail.c
++++ b/src/auditd-sendmail.c
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <unistd.h> // for access()
+ #include <string.h>
+--- a/src/auditd.c
++++ b/src/auditd.c
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+--- a/src/ausearch.c
++++ b/src/ausearch.c
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <stdio_ext.h>
+ #include <string.h>
+--- a/src/autrace.c
++++ b/src/autrace.c
+@@ -21,6 +21,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/wait.h>
+--- a/src/delete_all.c
++++ b/src/delete_all.c
+@@ -20,6 +20,7 @@
+ * Steve Grubb <sgrubb@redhat.com>
+ */
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/, sys-process/audit/files/
@ 2021-01-01 22:57 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2021-01-01 22:57 UTC (permalink / raw
To: gentoo-commits
commit: dcf4262cdd1e64450de4f825edc61f310894401c
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 1 22:52:33 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan 1 22:57:14 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcf4262c
sys-process/audit: Revert "Remove old (py3.6)"
Removed too many files/ due to a misgrep.
Reverts: 7494ff77d198e87226f368af01769e2ebb38cb61
Closes: https://bugs.gentoo.org/762919
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sys-process/audit/Manifest | 4 +
sys-process/audit/audit-2.6.4.ebuild | 230 +++++++++++++++++++++
sys-process/audit/audit-2.7.1.ebuild | 230 +++++++++++++++++++++
sys-process/audit/audit-2.8.2.ebuild | 228 ++++++++++++++++++++
sys-process/audit/audit-2.8.3.ebuild | 228 ++++++++++++++++++++
.../audit/files/audit-2.1.3-ia64-compile-fix.patch | 212 +++++++++++++++++++
sys-process/audit/files/audit.rules | 24 +++
sys-process/audit/files/audit.rules.stop.post | 12 ++
sys-process/audit/files/audit.rules.stop.pre | 15 ++
9 files changed, 1183 insertions(+)
diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
index d5276de092b..2890c29de36 100644
--- a/sys-process/audit/Manifest
+++ b/sys-process/audit/Manifest
@@ -1,4 +1,8 @@
DIST audit-017e6c6ab95df55f34e339d2139def83e5dada1f.patch 852 BLAKE2B 60d8b813f57338ce267a09913e68a0726acf5cf878cd2893fe2493f80d2b0ac1e0504dc7a72e85134ae2597b268cb1772b4e7c6c2f19149fc905f6928e2db47f SHA512 78e32c05b6896d37bacf0938954fbce7486a528dabd55421f1715438fe489171f9157059050abdcb3f673258aa28b4a11f643ddb7824f3499a195dbbe634f101
+DIST audit-2.6.4.tar.gz 1078677 BLAKE2B 056d9f269926d9b0d74f7187f833f1e94d4e03a5137750fe4ff87b71fa0ce0e0a8569b97ecbd671f951061cfb088dff17b46e37cc14122864c37615356646fc5 SHA512 69b5d3987d2b8b189d1242fde639af3d7d366e901733133e47ee71223caf73aa7da40b7811298f0af861969b0ab482c5ef9830b711bdd15bd5f4d0ebc88a1224
+DIST audit-2.7.1.tar.gz 1099083 BLAKE2B 10f72ac3273ce9e23e1fb8ad8d57dcae772ba1f861f519867399d95e14f4809897637969de45566d62a73a35e5674260155773daf8de00481fcbd1b9c3138f96 SHA512 37964d81deee8608fde5f90d5d096727d3eb009e084be34749adcb0662e607e35c49c80bd83ce38b17161f11363b691721c8a8aa5dea832d320c53ab0ebb7483
+DIST audit-2.8.2.tar.gz 1121970 BLAKE2B bbec694ed1177a8590d035c2d6d197e49343fc370b101589e58736042c3b12cabb68fe796422f3133feb79068ab7d5931efa5414d22edead10c8871fefcd2549 SHA512 888ebf5e8e9d285b82d87377fc8836886d7a8b089c1be4091420a77a0250c9baf09aebb7a6330ff5043fb35f51eb6baf8d4491e26da7ad0811f0087e395b5012
+DIST audit-2.8.3.tar.gz 1107583 BLAKE2B 21c2b8543a31c0ca4319af40b844f4400615108a59195a95ea79499ff2923d7dbbc840716d60dfba311bfc451983cd4cd0f7cb27c2444825df2c0dfb50f9614f SHA512 aa939b81a66111f4e466208d7a38414bd186d00ccd374b420439764905b4707bbfcdc2331a6179a080fca981d19171696ecabd26674205b2f9339c44954db933
DIST audit-2.8.4.tar.gz 1123889 BLAKE2B b80272b1984942d3c38bde30d22c736a8cc8896a2e42a9bf286446129313ce57a2a117ce26a0a5f1a4a06b4a48ddde463b8837b8c98273051be0c90e5bbebd42 SHA512 5795c565effab995cee447a2dc457ef6a6f15201fb185d7104992ac373a3cb5cfc865dd661c0896a895c96f452eff392d455064d0eead55cd7364d96e0d15c4a
DIST audit-2.8.5.tar.gz 1140694 BLAKE2B 64fd0cd93f934e3dd11faf21fcd765894a9c4336d8322179980bb7df1ef5a06d301a665860aeb84fefa0cf278940668023675b99ba7f33cdcfb542d869034358 SHA512 7d416aaa21c1a167f8e911ca82aecbaba804424f3243f505066c43ecc4a62a34feb2c27555e99d3268608404793dccca0f828c63670e3aa816016fb493f8174a
DIST audit-2.8.5_p80866dc78b5d.tar.gz 552094 BLAKE2B adb936a314ef2f11828ee00f3513631e06e2df09e37e68be27b1b694e278116d2f486dbde7ed57c77d9ff0bcd09309ea841959c7a66caed6770f367d65dd14f4 SHA512 7ec103bf076cfac7906748162e78835f1f65dd9d68e3a7466346e0473075beb47897adf88ab9ba0eb42db1953372aafb16cc040674b9a9c887730c062b82540a
diff --git a/sys-process/audit/audit-2.6.4.ebuild b/sys-process/audit/audit-2.6.4.ebuild
new file mode 100644
index 00000000000..fe6c17834e6
--- /dev/null
+++ b/sys-process/audit/audit-2.6.4.ebuild
@@ -0,0 +1,230 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python3_6 )
+
+inherit autotools ltprune multilib multilib-minimal toolchain-funcs preserve-libs python-r1 linux-info systemd usr-ldscript
+
+DESCRIPTION="Userspace utilities for storing and processing auditing records"
+HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
+SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
+IUSE="gssapi ldap python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+# Testcases are pretty useless as they are built for RedHat users/groups and kernels.
+RESTRICT="test"
+
+RDEPEND="gssapi? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ sys-libs/libcap-ng
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.34
+ python? ( dev-lang/swig:0 )"
+# Do not use os-headers as this is linux specific
+
+CONFIG_CHECK="~AUDIT"
+
+pkg_setup() {
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ eapply_user
+
+ # Do not build GUI tools
+ sed -i \
+ -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
+ "${S}"/configure.ac || die
+ sed -i \
+ -e 's,system-config-audit,,g' \
+ "${S}"/Makefile.am || die
+ rm -rf "${S}"/system-config-audit
+
+ if ! use ldap; then
+ sed -i \
+ -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
+ "${S}"/configure.ac || die
+ sed -i \
+ -e '/^SUBDIRS/s,zos-remote,,g' \
+ "${S}"/audisp/plugins/Makefile.am || die
+ fi
+
+ # Don't build static version of Python module.
+ eapply "${FILESDIR}"/${PN}-2.4.3-python.patch
+
+ # glibc/kernel upstreams suck with both defining ia64_fpreg
+ # This patch is a horribly workaround that is only valid as long as you
+ # don't need the OTHER definitions in fpu.h.
+ eapply "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
+
+ # there is no --without-golang conf option
+ sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
+
+ # Regenerate autotooling
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local ECONF_SOURCE=${S}
+ econf \
+ --sbindir="${EPREFIX}/sbin" \
+ $(use_enable gssapi gssapi-krb5) \
+ $(use_enable static-libs static) \
+ --enable-systemd \
+ --without-python \
+ --without-python3
+
+ if multilib_is_native_abi; then
+ python_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ if python_is_python3; then
+ econf --without-python --with-python3
+ else
+ econf --with-python --without-python3
+ fi
+ }
+
+ use python && python_foreach_impl python_configure
+ fi
+}
+
+src_configure() {
+ tc-export_build_env BUILD_{CC,CPP}
+ export CC_FOR_BUILD="${BUILD_CC}"
+ export CPP_FOR_BUILD="${BUILD_CPP}"
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+
+ python_compile() {
+ local pysuffix pydef
+ if python_is_python3; then
+ pysuffix=3
+ pydef='USE_PYTHON3=true'
+ else
+ pysuffix=2
+ pydef='HAVE_PYTHON=true'
+ fi
+
+ emake -C "${BUILD_DIR}"/bindings/swig \
+ VPATH="${native_build}/lib" \
+ LIBS="${native_build}/lib/libaudit.la" \
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
+ ${pydef}
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
+ ${pydef}
+ }
+
+ local native_build="${BUILD_DIR}"
+ use python && python_foreach_impl python_compile
+ else
+ emake -C lib
+ emake -C auparse
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
+
+ python_install() {
+ local pysuffix pydef
+ if python_is_python3; then
+ pysuffix=3
+ pydef='USE_PYTHON3=true'
+ else
+ pysuffix=2
+ pydef='HAVE_PYTHON=true'
+ fi
+
+ emake -C "${BUILD_DIR}"/bindings/swig \
+ VPATH="${native_build}/lib" \
+ LIBS="${native_build}/lib/libaudit.la" \
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
+ ${pydef} \
+ DESTDIR="${D}" install
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
+ ${pydef} \
+ DESTDIR="${D}" install
+ }
+
+ local native_build=${BUILD_DIR}
+ use python && python_foreach_impl python_install
+
+ # things like shadow use this so we need to be in /
+ gen_usr_ldscript -a audit auparse
+ else
+ emake -C lib DESTDIR="${D}" install
+ emake -C auparse DESTDIR="${D}" install
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS ChangeLog README* THANKS TODO
+ docinto contrib
+ dodoc contrib/{avc_snap,skeleton.c}
+ docinto contrib/plugin
+ dodoc contrib/plugin/*
+ docinto rules
+ dodoc rules/*
+
+ newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
+ newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
+
+ chmod 644 "${D}$(systemd_get_systemunitdir)"/auditd.service || die # 556436
+
+ [ -f "${ED}"/sbin/audisp-remote ] && \
+ dodir /usr/sbin && \
+ mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die
+
+ # Gentoo rules
+ insinto /etc/audit/
+ newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
+ doins "${FILESDIR}"/audit.rules.stop*
+
+ # audit logs go here
+ keepdir /var/log/audit/
+
+ # Security
+ lockdown_perms "${ED}"
+
+ prune_libtool_files --modules
+}
+
+pkg_preinst() {
+ # Preserve from the audit-1 series
+ preserve_old_lib /$(get_libdir)/libaudit.so.0
+}
+
+pkg_postinst() {
+ lockdown_perms "${EROOT}"
+ # Preserve from the audit-1 series
+ preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
+}
+
+lockdown_perms() {
+ # Upstream wants these to have restrictive perms.
+ # Should not || die as not all paths may exist.
+ local basedir="$1"
+ chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
+ chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
+ chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
+}
diff --git a/sys-process/audit/audit-2.7.1.ebuild b/sys-process/audit/audit-2.7.1.ebuild
new file mode 100644
index 00000000000..b3448548a50
--- /dev/null
+++ b/sys-process/audit/audit-2.7.1.ebuild
@@ -0,0 +1,230 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_6 )
+
+inherit autotools ltprune multilib multilib-minimal toolchain-funcs preserve-libs python-r1 linux-info systemd usr-ldscript
+
+DESCRIPTION="Userspace utilities for storing and processing auditing records"
+HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
+SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
+IUSE="gssapi ldap python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+# Testcases are pretty useless as they are built for RedHat users/groups and kernels.
+RESTRICT="test"
+
+RDEPEND="gssapi? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ sys-libs/libcap-ng
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.34
+ python? ( dev-lang/swig:0 )"
+# Do not use os-headers as this is linux specific
+
+CONFIG_CHECK="~AUDIT"
+
+pkg_setup() {
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ eapply_user
+
+ # Do not build GUI tools
+ sed -i \
+ -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
+ "${S}"/configure.ac || die
+ sed -i \
+ -e 's,system-config-audit,,g' \
+ "${S}"/Makefile.am || die
+ rm -rf "${S}"/system-config-audit
+
+ if ! use ldap; then
+ sed -i \
+ -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
+ "${S}"/configure.ac || die
+ sed -i \
+ -e '/^SUBDIRS/s,zos-remote,,g' \
+ "${S}"/audisp/plugins/Makefile.am || die
+ fi
+
+ # Don't build static version of Python module.
+ eapply "${FILESDIR}"/${PN}-2.4.3-python.patch
+
+ # glibc/kernel upstreams suck with both defining ia64_fpreg
+ # This patch is a horribly workaround that is only valid as long as you
+ # don't need the OTHER definitions in fpu.h.
+ eapply "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
+
+ # there is no --without-golang conf option
+ sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
+
+ # Regenerate autotooling
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local ECONF_SOURCE=${S}
+ econf \
+ --sbindir="${EPREFIX}/sbin" \
+ $(use_enable gssapi gssapi-krb5) \
+ $(use_enable static-libs static) \
+ --enable-systemd \
+ --without-python \
+ --without-python3
+
+ if multilib_is_native_abi; then
+ python_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ if python_is_python3; then
+ econf --without-python --with-python3
+ else
+ econf --with-python --without-python3
+ fi
+ }
+
+ use python && python_foreach_impl python_configure
+ fi
+}
+
+src_configure() {
+ tc-export_build_env BUILD_{CC,CPP}
+ export CC_FOR_BUILD="${BUILD_CC}"
+ export CPP_FOR_BUILD="${BUILD_CPP}"
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+
+ python_compile() {
+ local pysuffix pydef
+ if python_is_python3; then
+ pysuffix=3
+ pydef='USE_PYTHON3=true'
+ else
+ pysuffix=2
+ pydef='HAVE_PYTHON=true'
+ fi
+
+ emake -C "${BUILD_DIR}"/bindings/swig \
+ VPATH="${native_build}/lib" \
+ LIBS="${native_build}/lib/libaudit.la" \
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
+ ${pydef}
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
+ ${pydef}
+ }
+
+ local native_build="${BUILD_DIR}"
+ use python && python_foreach_impl python_compile
+ else
+ emake -C lib
+ emake -C auparse
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
+
+ python_install() {
+ local pysuffix pydef
+ if python_is_python3; then
+ pysuffix=3
+ pydef='USE_PYTHON3=true'
+ else
+ pysuffix=2
+ pydef='HAVE_PYTHON=true'
+ fi
+
+ emake -C "${BUILD_DIR}"/bindings/swig \
+ VPATH="${native_build}/lib" \
+ LIBS="${native_build}/lib/libaudit.la" \
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
+ ${pydef} \
+ DESTDIR="${D}" install
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
+ ${pydef} \
+ DESTDIR="${D}" install
+ }
+
+ local native_build=${BUILD_DIR}
+ use python && python_foreach_impl python_install
+
+ # things like shadow use this so we need to be in /
+ gen_usr_ldscript -a audit auparse
+ else
+ emake -C lib DESTDIR="${D}" install
+ emake -C auparse DESTDIR="${D}" install
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS ChangeLog README* THANKS TODO
+ docinto contrib
+ dodoc contrib/{avc_snap,skeleton.c}
+ docinto contrib/plugin
+ dodoc contrib/plugin/*
+ docinto rules
+ dodoc rules/*
+
+ newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
+ newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
+
+ chmod 644 "${D}$(systemd_get_systemunitdir)"/auditd.service || die # 556436
+
+ [ -f "${ED}"/sbin/audisp-remote ] && \
+ dodir /usr/sbin && \
+ mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die
+
+ # Gentoo rules
+ insinto /etc/audit/
+ newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
+ doins "${FILESDIR}"/audit.rules.stop*
+
+ # audit logs go here
+ keepdir /var/log/audit/
+
+ # Security
+ lockdown_perms "${ED}"
+
+ prune_libtool_files --modules
+}
+
+pkg_preinst() {
+ # Preserve from the audit-1 series
+ preserve_old_lib /$(get_libdir)/libaudit.so.0
+}
+
+pkg_postinst() {
+ lockdown_perms "${EROOT}"
+ # Preserve from the audit-1 series
+ preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
+}
+
+lockdown_perms() {
+ # Upstream wants these to have restrictive perms.
+ # Should not || die as not all paths may exist.
+ local basedir="$1"
+ chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
+ chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
+ chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
+}
diff --git a/sys-process/audit/audit-2.8.2.ebuild b/sys-process/audit/audit-2.8.2.ebuild
new file mode 100644
index 00000000000..6bcdd339ea4
--- /dev/null
+++ b/sys-process/audit/audit-2.8.2.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python3_6 )
+
+inherit autotools multilib multilib-minimal toolchain-funcs preserve-libs python-r1 linux-info systemd usr-ldscript
+
+DESCRIPTION="Userspace utilities for storing and processing auditing records"
+HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
+SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="gssapi ldap python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+# Testcases are pretty useless as they are built for RedHat users/groups and kernels.
+RESTRICT="test"
+
+RDEPEND="gssapi? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ sys-libs/libcap-ng
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.34
+ python? ( dev-lang/swig:0 )"
+# Do not use os-headers as this is linux specific
+
+CONFIG_CHECK="~AUDIT"
+
+pkg_setup() {
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ eapply_user
+
+ # Do not build GUI tools
+ sed -i \
+ -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
+ "${S}"/configure.ac || die
+ sed -i \
+ -e 's,system-config-audit,,g' \
+ "${S}"/Makefile.am || die
+ rm -rf "${S}"/system-config-audit
+
+ if ! use ldap; then
+ sed -i \
+ -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
+ "${S}"/configure.ac || die
+ sed -i \
+ -e '/^SUBDIRS/s,zos-remote,,g' \
+ "${S}"/audisp/plugins/Makefile.am || die
+ fi
+
+ # Don't build static version of Python module.
+ eapply "${FILESDIR}"/${PN}-2.4.3-python.patch
+
+ # glibc/kernel upstreams suck with both defining ia64_fpreg
+ # This patch is a horribly workaround that is only valid as long as you
+ # don't need the OTHER definitions in fpu.h.
+ eapply "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
+
+ # there is no --without-golang conf option
+ sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
+
+ # Regenerate autotooling
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local ECONF_SOURCE=${S}
+ econf \
+ --sbindir="${EPREFIX}/sbin" \
+ $(use_enable gssapi gssapi-krb5) \
+ $(use_enable static-libs static) \
+ --enable-systemd \
+ --without-python \
+ --without-python3
+
+ if multilib_is_native_abi; then
+ python_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ if python_is_python3; then
+ econf --without-python --with-python3
+ else
+ econf --with-python --without-python3
+ fi
+ }
+
+ use python && python_foreach_impl python_configure
+ fi
+}
+
+src_configure() {
+ tc-export_build_env BUILD_{CC,CPP}
+ export CC_FOR_BUILD="${BUILD_CC}"
+ export CPP_FOR_BUILD="${BUILD_CPP}"
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+
+ python_compile() {
+ local pysuffix pydef
+ if python_is_python3; then
+ pysuffix=3
+ pydef='USE_PYTHON3=true'
+ else
+ pysuffix=2
+ pydef='HAVE_PYTHON=true'
+ fi
+
+ emake -C "${BUILD_DIR}"/bindings/swig \
+ VPATH="${native_build}/lib" \
+ LIBS="${native_build}/lib/libaudit.la" \
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
+ ${pydef}
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
+ ${pydef}
+ }
+
+ local native_build="${BUILD_DIR}"
+ use python && python_foreach_impl python_compile
+ else
+ emake -C lib
+ emake -C auparse
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
+
+ python_install() {
+ local pysuffix pydef
+ if python_is_python3; then
+ pysuffix=3
+ pydef='USE_PYTHON3=true'
+ else
+ pysuffix=2
+ pydef='HAVE_PYTHON=true'
+ fi
+
+ emake -C "${BUILD_DIR}"/bindings/swig \
+ VPATH="${native_build}/lib" \
+ LIBS="${native_build}/lib/libaudit.la" \
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
+ ${pydef} \
+ DESTDIR="${D}" install
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
+ ${pydef} \
+ DESTDIR="${D}" install
+ }
+
+ local native_build=${BUILD_DIR}
+ use python && python_foreach_impl python_install
+
+ # things like shadow use this so we need to be in /
+ gen_usr_ldscript -a audit auparse
+ else
+ emake -C lib DESTDIR="${D}" install
+ emake -C auparse DESTDIR="${D}" install
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS ChangeLog README* THANKS TODO
+ docinto contrib
+ dodoc contrib/{avc_snap,skeleton.c}
+ docinto contrib/plugin
+ dodoc contrib/plugin/*
+ docinto rules
+ dodoc rules/*
+
+ newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
+ newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
+
+ [ -f "${ED}"/sbin/audisp-remote ] && \
+ dodir /usr/sbin && \
+ mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die
+
+ # Gentoo rules
+ insinto /etc/audit/
+ newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
+ doins "${FILESDIR}"/audit.rules.stop*
+
+ # audit logs go here
+ keepdir /var/log/audit/
+
+ find "${D}" -name '*.la' -delete || die
+
+ # Security
+ lockdown_perms "${ED}"
+}
+
+pkg_preinst() {
+ # Preserve from the audit-1 series
+ preserve_old_lib /$(get_libdir)/libaudit.so.0
+}
+
+pkg_postinst() {
+ lockdown_perms "${EROOT}"
+ # Preserve from the audit-1 series
+ preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
+}
+
+lockdown_perms() {
+ # Upstream wants these to have restrictive perms.
+ # Should not || die as not all paths may exist.
+ local basedir="$1"
+ chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
+ chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
+ chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
+}
diff --git a/sys-process/audit/audit-2.8.3.ebuild b/sys-process/audit/audit-2.8.3.ebuild
new file mode 100644
index 00000000000..64b55ec39e2
--- /dev/null
+++ b/sys-process/audit/audit-2.8.3.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python3_6 )
+
+inherit autotools multilib multilib-minimal toolchain-funcs preserve-libs python-r1 linux-info systemd usr-ldscript
+
+DESCRIPTION="Userspace utilities for storing and processing auditing records"
+HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
+SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
+IUSE="gssapi ldap python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+# Testcases are pretty useless as they are built for RedHat users/groups and kernels.
+RESTRICT="test"
+
+RDEPEND="gssapi? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ sys-libs/libcap-ng
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.34
+ python? ( dev-lang/swig:0 )"
+# Do not use os-headers as this is linux specific
+
+CONFIG_CHECK="~AUDIT"
+
+pkg_setup() {
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ eapply_user
+
+ # Do not build GUI tools
+ sed -i \
+ -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
+ "${S}"/configure.ac || die
+ sed -i \
+ -e 's,system-config-audit,,g' \
+ "${S}"/Makefile.am || die
+ rm -rf "${S}"/system-config-audit
+
+ if ! use ldap; then
+ sed -i \
+ -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
+ "${S}"/configure.ac || die
+ sed -i \
+ -e '/^SUBDIRS/s,zos-remote,,g' \
+ "${S}"/audisp/plugins/Makefile.am || die
+ fi
+
+ # Don't build static version of Python module.
+ eapply "${FILESDIR}"/${PN}-2.4.3-python.patch
+
+ # glibc/kernel upstreams suck with both defining ia64_fpreg
+ # This patch is a horribly workaround that is only valid as long as you
+ # don't need the OTHER definitions in fpu.h.
+ eapply "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
+
+ # there is no --without-golang conf option
+ sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
+
+ # Regenerate autotooling
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local ECONF_SOURCE=${S}
+ econf \
+ --sbindir="${EPREFIX}/sbin" \
+ $(use_enable gssapi gssapi-krb5) \
+ $(use_enable static-libs static) \
+ --enable-systemd \
+ --without-python \
+ --without-python3
+
+ if multilib_is_native_abi; then
+ python_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ if python_is_python3; then
+ econf --without-python --with-python3
+ else
+ econf --with-python --without-python3
+ fi
+ }
+
+ use python && python_foreach_impl python_configure
+ fi
+}
+
+src_configure() {
+ tc-export_build_env BUILD_{CC,CPP}
+ export CC_FOR_BUILD="${BUILD_CC}"
+ export CPP_FOR_BUILD="${BUILD_CPP}"
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+
+ python_compile() {
+ local pysuffix pydef
+ if python_is_python3; then
+ pysuffix=3
+ pydef='USE_PYTHON3=true'
+ else
+ pysuffix=2
+ pydef='HAVE_PYTHON=true'
+ fi
+
+ emake -C "${BUILD_DIR}"/bindings/swig \
+ VPATH="${native_build}/lib" \
+ LIBS="${native_build}/lib/libaudit.la" \
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
+ ${pydef}
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
+ ${pydef}
+ }
+
+ local native_build="${BUILD_DIR}"
+ use python && python_foreach_impl python_compile
+ else
+ emake -C lib
+ emake -C auparse
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
+
+ python_install() {
+ local pysuffix pydef
+ if python_is_python3; then
+ pysuffix=3
+ pydef='USE_PYTHON3=true'
+ else
+ pysuffix=2
+ pydef='HAVE_PYTHON=true'
+ fi
+
+ emake -C "${BUILD_DIR}"/bindings/swig \
+ VPATH="${native_build}/lib" \
+ LIBS="${native_build}/lib/libaudit.la" \
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
+ ${pydef} \
+ DESTDIR="${D}" install
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
+ ${pydef} \
+ DESTDIR="${D}" install
+ }
+
+ local native_build=${BUILD_DIR}
+ use python && python_foreach_impl python_install
+
+ # things like shadow use this so we need to be in /
+ gen_usr_ldscript -a audit auparse
+ else
+ emake -C lib DESTDIR="${D}" install
+ emake -C auparse DESTDIR="${D}" install
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS ChangeLog README* THANKS TODO
+ docinto contrib
+ dodoc contrib/{avc_snap,skeleton.c}
+ docinto contrib/plugin
+ dodoc contrib/plugin/*
+ docinto rules
+ dodoc rules/*
+
+ newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
+ newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
+
+ [ -f "${ED}"/sbin/audisp-remote ] && \
+ dodir /usr/sbin && \
+ mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die
+
+ # Gentoo rules
+ insinto /etc/audit/
+ newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
+ doins "${FILESDIR}"/audit.rules.stop*
+
+ # audit logs go here
+ keepdir /var/log/audit/
+
+ find "${D}" -name '*.la' -delete || die
+
+ # Security
+ lockdown_perms "${ED}"
+}
+
+pkg_preinst() {
+ # Preserve from the audit-1 series
+ preserve_old_lib /$(get_libdir)/libaudit.so.0
+}
+
+pkg_postinst() {
+ lockdown_perms "${EROOT}"
+ # Preserve from the audit-1 series
+ preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
+}
+
+lockdown_perms() {
+ # Upstream wants these to have restrictive perms.
+ # Should not || die as not all paths may exist.
+ local basedir="$1"
+ chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
+ chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
+ chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
+}
diff --git a/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch b/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch
new file mode 100644
index 00000000000..3ec60fbc48e
--- /dev/null
+++ b/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch
@@ -0,0 +1,212 @@
+diff -Nuar -X exclude audit-2.1.3.orig/configure.ac audit-2.1.3/configure.ac
+--- audit-2.1.3.orig/configure.ac 2011-08-15 17:30:58.000000000 +0000
++++ audit-2.1.3/configure.ac 2012-12-18 20:03:22.000000000 +0000
+@@ -79,6 +79,9 @@
+ esac
+ fi
+
++AC_CHECK_HEADER([asm/ptrace.h], [AC_DEFINE([HAVE_ASM_PTRACE_H],[],[Define to 1 if you have asm/ptrace.h])], [])
++AC_CHECK_HEADER([linux/ptrace.h], [AC_DEFINE([HAVE_LINUX_PTRACE_H],[],[Define to 1 if you have linux/ptrace.h])], [])
++
+ #gssapi
+ AC_ARG_ENABLE(gssapi_krb5,
+ [AS_HELP_STRING([--enable-gssapi-krb5],[Enable GSSAPI Kerberos 5 support @<:@default=no@:>@])],
+diff -Nuar -X exclude audit-2.1.3.orig/src/auditctl.c audit-2.1.3/src/auditctl.c
+--- audit-2.1.3.orig/src/auditctl.c 2011-08-15 17:31:00.000000000 +0000
++++ audit-2.1.3/src/auditctl.c 2012-12-18 20:21:21.000000000 +0000
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h> /* strdup needs xopen define */
+diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-config.c audit-2.1.3/src/auditd-config.c
+--- audit-2.1.3.orig/src/auditd-config.c 2011-08-15 17:31:00.000000000 +0000
++++ audit-2.1.3/src/auditd-config.c 2012-12-18 20:21:23.000000000 +0000
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/stat.h>
+diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-dispatch.c audit-2.1.3/src/auditd-dispatch.c
+--- audit-2.1.3.orig/src/auditd-dispatch.c 2011-08-15 17:31:00.000000000 +0000
++++ audit-2.1.3/src/auditd-dispatch.c 2012-12-18 20:21:27.000000000 +0000
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <unistd.h>
+ #include <sys/uio.h>
+ #include <fcntl.h>
+diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-event.c audit-2.1.3/src/auditd-event.c
+--- audit-2.1.3.orig/src/auditd-event.c 2011-08-15 17:31:00.000000000 +0000
++++ audit-2.1.3/src/auditd-event.c 2012-12-18 20:21:29.000000000 +0000
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-listen.c audit-2.1.3/src/auditd-listen.c
+--- audit-2.1.3.orig/src/auditd-listen.c 2011-08-15 17:31:00.000000000 +0000
++++ audit-2.1.3/src/auditd-listen.c 2012-12-18 20:21:31.000000000 +0000
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/stat.h>
+diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-reconfig.c audit-2.1.3/src/auditd-reconfig.c
+--- audit-2.1.3.orig/src/auditd-reconfig.c 2011-08-15 17:31:00.000000000 +0000
++++ audit-2.1.3/src/auditd-reconfig.c 2012-12-18 20:21:33.000000000 +0000
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <pthread.h>
+ #include <signal.h>
+ #include <stdlib.h>
+diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-sendmail.c audit-2.1.3/src/auditd-sendmail.c
+--- audit-2.1.3.orig/src/auditd-sendmail.c 2011-08-15 17:31:00.000000000 +0000
++++ audit-2.1.3/src/auditd-sendmail.c 2012-12-18 20:21:34.000000000 +0000
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <unistd.h> // for access()
+ #include <string.h>
+diff -Nuar -X exclude audit-2.1.3.orig/src/auditd.c audit-2.1.3/src/auditd.c
+--- audit-2.1.3.orig/src/auditd.c 2011-08-15 17:31:00.000000000 +0000
++++ audit-2.1.3/src/auditd.c 2012-12-18 20:21:38.000000000 +0000
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+diff -Nuar -X exclude audit-2.1.3.orig/src/autrace.c audit-2.1.3/src/autrace.c
+--- audit-2.1.3.orig/src/autrace.c 2011-08-15 17:31:00.000000000 +0000
++++ audit-2.1.3/src/autrace.c 2012-12-18 20:21:43.000000000 +0000
+@@ -21,6 +21,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/wait.h>
+diff -Nuar -X exclude audit-2.1.3.orig/src/delete_all.c audit-2.1.3/src/delete_all.c
+--- audit-2.1.3.orig/src/delete_all.c 2011-08-15 17:31:00.000000000 +0000
++++ audit-2.1.3/src/delete_all.c 2012-12-18 20:21:48.000000000 +0000
+@@ -20,6 +20,7 @@
+ * Steve Grubb <sgrubb@redhat.com>
+ */
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
+diff -Nuar -X exclude audit-2.1.3.orig/lib/fixup.h audit-2.1.3/lib/fixup.h
+--- audit-2.1.3.orig/lib/fixup.h 1970-01-01 00:00:00.000000000 +0000
++++ audit-2.1.3/lib/fixup.h 2012-12-18 20:21:02.000000000 +0000
+@@ -0,0 +1,17 @@
++#ifndef _AUDIT_IA64_FIXUP_H_
++#define _AUDIT_IA64_FIXUP_H_
++
++#ifdef __ia64__ /* what a pos */
++# include <linux/types.h>
++# define _ASM_IA64_FPU_H
++#endif
++#include <signal.h>
++/*
++#ifdef HAVE_ASM_PTRACE_H
++# include <asm/ptrace.h>
++#endif
++#ifdef HAVE_LINUX_PTRACE_H
++# include <linux/ptrace.h>
++#endif
++*/
++#endif
+--- audit-2.1.3/src/ausearch.c 2012-12-22 03:09:54.000000000 +0000
++++ audit-2.1.3/src/ausearch.c 2012-12-22 03:10:02.000000000 +0000
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <stdio_ext.h>
+ #include <string.h>
+diff -Nuar audit-2.1.3.orig/audisp/audispd.c audit-2.1.3/audisp/audispd.c
+--- audit-2.1.3.orig/audisp/audispd.c 2011-08-15 17:30:59.000000000 +0000
++++ audit-2.1.3/audisp/audispd.c 2012-12-22 03:25:15.000000000 +0000
+@@ -21,6 +21,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+diff -Nuar audit-2.1.3.orig/audisp/plugins/prelude/audisp-prelude.c audit-2.1.3/audisp/plugins/prelude/audisp-prelude.c
+--- audit-2.1.3.orig/audisp/plugins/prelude/audisp-prelude.c 2011-08-15 17:30:59.000000000 +0000
++++ audit-2.1.3/audisp/plugins/prelude/audisp-prelude.c 2012-12-22 03:25:20.000000000 +0000
+@@ -21,6 +21,8 @@
+ *
+ */
+
++#include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <signal.h>
+diff -Nuar audit-2.1.3.orig/audisp/plugins/remote/audisp-remote.c audit-2.1.3/audisp/plugins/remote/audisp-remote.c
+--- audit-2.1.3.orig/audisp/plugins/remote/audisp-remote.c 2011-08-15 17:30:59.000000000 +0000
++++ audit-2.1.3/audisp/plugins/remote/audisp-remote.c 2012-12-22 03:25:22.000000000 +0000
+@@ -22,6 +22,7 @@
+ */
+
+ #include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <signal.h>
+ #include <syslog.h>
+diff -Nuar audit-2.1.3.orig/contrib/plugin/audisp-example.c audit-2.1.3/contrib/plugin/audisp-example.c
+--- audit-2.1.3.orig/contrib/plugin/audisp-example.c 2011-08-15 17:31:02.000000000 +0000
++++ audit-2.1.3/contrib/plugin/audisp-example.c 2012-12-22 03:25:27.000000000 +0000
+@@ -37,6 +37,8 @@
+ */
+
+ #define _GNU_SOURCE
++#include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <signal.h>
+ #include <string.h>
+diff -Nuar audit-2.1.3.orig/contrib/skeleton.c audit-2.1.3/contrib/skeleton.c
+--- audit-2.1.3.orig/contrib/skeleton.c 2011-08-15 17:31:02.000000000 +0000
++++ audit-2.1.3/contrib/skeleton.c 2012-12-22 03:25:40.000000000 +0000
+@@ -7,6 +7,8 @@
+ * gcc skeleton.c -o skeleton -laudit
+ */
+
++#include "config.h"
++#include "fixup.h"
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/uio.h>
diff --git a/sys-process/audit/files/audit.rules b/sys-process/audit/files/audit.rules
new file mode 100644
index 00000000000..ef0e6ee26f3
--- /dev/null
+++ b/sys-process/audit/files/audit.rules
@@ -0,0 +1,24 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# This file contains the auditctl rules that are loaded
+# whenever the audit daemon is started via the initscripts.
+# The rules are simply the parameters that would be passed
+# to auditctl.
+
+# First rule - delete all
+# This is to clear out old rules, so we don't append to them.
+-D
+
+# Feel free to add below this line. See auditctl man page
+
+# The following rule would cause all of the syscalls listed to be ignored in logging.
+# -a entry,never -S read -S write -S open -S fstat -S fstat64 -S mmap -S brk -S munmap -S _llseek -S nanosleep -S fcntl64 -S close -S dup2 -S rt_sigaction -S stat64 -S stat
+
+# The following rule would cause the capture of all systems not caught above.
+# -a entry,always -S all
+
+# Increase the buffers to survive stress events
+-b 256
+
+# vim:ft=conf:
diff --git a/sys-process/audit/files/audit.rules.stop.post b/sys-process/audit/files/audit.rules.stop.post
new file mode 100644
index 00000000000..29ae197f18b
--- /dev/null
+++ b/sys-process/audit/files/audit.rules.stop.post
@@ -0,0 +1,12 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# This file contains the auditctl rules that are loaded immediately after the
+# audit deamon is stopped via the initscripts.
+# The rules are simply the parameters that would be passed
+# to auditctl.
+
+# Not used for the default Gentoo configuration as of v1.2.3
+# Paranoid security types might wish to reconfigure kauditd here.
+
+# vim:ft=conf:
diff --git a/sys-process/audit/files/audit.rules.stop.pre b/sys-process/audit/files/audit.rules.stop.pre
new file mode 100644
index 00000000000..1f34173369e
--- /dev/null
+++ b/sys-process/audit/files/audit.rules.stop.pre
@@ -0,0 +1,15 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# This file contains the auditctl rules that are loaded immediately before the
+# audit deamon is stopped via the initscripts.
+# The rules are simply the parameters that would be passed
+# to auditctl.
+
+# auditd is stopping, don't capture events anymore
+-D
+
+# Disable kernel generating audit events
+-e 0
+
+# vim:ft=conf:
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/, sys-process/audit/files/
@ 2021-05-09 8:35 Lars Wendler
0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2021-05-09 8:35 UTC (permalink / raw
To: gentoo-commits
commit: b585fe61267e021273ad381650aa00bcb5df3eab
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri May 7 17:02:43 2021 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun May 9 08:35:36 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b585fe61
sys-process/audit: Fix for slibtool
Thanks-to: orbea <orbea <AT> riseup.net>
Upstream: https://github.com/linux-audit/audit-userspace/commit/a417399
Closes: https://bugs.gentoo.org/779529
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
sys-process/audit/audit-3.0.1.ebuild | 5 +-
sys-process/audit/files/audit-3.0.1-slibtool.patch | 207 +++++++++++++++++++++
2 files changed, 211 insertions(+), 1 deletion(-)
diff --git a/sys-process/audit/audit-3.0.1.ebuild b/sys-process/audit/audit-3.0.1.ebuild
index bc901e6325b..5c63dae44b9 100644
--- a/sys-process/audit/audit-3.0.1.ebuild
+++ b/sys-process/audit/audit-3.0.1.ebuild
@@ -5,7 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
-inherit multilib multilib-minimal toolchain-funcs python-r1 linux-info systemd usr-ldscript
+inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info systemd usr-ldscript
DESCRIPTION="Userspace utilities for storing and processing auditing records"
HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
@@ -30,6 +30,8 @@ BDEPEND="python? ( dev-lang/swig:0 )"
CONFIG_CHECK="~AUDIT"
+PATCHES=( "${FILESDIR}"/${P}-slibtool.patch )
+
src_prepare() {
# audisp-remote moved in multilib_src_install_all
sed -i \
@@ -40,6 +42,7 @@ src_prepare() {
echo -e '%:\n\t:' | tee rules/Makefile.{am,in} >/dev/null
default
+ eautoreconf
}
multilib_src_configure() {
diff --git a/sys-process/audit/files/audit-3.0.1-slibtool.patch b/sys-process/audit/files/audit-3.0.1-slibtool.patch
new file mode 100644
index 00000000000..a1cf7534178
--- /dev/null
+++ b/sys-process/audit/files/audit-3.0.1-slibtool.patch
@@ -0,0 +1,207 @@
+From 8d6a7be8e29d00ab08c0cdcaf0dd293ed834205d Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Wed, 31 Mar 2021 05:51:53 -0700
+Subject: [PATCH] build: Link with libtool archives instead.
+
+Signed-off-by: orbea <orbea@riseup.net>
+---
+ audisp/Makefile.am | 10 +++++-----
+ audisp/plugins/ids/Makefile.am | 2 +-
+ audisp/plugins/remote/Makefile.am | 2 +-
+ audisp/plugins/statsd/Makefile.am | 2 +-
+ audisp/plugins/syslog/Makefile.am | 2 +-
+ audisp/plugins/zos-remote/Makefile.am | 2 +-
+ src/Makefile.am | 11 +++++------
+ src/libev/Makefile.am | 5 +++--
+ tools/aulast/Makefile.am | 2 +-
+ tools/aulastlog/Makefile.am | 2 +-
+ tools/ausyscall/Makefile.am | 2 +-
+ tools/auvirt/Makefile.am | 2 +-
+ 12 files changed, 22 insertions(+), 22 deletions(-)
+
+diff --git a/audisp/Makefile.am b/audisp/Makefile.am
+index 852169e0..c477ee19 100644
+--- a/audisp/Makefile.am
++++ b/audisp/Makefile.am
+@@ -23,13 +23,13 @@
+ SUBDIRS = plugins
+ CONFIG_CLEAN_FILES = *.rej *.orig
+ AM_CPPFLAGS = -D_GNU_SOURCE -fPIC -DPIC -I${top_srcdir} -I${top_srcdir}/lib -I${top_srcdir}/src -I${top_srcdir}/src/libev
+-LIBS = -L${top_builddir}/lib -laudit
++LIBS = ${top_builddir}/lib/libaudit.la
+ LDADD = -lpthread
+
+ noinst_HEADERS = audispd-pconfig.h audispd-llist.h audispd-config.h \
+ queue.h audispd-builtins.h libdisp.h
+-libdisp_a_SOURCES = audispd.c audispd-pconfig.c queue.c \
++libdisp_la_SOURCES = audispd.c audispd-pconfig.c queue.c \
+ audispd-llist.c audispd-builtins.c
+-libdisp_a_CFLAGS = -fno-strict-aliasing
+-noinst_LIBRARIES = libdisp.a
+-
++libdisp_la_CFLAGS = -fno-strict-aliasing
++libdisp_la_LDFLAGS = -no-undefined -static
++noinst_LTLIBRARIES = libdisp.la
+diff --git a/audisp/plugins/ids/Makefile.am b/audisp/plugins/ids/Makefile.am
+index 65d83b64..9bb141fa 100644
+--- a/audisp/plugins/ids/Makefile.am
++++ b/audisp/plugins/ids/Makefile.am
+@@ -37,7 +37,7 @@ audisp_ids_SOURCES = account.c avl.c ids.c ids_config.c model_bad_event.c \
+ model_behavior.c nvpair.c origin.c reactions.c session.c \
+ timer-services.c
+ audisp_ids_CFLAGS = -D_GNU_SOURCE
+-audisp_ids_LDADD = -L${top_builddir}/lib -laudit -L${top_builddir}/auparse -lauparse -L${top_builddir}/common -laucommon -lpthread
++audisp_ids_LDADD = ${top_builddir}/lib/libaudit.la ${top_builddir}/auparse/libauparse.la ${top_builddir}/common/libaucommon.la -lpthread
+
+ install-data-hook:
+ mkdir -p -m 0750 ${DESTDIR}${plugin_confdir}
+diff --git a/audisp/plugins/remote/Makefile.am b/audisp/plugins/remote/Makefile.am
+index bd3f3016..ae867079 100644
+--- a/audisp/plugins/remote/Makefile.am
++++ b/audisp/plugins/remote/Makefile.am
+@@ -37,7 +37,7 @@ audisp_remote_DEPENDENCIES = ${top_builddir}/common/libaucommon.la
+ audisp_remote_SOURCES = audisp-remote.c remote-config.c queue.c
+ audisp_remote_CFLAGS = -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -Wundef
+ audisp_remote_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
+-audisp_remote_LDADD = $(CAPNG_LDADD) $(gss_libs) -L${top_builddir}/common -laucommon
++audisp_remote_LDADD = $(CAPNG_LDADD) $(gss_libs) ${top_builddir}/common/libaucommon.la
+
+ test_queue_SOURCES = queue.c test-queue.c
+
+diff --git a/audisp/plugins/statsd/Makefile.am b/audisp/plugins/statsd/Makefile.am
+index 7ba887df..a105e66b 100644
+--- a/audisp/plugins/statsd/Makefile.am
++++ b/audisp/plugins/statsd/Makefile.am
+@@ -30,7 +30,7 @@ sbin_PROGRAMS = audisp-statsd
+ man_MANS = audisp-statsd.8
+ audisp_statsd_SOURCES = audisp-statsd.c
+ audisp_statsd_CFLAGS = -g -D_GNU_SOURCE
+-audisp_statsd_LDADD = -L${top_builddir}/auparse -lauparse -L${top_builddir}/lib -laudit
++audisp_statsd_LDADD = ${top_builddir}/auparse/libauparse.la ${top_builddir}/lib/libaudit.la
+
+ install-data-hook:
+ mkdir -p -m 0750 ${DESTDIR}${plugin_confdir}
+diff --git a/audisp/plugins/syslog/Makefile.am b/audisp/plugins/syslog/Makefile.am
+index 353229ec..e5451866 100644
+--- a/audisp/plugins/syslog/Makefile.am
++++ b/audisp/plugins/syslog/Makefile.am
+@@ -33,7 +33,7 @@ audisp_syslog_DEPENDENCIES = ${top_builddir}/common/libaucommon.la
+ audisp_syslog_SOURCES = audisp-syslog.c
+ audisp_syslog_CFLAGS = -fPIE -DPIE -g -D_GNU_SOURCE -Wundef
+ audisp_syslog_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
+-audisp_syslog_LDADD = $(CAPNG_LDADD) -L${top_builddir}/common -laucommon -L${top_builddir}/auparse -lauparse
++audisp_syslog_LDADD = $(CAPNG_LDADD) ${top_builddir}/common/libaucommon.la ${top_builddir}/auparse/libauparse.la
+
+ install-data-hook:
+ mkdir -p -m 0750 ${DESTDIR}${plugin_confdir}
+diff --git a/audisp/plugins/zos-remote/Makefile.am b/audisp/plugins/zos-remote/Makefile.am
+index d8d88b3f..d51e83e7 100644
+--- a/audisp/plugins/zos-remote/Makefile.am
++++ b/audisp/plugins/zos-remote/Makefile.am
+@@ -24,7 +24,7 @@
+ AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/lib -I${top_srcdir}/auparse
+ CONFIG_CLEAN_FILES = *.rej *.orig
+ EXTRA_DIST = zos-remote.conf audispd-zos-remote.conf
+-LIBS = -L${top_builddir}/auparse -lauparse
++LIBS = ${top_builddir}/auparse/libauparse.la
+ LDADD = -lpthread -lldap -llber $(CAPNG_LDADD)
+ plugin_confdir=$(sysconfdir)/audit
+ plugin_conf = zos-remote.conf
+diff --git a/src/Makefile.am b/src/Makefile.am
+index fda612b1..e2e58acb 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -33,22 +33,21 @@ auditd_SOURCES += auditd-listen.c
+ endif
+ auditd_CFLAGS = -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pthread -Wno-pointer-sign
+ auditd_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
+-auditd_DEPENDENCIES = libev/libev.a ${top_builddir}/audisp/libdisp.a
+-auditd_LDADD = @LIBWRAP_LIBS@ -Llibev -lev -L${top_builddir}/audisp -ldisp -L${top_builddir}/lib -laudit -L${top_builddir}/auparse -lauparse -lpthread -lrt -lm $(gss_libs) -L${top_builddir}/common -laucommon
++auditd_LDADD = @LIBWRAP_LIBS@ ${top_builddir}/src/libev/libev.la ${top_builddir}/audisp/libdisp.la ${top_builddir}/lib/libaudit.la ${top_builddir}/auparse/libauparse.la -lpthread -lrt -lm $(gss_libs) ${top_builddir}/common/libaucommon.la
+
+ auditctl_SOURCES = auditctl.c auditctl-llist.c delete_all.c auditctl-listing.c
+ auditctl_CFLAGS = -fPIE -DPIE -g -D_GNU_SOURCE
+ auditctl_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
+-auditctl_LDADD = -L${top_builddir}/lib -laudit -L${top_builddir}/auparse -lauparse -L${top_builddir}/common -laucommon
++auditctl_LDADD = ${top_builddir}/lib/libaudit.la ${top_builddir}/auparse/libauparse.la ${top_builddir}/common/libaucommon.la
+
+ aureport_SOURCES = aureport.c auditd-config.c ausearch-llist.c aureport-options.c ausearch-string.c ausearch-parse.c aureport-scan.c aureport-output.c ausearch-lookup.c ausearch-int.c ausearch-time.c ausearch-nvpair.c ausearch-avc.c ausearch-lol.c
+-aureport_LDADD = -L${top_builddir}/lib -laudit -L${top_builddir}/auparse -lauparse -L${top_builddir}/common -laucommon
++aureport_LDADD = ${top_builddir}/lib/libaudit.la ${top_builddir}/auparse/libauparse.la ${top_builddir}/common/libaucommon.la
+
+ ausearch_SOURCES = ausearch.c auditd-config.c ausearch-llist.c ausearch-options.c ausearch-report.c ausearch-match.c ausearch-string.c ausearch-parse.c ausearch-int.c ausearch-time.c ausearch-nvpair.c ausearch-lookup.c ausearch-avc.c ausearch-lol.c ausearch-checkpt.c
+-ausearch_LDADD = -L${top_builddir}/lib -laudit -L${top_builddir}/auparse -lauparse -L${top_builddir}/common -laucommon
++ausearch_LDADD = ${top_builddir}/lib/libaudit.la ${top_builddir}/auparse/libauparse.la ${top_builddir}/common/libaucommon.la
+
+ autrace_SOURCES = autrace.c delete_all.c auditctl-llist.c
+-autrace_LDADD = -L${top_builddir}/lib -laudit
++autrace_LDADD = ${top_builddir}/lib/libaudit.la
+
+ libev/libev.a:
+ make -C libev
+diff --git a/src/libev/Makefile.am b/src/libev/Makefile.am
+index d6094a76..85f4da52 100644
+--- a/src/libev/Makefile.am
++++ b/src/libev/Makefile.am
+@@ -24,6 +24,7 @@ EXTRA_DIST = README ev_epoll.c ev_poll.c ev_select.c ev_iouring.c ev_linuxaio.c
+ AM_CFLAGS = -fPIC -DPIC -g -fno-strict-aliasing ${DEBUG}
+
+ noinst_HEADERS = ev.h ev_vars.h ev_wrap.h event.h
+-noinst_LIBRARIES = libev.a
++noinst_LTLIBRARIES = libev.la
+
+-libev_a_SOURCES = ev.c event.c
++libev_la_SOURCES = ev.c event.c
++libev_la_LDFLAGS = -no-undefined -static
+diff --git a/tools/aulast/Makefile.am b/tools/aulast/Makefile.am
+index 2f15525a..1ee0b8c0 100644
+--- a/tools/aulast/Makefile.am
++++ b/tools/aulast/Makefile.am
+@@ -23,7 +23,7 @@
+ CONFIG_CLEAN_FILES = *.loT *.rej *.orig
+ EXTRA_DIST = $(man_MANS)
+ AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/lib -I${top_srcdir}/auparse
+-LIBS = -L${top_builddir}/auparse -lauparse
++LIBS = ${top_builddir}/auparse/libauparse.la
+ AM_CFLAGS = -D_GNU_SOURCE
+ bin_PROGRAMS = aulast
+ noinst_HEADERS = aulast-llist.h
+diff --git a/tools/aulastlog/Makefile.am b/tools/aulastlog/Makefile.am
+index e45076ba..f208b4c3 100644
+--- a/tools/aulastlog/Makefile.am
++++ b/tools/aulastlog/Makefile.am
+@@ -23,7 +23,7 @@
+ CONFIG_CLEAN_FILES = *.loT *.rej *.orig
+ EXTRA_DIST = $(man_MANS)
+ AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/auparse
+-LIBS = -L${top_builddir}/auparse -lauparse
++LIBS = ${top_builddir}/auparse/libauparse.la
+ AM_CFLAGS = -D_GNU_SOURCE
+ bin_PROGRAMS = aulastlog
+ noinst_HEADERS = aulastlog-llist.h
+diff --git a/tools/ausyscall/Makefile.am b/tools/ausyscall/Makefile.am
+index 1dce67c0..daa277d7 100644
+--- a/tools/ausyscall/Makefile.am
++++ b/tools/ausyscall/Makefile.am
+@@ -23,7 +23,7 @@
+ CONFIG_CLEAN_FILES = *.loT *.rej *.orig
+ EXTRA_DIST = $(man_MANS)
+ AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/lib
+-LIBS = -L${top_builddir}/lib -laudit
++LIBS = ${top_builddir}/lib/libaudit.la
+ AM_CFLAGS = -D_GNU_SOURCE
+ bin_PROGRAMS = ausyscall
+ man_MANS = ausyscall.8
+diff --git a/tools/auvirt/Makefile.am b/tools/auvirt/Makefile.am
+index 50b9b323..dafeeccf 100644
+--- a/tools/auvirt/Makefile.am
++++ b/tools/auvirt/Makefile.am
+@@ -29,7 +29,7 @@ AM_CPPFLAGS = -I${top_srcdir} \
+ -I${top_srcdir}/lib \
+ -I${top_srcdir}/auparse \
+ -I${top_srcdir}/src
+-LIBS = -L${top_builddir}/auparse -lauparse
++LIBS = ${top_builddir}/auparse/libauparse.la
+ AM_CFLAGS = -D_GNU_SOURCE
+ bin_PROGRAMS = auvirt
+ noinst_HEADERS = auvirt-list.h
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/, sys-process/audit/files/
@ 2021-09-07 16:22 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2021-09-07 16:22 UTC (permalink / raw
To: gentoo-commits
commit: 8442b964fea8e814264229a78be0da6ae1735919
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 3 12:21:49 2021 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Sep 7 16:21:53 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8442b964
sys-process/audit: Drop 2.8.5-r2, EAPI6--
Closes: https://bugs.gentoo.org/763237
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
sys-process/audit/Manifest | 2 -
sys-process/audit/audit-2.8.5-r2.ebuild | 217 ---------------------
sys-process/audit/files/audit-2.4.3-python.patch | 46 -----
.../audit/files/audit-2.8.4-ia64-compile-fix.patch | 195 ------------------
4 files changed, 460 deletions(-)
diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
index c44d95add0b..48cc8ee6601 100644
--- a/sys-process/audit/Manifest
+++ b/sys-process/audit/Manifest
@@ -1,5 +1,3 @@
-DIST audit-017e6c6ab95df55f34e339d2139def83e5dada1f.patch 852 BLAKE2B 60d8b813f57338ce267a09913e68a0726acf5cf878cd2893fe2493f80d2b0ac1e0504dc7a72e85134ae2597b268cb1772b4e7c6c2f19149fc905f6928e2db47f SHA512 78e32c05b6896d37bacf0938954fbce7486a528dabd55421f1715438fe489171f9157059050abdcb3f673258aa28b4a11f643ddb7824f3499a195dbbe634f101
-DIST audit-2.8.5_p80866dc78b5d.tar.gz 552094 BLAKE2B adb936a314ef2f11828ee00f3513631e06e2df09e37e68be27b1b694e278116d2f486dbde7ed57c77d9ff0bcd09309ea841959c7a66caed6770f367d65dd14f4 SHA512 7ec103bf076cfac7906748162e78835f1f65dd9d68e3a7466346e0473075beb47897adf88ab9ba0eb42db1953372aafb16cc040674b9a9c887730c062b82540a
DIST audit-3.0.1.tar.gz 1180286 BLAKE2B f29687ebc76f4eb88184cce1a3da0b8ca4464b2f81f56d71048ac4a64a713f33d6964e46e78b73c72b6ac2495f80114866773b3b86753c1d0dead25df73f7c43 SHA512 ad2897c9f539681f0f65b08cd0e650c528957fd4799755c2bcc47f869e04272aad31684c46847124d7b42dde243a16ba2754936890189610814c7007c0381d8c
DIST audit-3.0.2.tar.gz 1184356 BLAKE2B 13f76e9c40bc8ffc53b5499076b5cb75c2690d95414a0e1942fa9725b9617f10327a2ee676dc10cc46ba76d223f77509d305bcd22344b678443b7707cc6d10cd SHA512 9e831ed6f30ac7d58f028cede97adba431bde18dfd9045c19f5e03eff52cd28db3a6792e5969f555ce51aa562662b59fa5cc5265586c6acf0b3aa1feae4d720f
DIST audit-3.0.tar.gz 1109442 BLAKE2B f9c94f7163522068f5f37163a242cb913acc87b5465f7f8550fad27ac1dc673fd7a98e208bd5e6fb136eac1fdadd659e599e7722426937481bbf8c66d86a1617 SHA512 b82ec73c85a8ebb5108b526673d6fe08cbe0b51376788f3ea6ed5747c4612158462893e719496dffbd723f833f84383a2d1d55fd78a3ed985ecfd19545060c88
diff --git a/sys-process/audit/audit-2.8.5-r2.ebuild b/sys-process/audit/audit-2.8.5-r2.ebuild
deleted file mode 100644
index e70218a14ef..00000000000
--- a/sys-process/audit/audit-2.8.5-r2.ebuild
+++ /dev/null
@@ -1,217 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python{3_7,3_8} )
-
-inherit autotools multilib multilib-minimal toolchain-funcs preserve-libs python-r1 linux-info systemd usr-ldscript
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-# https://github.com/linux-audit/audit-userspace/tree/2.8_maintenance
-COMMIT='80866dc78b5db17010516e24344eaed8dcc6fb99' # contains many fixes not yet released
-if [[ -n $COMMIT ]]; then
- SRC_URI="https://github.com/linux-audit/audit-userspace/archive/${COMMIT}.tar.gz -> ${P}_p${COMMIT:0:12}.tar.gz"
- S="${WORKDIR}/audit-userspace-${COMMIT}"
-else
- SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
-fi
-# -fno-common patch:
-SRC_URI+=" https://github.com/linux-audit/audit-userspace/commit/017e6c6ab95df55f34e339d2139def83e5dada1f.patch -> ${PN}-017e6c6ab95df55f34e339d2139def83e5dada1f.patch"
-
-LICENSE="GPL-2+ LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="gssapi ldap python static-libs"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-# Testcases are pretty useless as they are built for RedHat users/groups and kernels.
-RESTRICT="test"
-
-RDEPEND="gssapi? ( virtual/krb5 )
- ldap? ( net-nds/openldap )
- sys-libs/libcap-ng
- python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- >=sys-kernel/linux-headers-2.6.34
- python? ( dev-lang/swig:0 )"
-# Do not use os-headers as this is linux specific
-
-CONFIG_CHECK="~AUDIT"
-
-pkg_setup() {
- linux-info_pkg_setup
-}
-
-src_prepare() {
- # Do not build GUI tools
- sed -i \
- -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
- "${S}"/configure.ac || die
- sed -i \
- -e 's,system-config-audit,,g' \
- "${S}"/Makefile.am || die
- rm -rf "${S}"/system-config-audit
-
- # audisp-remote moved in multilib_src_install_all
- sed -i \
- -e "s,/sbin/audisp-remote,${EPREFIX}/usr/sbin/audisp-remote," \
- "${S}"/audisp/plugins/remote/au-remote.conf || die
-
- # Don't build static version of Python module.
- eapply "${FILESDIR}"/${PN}-2.4.3-python.patch
-
- # glibc/kernel upstreams suck with both defining ia64_fpreg
- # This patch is a horribly workaround that is only valid as long as you
- # don't need the OTHER definitions in fpu.h.
- eapply "${FILESDIR}"/${PN}-2.8.4-ia64-compile-fix.patch
-
- # there is no --without-golang conf option
- sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die
-
- # -fno-common
- eapply "${DISTDIR}/${PN}-017e6c6ab95df55f34e339d2139def83e5dada1f.patch"
-
- eapply_user
-
- # Regenerate autotooling
- eautoreconf
-}
-
-multilib_src_configure() {
- local ECONF_SOURCE=${S}
- local my_conf="$(use_enable ldap zos-remote)"
- econf \
- ${my_conf} \
- --sbindir="${EPREFIX}/sbin" \
- $(use_enable gssapi gssapi-krb5) \
- $(use_enable static-libs static) \
- --enable-systemd \
- --without-python \
- --without-python3
-
- if multilib_is_native_abi; then
- python_configure() {
- mkdir -p "${BUILD_DIR}" || die
- cd "${BUILD_DIR}" || die
-
- econf ${my_conf} --without-python --with-python3
- }
-
- use python && python_foreach_impl python_configure
- fi
-}
-
-src_configure() {
- tc-export_build_env BUILD_{CC,CPP}
- export CC_FOR_BUILD="${BUILD_CC}"
- export CPP_FOR_BUILD="${BUILD_CPP}"
-
- multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
-
- python_compile() {
- emake -C "${BUILD_DIR}"/bindings/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la" \
- _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
- _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
- USE_PYTHON3=true
- emake -C "${BUILD_DIR}"/bindings/python/python3 \
- VPATH="${S}/bindings/python/python3:${native_build}/bindings/python/python3" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
- USE_PYTHON3=true
- }
-
- local native_build="${BUILD_DIR}"
- use python && python_foreach_impl python_compile
- else
- emake -C lib
- emake -C auparse
- fi
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
-
- python_install() {
- emake -C "${BUILD_DIR}"/bindings/swig \
- VPATH="${native_build}/lib" \
- LIBS="${native_build}/lib/libaudit.la" \
- _audit_la_LIBADD="${native_build}/lib/libaudit.la" \
- _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \
- USE_PYTHON3=true \
- DESTDIR="${D}" install
- emake -C "${BUILD_DIR}"/bindings/python/python3 \
- VPATH="${S}/bindings/python/python3:${native_build}/bindings/python/python3" \
- auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \
- USE_PYTHON3=true \
- DESTDIR="${D}" install
- python_optimize
- }
-
- local native_build=${BUILD_DIR}
- use python && python_foreach_impl python_install
-
- # things like shadow use this so we need to be in /
- gen_usr_ldscript -a audit auparse
- else
- emake -C lib DESTDIR="${D}" install
- emake -C auparse DESTDIR="${D}" install
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS ChangeLog README* THANKS
- docinto contrib
- dodoc contrib/{avc_snap,skeleton.c}
- docinto contrib/plugin
- dodoc contrib/plugin/*
- docinto rules
- dodoc rules/*
-
- newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
- newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
-
- [ -f "${ED}"/sbin/audisp-remote ] && \
- dodir /usr/sbin && \
- mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die
-
- # Gentoo rules
- insinto /etc/audit/
- newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
- doins "${FILESDIR}"/audit.rules.stop*
-
- # audit logs go here
- keepdir /var/log/audit/
-
- find "${D}" -name '*.la' -delete || die
-
- # Security
- lockdown_perms "${ED}"
-}
-
-pkg_preinst() {
- # Preserve from the audit-1 series
- preserve_old_lib /$(get_libdir)/libaudit.so.0
-}
-
-pkg_postinst() {
- lockdown_perms "${EROOT}"
- # Preserve from the audit-1 series
- preserve_old_lib_notify /$(get_libdir)/libaudit.so.0
-}
-
-lockdown_perms() {
- # Upstream wants these to have restrictive perms.
- # Should not || die as not all paths may exist.
- local basedir="$1"
- chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
- chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
- chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
-}
diff --git a/sys-process/audit/files/audit-2.4.3-python.patch b/sys-process/audit/files/audit-2.4.3-python.patch
deleted file mode 100644
index 7b9ea53e09d..00000000000
--- a/sys-process/audit/files/audit-2.4.3-python.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -ur audit-2.4.3.orig/bindings/python/python2/Makefile.am audit-2.4.3/bindings/python/python2/Makefile.am
---- audit-2.4.3.orig/bindings/python/python2/Makefile.am 2015-07-22 23:35:24.315424091 +0800
-+++ audit-2.4.3/bindings/python/python2/Makefile.am 2015-07-22 23:37:16.861510504 +0800
-@@ -29,5 +29,6 @@
-
- auparse_la_SOURCES = $(top_srcdir)/bindings/python/auparse_python.c
- auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS)
--auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
-+auparse_la_CFLAGS = -shared
-+auparse_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
- auparse_la_LIBADD = ${top_builddir}/auparse/libauparse.la ${top_builddir}/lib/libaudit.la
-diff -ur audit-2.4.3.orig/bindings/python/python3/Makefile.am audit-2.4.3/bindings/python/python3/Makefile.am
---- audit-2.4.3.orig/bindings/python/python3/Makefile.am 2015-07-22 23:35:24.315424091 +0800
-+++ audit-2.4.3/bindings/python/python3/Makefile.am 2015-07-22 23:37:30.395400641 +0800
-@@ -28,5 +28,6 @@
-
- auparse_la_SOURCES = $(top_srcdir)/bindings/python/auparse_python.c
- auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS)
--auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
-+auparse_la_CFLAGS = -shared
-+auparse_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
- auparse_la_LIBADD = ${top_builddir}/auparse/libauparse.la ${top_builddir}/lib/libaudit.la
-diff -ur audit-2.4.3.orig/bindings/swig/python/Makefile.am audit-2.4.3/bindings/swig/python/Makefile.am
---- audit-2.4.3.orig/bindings/swig/python/Makefile.am 2015-07-22 23:35:24.316424083 +0800
-+++ audit-2.4.3/bindings/swig/python/Makefile.am 2015-07-22 23:35:53.244189263 +0800
-@@ -28,7 +28,7 @@
- pyexec_LTLIBRARIES = _audit.la
- pyexec_SOLIBRARIES = _audit.so
- _audit_la_CFLAGS = -shared
--_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
-+_audit_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
- _audit_la_HEADERS: $(top_builddir)/config.h
- _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la
- _audit_la_LIBADD = $(top_builddir)/lib/libaudit.la
-diff -ur audit-2.4.3.orig/bindings/swig/python3/Makefile.am audit-2.4.3/bindings/swig/python3/Makefile.am
---- audit-2.4.3.orig/bindings/swig/python3/Makefile.am 2015-07-22 23:35:24.316424083 +0800
-+++ audit-2.4.3/bindings/swig/python3/Makefile.am 2015-07-22 23:36:27.833908482 +0800
-@@ -29,7 +29,7 @@
- py3exec_LTLIBRARIES = _audit.la
- py3exec_SOLIBRARIES = _audit.so
- _audit_la_CFLAGS = -shared
--_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro
-+_audit_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro
- _audit_la_HEADERS: $(top_builddir)/config.h
- _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la
- _audit_la_LIBADD = ${top_builddir}/lib/libaudit.la
diff --git a/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch b/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch
deleted file mode 100644
index ef04f720495..00000000000
--- a/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch
+++ /dev/null
@@ -1,195 +0,0 @@
---- a/audisp/audispd.c
-+++ b/audisp/audispd.c
-@@ -21,6 +21,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
---- a/audisp/plugins/prelude/audisp-prelude.c
-+++ b/audisp/plugins/prelude/audisp-prelude.c
-@@ -21,6 +21,8 @@
- *
- */
-
-+#include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <stdlib.h>
- #include <signal.h>
---- a/audisp/plugins/remote/audisp-remote.c
-+++ b/audisp/plugins/remote/audisp-remote.c
-@@ -22,6 +22,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <signal.h>
- #include <syslog.h>
---- a/configure.ac
-+++ b/configure.ac
-@@ -216,6 +216,9 @@ AC_ARG_ENABLE(zos-remote,
- AM_CONDITIONAL(ENABLE_ZOS_REMOTE, test "x$enable_zos_remote" != "xno")
- AC_MSG_RESULT($enable_zos_remote)
-
-+AC_CHECK_HEADER([asm/ptrace.h], [AC_DEFINE([HAVE_ASM_PTRACE_H],[],[Define to 1 if you have asm/ptrace.h])], [])
-+AC_CHECK_HEADER([linux/ptrace.h], [AC_DEFINE([HAVE_LINUX_PTRACE_H],[],[Define to 1 if you have linux/ptrace.h])], [])
-+
- #gssapi
- AC_ARG_ENABLE(gssapi_krb5,
- [AS_HELP_STRING([--enable-gssapi-krb5],[Enable GSSAPI Kerberos 5 support @<:@default=no@:>@])],
---- a/contrib/plugin/audisp-example.c
-+++ b/contrib/plugin/audisp-example.c
-@@ -37,6 +37,8 @@
- */
-
- #define _GNU_SOURCE
-+#include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <signal.h>
- #include <string.h>
---- a/contrib/skeleton.c
-+++ b/contrib/skeleton.c
-@@ -13,6 +13,8 @@
- * gcc skeleton.c -o skeleton -laudit
- */
-
-+#include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/uio.h>
---- /dev/null
-+++ b/lib/fixup.h
-@@ -0,0 +1,17 @@
-+#ifndef _AUDIT_IA64_FIXUP_H_
-+#define _AUDIT_IA64_FIXUP_H_
-+
-+#ifdef __ia64__ /* what a pos */
-+# include <linux/types.h>
-+# define _ASM_IA64_FPU_H
-+#endif
-+#include <signal.h>
-+/*
-+#ifdef HAVE_ASM_PTRACE_H
-+# include <asm/ptrace.h>
-+#endif
-+#ifdef HAVE_LINUX_PTRACE_H
-+# include <linux/ptrace.h>
-+#endif
-+*/
-+#endif
---- a/src/auditctl.c
-+++ b/src/auditctl.c
-@@ -23,6 +23,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdbool.h>
---- a/src/auditd-config.c
-+++ b/src/auditd-config.c
-@@ -22,6 +22,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <unistd.h>
- #include <sys/stat.h>
---- a/src/auditd-dispatch.c
-+++ b/src/auditd-dispatch.c
-@@ -22,6 +22,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <unistd.h>
- #include <sys/uio.h>
- #include <fcntl.h>
---- a/src/auditd-event.c
-+++ b/src/auditd-event.c
-@@ -22,6 +22,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <stdlib.h>
- #include <unistd.h>
- #include <pthread.h>
---- a/src/auditd-listen.c
-+++ b/src/auditd-listen.c
-@@ -23,6 +23,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <unistd.h>
- #include <sys/stat.h>
---- a/src/auditd-reconfig.c
-+++ b/src/auditd-reconfig.c
-@@ -22,6 +22,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <pthread.h>
- #include <signal.h>
- #include <stdlib.h>
---- a/src/auditd-sendmail.c
-+++ b/src/auditd-sendmail.c
-@@ -22,6 +22,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <unistd.h> // for access()
- #include <string.h>
---- a/src/auditd.c
-+++ b/src/auditd.c
-@@ -22,6 +22,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <sys/types.h>
- #include <unistd.h>
---- a/src/ausearch.c
-+++ b/src/ausearch.c
-@@ -22,6 +22,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <stdio_ext.h>
- #include <string.h>
---- a/src/autrace.c
-+++ b/src/autrace.c
-@@ -21,6 +21,7 @@
- */
-
- #include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <string.h>
- #include <sys/wait.h>
---- a/src/delete_all.c
-+++ b/src/delete_all.c
-@@ -20,6 +20,7 @@
- * Steve Grubb <sgrubb@redhat.com>
- */
- #include "config.h"
-+#include "fixup.h"
- #include <stdio.h>
- #include <string.h>
- #include <errno.h>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/, sys-process/audit/files/
@ 2024-06-23 22:46 Sam James
0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2024-06-23 22:46 UTC (permalink / raw
To: gentoo-commits
commit: acf4c3b19d2e93a66020970627da22e813747e2a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 23 22:46:14 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 23 22:46:14 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acf4c3b1
sys-process/audit: fix musl build
Closes: https://bugs.gentoo.org/934006
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-process/audit/audit-3.1.3.ebuild | 2 +-
.../audit/files/audit-3.1.3-musl-malloc.patch | 28 ++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/sys-process/audit/audit-3.1.3.ebuild b/sys-process/audit/audit-3.1.3.ebuild
index a7941a5d6676..e185e4615aae 100644
--- a/sys-process/audit/audit-3.1.3.ebuild
+++ b/sys-process/audit/audit-3.1.3.ebuild
@@ -46,7 +46,7 @@ BDEPEND="
CONFIG_CHECK="~AUDIT"
PATCHES=(
- "${FILESDIR}"/${PN}-3.0.8-musl-malloc.patch
+ "${FILESDIR}"/${PN}-3.1.3-musl-malloc.patch
)
QA_CONFIG_IMPL_DECL_SKIP=(
diff --git a/sys-process/audit/files/audit-3.1.3-musl-malloc.patch b/sys-process/audit/files/audit-3.1.3-musl-malloc.patch
new file mode 100644
index 000000000000..01c440f3eb83
--- /dev/null
+++ b/sys-process/audit/files/audit-3.1.3-musl-malloc.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/934006
+https://github.com/linux-audit/audit-userspace/commit/1dd6123e810ce255692a693a5d52a0c34cf432d0
+
+From 1dd6123e810ce255692a693a5d52a0c34cf432d0 Mon Sep 17 00:00:00 2001
+From: Steve Grubb <ausearch.1@gmail.com>
+Date: Mon, 1 Apr 2024 12:10:33 -0400
+Subject: [PATCH] Add empty macro to fix muscl c builds
+
+--- a/common/common.h
++++ b/common/common.h
+@@ -1,5 +1,5 @@
+-/* audit-fgets.h -- a replacement for glibc's fgets
+- * Copyright 2018,2022 Red Hat Inc.
++/* common.h -- common utility functions used throughout
++ * Copyright 2018-24 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+@@ -29,6 +29,9 @@
+ #ifndef __attr_access
+ # define __attr_access(x)
+ #endif
++#ifndef __attribute_malloc__
++# define __attribute_malloc__
++#endif
+ #ifndef __attr_dealloc
+ # define __attr_dealloc(dealloc, argno)
+ #endif
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/, sys-process/audit/files/
@ 2024-07-22 4:36 Jason Zaman
0 siblings, 0 replies; 7+ messages in thread
From: Jason Zaman @ 2024-07-22 4:36 UTC (permalink / raw
To: gentoo-commits
commit: 1881165de3cc20817f3f874e00bdeb7e0c265439
Author: Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 22 04:09:32 2024 +0000
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Mon Jul 22 04:32:28 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1881165d
sys-process/audit: add 4.0.1
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>
sys-process/audit/Manifest | 1 +
sys-process/audit/audit-4.0.1.ebuild | 193 +++++++
.../audit-4.0.1-implicit-builtin-functions.patch | 563 +++++++++++++++++++++
.../audit/files/audit-4.0.1-null-deref.patch | 35 ++
4 files changed, 792 insertions(+)
diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
index 32dd6e54f424..efb7e2180891 100644
--- a/sys-process/audit/Manifest
+++ b/sys-process/audit/Manifest
@@ -1,3 +1,4 @@
DIST audit-3.1.2.tar.gz 1219860 BLAKE2B dfdec470bf12cce6c570b3d260e65e2b49e8ac0761e6a6fbf7b4f4a57f92e88367cd74bfcb88e6d718619b88fea27ce963a977c9f4346c95d18a5310e217accb SHA512 a97003a294ed3671df01e2952688e7d5eef59a35f6891feb53e67c4c7eab9ae8c2d18de41a5b5b20e0ad7156fac93aec05f32f6bc5eea706b42b6f27f676446a
DIST audit-3.1.3.tar.gz 1225761 BLAKE2B 97ee35fc722083d541e164b27fd318ec7be2a4e4e8774767d14c6a2e800092a37b7042a272db5d208c913fb36d295c5343bd6082237caf0fb561ec3c7a2883db SHA512 7d6399ca97b171d5ea3cf7f7566bdabe9d5677a3a54c75411146dc2971106809a90d1a9cd0b1ba9b8af4cc409e6bee5876c7f2a0c54c42400fdcf9cfade58a8c
DIST audit-3.1.4.tar.gz 1225648 BLAKE2B c6875f7d031e810469511ac8f86f05b2de7f19c044dbf67bc9d66430167fcf0f031e0279ce170a496b672a6fc99ee18b8cc39943e6faf3c19a24a381d2701439 SHA512 d26c498c91e838d97d3f199630650f509bb1e82b44d364306b20db32d4116fa73d775ef56c0fed2ec8d548b19215052691cbc80c74699bc87f2a0ea08cf664f5
+DIST audit-4.0.1.tar.gz 1194961 BLAKE2B 590abf58e672921a432348f48936cfbff0b6ddfa47e77b3b20eaa00e5d1c4ce2fc8d10c1fc1cbc19d44c09a9f7dfbca76778c94d8d340485c2bb1bb3b5a3c95a SHA512 7fbc426d0ddea340a36ceab52ac090e8e3dfb3450ebf50b478324a097f19ab4bb2cf78a2532644acb17e6114b59b8fda718affda9da62fb84181e3abf76039df
diff --git a/sys-process/audit/audit-4.0.1.ebuild b/sys-process/audit/audit-4.0.1.ebuild
new file mode 100644
index 000000000000..fead7ccba13f
--- /dev/null
+++ b/sys-process/audit/audit-4.0.1.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# As with sys-libs/libcap-ng, same maintainer in Fedora as upstream, so
+# check Fedora's packaging (https://src.fedoraproject.org/rpms/audit/tree/rawhide)
+# on bumps (or if hitting a bug) to see what they've done there.
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit autotools multilib-minimal toolchain-funcs python-r1 linux-info systemd usr-ldscript
+
+DESCRIPTION="Userspace utilities for storing and processing auditing records"
+HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
+SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="gssapi io-uring ldap python static-libs test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/libcap-ng
+ gssapi? ( virtual/krb5 )
+ ldap? ( net-nds/openldap:= )
+ python? ( ${PYTHON_DEPS} )
+"
+DEPEND="
+ ${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.34
+ test? ( dev-libs/check )
+"
+BDEPEND="
+ python? (
+ dev-lang/swig
+ $(python_gen_cond_dep '
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ' python3_12)
+ )
+"
+
+CONFIG_CHECK="~AUDIT"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ # missing on musl. Uses handrolled AC_LINK_IFELSE but fails at link time
+ # for older compilers regardless. bug #898828
+ strndupa
+)
+
+PATCHES=(
+ "${FILESDIR}/${P}-implicit-builtin-functions.patch"
+ "${FILESDIR}/${P}-null-deref.patch"
+)
+
+src_prepare() {
+ # audisp-remote moved in multilib_src_install_all
+ sed -i \
+ -e "s,/sbin/audisp-remote,${EPREFIX}/usr/sbin/audisp-remote," \
+ audisp/plugins/remote/au-remote.conf || die
+
+ # Disable installing sample rules so they can be installed as docs.
+ echo -e '%:\n\t:' | tee rules/Makefile.{am,in} >/dev/null || die
+
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --sbindir="${EPREFIX}"/sbin
+ $(use_enable gssapi gssapi-krb5)
+ $(use_enable ldap zos-remote)
+ $(use_enable static-libs static)
+ $(use_with io-uring io_uring)
+ --without-golang
+ --without-libwrap
+ --without-python3
+ )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+
+ if multilib_is_native_abi && use python; then
+ python_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ pushd "${BUILD_DIR}" &>/dev/null || die
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" --with-python3
+
+ popd &>/dev/null || die
+ }
+
+ python_foreach_impl python_configure
+ fi
+}
+
+src_configure() {
+ tc-export_build_env BUILD_{CC,CPP}
+
+ local -x CC_FOR_BUILD="${BUILD_CC}"
+ local -x CPP_FOR_BUILD="${BUILD_CPP}"
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+
+ local native_build="${BUILD_DIR}"
+
+ python_compile() {
+ emake -C "${BUILD_DIR}"/bindings/swig top_builddir="${native_build}"
+ emake -C "${BUILD_DIR}"/bindings/python/python3 top_builddir="${native_build}"
+ }
+
+ use python && python_foreach_impl python_compile
+ else
+ emake -C common
+ emake -C lib
+ emake -C auparse
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
+
+ local native_build="${BUILD_DIR}"
+
+ python_install() {
+ emake -C "${BUILD_DIR}"/bindings/swig DESTDIR="${D}" top_builddir="${native_build}" install
+ emake -C "${BUILD_DIR}"/bindings/python/python3 DESTDIR="${D}" top_builddir="${native_build}" install
+ python_optimize
+ }
+
+ use python && python_foreach_impl python_install
+
+ # Things like shadow use this so we need to be in /
+ gen_usr_ldscript -a audit auparse
+ else
+ emake -C lib DESTDIR="${D}" install
+ emake -C auparse DESTDIR="${D}" install
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS ChangeLog README* THANKS
+ docinto contrib
+ dodoc contrib/avc_snap
+ docinto contrib/plugin
+ dodoc contrib/plugin/*
+ docinto rules
+ dodoc rules/*rules
+
+ newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd
+ newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
+
+ if [[ -f "${ED}"/sbin/audisp-remote ]] ; then
+ dodir /usr/sbin
+ mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die
+ fi
+
+ # Gentoo rules
+ insinto /etc/audit
+ newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
+ doins "${FILESDIR}"/audit.rules.stop*
+ keepdir /etc/audit/rules.d
+
+ # audit logs go here
+ keepdir /var/log/audit
+
+ find "${ED}" -type f -name '*.la' -delete || die
+
+ # Security
+ lockdown_perms "${ED}"
+}
+
+pkg_postinst() {
+ lockdown_perms "${EROOT}"
+}
+
+lockdown_perms() {
+ # Upstream wants these to have restrictive perms.
+ # Should not || die as not all paths may exist.
+ local basedir="${1}"
+ chmod 0750 "${basedir}"/sbin/au{ditctl,ditd,report,search,trace} 2>/dev/null
+ chmod 0750 "${basedir}"/var/log/audit 2>/dev/null
+ chmod 0640 "${basedir}"/etc/audit/{auditd.conf,audit*.rules*} 2>/dev/null
+}
diff --git a/sys-process/audit/files/audit-4.0.1-implicit-builtin-functions.patch b/sys-process/audit/files/audit-4.0.1-implicit-builtin-functions.patch
new file mode 100644
index 000000000000..cd0f0f7e727b
--- /dev/null
+++ b/sys-process/audit/files/audit-4.0.1-implicit-builtin-functions.patch
@@ -0,0 +1,563 @@
+Backport of https://github.com/linux-audit/audit-userspace/commit/8c7eaa7ead6c70486623674c19d649f3831578ad
+
+diff -ur audit-4.0.1.orig/audisp/audispd-llist.c audit-4.0.1/audisp/audispd-llist.c
+--- audit-4.0.1.orig/audisp/audispd-llist.c
++++ audit-4.0.1/audisp/audispd-llist.c
+@@ -69,11 +69,13 @@ unsigned int plist_count_active(const co
+ return cnt;
+ }
+
+-void plist_append(conf_llist *l, plugin_conf_t *p)
++int plist_append(conf_llist *l, plugin_conf_t *p)
+ {
+ lnode* newnode;
+
+ newnode = malloc(sizeof(lnode));
++ if (newnode == NULL)
++ return 1;
+
+ if (p) {
+ void *pp = malloc(sizeof(struct plugin_conf));
+@@ -94,6 +96,8 @@ void plist_append(conf_llist *l, plugin_
+ // make newnode current
+ l->cur = newnode;
+ l->cnt++;
++
++ return 0;
+ }
+
+ void plist_clear(conf_llist* l)
+diff -ur audit-4.0.1.orig/audisp/audispd-llist.h audit-4.0.1/audisp/audispd-llist.h
+--- audit-4.0.1.orig/audisp/audispd-llist.h
++++ audit-4.0.1/audisp/audispd-llist.h
+@@ -1,6 +1,6 @@
+ /*
+ * audispd-llist.h - Header file for ausearch-conf_llist.c
+-* Copyright (c) 2007,2013 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2007,2013 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -51,7 +51,7 @@ unsigned int plist_count_active(const co
+ void plist_last(conf_llist *l);
+ lnode *plist_next(conf_llist *l);
+ static inline lnode *plist_get_cur(conf_llist *l) { return l->cur; }
+-void plist_append(conf_llist *l, plugin_conf_t *p);
++int plist_append(conf_llist *l, plugin_conf_t *p);
+ void plist_clear(conf_llist* l);
+ void plist_mark_all_unchecked(conf_llist* l);
+ lnode *plist_find_unchecked(conf_llist* l);
+diff -ur audit-4.0.1.orig/auparse/normalize-llist.c audit-4.0.1/auparse/normalize-llist.c
+--- audit-4.0.1.orig/auparse/normalize-llist.c
++++ audit-4.0.1/auparse/normalize-llist.c
+@@ -1,6 +1,6 @@
+ /*
+ * normalize-llist.c - Minimal linked list library
+- * Copyright (c) 2016-17 Red Hat Inc., Durham, North Carolina.
++ * Copyright (c) 2016-17 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+@@ -61,11 +61,14 @@ data_node *cllist_next(cllist *l)
+ return l->cur;
+ }
+
+-void cllist_append(cllist *l, uint32_t num, void *data)
++// Returns 0 on success and 1 on error
++int cllist_append(cllist *l, uint32_t num, void *data)
+ {
+ data_node *newnode;
+
+ newnode = malloc(sizeof(data_node));
++ if (newnode == NULL)
++ return 1;
+
+ newnode->num = num;
+ newnode->data = data;
+@@ -80,5 +83,6 @@ void cllist_append(cllist *l, uint32_t n
+ // make newnode current
+ l->cur = newnode;
+ l->cnt++;
++ return 0;
+ }
+
+diff -ur audit-4.0.1.orig/auparse/normalize-llist.h audit-4.0.1/auparse/normalize-llist.h
+--- audit-4.0.1.orig/auparse/normalize-llist.h
++++ audit-4.0.1/auparse/normalize-llist.h
+@@ -1,6 +1,6 @@
+ /*
+ * normalize-llist.h - Header file for normalize-llist.c
+- * Copyright (c) 2016-17 Red Hat Inc., Durham, North Carolina.
++ * Copyright (c) 2016-17 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+@@ -53,7 +53,7 @@ AUDIT_HIDDEN_START
+ void cllist_create(cllist *l, void (*cleanup)(void *));
+ void cllist_clear(cllist* l);
+ data_node *cllist_next(cllist *l);
+-void cllist_append(cllist *l, uint32_t num, void *data);
++int cllist_append(cllist *l, uint32_t num, void *data);
+
+ AUDIT_HIDDEN_END
+
+diff -ur audit-4.0.1.orig/auparse/normalize.c audit-4.0.1/auparse/normalize.c
+--- audit-4.0.1.orig/auparse/normalize.c
++++ audit-4.0.1/auparse/normalize.c
+@@ -179,7 +179,8 @@ static unsigned int add_subj_attr(aupars
+ if ((auparse_find_field(au, str))) {
+ attr = set_record(0, rnum);
+ attr = set_field(attr, auparse_get_field_num(au));
+- cllist_append(&D.actor.attr, attr, NULL);
++ if (cllist_append(&D.actor.attr, attr, NULL))
++ return 1;
+ return 0;
+ } else
+ auparse_goto_record_num(au, rnum);
+@@ -224,7 +225,8 @@ static unsigned int add_obj_attr(auparse
+ if ((auparse_find_field(au, str))) {
+ attr = set_record(0, rnum);
+ attr = set_field(attr, auparse_get_field_num(au));
+- cllist_append(&D.thing.attr, attr, NULL);
++ if (cllist_append(&D.thing.attr, attr, NULL))
++ return 1;
+ return 0;
+ } else
+ auparse_goto_record_num(au, rnum);
+@@ -360,21 +362,23 @@ static void collect_id_obj2(auparse_stat
+ }
+ }
+
+-static void collect_path_attrs(auparse_state_t *au)
++static int collect_path_attrs(auparse_state_t *au)
+ {
+ value_t attr;
+ unsigned int rnum = auparse_get_record_num(au);
+
+ auparse_first_field(au);
+ if (add_obj_attr(au, "mode", rnum))
+- return; // Failed opens don't have anything else
++ return 1; // Failed opens don't have anything else
+
+ // All the rest of the fields matter
+ while ((auparse_next_field(au))) {
+ attr = set_record(0, rnum);
+ attr = set_field(attr, auparse_get_field_num(au));
+- cllist_append(&D.thing.attr, attr, NULL);
++ if (cllist_append(&D.thing.attr, attr, NULL))
++ return 1;
+ }
++ return 0;
+ }
+
+ static void collect_cwd_attrs(auparse_state_t *au)
+diff -ur audit-4.0.1.orig/src/auditctl-llist.c audit-4.0.1/src/auditctl-llist.c
+--- audit-4.0.1.orig/src/auditctl-llist.c
++++ audit-4.0.1/src/auditctl-llist.c
+@@ -1,7 +1,7 @@
+ /*
+ * ausearch-llist.c - Minimal linked list library
+-* Copyright (c) 2005 Red Hat Inc., Durham, North Carolina.
+-* All Rights Reserved.
++* Copyright (c) 2005 Red Hat Inc.
++* All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+ * terms of the GNU General Public License as published by the Free
+@@ -15,7 +15,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to the
+-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
++* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1335, USA.
+ *
+ * Authors:
+@@ -59,11 +59,13 @@ lnode *list_next(llist *l)
+ return l->cur;
+ }
+
+-void list_append(llist *l, const struct audit_rule_data *r, size_t sz)
++int list_append(llist *l, const struct audit_rule_data *r, size_t sz)
+ {
+ lnode* newnode;
+
+ newnode = malloc(sizeof(lnode));
++ if (newnode == NULL)
++ return 1;
+
+ if (r) {
+ void *rr = malloc(sz);
+@@ -85,6 +87,8 @@ void list_append(llist *l, const struct
+ // make newnode current
+ l->cur = newnode;
+ l->cnt++;
++
++ return 0;
+ }
+
+ void list_clear(llist* l)
+diff -ur audit-4.0.1.orig/src/auditctl-llist.h audit-4.0.1/src/auditctl-llist.h
+--- audit-4.0.1.orig/src/auditctl-llist.h
++++ audit-4.0.1/src/auditctl-llist.h
+@@ -1,6 +1,6 @@
+ /*
+ * auditctl-llist.h - Header file for ausearch-llist.c
+-* Copyright (c) 2005 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2005 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -50,7 +50,7 @@ void list_first(llist *l);
+ void list_last(llist *l);
+ lnode *list_next(llist *l);
+ static inline lnode *list_get_cur(const llist *l) { return l->cur; }
+-void list_append(llist *l, const struct audit_rule_data *r, size_t sz);
++int list_append(llist *l, const struct audit_rule_data *r, size_t sz);
+ void list_clear(llist* l);
+
+ #endif
+diff -ur audit-4.0.1.orig/src/ausearch-avc.c audit-4.0.1/src/ausearch-avc.c
+--- audit-4.0.1.orig/src/ausearch-avc.c
++++ audit-4.0.1/src/ausearch-avc.c
+@@ -1,7 +1,7 @@
+ /*
+ * ausearch-avc.c - Minimal linked list library for avcs
+-* Copyright (c) 2006,2008,2014 Red Hat Inc., Durham, North Carolina.
+-* All Rights Reserved.
++* Copyright (c) 2006,2008,2014 Red Hat Inc.
++* All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+ * terms of the GNU General Public License as published by the Free
+@@ -15,7 +15,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to the
+-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
++* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1335, USA.
+ *
+ * Authors:
+@@ -62,11 +62,13 @@ static void alist_last(alist *l)
+ l->cur = cur;
+ }
+
+-void alist_append(alist *l, anode *node)
++int alist_append(alist *l, anode *node)
+ {
+ anode* newnode;
+
+ newnode = malloc(sizeof(anode));
++ if (newnode == NULL)
++ return 1;
+
+ if (node->scontext)
+ newnode->scontext = node->scontext;
+@@ -104,6 +106,8 @@ void alist_append(alist *l, anode *node)
+ // make newnode current
+ l->cur = newnode;
+ l->cnt++;
++
++ return 0;
+ }
+
+ int alist_find_subj(alist *l)
+diff -ur audit-4.0.1.orig/src/ausearch-avc.h audit-4.0.1/src/ausearch-avc.h
+--- audit-4.0.1.orig/src/ausearch-avc.h
++++ audit-4.0.1/src/ausearch-avc.h
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-avc.h - Header file for ausearch-string.c
+-* Copyright (c) 2006,2008 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2006,2008 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -54,7 +54,7 @@ void alist_create(alist *l);
+ static inline void alist_first(alist *l) { l->cur = l->head; }
+ anode *alist_next(alist *l);
+ static inline anode *alist_get_cur(const alist *l) { return l->cur; }
+-void alist_append(alist *l, anode *node);
++int alist_append(alist *l, anode *node);
+ void anode_init(anode *an);
+ void anode_clear(anode *an);
+ void alist_clear(alist* l);
+diff -ur audit-4.0.1.orig/src/ausearch-int.c audit-4.0.1/src/ausearch-int.c
+--- audit-4.0.1.orig/src/ausearch-int.c
++++ audit-4.0.1/src/ausearch-int.c
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-int.c - Minimal linked list library for integers
+-* Copyright (c) 2005,2008 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2005,2008 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -41,11 +41,13 @@ int_node *ilist_next(ilist *l)
+ return l->cur;
+ }
+
+-void ilist_append(ilist *l, int num, unsigned int hits, int aux)
++int ilist_append(ilist *l, int num, unsigned int hits, int aux)
+ {
+ int_node* newnode;
+
+ newnode = malloc(sizeof(int_node));
++ if (newnode == NULL)
++ return 1;
+
+ newnode->num = num;
+ newnode->hits = hits;
+@@ -61,6 +63,8 @@ void ilist_append(ilist *l, int num, uns
+ // make newnode current
+ l->cur = newnode;
+ l->cnt++;
++
++ return 0;
+ }
+
+ void ilist_clear(ilist* l)
+diff -ur audit-4.0.1.orig/src/ausearch-int.h audit-4.0.1/src/ausearch-int.h
+--- audit-4.0.1.orig/src/ausearch-int.h
++++ audit-4.0.1/src/ausearch-int.h
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-int.h - Header file for ausearch-int.c
+-* Copyright (c) 2005,2008 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2005,2008 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -48,7 +48,7 @@ void ilist_create(ilist *l);
+ static inline void ilist_first(ilist *l) { l->cur = l->head; }
+ int_node *ilist_next(ilist *l);
+ static inline int_node *ilist_get_cur(const ilist *l) { return l->cur; }
+-void ilist_append(ilist *l, int num, unsigned int hits, int aux);
++int ilist_append(ilist *l, int num, unsigned int hits, int aux);
+ void ilist_clear(ilist* l);
+
+ /* append a number if its not already on the list */
+diff -ur audit-4.0.1.orig/src/ausearch-llist.c audit-4.0.1/src/ausearch-llist.c
+--- audit-4.0.1.orig/src/ausearch-llist.c
++++ audit-4.0.1/src/ausearch-llist.c
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-llist.c - Minimal linked list library
+-* Copyright (c) 2005-2008,2011,2016 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2005-2008,2011,2016 Red Hat Inc.
+ * Copyright (c) 2011 IBM Corp.
+ * All Rights Reserved.
+ *
+@@ -102,11 +102,13 @@ lnode *list_prev(llist *l)
+ return l->cur;
+ }
+
+-void list_append(llist *l, lnode *node)
++int list_append(llist *l, lnode *node)
+ {
+ lnode* newnode;
+
+ newnode = malloc(sizeof(lnode));
++ if (newnode == NULL)
++ return 1;
+
+ if (node->message)
+ newnode->message = node->message;
+@@ -119,7 +121,7 @@ void list_append(llist *l, lnode *node)
+ newnode->type = node->type;
+ newnode->a0 = node->a0;
+ newnode->a1 = node->a1;
+- newnode->item = l->cnt;
++ newnode->item = l->cnt;
+ newnode->next = NULL;
+
+ // if we are at top, fix this up
+@@ -131,6 +133,8 @@ void list_append(llist *l, lnode *node)
+ // make newnode current
+ l->cur = newnode;
+ l->cnt++;
++
++ return 0;
+ }
+
+ int list_find_item(llist *l, unsigned int i)
+diff -ur audit-4.0.1.orig/src/ausearch-llist.h audit-4.0.1/src/ausearch-llist.h
+--- audit-4.0.1.orig/src/ausearch-llist.h
++++ audit-4.0.1/src/ausearch-llist.h
+@@ -107,7 +107,7 @@ void list_last(llist *l);
+ lnode *list_next(llist *l);
+ lnode *list_prev(llist *l);
+ static inline lnode *list_get_cur(llist *l) { return l->cur; }
+-void list_append(llist *l, lnode *node);
++int list_append(llist *l, lnode *node);
+ void list_clear(llist* l);
+ int list_get_event(llist* l, event *e);
+
+diff -ur audit-4.0.1.orig/src/ausearch-nvpair.c audit-4.0.1/src/ausearch-nvpair.c
+--- audit-4.0.1.orig/src/ausearch-nvpair.c
++++ audit-4.0.1/src/ausearch-nvpair.c
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-nvpair.c - Minimal linked list library for name-value pairs
+-* Copyright (c) 2006-08 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2006-08 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -34,9 +34,11 @@ void search_list_create(nvlist *l)
+ l->cnt = 0;
+ }
+
+-void search_list_append(nvlist *l, nvnode *node)
++int search_list_append(nvlist *l, nvnode *node)
+ {
+ nvnode* newnode = malloc(sizeof(nvnode));
++ if (newnode == NULL)
++ return 1;
+
+ newnode->name = node->name;
+ newnode->val = node->val;
+@@ -54,6 +56,8 @@ void search_list_append(nvlist *l, nvnod
+ // make newnode current
+ l->cur = newnode;
+ l->cnt++;
++
++ return 0;
+ }
+
+ int search_list_find_val(nvlist *l, long val)
+diff -ur audit-4.0.1.orig/src/ausearch-nvpair.h audit-4.0.1/src/ausearch-nvpair.h
+--- audit-4.0.1.orig/src/ausearch-nvpair.h
++++ audit-4.0.1/src/ausearch-nvpair.h
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-nvpair.h - Header file for ausearch-nvpair.c
+-* Copyright (c) 2006-08 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2006-08 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -46,7 +46,7 @@ typedef struct {
+
+ void search_list_create(nvlist *l);
+ static inline nvnode *search_list_get_cur(nvlist *l) { return l->cur; }
+-void search_list_append(nvlist *l, nvnode *node);
++int search_list_append(nvlist *l, nvnode *node);
+ void search_list_clear(nvlist* l);
+
+ /* Given a numeric index, find that record. */
+diff -ur audit-4.0.1.orig/src/ausearch-string.c audit-4.0.1/src/ausearch-string.c
+--- audit-4.0.1.orig/src/ausearch-string.c
++++ audit-4.0.1/src/ausearch-string.c
+@@ -44,11 +44,13 @@ snode *slist_next(slist *l)
+ return l->cur;
+ }
+
+-void slist_append(slist *l, const snode *node)
++int slist_append(slist *l, const snode *node)
+ {
+ snode* newnode;
+
+ newnode = malloc(sizeof(snode));
++ if (newnode == NULL)
++ return 1;
+
+ if (node->str)
+ newnode->str = node->str;
+@@ -75,6 +77,8 @@ void slist_append(slist *l, const snode
+ // make newnode current
+ l->cur = newnode;
+ l->cnt++;
++
++ return 0;
+ }
+
+ void slist_clear(slist* l)
+diff -ur audit-4.0.1.orig/src/ausearch-string.h audit-4.0.1/src/ausearch-string.h
+--- audit-4.0.1.orig/src/ausearch-string.h
++++ audit-4.0.1/src/ausearch-string.h
+@@ -49,7 +49,7 @@ void slist_create(slist *l);
+ static inline void slist_first(slist *l) { l->cur = l->head; }
+ snode *slist_next(slist *l);
+ static inline snode *slist_get_cur(const slist *l) { return l->cur; }
+-void slist_append(slist *l, const snode *node);
++int slist_append(slist *l, const snode *node);
+ void slist_clear(slist* l);
+
+ /* append a string if its not already on the list */
+diff -ur audit-4.0.1.orig/tools/aulastlog/aulastlog-llist.c audit-4.0.1/tools/aulastlog/aulastlog-llist.c
+--- audit-4.0.1.orig/tools/aulastlog/aulastlog-llist.c
++++ audit-4.0.1/tools/aulastlog/aulastlog-llist.c
+@@ -1,7 +1,7 @@
+ /*
+ * aulastlog-llist.c - Minimal linked list library
+-* Copyright (c) 2008 Red Hat Inc., Durham, North Carolina.
+-* All Rights Reserved.
++* Copyright (c) 2008 Red Hat Inc..
++* All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+ * terms of the GNU General Public License as published by the Free
+@@ -15,7 +15,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to the
+-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
++* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1335, USA.
+ *
+ * Authors:
+@@ -41,11 +41,13 @@ lnode *list_next(llist *l)
+ return l->cur;
+ }
+
+-void list_append(llist *l, lnode *node)
++int list_append(llist *l, lnode *node)
+ {
+ lnode* newnode;
+
+ newnode = malloc(sizeof(lnode));
++ if (newnode == NULL)
++ return 1;
+
+ newnode->sec = node->sec;
+ newnode->uid = node->uid;
+@@ -58,7 +60,7 @@ void list_append(llist *l, lnode *node)
+ newnode->term = strdup(node->term);
+ else
+ newnode->term = NULL;
+- newnode->item = l->cnt;
++ newnode->item = l->cnt;
+ newnode->next = NULL;
+
+ // if we are at top, fix this up
+@@ -70,6 +72,8 @@ void list_append(llist *l, lnode *node)
+ // make newnode current
+ l->cur = newnode;
+ l->cnt++;
++
++ return 0;
+ }
+
+ void list_clear(llist* l)
+diff -ur audit-4.0.1.orig/tools/aulastlog/aulastlog-llist.h audit-4.0.1/tools/aulastlog/aulastlog-llist.h
+--- audit-4.0.1.orig/tools/aulastlog/aulastlog-llist.h
++++ audit-4.0.1/tools/aulastlog/aulastlog-llist.h
+@@ -1,6 +1,6 @@
+ /*
+ * aulastlog-llist.h - Header file for aulastlog-llist.c
+-* Copyright (c) 2008 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2008 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -53,7 +53,7 @@ static inline void list_first(llist *l)
+ lnode *list_next(llist *l);
+ static inline lnode *list_get_cur(llist *l) { return l->cur; }
+ static inline unsigned int list_get_cnt(llist *l) { return l->cnt; }
+-void list_append(llist *l, lnode *node);
++int list_append(llist *l, lnode *node);
+ void list_clear(llist* l);
+ int list_update_login(llist* l, time_t t);
+ int list_update_host(llist* l, const char *h);
diff --git a/sys-process/audit/files/audit-4.0.1-null-deref.patch b/sys-process/audit/files/audit-4.0.1-null-deref.patch
new file mode 100644
index 000000000000..c18322ad2797
--- /dev/null
+++ b/sys-process/audit/files/audit-4.0.1-null-deref.patch
@@ -0,0 +1,35 @@
+From 4780cd1a790286213dda646f782fa7128fb092a9 Mon Sep 17 00:00:00 2001
+From: Yugend <77495782+Yugend@users.noreply.github.com>
+Date: Sat, 4 May 2024 00:39:36 +0300
+Subject: [PATCH] avoiding of NULL pointers dereference (#366)
+
+---
+ src/ausearch-parse.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/ausearch-parse.c b/src/ausearch-parse.c
+index 1a5b047f3..be57606bd 100644
+--- a/src/ausearch-parse.c
++++ b/src/ausearch-parse.c
+@@ -719,6 +719,10 @@ static int common_path_parser(search_items *s, char *path)
+ // append
+ snode sn;
+ sn.str = strdup(path);
++ if (sn.str == NULL) {
++ fprintf(stderr, "Out of memory. Check %s file, %d line\n", __FILE__, __LINE__);
++ return 8;
++ }
+ sn.key = NULL;
+ sn.hits = 1;
+ // Attempt to rebuild path if relative
+@@ -1217,6 +1221,10 @@ static int parse_user(const lnode *n, search_items *s, anode *avc)
+ saved = *term;
+ *term = 0;
+ s->hostname = strdup(str);
++ if (s->hostname == NULL) {
++ fprintf(stderr, "Out of memory. Check %s file, %d line\n", __FILE__, __LINE__);
++ return 33;
++ }
+ *term = saved;
+
+ // Lets see if there is something more
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-07-22 4:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-07 16:22 [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/, sys-process/audit/files/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2024-07-22 4:36 Jason Zaman
2024-06-23 22:46 Sam James
2021-05-09 8:35 Lars Wendler
2021-01-01 22:57 Michał Górny
2018-12-13 17:16 Thomas Deutschmann
2017-01-15 11:20 Pacho Ramos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox