public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/files/, sys-process/audit/
@ 2015-08-18  4:30 Jason Zaman
  0 siblings, 0 replies; 8+ messages in thread
From: Jason Zaman @ 2015-08-18  4:30 UTC (permalink / raw
  To: gentoo-commits

commit:     7b1821119f093af1396b20cfd26c24188d5936f1
Author:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 18 04:27:33 2015 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Tue Aug 18 04:29:26 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b182111

sys-process/audit: Remove lock from init script

The lock in the init script was only needed in Redhat. OpenRC keeps track of if
the process is started so not required.  Also fix perms on the systemd unit.

Gentoo-Bug: https://bugs.gentoo.org/556436
Gentoo-Bug: https://bugs.gentoo.org/449990

Package-Manager: portage-2.2.20.1

 sys-process/audit/audit-2.4.3-r1.ebuild     | 225 ++++++++++++++++++++++++++++
 sys-process/audit/files/auditd-init.d-2.4.3 |  91 +++++++++++
 2 files changed, 316 insertions(+)

diff --git a/sys-process/audit/audit-2.4.3-r1.ebuild b/sys-process/audit/audit-2.4.3-r1.ebuild
new file mode 100644
index 0000000..e7284e5
--- /dev/null
+++ b/sys-process/audit/audit-2.4.3-r1.ebuild
@@ -0,0 +1,225 @@
+# 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_3,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="http://people.redhat.com/sgrubb/audit/"
+SRC_URI="http://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}
+		>=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/auditd-init.d-2.4.3 b/sys-process/audit/files/auditd-init.d-2.4.3
new file mode 100644
index 0000000..33c932a
--- /dev/null
+++ b/sys-process/audit/files/auditd-init.d-2.4.3
@@ -0,0 +1,91 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands='reload reload_auditd reload_rules'
+description='Linux Auditing System'
+description_reload='Reload daemon configuration and rules'
+description_reload_rules='Reload daemon rules'
+description_reload_auditd='Reload daemon configuration'
+
+name='auditd'
+pidfile='/var/run/auditd.pid'
+command='/sbin/auditd'
+
+start_auditd() {
+	# Env handling taken from the upstream init script
+	if [ -z "$AUDITD_LANG" -o "$AUDITD_LANG" = "none" -o "$AUDITD_LANG" = "NONE" ]; then
+		unset LANG LC_TIME LC_ALL LC_MESSAGES LC_NUMERIC LC_MONETARY LC_COLLATE
+	else
+		LANG="$AUDITD_LANG"
+		LC_TIME="$AUDITD_LANG"
+		LC_ALL="$AUDITD_LANG"
+		LC_MESSAGES="$AUDITD_LANG"
+		LC_NUMERIC="$AUDITD_LANG"
+		LC_MONETARY="$AUDITD_LANG"
+		LC_COLLATE="$AUDITD_LANG"
+		export LANG LC_TIME LC_ALL LC_MESSAGES LC_NUMERIC LC_MONETARY LC_COLLATE
+	fi
+	unset HOME MAIL USER USERNAME
+
+	ebegin "Starting ${name}"
+	start-stop-daemon \
+		--start --quiet --pidfile ${pidfile} \
+		--exec ${command} -- ${EXTRAOPTIONS}
+	local ret=$?
+	eend $ret
+	return $ret
+}
+
+stop_auditd() {
+	ebegin "Stopping ${name}"
+	start-stop-daemon --stop --quiet --pidfile ${pidfile}
+	local ret=$?
+	eend $ret
+	return $ret
+}
+
+loadfile() {
+	local rules="$1"
+	if [ -n "${rules}" -a -f "${rules}" ]; then
+		einfo "Loading audit rules from ${rules}"
+		/sbin/auditctl -R "${rules}" >/dev/null
+		return $?
+	else
+		return 0
+	fi
+}
+
+start() {
+	start_auditd
+	local ret=$?
+	if [ $ret -eq 0 -a "${RC_CMD}" != "restart" ]; then
+		loadfile "${RULEFILE_STARTUP}"
+	fi
+	return $ret
+}
+
+reload_rules() {
+	loadfile "${RULEFILE_STARTUP}"
+}
+
+reload_auditd() {
+	ebegin "Reloading ${SVCNAME}"
+	start-stop-daemon --signal HUP \
+	    --exec "${command}" --pidfile "${pidfile}"
+	eend $?
+}
+
+reload() {
+	reload_auditd
+	reload_rules
+}
+
+stop() {
+	[ "${RC_CMD}" != "restart" ] && loadfile "${RULEFILE_STOP_PRE}"
+	stop_auditd
+	local ret=$?
+	[ "${RC_CMD}" != "restart" ] && loadfile "${RULEFILE_STOP_POST}"
+	return $ret
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/files/, sys-process/audit/
@ 2021-01-01  2:03 Michał Górny
  0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2021-01-01  2:03 UTC (permalink / raw
  To: gentoo-commits

commit:     7494ff77d198e87226f368af01769e2ebb38cb61
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  1 02:00:44 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan  1 02:00:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7494ff77

sys-process/audit: Remove old (py3.6)

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 deletions(-)

diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
index 2890c29de36..d5276de092b 100644
--- a/sys-process/audit/Manifest
+++ b/sys-process/audit/Manifest
@@ -1,8 +1,4 @@
 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
deleted file mode 100644
index fe6c17834e6..00000000000
--- a/sys-process/audit/audit-2.6.4.ebuild
+++ /dev/null
@@ -1,230 +0,0 @@
-# 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
deleted file mode 100644
index b3448548a50..00000000000
--- a/sys-process/audit/audit-2.7.1.ebuild
+++ /dev/null
@@ -1,230 +0,0 @@
-# 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
deleted file mode 100644
index 6bcdd339ea4..00000000000
--- a/sys-process/audit/audit-2.8.2.ebuild
+++ /dev/null
@@ -1,228 +0,0 @@
-# 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
deleted file mode 100644
index 64b55ec39e2..00000000000
--- a/sys-process/audit/audit-2.8.3.ebuild
+++ /dev/null
@@ -1,228 +0,0 @@
-# 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
deleted file mode 100644
index 3ec60fbc48e..00000000000
--- a/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-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
deleted file mode 100644
index ef0e6ee26f3..00000000000
--- a/sys-process/audit/files/audit.rules
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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
deleted file mode 100644
index 29ae197f18b..00000000000
--- a/sys-process/audit/files/audit.rules.stop.post
+++ /dev/null
@@ -1,12 +0,0 @@
-# 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
deleted file mode 100644
index 1f34173369e..00000000000
--- a/sys-process/audit/files/audit.rules.stop.pre
+++ /dev/null
@@ -1,15 +0,0 @@
-# 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] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/files/, sys-process/audit/
@ 2021-01-01 22:57 Michał Górny
  0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2021-01-01 22:57 UTC (permalink / raw
  To: gentoo-commits

commit:     a4761b5340cae19f0acab4528bb7fc3f3a75c954
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  1 22:55:19 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan  1 22:57:15 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4761b53

sys-process/audit: Remove old (py3.6)

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 ---
 7 files changed, 1156 deletions(-)

diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
index 2890c29de36..d5276de092b 100644
--- a/sys-process/audit/Manifest
+++ b/sys-process/audit/Manifest
@@ -1,8 +1,4 @@
 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
deleted file mode 100644
index fe6c17834e6..00000000000
--- a/sys-process/audit/audit-2.6.4.ebuild
+++ /dev/null
@@ -1,230 +0,0 @@
-# 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
deleted file mode 100644
index b3448548a50..00000000000
--- a/sys-process/audit/audit-2.7.1.ebuild
+++ /dev/null
@@ -1,230 +0,0 @@
-# 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
deleted file mode 100644
index 6bcdd339ea4..00000000000
--- a/sys-process/audit/audit-2.8.2.ebuild
+++ /dev/null
@@ -1,228 +0,0 @@
-# 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
deleted file mode 100644
index 64b55ec39e2..00000000000
--- a/sys-process/audit/audit-2.8.3.ebuild
+++ /dev/null
@@ -1,228 +0,0 @@
-# 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
deleted file mode 100644
index 3ec60fbc48e..00000000000
--- a/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-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
deleted file mode 100644
index ef0e6ee26f3..00000000000
--- a/sys-process/audit/files/audit.rules
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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:


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/files/, sys-process/audit/
@ 2022-04-07  3:37 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-04-07  3:37 UTC (permalink / raw
  To: gentoo-commits

commit:     b0fbaa7cc15c6663e4a854c0caca4ffffe7d1ff9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  7 03:03:22 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr  7 03:37:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0fbaa7c

sys-process/audit: add 3.0.8

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-process/audit/Manifest                         |   1 +
 sys-process/audit/audit-3.0.8.ebuild               | 175 +++++++++++++++++++++
 .../files/audit-3.0.8-linux-headers-5.17.patch     |  41 +++++
 3 files changed, 217 insertions(+)

diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
index 84d6a8474b9b..66d3b1f8fc41 100644
--- a/sys-process/audit/Manifest
+++ b/sys-process/audit/Manifest
@@ -1,3 +1,4 @@
 DIST audit-3.0.6.tar.gz 1190011 BLAKE2B 93a7efad1cbea6771a73222b05aacbabc4ac61d1efb9fc2532607a94804bcac6512d0be2f4d89aa62d94fb85ba5818ffae4bf0a72676e8d549ddbec766e83e9c SHA512 74734e1b1fddea086db9c5dc8c4b7817917fdf17bc7ca4e5b440aae975484d020a17c3f485f6a37b6b150a307d809e50d559d31a8cbd6f1e554933719551bcd1
 DIST audit-3.0.7.tar.gz 1180226 BLAKE2B 706db746fb779913619da794bab24a9e890e1655bbd0abb007cbc909b32ab1d643e93953a23ef864d5e189f3447a7ddb4dca1478144cdc226f5a5594545bd28f SHA512 b5662b32082fc2ac54e247aa0db5442d76afa30134ebba1d624a17004e9ccf6856bb75344af4ce9d9a0a66c03e1c6f18b7d45658d7df13ea71af0c8362e08d70
+DIST audit-3.0.8.tar.gz 1182432 BLAKE2B 38a35a7540e608127cfc54a2de2cb12df8c29e778799ca53318824c84565a67b7ea131f9bba455fa469ce9139a27908738f571a6e383ce9a3274f70c09d27ec7 SHA512 8379bf425d68381d182300e628e42de8460d2f3e15b2395e10880f94b9989656852a50a9bece75b632ec8a04c40c9e666ff4c9d6b25ace3a8f50d2011506afab
 DIST audit-3.0.tar.gz 1109442 BLAKE2B f9c94f7163522068f5f37163a242cb913acc87b5465f7f8550fad27ac1dc673fd7a98e208bd5e6fb136eac1fdadd659e599e7722426937481bbf8c66d86a1617 SHA512 b82ec73c85a8ebb5108b526673d6fe08cbe0b51376788f3ea6ed5747c4612158462893e719496dffbd723f833f84383a2d1d55fd78a3ed985ecfd19545060c88

diff --git a/sys-process/audit/audit-3.0.8.ebuild b/sys-process/audit/audit-3.0.8.ebuild
new file mode 100644
index 000000000000..5b0d02d64cbe
--- /dev/null
+++ b/sys-process/audit/audit-3.0.8.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# 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_{8..10} )
+
+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="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="gssapi ldap python static-libs test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="gssapi? ( virtual/krb5 )
+	ldap? ( net-nds/openldap:= )
+	python? ( ${PYTHON_DEPS} )
+	sys-libs/libcap-ng"
+DEPEND="${RDEPEND}
+	>=sys-kernel/linux-headers-2.6.34
+	test? ( dev-libs/check )"
+BDEPEND="python? ( dev-lang/swig )"
+
+CONFIG_CHECK="~AUDIT"
+
+PATCHES=(
+	# See bug #836702 before removing / verify builds fine w/ USE=python
+	# with latest kernel headers.
+	"${FILESDIR}"/${PN}-3.0.8-linux-headers-5.17.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 -a myeconfargs=(
+		--sbindir="${EPREFIX}/sbin"
+		$(use_enable gssapi gssapi-krb5)
+		$(use_enable ldap zos-remote)
+		$(use_enable static-libs static)
+		--enable-systemd
+		--without-golang
+		--without-python
+		--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
+
+	[ -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 "${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-3.0.8-linux-headers-5.17.patch b/sys-process/audit/files/audit-3.0.8-linux-headers-5.17.patch
new file mode 100644
index 000000000000..8d41d8363822
--- /dev/null
+++ b/sys-process/audit/files/audit-3.0.8-linux-headers-5.17.patch
@@ -0,0 +1,41 @@
+Upstream rejected a workaround/fix at https://github.com/linux-audit/audit-userspace/pull/253
+/ https://github.com/linux-audit/audit-userspace/issues/252#issuecomment-1078595249.
+
+Instead, in Fedora (same maintainer as upstream), they're patching the headers then unpatching before install.
+
+Apparently the swig bindings are on their way out but I'm not convinced that's going to be a quick migration given the API will.. surely change?
+
+It's not ideal but let's take the patch slyfox ended up using in nixpkgs anyway.
+
+https://bugs.gentoo.org/836702
+
+From beed138222421a2eb4212d83cb889404bd7efc49 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Wed, 23 Mar 2022 07:27:05 +0000
+Subject: [PATCH] auditswig.i: avoid setter generation for audit_rule_data::buf
+
+As it's a flexible array generated code was never safe to use.
+With kernel's https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed98ea2128b6fd83bce13716edf8f5fe6c47f574
+change it's a build failure now:
+
+    audit> audit_wrap.c:5010:15: error: invalid use of flexible array member
+    audit>  5010 |     arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
+    audit>       |               ^
+
+Let's avoid setter generation entirely.
+
+Closes: https://github.com/linux-audit/audit-userspace/issues/252
+--- a/bindings/swig/src/auditswig.i
++++ b/bindings/swig/src/auditswig.i
+@@ -39,6 +39,10 @@ signed
+ #define __attribute(X) /*nothing*/
+ typedef unsigned __u32;
+ typedef unsigned uid_t;
++/* Sidestep SWIG's limitation of handling c99 Flexible arrays by not:
++ * generating setters against them: https://github.com/swig/swig/issues/1699
++ */
++%ignore audit_rule_data::buf;
+ %include "/usr/include/linux/audit.h"
+ #define __extension__ /*nothing*/
+ %include <stdint.i>
+


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/files/, sys-process/audit/
@ 2022-08-16  0:19 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-08-16  0:19 UTC (permalink / raw
  To: gentoo-commits

commit:     7ed0e40edb8ce9b75521efca7fc14e71e3ac431a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 16 00:09:28 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 16 00:10:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ed0e40e

sys-process/audit: fix musl build

Closes: https://bugs.gentoo.org/837275
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-process/audit/audit-3.0.8.ebuild               |  3 ++-
 .../audit/files/audit-3.0.8-musl-malloc.patch      | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/sys-process/audit/audit-3.0.8.ebuild b/sys-process/audit/audit-3.0.8.ebuild
index 4c4bfe08a040..44a6d4ffd6c5 100644
--- a/sys-process/audit/audit-3.0.8.ebuild
+++ b/sys-process/audit/audit-3.0.8.ebuild
@@ -38,6 +38,7 @@ PATCHES=(
 	# See bug #836702 before removing / verify builds fine w/ USE=python
 	# with latest kernel headers.
 	"${FILESDIR}"/${PN}-3.0.8-linux-headers-5.17.patch
+	"${FILESDIR}"/${PN}-3.0.8-musl-malloc.patch
 )
 
 src_prepare() {
@@ -72,7 +73,7 @@ multilib_src_configure() {
 			mkdir -p "${BUILD_DIR}" || die
 			pushd "${BUILD_DIR}" &>/dev/null || die
 
-			ECONF_SOURCE=${S} econf "${myeconfargs[@]}" --with-python3
+			ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" --with-python3
 
 			popd &>/dev/null || die
 		}

diff --git a/sys-process/audit/files/audit-3.0.8-musl-malloc.patch b/sys-process/audit/files/audit-3.0.8-musl-malloc.patch
new file mode 100644
index 000000000000..17814dbe29fc
--- /dev/null
+++ b/sys-process/audit/files/audit-3.0.8-musl-malloc.patch
@@ -0,0 +1,28 @@
+https://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-security/audit/audit/0001-Replace-__attribute_malloc__-with-__attribute__-__ma.patch?id=ad978133a1a10d609bb2545882a2f720a2572f3d
+https://bugs.gentoo.org/837275
+
+From 79c8d6a2755c9dfa00a5e86378e89a94eef0504d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 9 Aug 2022 23:57:03 -0700
+Subject: [PATCH] Replace __attribute_malloc__ with 
+ __attribute__((__malloc__))
+
+__attribute_malloc__ is not available on musl
+
+Fixes
+| ../../git/auparse/auparse.h:54:2: error: expected function body after function declarator
+|         __attribute_malloc__ __attr_dealloc (auparse_destroy, 1);
+|         ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/auparse/auparse.h
++++ b/auparse/auparse.h
+@@ -51,7 +51,7 @@ typedef void (*auparse_callback_ptr)(auparse_state_t *au,
+ void auparse_destroy(auparse_state_t *au);
+ void auparse_destroy_ext(auparse_state_t *au, auparse_destroy_what_t what);
+ auparse_state_t *auparse_init(ausource_t source, const void *b)
+-	__attribute_malloc__ __attr_dealloc (auparse_destroy, 1);
++	__attribute__((__malloc__)) __attr_dealloc (auparse_destroy, 1);
+ int auparse_new_buffer(auparse_state_t *au, const char *data, size_t data_len)
+ 	__attr_access ((__read_only__, 2, 3));
+ int auparse_feed(auparse_state_t *au, const char *data, size_t data_len)


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/files/, sys-process/audit/
@ 2024-07-14 23:15 Jason Zaman
  0 siblings, 0 replies; 8+ messages in thread
From: Jason Zaman @ 2024-07-14 23:15 UTC (permalink / raw
  To: gentoo-commits

commit:     06f2781c70fab797c05d34fdccd3abca5391946e
Author:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 14 22:43:21 2024 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Jul 14 23:13:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06f2781c

sys-process/audit: drop 3.1.1

Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>

 sys-process/audit/Manifest                         |   1 -
 sys-process/audit/audit-3.1.1.ebuild               | 196 ---------------------
 .../files/audit-3.0.8-linux-headers-5.17.patch     |  41 -----
 3 files changed, 238 deletions(-)

diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
index a4241527b24b..32dd6e54f424 100644
--- a/sys-process/audit/Manifest
+++ b/sys-process/audit/Manifest
@@ -1,4 +1,3 @@
-DIST audit-3.1.1.tar.gz 1218111 BLAKE2B a804684e438efc5f35b387708b3dc91bf857eeb56624261e0f75543556c436bfe638b792f63289f049c11541b10b2dc0e9f17b22f44b913da0168b1cf20684fc SHA512 4917970cc4c7f786c464a6d101bf66d55d55ac4716cf415ff97177f08176a6301e946716d28cf5b16054538469b3140b97db99d55a28686a9a807eea60c070f3
 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

diff --git a/sys-process/audit/audit-3.1.1.ebuild b/sys-process/audit/audit-3.1.1.ebuild
deleted file mode 100644
index 97910e182b7e..000000000000
--- a/sys-process/audit/audit-3.1.1.ebuild
+++ /dev/null
@@ -1,196 +0,0 @@
-# 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..12} )
-
-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"
-
-PATCHES=(
-	# See bug #836702 before removing / verify builds fine w/ USE=python
-	# with latest kernel headers.
-	"${FILESDIR}"/${PN}-3.0.8-linux-headers-5.17.patch
-	"${FILESDIR}"/${PN}-3.0.8-musl-malloc.patch
-)
-
-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
-)
-
-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)
-		--enable-systemd
-		--without-golang
-		--without-libwrap
-		--without-python
-		--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-3.0.8-linux-headers-5.17.patch b/sys-process/audit/files/audit-3.0.8-linux-headers-5.17.patch
deleted file mode 100644
index 8d41d8363822..000000000000
--- a/sys-process/audit/files/audit-3.0.8-linux-headers-5.17.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Upstream rejected a workaround/fix at https://github.com/linux-audit/audit-userspace/pull/253
-/ https://github.com/linux-audit/audit-userspace/issues/252#issuecomment-1078595249.
-
-Instead, in Fedora (same maintainer as upstream), they're patching the headers then unpatching before install.
-
-Apparently the swig bindings are on their way out but I'm not convinced that's going to be a quick migration given the API will.. surely change?
-
-It's not ideal but let's take the patch slyfox ended up using in nixpkgs anyway.
-
-https://bugs.gentoo.org/836702
-
-From beed138222421a2eb4212d83cb889404bd7efc49 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyich@gmail.com>
-Date: Wed, 23 Mar 2022 07:27:05 +0000
-Subject: [PATCH] auditswig.i: avoid setter generation for audit_rule_data::buf
-
-As it's a flexible array generated code was never safe to use.
-With kernel's https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed98ea2128b6fd83bce13716edf8f5fe6c47f574
-change it's a build failure now:
-
-    audit> audit_wrap.c:5010:15: error: invalid use of flexible array member
-    audit>  5010 |     arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
-    audit>       |               ^
-
-Let's avoid setter generation entirely.
-
-Closes: https://github.com/linux-audit/audit-userspace/issues/252
---- a/bindings/swig/src/auditswig.i
-+++ b/bindings/swig/src/auditswig.i
-@@ -39,6 +39,10 @@ signed
- #define __attribute(X) /*nothing*/
- typedef unsigned __u32;
- typedef unsigned uid_t;
-+/* Sidestep SWIG's limitation of handling c99 Flexible arrays by not:
-+ * generating setters against them: https://github.com/swig/swig/issues/1699
-+ */
-+%ignore audit_rule_data::buf;
- %include "/usr/include/linux/audit.h"
- #define __extension__ /*nothing*/
- %include <stdint.i>
-


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/files/, sys-process/audit/
@ 2024-07-15  3:32 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-07-15  3:32 UTC (permalink / raw
  To: gentoo-commits

commit:     c2d50c79cc88f5dc8272e987278bc2d35a805619
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 15 03:31:24 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul 15 03:31:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2d50c79

sys-process/audit: fix modern C issues

Revbump for two reasons:
1) the general modern C rationale per the wiki page and ML post, but also
2) the patch changes behaviour to drop e.g. printf in the library side.

Closes: https://bugs.gentoo.org/936080
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{audit-3.1.4.ebuild => audit-3.1.4-r1.ebuild}  |   4 +
 sys-process/audit/files/audit-3.1.4-c99.patch      | 599 +++++++++++++++++++++
 2 files changed, 603 insertions(+)

diff --git a/sys-process/audit/audit-3.1.4.ebuild b/sys-process/audit/audit-3.1.4-r1.ebuild
similarity index 99%
rename from sys-process/audit/audit-3.1.4.ebuild
rename to sys-process/audit/audit-3.1.4-r1.ebuild
index 0d70c01f9efe..33f5402ee966 100644
--- a/sys-process/audit/audit-3.1.4.ebuild
+++ b/sys-process/audit/audit-3.1.4-r1.ebuild
@@ -51,6 +51,10 @@ QA_CONFIG_IMPL_DECL_SKIP=(
 	strndupa
 )
 
+PATCHES=(
+	"${FILESDIR}"/${P}-c99.patch
+)
+
 src_prepare() {
 	# audisp-remote moved in multilib_src_install_all
 	sed -i \

diff --git a/sys-process/audit/files/audit-3.1.4-c99.patch b/sys-process/audit/files/audit-3.1.4-c99.patch
new file mode 100644
index 000000000000..e78d26038645
--- /dev/null
+++ b/sys-process/audit/files/audit-3.1.4-c99.patch
@@ -0,0 +1,599 @@
+https://bugs.gentoo.org/936080
+https://github.com/linux-audit/audit-userspace/commit/ec6763ed29a034b452a6fb568b226c57c7be30e7
+
+From ec6763ed29a034b452a6fb568b226c57c7be30e7 Mon Sep 17 00:00:00 2001
+From: Yanase Yuki <41878038+zpc0@users.noreply.github.com>
+Date: Tue, 14 May 2024 04:51:35 +0900
+Subject: [PATCH] Implicit builtin functions (#372)
+
+Correct a number of places where printf is being used without a prototype.
+All cases are in libraries which should not be using printf. Change them
+to return an error rather than communicate the problem.
+
+This is a backport of 8c7eaa7
+
+Co-authored-by: Steve Grubb <ausearch.1@gmail.com>
+--- a/audisp/audispd-llist.c
++++ b/audisp/audispd-llist.c
+@@ -69,15 +69,13 @@ unsigned int plist_count_active(const conf_llist *l)
+ 	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) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	if (p) {
+ 		void *pp = malloc(sizeof(struct plugin_conf));
+@@ -98,6 +96,8 @@ void plist_append(conf_llist *l, plugin_conf_t *p)
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ void plist_clear(conf_llist* l)
+--- a/audisp/audispd-llist.h
++++ b/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 conf_llist *l);
+ 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);
+--- a/auparse/normalize-llist.c
++++ b/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,15 +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) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	newnode->num = num;
+ 	newnode->data = data;
+@@ -84,5 +83,6 @@ void cllist_append(cllist *l, uint32_t num, void *data)
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++	return 0;
+ }
+ 
+--- a/auparse/normalize-llist.h
++++ b/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
+ 
+--- a/auparse/normalize.c
++++ b/auparse/normalize.c
+@@ -179,7 +179,8 @@ static unsigned int add_subj_attr(auparse_state_t *au, const char *str,
+ 	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_state_t *au, const char *str,
+ 	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_state_t *au, const char *syscall)
+ 	}
+ }
+ 
+-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)
+--- a/src/auditctl-llist.c
++++ b/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,19 +59,17 @@ lnode *list_next(llist *l)
+ 	return l->cur;
+ }
+ 
+-void list_append(llist *l, struct audit_rule_data *r, size_t sz)
++int list_append(llist *l, struct audit_rule_data *r, size_t sz)
+ {
+ 	lnode* newnode;
+ 
+ 	newnode = malloc(sizeof(lnode));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	if (r) {
+ 		void *rr = malloc(sz);
+-		if (rr) 
++		if (rr)
+ 			memcpy(rr, r, sz);
+ 		newnode->r = rr;
+ 	} else
+@@ -89,6 +87,8 @@ void list_append(llist *l, struct audit_rule_data *r, size_t sz)
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ void list_clear(llist* l)
+--- a/src/auditctl-llist.h
++++ b/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(llist *l) { return l->cur; }
+-void list_append(llist *l, struct audit_rule_data *r, size_t sz);
++int list_append(llist *l, struct audit_rule_data *r, size_t sz);
+ void list_clear(llist* l);
+ 
+ #endif
+--- a/src/ausearch-avc.c
++++ b/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,15 +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) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	if (node->scontext)
+ 		newnode->scontext = node->scontext;
+@@ -108,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)
+--- a/src/ausearch-avc.h
++++ b/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(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);
+--- a/src/ausearch-int.c
++++ b/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,15 +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) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	newnode->num = num;
+ 	newnode->hits = hits;
+@@ -65,6 +63,8 @@ void ilist_append(ilist *l, int num, unsigned int hits, int aux)
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ void ilist_clear(ilist* l)
+--- a/src/ausearch-int.h
++++ b/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(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 */
+--- a/src/ausearch-llist.c
++++ b/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,15 +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) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	if (node->message)
+ 		newnode->message = node->message;
+@@ -123,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
+@@ -135,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)
+--- a/src/ausearch-llist.h
++++ b/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);
+ 
+--- a/src/ausearch-nvpair.c
++++ b/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
+@@ -42,13 +42,11 @@ nvnode *search_list_next(nvlist *l)
+ 	return l->cur;
+ }
+ 
+-void search_list_append(nvlist *l, nvnode *node)
++int search_list_append(nvlist *l, nvnode *node)
+ {
+ 	nvnode* newnode = malloc(sizeof(nvnode));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	newnode->name = node->name;
+ 	newnode->val = node->val;
+@@ -66,6 +64,8 @@ void search_list_append(nvlist *l, nvnode *node)
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ int search_list_find_val(nvlist *l, long val)
+--- a/src/ausearch-nvpair.h
++++ b/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
+@@ -48,7 +48,7 @@ void search_list_create(nvlist *l);
+ static inline void search_list_first(nvlist *l) { l->cur = l->head; }
+ nvnode *search_list_next(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. */
+--- a/src/ausearch-string.c
++++ b/src/ausearch-string.c
+@@ -44,15 +44,13 @@ snode *slist_next(slist *l)
+ 	return l->cur;
+ }
+ 
+-void slist_append(slist *l, snode *node)
++int slist_append(slist *l, snode *node)
+ {
+ 	snode* newnode;
+ 
+ 	newnode = malloc(sizeof(snode));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	if (node->str)
+ 		newnode->str = node->str;
+@@ -79,6 +77,8 @@ void slist_append(slist *l, snode *node)
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ void slist_clear(slist* l)
+--- a/src/ausearch-string.h
++++ b/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(slist *l) { return l->cur; }
+-void slist_append(slist *l, snode *node);
++int slist_append(slist *l, snode *node);
+ void slist_clear(slist* l);
+ 
+ /* append a string if its not already on the list */
+--- a/tools/aulastlog/aulastlog-llist.c
++++ b/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,15 +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) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	newnode->sec = node->sec;
+ 	newnode->uid = node->uid;
+@@ -62,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
+@@ -74,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)
+--- a/tools/aulastlog/aulastlog-llist.h
++++ b/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) { l->cur = l->head; }
+ 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);
+


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/files/, sys-process/audit/
@ 2024-11-01 16:56 Andreas K. Hüttel
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas K. Hüttel @ 2024-11-01 16:56 UTC (permalink / raw
  To: gentoo-commits

commit:     200dd4d0252c70f32a81496eb94834fcbb0dfb35
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  1 16:28:54 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Nov  1 16:56:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=200dd4d0

sys-process/audit: drop 3.1.2, 3.1.4-r1

Bug: https://bugs.gentoo.org/936080
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-process/audit/Manifest                         |   2 -
 sys-process/audit/audit-3.1.2.ebuild               | 196 -------
 sys-process/audit/audit-3.1.4-r1.ebuild            | 197 -------
 .../audit/files/audit-3.0.8-musl-malloc.patch      |  29 -
 sys-process/audit/files/audit-3.1.4-c99.patch      | 599 ---------------------
 5 files changed, 1023 deletions(-)

diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
index d447a382ee89..317f73b539b9 100644
--- a/sys-process/audit/Manifest
+++ b/sys-process/audit/Manifest
@@ -1,3 +1 @@
-DIST audit-3.1.2.tar.gz 1219860 BLAKE2B dfdec470bf12cce6c570b3d260e65e2b49e8ac0761e6a6fbf7b4f4a57f92e88367cd74bfcb88e6d718619b88fea27ce963a977c9f4346c95d18a5310e217accb SHA512 a97003a294ed3671df01e2952688e7d5eef59a35f6891feb53e67c4c7eab9ae8c2d18de41a5b5b20e0ad7156fac93aec05f32f6bc5eea706b42b6f27f676446a
-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-3.1.2.ebuild b/sys-process/audit/audit-3.1.2.ebuild
deleted file mode 100644
index 62947e3e3553..000000000000
--- a/sys-process/audit/audit-3.1.2.ebuild
+++ /dev/null
@@ -1,196 +0,0 @@
-# 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..12} )
-
-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 ~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"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.0.8-musl-malloc.patch
-)
-
-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
-)
-
-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)
-		$(use_with arm)
-		$(use_with arm64 aarch64)
-		--enable-systemd
-		--without-golang
-		--without-libwrap
-		--without-python
-		--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
-			find . -type f -name 'Makefile' -exec sed -i "s;-I/usr/include/python;-I${SYSROOT}/usr/include/python;g" {} +
-
-			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/audit-3.1.4-r1.ebuild b/sys-process/audit/audit-3.1.4-r1.ebuild
deleted file mode 100644
index 11755f4501cd..000000000000
--- a/sys-process/audit/audit-3.1.4-r1.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# 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 ~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}-c99.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 arm)
-		$(use_with arm64 aarch64)
-		$(use_with io-uring io_uring)
-		--enable-systemd
-		--without-golang
-		--without-libwrap
-		--without-python
-		--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
-			find . -type f -name 'Makefile' -exec sed -i "s;-I/usr/include/python;-I${SYSROOT}/usr/include/python;g" {} +
-
-			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-3.0.8-musl-malloc.patch b/sys-process/audit/files/audit-3.0.8-musl-malloc.patch
deleted file mode 100644
index 7233aabe03c6..000000000000
--- a/sys-process/audit/files/audit-3.0.8-musl-malloc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-https://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-security/audit/audit/0001-Replace-__attribute_malloc__-with-__attribute__-__ma.patch?id=ad978133a1a10d609bb2545882a2f720a2572f3d
-https://github.com/linux-audit/audit-userspace/pull/311
-https://bugs.gentoo.org/837275
-
-From 79c8d6a2755c9dfa00a5e86378e89a94eef0504d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 9 Aug 2022 23:57:03 -0700
-Subject: [PATCH] Replace __attribute_malloc__ with 
- __attribute__((__malloc__))
-
-__attribute_malloc__ is not available on musl
-
-Fixes
-| ../../git/auparse/auparse.h:54:2: error: expected function body after function declarator
-|         __attribute_malloc__ __attr_dealloc (auparse_destroy, 1);
-|         ^
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
---- a/auparse/auparse.h
-+++ b/auparse/auparse.h
-@@ -51,7 +51,7 @@ typedef void (*auparse_callback_ptr)(auparse_state_t *au,
- void auparse_destroy(auparse_state_t *au);
- void auparse_destroy_ext(auparse_state_t *au, auparse_destroy_what_t what);
- auparse_state_t *auparse_init(ausource_t source, const void *b)
--	__attribute_malloc__ __attr_dealloc (auparse_destroy, 1);
-+	__attribute__((__malloc__)) __attr_dealloc (auparse_destroy, 1);
- int auparse_new_buffer(auparse_state_t *au, const char *data, size_t data_len)
- 	__attr_access ((__read_only__, 2, 3));
- int auparse_feed(auparse_state_t *au, const char *data, size_t data_len)

diff --git a/sys-process/audit/files/audit-3.1.4-c99.patch b/sys-process/audit/files/audit-3.1.4-c99.patch
deleted file mode 100644
index e78d26038645..000000000000
--- a/sys-process/audit/files/audit-3.1.4-c99.patch
+++ /dev/null
@@ -1,599 +0,0 @@
-https://bugs.gentoo.org/936080
-https://github.com/linux-audit/audit-userspace/commit/ec6763ed29a034b452a6fb568b226c57c7be30e7
-
-From ec6763ed29a034b452a6fb568b226c57c7be30e7 Mon Sep 17 00:00:00 2001
-From: Yanase Yuki <41878038+zpc0@users.noreply.github.com>
-Date: Tue, 14 May 2024 04:51:35 +0900
-Subject: [PATCH] Implicit builtin functions (#372)
-
-Correct a number of places where printf is being used without a prototype.
-All cases are in libraries which should not be using printf. Change them
-to return an error rather than communicate the problem.
-
-This is a backport of 8c7eaa7
-
-Co-authored-by: Steve Grubb <ausearch.1@gmail.com>
---- a/audisp/audispd-llist.c
-+++ b/audisp/audispd-llist.c
-@@ -69,15 +69,13 @@ unsigned int plist_count_active(const conf_llist *l)
- 	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) {
--		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
--		return;
--	}
-+	if (newnode == NULL)
-+		return 1;
- 
- 	if (p) {
- 		void *pp = malloc(sizeof(struct plugin_conf));
-@@ -98,6 +96,8 @@ void plist_append(conf_llist *l, plugin_conf_t *p)
- 	// make newnode current
- 	l->cur = newnode;
- 	l->cnt++;
-+
-+	return 0;
- }
- 
- void plist_clear(conf_llist* l)
---- a/audisp/audispd-llist.h
-+++ b/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 conf_llist *l);
- 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);
---- a/auparse/normalize-llist.c
-+++ b/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,15 +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) {
--		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
--		return;
--	}
-+	if (newnode == NULL)
-+		return 1;
- 
- 	newnode->num = num;
- 	newnode->data = data;
-@@ -84,5 +83,6 @@ void cllist_append(cllist *l, uint32_t num, void *data)
- 	// make newnode current
- 	l->cur = newnode;
- 	l->cnt++;
-+	return 0;
- }
- 
---- a/auparse/normalize-llist.h
-+++ b/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
- 
---- a/auparse/normalize.c
-+++ b/auparse/normalize.c
-@@ -179,7 +179,8 @@ static unsigned int add_subj_attr(auparse_state_t *au, const char *str,
- 	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_state_t *au, const char *str,
- 	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_state_t *au, const char *syscall)
- 	}
- }
- 
--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)
---- a/src/auditctl-llist.c
-+++ b/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,19 +59,17 @@ lnode *list_next(llist *l)
- 	return l->cur;
- }
- 
--void list_append(llist *l, struct audit_rule_data *r, size_t sz)
-+int list_append(llist *l, struct audit_rule_data *r, size_t sz)
- {
- 	lnode* newnode;
- 
- 	newnode = malloc(sizeof(lnode));
--	if (newnode == NULL) {
--		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
--		return;
--	}
-+	if (newnode == NULL)
-+		return 1;
- 
- 	if (r) {
- 		void *rr = malloc(sz);
--		if (rr) 
-+		if (rr)
- 			memcpy(rr, r, sz);
- 		newnode->r = rr;
- 	} else
-@@ -89,6 +87,8 @@ void list_append(llist *l, struct audit_rule_data *r, size_t sz)
- 	// make newnode current
- 	l->cur = newnode;
- 	l->cnt++;
-+
-+	return 0;
- }
- 
- void list_clear(llist* l)
---- a/src/auditctl-llist.h
-+++ b/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(llist *l) { return l->cur; }
--void list_append(llist *l, struct audit_rule_data *r, size_t sz);
-+int list_append(llist *l, struct audit_rule_data *r, size_t sz);
- void list_clear(llist* l);
- 
- #endif
---- a/src/ausearch-avc.c
-+++ b/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,15 +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) {
--		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
--		return;
--	}
-+	if (newnode == NULL)
-+		return 1;
- 
- 	if (node->scontext)
- 		newnode->scontext = node->scontext;
-@@ -108,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)
---- a/src/ausearch-avc.h
-+++ b/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(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);
---- a/src/ausearch-int.c
-+++ b/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,15 +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) {
--		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
--		return;
--	}
-+	if (newnode == NULL)
-+		return 1;
- 
- 	newnode->num = num;
- 	newnode->hits = hits;
-@@ -65,6 +63,8 @@ void ilist_append(ilist *l, int num, unsigned int hits, int aux)
- 	// make newnode current
- 	l->cur = newnode;
- 	l->cnt++;
-+
-+	return 0;
- }
- 
- void ilist_clear(ilist* l)
---- a/src/ausearch-int.h
-+++ b/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(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 */
---- a/src/ausearch-llist.c
-+++ b/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,15 +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) {
--		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
--		return;
--	}
-+	if (newnode == NULL)
-+		return 1;
- 
- 	if (node->message)
- 		newnode->message = node->message;
-@@ -123,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
-@@ -135,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)
---- a/src/ausearch-llist.h
-+++ b/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);
- 
---- a/src/ausearch-nvpair.c
-+++ b/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
-@@ -42,13 +42,11 @@ nvnode *search_list_next(nvlist *l)
- 	return l->cur;
- }
- 
--void search_list_append(nvlist *l, nvnode *node)
-+int search_list_append(nvlist *l, nvnode *node)
- {
- 	nvnode* newnode = malloc(sizeof(nvnode));
--	if (newnode == NULL) {
--		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
--		return;
--	}
-+	if (newnode == NULL)
-+		return 1;
- 
- 	newnode->name = node->name;
- 	newnode->val = node->val;
-@@ -66,6 +64,8 @@ void search_list_append(nvlist *l, nvnode *node)
- 	// make newnode current
- 	l->cur = newnode;
- 	l->cnt++;
-+
-+	return 0;
- }
- 
- int search_list_find_val(nvlist *l, long val)
---- a/src/ausearch-nvpair.h
-+++ b/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
-@@ -48,7 +48,7 @@ void search_list_create(nvlist *l);
- static inline void search_list_first(nvlist *l) { l->cur = l->head; }
- nvnode *search_list_next(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. */
---- a/src/ausearch-string.c
-+++ b/src/ausearch-string.c
-@@ -44,15 +44,13 @@ snode *slist_next(slist *l)
- 	return l->cur;
- }
- 
--void slist_append(slist *l, snode *node)
-+int slist_append(slist *l, snode *node)
- {
- 	snode* newnode;
- 
- 	newnode = malloc(sizeof(snode));
--	if (newnode == NULL) {
--		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
--		return;
--	}
-+	if (newnode == NULL)
-+		return 1;
- 
- 	if (node->str)
- 		newnode->str = node->str;
-@@ -79,6 +77,8 @@ void slist_append(slist *l, snode *node)
- 	// make newnode current
- 	l->cur = newnode;
- 	l->cnt++;
-+
-+	return 0;
- }
- 
- void slist_clear(slist* l)
---- a/src/ausearch-string.h
-+++ b/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(slist *l) { return l->cur; }
--void slist_append(slist *l, snode *node);
-+int slist_append(slist *l, snode *node);
- void slist_clear(slist* l);
- 
- /* append a string if its not already on the list */
---- a/tools/aulastlog/aulastlog-llist.c
-+++ b/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,15 +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) {
--		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
--		return;
--	}
-+	if (newnode == NULL)
-+		return 1;
- 
- 	newnode->sec = node->sec;
- 	newnode->uid = node->uid;
-@@ -62,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
-@@ -74,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)
---- a/tools/aulastlog/aulastlog-llist.h
-+++ b/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) { l->cur = l->head; }
- 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);
-


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-11-01 16:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-16  0:19 [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/files/, sys-process/audit/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-11-01 16:56 Andreas K. Hüttel
2024-07-15  3:32 Sam James
2024-07-14 23:15 Jason Zaman
2022-04-07  3:37 Sam James
2021-01-01 22:57 Michał Górny
2021-01-01  2:03 Michał Górny
2015-08-18  4:30 Jason Zaman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox