summaryrefslogtreecommitdiff
path: root/sys-process/audit
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-07-06 03:04:40 -0500
committerroot <root@alpha.trunkmasters.com>2026-07-06 03:04:40 -0500
commit615d6f7e3408947bf962ea4d7edde01977474d1e (patch)
tree669937b348f12e0bd52d35ef889d0b283f90476c /sys-process/audit
parent7d0655e0f85be0eec06807898321a634968f9336 (diff)
downloadbaldeagleos-repo-615d6f7e3408947bf962ea4d7edde01977474d1e.tar.gz
baldeagleos-repo-615d6f7e3408947bf962ea4d7edde01977474d1e.tar.xz
baldeagleos-repo-615d6f7e3408947bf962ea4d7edde01977474d1e.zip
Adding metadata
Diffstat (limited to 'sys-process/audit')
-rw-r--r--sys-process/audit/audit-4.1.4-r1.ebuild194
-rw-r--r--sys-process/audit/audit-4.1.4-r4.ebuild (renamed from sys-process/audit/audit-4.1.4-r3.ebuild)6
-rw-r--r--sys-process/audit/files/audit-4.0.1-musl-basename.patch2
-rw-r--r--sys-process/audit/files/auditd-init.d-2.4.390
4 files changed, 5 insertions, 287 deletions
diff --git a/sys-process/audit/audit-4.1.4-r1.ebuild b/sys-process/audit/audit-4.1.4-r1.ebuild
deleted file mode 100644
index 0aef9874afb1..000000000000
--- a/sys-process/audit/audit-4.1.4-r1.ebuild
+++ /dev/null
@@ -1,194 +0,0 @@
-# Copyright 1999-2026 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_{13..14} )
-
-inherit autotools multilib-minimal toolchain-funcs python-r1 linux-info systemd tmpfiles usr-ldscript
-
-DESCRIPTION="Userspace utilities for storing and processing auditing records"
-HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
-SRC_URI="https://github.com/linux-audit/audit-userspace/archive/refs/tags/v${PV}.tar.gz
- -> ${P}.tar.gz"
-
-S="${WORKDIR}/audit-userspace-${PV}"
-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"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- sys-libs/libcap-ng
- gssapi? ( virtual/krb5 )
- ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
- python? ( ${PYTHON_DEPS} )
-"
-DEPEND="
- ${RDEPEND}
- >=sys-kernel/linux-headers-5
-"
-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}/${PN}-4.0.1-musl-basename.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
- --localstatedir="${EPREFIX}"/var
- --runstatedir="${EPREFIX}"/run
- $(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)
- --without-golang
- --without-libwrap
- --without-python3
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-
- if multilib_is_native_abi && use python; then
- python_configure() {
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" &>/dev/null || die
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" --with-python3
- 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
-
- # Make target bindings/python/auparse_python.c doesn't get copied to ${BUILD_DIR}. bug #944338
- ln -s "${S}/bindings/python/auparse_python.c" "${BUILD_DIR}/bindings/python/auparse_python.c" || die
-}
-
-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() {
- default
-
- if multilib_is_native_abi; then
- 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
- fi
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
-
- if multilib_is_native_abi; then
- 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
- 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}"
- tmpfiles_process audit.conf
-}
-
-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-4.1.4-r3.ebuild b/sys-process/audit/audit-4.1.4-r4.ebuild
index fe39222526f5..c4dde4367c50 100644
--- a/sys-process/audit/audit-4.1.4-r3.ebuild
+++ b/sys-process/audit/audit-4.1.4-r4.ebuild
@@ -38,9 +38,7 @@ DEPEND="
BDEPEND="
python? (
dev-lang/swig
- $(python_gen_cond_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ' python3_12)
+ dev-python/setuptools[${PYTHON_USEDEP}]
)
"
IDEPEND="!build? ( virtual/tmpfiles )"
@@ -118,6 +116,8 @@ src_configure() {
multilib_src_compile() {
default
+ # We could copy this for tests but the only thing the bindings do
+ # in check-local is rebuild (!) with -Wl,--no-undefined.
if multilib_is_native_abi; then
local native_build="${BUILD_DIR}"
diff --git a/sys-process/audit/files/audit-4.0.1-musl-basename.patch b/sys-process/audit/files/audit-4.0.1-musl-basename.patch
index 08b74caf8ac2..cacaa49894a1 100644
--- a/sys-process/audit/files/audit-4.0.1-musl-basename.patch
+++ b/sys-process/audit/files/audit-4.0.1-musl-basename.patch
@@ -1,3 +1,5 @@
+https://github.com/linux-audit/audit-userspace/commit/b6e0c6eb88a4d866bc8316706277dbc33670022a
+
Since musl 1.2.5, basename(3) is strict-POSIX compliant, and
needs #include <libgen.h>, instead of the GNU version included
with <string.h>
diff --git a/sys-process/audit/files/auditd-init.d-2.4.3 b/sys-process/audit/files/auditd-init.d-2.4.3
deleted file mode 100644
index c952554df2f2..000000000000
--- a/sys-process/audit/files/auditd-init.d-2.4.3
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-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
-}