[sys-process/audit] sync with in-tree multilib version
This commit is contained in:
parent
dc399d929c
commit
569c9cb8c5
@ -3,9 +3,10 @@
|
|||||||
# $Header: $
|
# $Header: $
|
||||||
|
|
||||||
EAPI="5"
|
EAPI="5"
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 )
|
PYTHON_COMPAT=( python2_7 )
|
||||||
|
|
||||||
inherit autotools multilib toolchain-funcs python-r1 linux-info eutils
|
inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd
|
||||||
|
|
||||||
DESCRIPTION="Userspace utilities for storing and processing auditing records"
|
DESCRIPTION="Userspace utilities for storing and processing auditing records"
|
||||||
HOMEPAGE="http://people.redhat.com/sgrubb/audit/"
|
HOMEPAGE="http://people.redhat.com/sgrubb/audit/"
|
||||||
@ -21,7 +22,6 @@ RESTRICT="test"
|
|||||||
|
|
||||||
RDEPEND="apparmor? ( sys-apps/apparmor )
|
RDEPEND="apparmor? ( sys-apps/apparmor )
|
||||||
ldap? ( net-nds/openldap )
|
ldap? ( net-nds/openldap )
|
||||||
python? ( ${PYTHON_DEPS} )
|
|
||||||
tcpd? ( sys-apps/tcp-wrappers )
|
tcpd? ( sys-apps/tcp-wrappers )
|
||||||
sys-libs/libcap-ng"
|
sys-libs/libcap-ng"
|
||||||
DEPEND="${RDEPEND}
|
DEPEND="${RDEPEND}
|
||||||
@ -29,8 +29,8 @@ DEPEND="${RDEPEND}
|
|||||||
>=sys-kernel/linux-headers-2.6.34"
|
>=sys-kernel/linux-headers-2.6.34"
|
||||||
# Do not use os-headers as this is linux specific
|
# Do not use os-headers as this is linux specific
|
||||||
|
|
||||||
|
|
||||||
CONFIG_CHECK="~AUDIT"
|
CONFIG_CHECK="~AUDIT"
|
||||||
PYTHON_DIRS="bindings/python swig"
|
|
||||||
|
|
||||||
pkg_setup() {
|
pkg_setup() {
|
||||||
linux-info_pkg_setup
|
linux-info_pkg_setup
|
||||||
@ -61,66 +61,60 @@ src_prepare() {
|
|||||||
# Regenerate autotooling
|
# Regenerate autotooling
|
||||||
eautoreconf
|
eautoreconf
|
||||||
|
|
||||||
# Disable byte-compilation of Python modules.
|
|
||||||
echo "#!/bin/sh" > py-compile
|
|
||||||
|
|
||||||
# Bug 352198: Avoid parallel build fail
|
# Bug 352198: Avoid parallel build fail
|
||||||
cd "${S}"/src/mt
|
cd "${S}"/src/mt
|
||||||
[[ ! -s private.h ]] && ln -s ../../lib/private.h .
|
[[ ! -s private.h ]] && ln -s ../../lib/private.h .
|
||||||
}
|
}
|
||||||
|
|
||||||
src_configure() {
|
multilib_src_configure() {
|
||||||
|
local ECONF_SOURCE=${S}
|
||||||
econf \
|
econf \
|
||||||
--sbindir=/sbin \
|
--sbindir=/sbin \
|
||||||
--enable-systemd \
|
--enable-systemd \
|
||||||
--without-prelude \
|
--without-prelude \
|
||||||
$(use_with arm64 aarch64) \
|
--without-python \
|
||||||
$(use_with alpha) \
|
$(multilib_native_use_with arm64 aarch64) \
|
||||||
$(use_with arm) \
|
$(multilib_native_use_with alpha) \
|
||||||
$(use_with apparmor) \
|
$(multilib_native_use_with arm) \
|
||||||
$(use_with python) \
|
$(multilib_native_use_with apparmor) \
|
||||||
$(use_with tcpd libwrap)
|
$(multilib_native_use_with tcpd libwrap)
|
||||||
|
|
||||||
|
if multilib_is_native_abi; then
|
||||||
|
python_configure() {
|
||||||
|
mkdir -p "${BUILD_DIR}" || die
|
||||||
|
cd "${BUILD_DIR}" || die
|
||||||
|
econf --with-python
|
||||||
}
|
}
|
||||||
|
|
||||||
src_compile_python() {
|
use python && python_foreach_impl python_configure
|
||||||
python_copy_sources ${PYTHON_DIRS}
|
fi
|
||||||
|
|
||||||
building() {
|
|
||||||
emake \
|
|
||||||
-C "${dir}" \
|
|
||||||
VPATH="${BUILD_DIR}"/"${dir}" \
|
|
||||||
pyexecdir="$(python_get_sitedir)"
|
|
||||||
}
|
|
||||||
local dir
|
|
||||||
for dir in ${PYTHON_DIRS}; do
|
|
||||||
python_foreach_impl building
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
multilib_src_install() {
|
||||||
default
|
if multilib_is_native_abi; then
|
||||||
use python && src_compile_python
|
emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install
|
||||||
|
|
||||||
|
python_install() {
|
||||||
|
emake -C "${BUILD_DIR}"/swig \
|
||||||
|
VPATH="${native_build}/lib" \
|
||||||
|
DESTDIR="${D}" install
|
||||||
|
emake -C "${BUILD_DIR}"/bindings/python \
|
||||||
|
VPATH="${S}/bindings/python:${native_build}/bindings/python" \
|
||||||
|
DESTDIR="${D}" install
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install_python() {
|
local native_build=${BUILD_DIR}
|
||||||
installation() {
|
use python && python_foreach_impl python_install
|
||||||
emake \
|
|
||||||
-C "${dir}" \
|
# things like shadow use this so we need to be in /
|
||||||
VPATH="${BUILD_DIR}"/"${dir}" \
|
gen_usr_ldscript -a audit auparse
|
||||||
DESTDIR="${D}" \
|
else
|
||||||
pyexecdir="$(python_get_sitedir)" \
|
emake -C lib DESTDIR="${D}" install
|
||||||
install
|
emake -C auparse DESTDIR="${D}" install
|
||||||
}
|
fi
|
||||||
local dir
|
|
||||||
for dir in ${PYTHON_DIRS}; do
|
|
||||||
python_foreach_impl installation
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
multilib_src_install_all() {
|
||||||
emake DESTDIR="${D}" install || die
|
|
||||||
use python && src_install_python
|
|
||||||
|
|
||||||
dodoc AUTHORS ChangeLog README* THANKS TODO
|
dodoc AUTHORS ChangeLog README* THANKS TODO
|
||||||
docinto contrib
|
docinto contrib
|
||||||
dodoc contrib/{*.rules,avc_snap,skeleton.c}
|
dodoc contrib/{*.rules,avc_snap,skeleton.c}
|
||||||
@ -130,9 +124,6 @@ src_install() {
|
|||||||
newinitd "${FILESDIR}"/auditd-init.d-2.3.6 auditd
|
newinitd "${FILESDIR}"/auditd-init.d-2.3.6 auditd
|
||||||
newconfd "${FILESDIR}"/auditd-conf.d-2.3.6 auditd
|
newconfd "${FILESDIR}"/auditd-conf.d-2.3.6 auditd
|
||||||
|
|
||||||
# things like shadow use this so we need to be in /
|
|
||||||
gen_usr_ldscript -a audit auparse
|
|
||||||
|
|
||||||
[ -f "${D}"/sbin/audisp-remote ] && \
|
[ -f "${D}"/sbin/audisp-remote ] && \
|
||||||
dodir /usr/sbin && \
|
dodir /usr/sbin && \
|
||||||
mv "${D}"/{sbin,usr/sbin}/audisp-remote || die
|
mv "${D}"/{sbin,usr/sbin}/audisp-remote || die
|
||||||
@ -148,8 +139,7 @@ src_install() {
|
|||||||
# Security
|
# Security
|
||||||
lockdown_perms "${D}"
|
lockdown_perms "${D}"
|
||||||
|
|
||||||
prune_libtool_files
|
prune_libtool_files --modules
|
||||||
use python && python_foreach_impl python_optimize
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst() {
|
pkg_postinst() {
|
||||||
|
Loading…
Reference in New Issue
Block a user