|
|
|
@ -1,23 +1,22 @@
|
|
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
|
|
|
|
# Copyright 1999-2016 Gentoo Foundation
|
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
|
|
EAPI="5"
|
|
|
|
|
EAPI="6"
|
|
|
|
|
|
|
|
|
|
PYTHON_COMPAT=( python{2_7,3_3,3_4} )
|
|
|
|
|
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
|
|
|
|
|
|
|
|
|
|
inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd
|
|
|
|
|
inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info 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"
|
|
|
|
|
HOMEPAGE="https://people.redhat.com/sgrubb/audit/"
|
|
|
|
|
SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz"
|
|
|
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
|
SLOT="0"
|
|
|
|
|
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
|
|
|
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
|
|
|
|
|
IUSE="apparmor ldap python tcpd"
|
|
|
|
|
# Testcases are pretty useless as they are built for RedHat users/groups and
|
|
|
|
|
# kernels.
|
|
|
|
|
# Testcases are pretty useless as they are built for RedHat users/groups and kernels.
|
|
|
|
|
RESTRICT="test"
|
|
|
|
|
|
|
|
|
|
RDEPEND="apparmor? ( sys-apps/apparmor )
|
|
|
|
@ -41,7 +40,7 @@ pkg_setup() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
|
epatch_user
|
|
|
|
|
eapply_user
|
|
|
|
|
|
|
|
|
|
# Do not build GUI tools
|
|
|
|
|
sed -i \
|
|
|
|
@ -62,22 +61,18 @@ src_prepare() {
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Don't build static version of Python module.
|
|
|
|
|
epatch "${FILESDIR}"/${PN}-2.4.3-python.patch
|
|
|
|
|
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.
|
|
|
|
|
epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
# Bug 352198: Avoid parallel build fail
|
|
|
|
|
cd "${S}"/src/mt
|
|
|
|
|
[[ ! -s private.h ]] && ln -s ../../lib/private.h .
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
multilib_src_configure() {
|
|
|
|
@ -85,12 +80,8 @@ multilib_src_configure() {
|
|
|
|
|
econf \
|
|
|
|
|
--sbindir=/sbin \
|
|
|
|
|
--enable-systemd \
|
|
|
|
|
--without-prelude \
|
|
|
|
|
--without-python \
|
|
|
|
|
--without-python3 \
|
|
|
|
|
$(use_with arm64 aarch64) \
|
|
|
|
|
$(use_with alpha) \
|
|
|
|
|
$(use_with arm) \
|
|
|
|
|
$(use_with apparmor) \
|
|
|
|
|
$(multilib_native_use_with tcpd libwrap)
|
|
|
|
|
|
|
|
|
@ -146,7 +137,7 @@ multilib_src_compile() {
|
|
|
|
|
|
|
|
|
|
multilib_src_install() {
|
|
|
|
|
if multilib_is_native_abi; then
|
|
|
|
|
emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install
|
|
|
|
|
emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install
|
|
|
|
|
|
|
|
|
|
python_install() {
|
|
|
|
|
local pysuffix pydef
|
|
|
|
@ -186,14 +177,16 @@ multilib_src_install() {
|
|
|
|
|
multilib_src_install_all() {
|
|
|
|
|
dodoc AUTHORS ChangeLog README* THANKS TODO
|
|
|
|
|
docinto contrib
|
|
|
|
|
dodoc contrib/{*.rules,avc_snap,skeleton.c}
|
|
|
|
|
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.3.6 auditd
|
|
|
|
|
newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
|
|
|
|
|
|
|
|
|
|
chmod 644 "${D}/$(systemd_get_unitdir)"/auditd.service || die # 556436
|
|
|
|
|
fperms 644 "$(systemd_get_systemunitdir)"/auditd.service # 556436
|
|
|
|
|
|
|
|
|
|
[ -f "${D}"/sbin/audisp-remote ] && \
|
|
|
|
|
dodir /usr/sbin && \
|
|
|
|
@ -226,6 +219,7 @@ pkg_postinst() {
|
|
|
|
|
|
|
|
|
|
lockdown_perms() {
|
|
|
|
|
# upstream wants these to have restrictive perms
|
|
|
|
|
# should not || die, maybe not all paths exist
|
|
|
|
|
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
|