summaryrefslogtreecommitdiff
path: root/sys-process/audit
diff options
context:
space:
mode:
Diffstat (limited to 'sys-process/audit')
-rw-r--r--sys-process/audit/Manifest4
-rw-r--r--sys-process/audit/audit-3.1.2.ebuild181
-rw-r--r--sys-process/audit/files/audit-3.0.8-musl-malloc.patch1
3 files changed, 185 insertions, 1 deletions
diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest
index d949dc376e25..738d6c435206 100644
--- a/sys-process/audit/Manifest
+++ b/sys-process/audit/Manifest
@@ -1,5 +1,5 @@
AUX audit-3.0.8-linux-headers-5.17.patch 1832 BLAKE2B 15d82a6c7c964f14414ca34ed09d4251c331497e9aae1f0cbb54398bef02a5be0eadbdee90b3bb26ac90e8b9825bdb09c01bfcea61cd99b905f508c08578a9ba SHA512 76a7f958c1523f3441ad9206f1bc58e71d81f992f64c06c69f705c8bdc535dff5078fcf89b93b195fb8a437079f27f0b75b7b1a2f12c16be309daec108b6c72b
-AUX audit-3.0.8-musl-malloc.patch 1359 BLAKE2B 4a3b4a330ddf68226d5c5139f27444df7a155dce689de98e699a48fec86a0269775ee52d683c9bc88a84883e5d602138d6d928c0188e3e7b53c4c9f9cc2a1cc4 SHA512 22fe3410e9f34f7513618abe2904ab73977a947fd831569cd340fe2427d39cbef6b632aba7bf73d01ac82dc7f98c7dd576025ca29aec72782b60e3a2258913d5
+AUX audit-3.0.8-musl-malloc.patch 1415 BLAKE2B 0b3a9ec80ed8b445e4d5eea0b9f49f4e5a165ac538b7769305b9107be0874ee9b50f30ea13f77d1b9d54a35ada15a0dfd07e5b905f03b4df3834a4904dec4b94 SHA512 152674f0000a14d7e13b31c1b6cfc0bf48f94f56eb2a1d52e5aa2e306264c507dd1410b7a1457195578bce734ae9ac7f9ad3e10006a8451450b6d8bf6592a8d6
AUX audit.rules-2.1.3 1009 BLAKE2B df40176208bd68cb9021d15ea5803bb0d1c768c9d6400036a69409e1aae3ad55b89983ed94f22a6399a9cec8fc3dc7b20a7b27e75cdea24edda92b95ee19af87 SHA512 bce3ee9aaa0ab48395e6e10ee9b3627d6b7a8083abefdc4009de26649c65a39e000078f799e8c3c9e3341dfa030c6dfbbcad2fb7756fbb3d01b27be078adecec
AUX audit.rules.stop.post 452 BLAKE2B b10d6d6c0fa475998856e674bd5c8dc0d7ca8f1d676a684223f48d1b22ce90441b2970c02b0eab882b3d3059f2b350d8a34109b03f5457f709624dccb3722e82 SHA512 a7bc52cbbea278a38e2837149524bb21b2c5367c96ed07fe576e08322595c5bee57ff07f8ebecd17391d9c3abe1ba187ac6e39400a153bf0ace4257303d036d3
AUX audit.rules.stop.pre 427 BLAKE2B ddf4ac16c3e1fd401c266287e792865adf8f4dd0b4bbaea6f991bf8dcee69c8ecd69c93d0cbd8352e280c3c61d24de23ca89f700e383c79036526e59c311c004 SHA512 def5ef378ad554f38754839d1c00c598686645a59896e37a3c7ff07b00aaa05a2b92305e49a750358eaba63a7d48fb647472529b155301069771678eed272463
@@ -7,6 +7,8 @@ AUX auditd-conf.d-2.1.3 734 BLAKE2B 018677362bc82c2052885cdd0e2185050cf5e97722ea
AUX auditd-init.d-2.4.3 2054 BLAKE2B 20e68ab676c925b8567a7e9a12d2ac055fd90477cbbd6444136b7198828798f7b6428948503c344639fab5fea54962682be7c986950c2cbae8b7c9dfeb321a4b SHA512 1b48c248db5d34f148f9c79f8b2a6acbf61c729230341b861f5e331bbfb0c8356305a09eb2cc5c82c14c4fd9a13c7c13957e1ed493834b8b3b9ee38978e4c31f
DIST audit-3.0.9.tar.gz 1210655 BLAKE2B a6b17ee61f506878cd70827b6ca2040762c762f10bdab7a253300d926cda59b300571c6df0e852ffb56db94620868de7dd22267ba1e8d1281e4ae1f702914b23 SHA512 5219eb0b41746eca3406008a97731c0083e7be50ec88563a39537de22cb69fe88490f5fe5a11535930f360b11a62538e2ff6cbe39e059cd760038363954ef4d6
DIST audit-3.1.1.tar.gz 1218111 BLAKE2B a804684e438efc5f35b387708b3dc91bf857eeb56624261e0f75543556c436bfe638b792f63289f049c11541b10b2dc0e9f17b22f44b913da0168b1cf20684fc SHA512 4917970cc4c7f786c464a6d101bf66d55d55ac4716cf415ff97177f08176a6301e946716d28cf5b16054538469b3140b97db99d55a28686a9a807eea60c070f3
+DIST audit-3.1.2.tar.gz 1219860 BLAKE2B dfdec470bf12cce6c570b3d260e65e2b49e8ac0761e6a6fbf7b4f4a57f92e88367cd74bfcb88e6d718619b88fea27ce963a977c9f4346c95d18a5310e217accb SHA512 a97003a294ed3671df01e2952688e7d5eef59a35f6891feb53e67c4c7eab9ae8c2d18de41a5b5b20e0ad7156fac93aec05f32f6bc5eea706b42b6f27f676446a
EBUILD audit-3.0.9-r1.ebuild 4638 BLAKE2B 221e9c6f037f8e43e536be2aed7bcf35b0934febc725bbb4d86536dddeb0fe53246bdcf7879af2e99537abf783a2d3be012afd3913da6126d693345aa3877358 SHA512 9d4894e640a2ef92b02d1c117ed14e01c0b31f14622806209a63531cac39786c2e2b131d5cab7f783a34fecd27cac2dbd2be0f9af97ba921dea89e466339a462
EBUILD audit-3.1.1.ebuild 4707 BLAKE2B bff05deaf3d8f4db0e712a0a7fe886a9461ab4392121b2665c9be79badbc3a933406526aa649b687741eedc03e1a689a53f944afbbb994714e646fa8db859668 SHA512 993c83884e4823c4f74c709b555e81dfae43d2d238d4944dd4b13705ce9aa6027bf264d29727ce05604df9ae564c4d5a864207b26389642fa5cb55bd4f1906f3
+EBUILD audit-3.1.2.ebuild 4560 BLAKE2B 3687484fae513246bd8106bfff34636854a7257adb0217a49e9135c7bb0f02ec80aa257942e9eebad2128b6275b6530bf8e79c029398fbe646745a5c40bed029 SHA512 5d1a7c6b6594eaab647841b70adad83cbaad5e071b61a05f9ade8c347f61b6dfe88332b97df072557d5d94ffc76463f53025ea604597193df5b31e9b1985da39
MISC metadata.xml 573 BLAKE2B e8b51efd4bb4c92e155cf6599cc826c6f93be3413ba6023b41d1d5564de99b7f7746d06c1906fed5010c926c1a9a8281bd4ce14d7ec01114918cd48f5247c527 SHA512 1a53672b20748fd2062684ba50074f4f9b959fb2c8cc3e34de83ac3afb56a3bff5c43db72ce750d63fae68f9e1f2f668831aebb88cc09da2d125e76f04f22e33
diff --git a/sys-process/audit/audit-3.1.2.ebuild b/sys-process/audit/audit-3.1.2.ebuild
new file mode 100644
index 000000000000..d2b9730673da
--- /dev/null
+++ b/sys-process/audit/audit-3.1.2.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2023 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_{9..11} )
+
+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 )"
+
+CONFIG_CHECK="~AUDIT"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.8-musl-malloc.patch
+)
+
+src_prepare() {
+ # audisp-remote moved in multilib_src_install_all
+ sed -i \
+ -e "s,/sbin/audisp-remote,${EPREFIX}/usr/sbin/audisp-remote," \
+ audisp/plugins/remote/au-remote.conf || die
+
+ # Disable installing sample rules so they can be installed as docs.
+ echo -e '%:\n\t:' | tee rules/Makefile.{am,in} >/dev/null || die
+
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --sbindir="${EPREFIX}"/sbin
+ $(use_enable gssapi gssapi-krb5)
+ $(use_enable ldap zos-remote)
+ $(use_enable static-libs static)
+ $(use_with io-uring io_uring)
+ --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-musl-malloc.patch b/sys-process/audit/files/audit-3.0.8-musl-malloc.patch
index 17814dbe29fc..7233aabe03c6 100644
--- a/sys-process/audit/files/audit-3.0.8-musl-malloc.patch
+++ b/sys-process/audit/files/audit-3.0.8-musl-malloc.patch
@@ -1,4 +1,5 @@
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