From c30d05b070412af821822d5958c1adec8dd263d5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 4 Feb 2012 18:25:35 +0000 Subject: Make python support optional. Package-Manager: portage-2.2.0_alpha84/cvs/Linux x86_64 --- sys-process/audit/ChangeLog | 9 +- sys-process/audit/Manifest | 23 +++-- sys-process/audit/audit-2.1.3-r1.ebuild | 173 ++++++++++++++++++++++++++++++++ 3 files changed, 196 insertions(+), 9 deletions(-) create mode 100644 sys-process/audit/audit-2.1.3-r1.ebuild (limited to 'sys-process/audit') diff --git a/sys-process/audit/ChangeLog b/sys-process/audit/ChangeLog index f5fe17d81935..768a03d8455c 100644 --- a/sys-process/audit/ChangeLog +++ b/sys-process/audit/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-process/audit -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/audit/ChangeLog,v 1.71 2011/09/11 02:58:55 robbat2 Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/audit/ChangeLog,v 1.72 2012/02/04 18:25:35 vapier Exp $ + +*audit-2.1.3-r1 (04 Feb 2012) + + 04 Feb 2012; Mike Frysinger +audit-2.1.3-r1.ebuild: + Make python support optional. 11 Sep 2011; Robin H. Johnson +files/auditd-conf.d-2.1.3, +files/auditd-init.d-2.1.3, audit-2.1.3.ebuild, diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest index 4a045596a2f4..91348b4bca5f 100644 --- a/sys-process/audit/Manifest +++ b/sys-process/audit/Manifest @@ -1,5 +1,5 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 +Hash: SHA1 AUX audit-1.5.4-build.patch 292 RMD160 6f97369e4d1b27b293f5b875790dee502927f7e0 SHA1 964fc33bf0c668ebd9bf0cf439538fc5b5101a22 SHA256 ef286820b8d34efa8aa04a8cd0344a78eeb0fa50a6ad12f94427bd01dea53534 AUX audit-1.5.4-swig-gcc-attribute.patch 434 RMD160 dc8c3d070a75f05883784dce72273551513e6fad SHA1 eb8774038fb07434030c9dad839e7d5dc5c9d027 SHA256 0da2225a8bd1f3f83a2e8c54d1c2fe97f9917be6b0a4ed116baa8f06f1800818 @@ -25,15 +25,24 @@ DIST audit-2.1.3.tar.gz 833647 RMD160 b5118fae12ddf9599c379119acc9daec100796b7 S EBUILD audit-1.7.17.ebuild 3346 RMD160 b5c544dc6fabcd53b41732ff048e5e72de240c0c SHA1 2d78c68e01c87e85a18aa637a602f84f170d24f9 SHA256 5eaf81304400e87f962628df06287ca6e985658c0a2c1994cf837451f4f2399a EBUILD audit-1.7.4.ebuild 3384 RMD160 c680813cb5e99b721b38024ebd8c8744c1bbd0cb SHA1 b95a1b28acba22c5f27f770bb931a0d7902c38f7 SHA256 e82051d0cf59e54257458472854b04b31eb9ba7f478932c0499f16e4d751ad94 EBUILD audit-2.0.5.ebuild 4235 RMD160 93dd6229c74b20a1a9c3c7a636bb5713a09cb372 SHA1 30471958c72b79c7cb2c3616871d4d0fc735b056 SHA256 a2fe1f5883de2f8fede4d07ce30c45faf5d44e84b2a9e7cd2d1dcc3967836be2 +EBUILD audit-2.1.3-r1.ebuild 4372 RMD160 1f4237f231db3fba0778790cf7fe7e782179770f SHA1 2cad124c42f35b7dfa5fbfa33a6df417094b9b68 SHA256 cfad1588f950d2ea286eff42511b2f3b27d73e2d5dc730509b6ad2706db70b1c EBUILD audit-2.1.3.ebuild 4268 RMD160 4481961d9445a65e238495f87347ad13e5180997 SHA1 a3bc45879b09e9d878637f38bd463428df01bf4a SHA256 e01a63f012037946d8a46b830d40748fc54ee9a4aa2194b61acc7953c17b0fcb -MISC ChangeLog 11489 RMD160 bebbdf2fede1965e7e8bb6dbcbe5085591990c4a SHA1 ba96595ea18685561e80744ee9e4ae2b8f581683 SHA256 fae73d9dccb8393a80ab1ca5a907f35c56d8f41c51ee8b3ff24a406c6c3d9e32 +MISC ChangeLog 11626 RMD160 7e613e51c8609fe931cb2d65570b35330eb3b6aa SHA1 960c18e5362a699e4d1498dab06f7fade696c16e SHA256 0300dde6e3db0d906a69e1ce4f60a93fdb269b014e4d627b0896af9b4ee03e4f MISC metadata.xml 208 RMD160 7d864a2aecd613eea1bfed0c038d4ca9d9334276 SHA1 dfdeaa9aa52c5d0a315807d5500b951b7ba9fd37 SHA256 474aad89b28273a47e9d612283399fab63cd9ada8b3c4fa65b16250128abf342 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iJwEAQEIAAYFAk59tWwACgkQfXuS5UK5QB26ZQP/bKRnj0lGL1UPH5Hd2MI1DI1r -c2htXBdhlTqorW9qgUpbzLYdZ7vY7JsBWwamLFsL3IpcQKf8rrb5njVndnoqVaCJ -I5TfvVHwjtY9RdS6QVp//DKxofk/EebGyKAjP8YCoXKlOCGDQOpcqsVC2/HHRod8 -L7GS+3R+evG/usLoYUc= -=VVmZ +iQIcBAEBAgAGBQJPLXg0AAoJELEHsLL7fEFWsosQALsTT8dAzi7BH04c0ulZ7iR2 +rwYJd0QUf6sSY09VU/knNgfvNGBWBlorhIUIyZSP1eeyF3dAw7HYpewfrQCK6C2E +AQaISDDir3+yy/Pk8v4/9Np9KIA/MpavMVxnpKEFZkdJlX93COtfXQsUixTgKZL6 +t4R+TmhItBjqBjrZKkvo3IyZYfhehKcsKlK+2Pv5ugcImixd8WzGTHWIy3ck5KPf +Ucm12vuuCS23DpYpOmti/lPbab0WUROTbvQG2+2Lodife9OAfaazlbmkxT29UmEG +jhnGLEm6f0CvQ+mPvSuTqtgAPpB4HaUnXVng2GTqTBpPsUU862seJkOu6EXl+JEB +Ah/khfo0LLdJUwvEeMdfgHdZ5X91ALqRkUG/0En4Xh6iFddj/TKDI1499krcd0aO +lvQcqvwYTC1HS/LbGiDEDFOR+Qqt3PqJufv2afMrrvkB8dQlM7vQ6s0W6xk7YAvW +edhsbq2mBZHDdFKWttstHAL9VY6/Xj5gLCLhcyhNZn11ko0Deb+aZ680BGjegFZm +oNtSF/HY/Lba+148HLD8H93+cx2hUCnUMKjRpFsz4lWl48IlSpBSE2OyS7fgkWym +q8/iU+XAUxN7vwGKE4/GqJ+VyPkePW18jtickaJOO3F3ZHBBCTEG+sHTALajsNtJ +pbHWQjnqrzQZhScuG7F7 +=QF07 -----END PGP SIGNATURE----- diff --git a/sys-process/audit/audit-2.1.3-r1.ebuild b/sys-process/audit/audit-2.1.3-r1.ebuild new file mode 100644 index 000000000000..4acf583ef1a4 --- /dev/null +++ b/sys-process/audit/audit-2.1.3-r1.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/audit/audit-2.1.3-r1.ebuild,v 1.1 2012/02/04 18:25:35 vapier Exp $ + +EAPI="3" +PYTHON_DEPEND="python? 2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.* *-jython" + +inherit autotools multilib toolchain-funcs python linux-info + +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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="ldap prelude python" +# Testcases are pretty useless as they are built for RedHat users/groups and +# kernels. +RESTRICT="test" + +RDEPEND="ldap? ( net-nds/openldap ) + prelude? ( dev-libs/libprelude ) + sys-libs/libcap-ng" +DEPEND="${RDEPEND} + python? ( dev-lang/swig ) + >=sys-kernel/linux-headers-2.6.34" +# Do not use os-headers as this is linux specific + +CONFIG_CHECK="~AUDIT" +PYTHON_DIRS="bindings/python swig" + +pkg_setup() { + linux-info_pkg_setup + use python && python_pkg_setup +} + +src_prepare() { + # Old patch applies fine + #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch + + # Applied by upstream + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch + + # 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 + + # Probably goes away in 1.6.9 + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch + + 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.1.3-python.patch + + # Python bindings are built/installed manually. + sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am + sed -e "/^SUBDIRS =/s/ swig//" -i Makefile.am + + # Regenerate autotooling + eautoreconf + + # Disable byte-compilation of Python modules. + echo "#!/bin/sh" > py-compile + + # Bug 352198: Avoid parallel build fail + cd "${S}"/src/mt + [[ ! -s private.h ]] && ln -s ../../lib/private.h . +} + +src_configure() { + #append-flags -D'__attribute__(x)=' + econf --sbindir=/sbin $(use_with prelude) +} + +src_compile_python() { + python_copy_sources ${PYTHON_DIRS} + + building() { + emake \ + PYTHON_VERSION="$(python_get_version)" \ + pyexecdir="$(python_get_sitedir)" + } + local dir + for dir in ${PYTHON_DIRS}; do + python_execute_function -s --source-dir ${dir} building + done +} + +src_compile() { + default + use python && src_compile_python +} + +src_install_python() { + installation() { + emake \ + DESTDIR="${D}" \ + PYTHON_VERSION="$(python_get_version)" \ + pyexecdir="$(python_get_sitedir)" \ + install + } + local dir + for dir in ${PYTHON_DIRS}; do + python_execute_function -s --source-dir ${dir} installation + done +} + +src_install() { + emake DESTDIR="${D}" install || die + use python && src_install_python + + dodoc AUTHORS ChangeLog README* THANKS TODO + docinto contrib + dodoc contrib/* + docinto contrib/plugin + dodoc contrib/plugin/* + + newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd + newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd + + # things like shadow use this so we need to be in / + gen_usr_ldscript -a audit auparse + + # remove RedHat garbage + rm -r "${D}"/etc/{rc.d,sysconfig} || 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}" + + # Don't install .la files in Python directories. + use python && python_clean_installation_image +} + +pkg_postinst() { + lockdown_perms "${ROOT}" + use python && python_mod_optimize audit.py +} + +pkg_postrm() { + use python && python_mod_cleanup audit.py +} + +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 +} -- cgit v1.2.3-65-gdbad