Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-process/audit: audit-2.1.3-r1.ebuild ChangeLog
Date: Sat, 04 Feb 2012 18:25:46
Message-Id: 20120204182535.545C42004B@flycatcher.gentoo.org
1 vapier 12/02/04 18:25:35
2
3 Modified: ChangeLog
4 Added: audit-2.1.3-r1.ebuild
5 Log:
6 Make python support optional.
7
8 (Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.72 sys-process/audit/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/audit/ChangeLog?rev=1.72&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/audit/ChangeLog?rev=1.72&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/audit/ChangeLog?r1=1.71&r2=1.72
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-process/audit/ChangeLog,v
20 retrieving revision 1.71
21 retrieving revision 1.72
22 diff -u -r1.71 -r1.72
23 --- ChangeLog 11 Sep 2011 02:58:55 -0000 1.71
24 +++ ChangeLog 4 Feb 2012 18:25:35 -0000 1.72
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sys-process/audit
27 -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-process/audit/ChangeLog,v 1.71 2011/09/11 02:58:55 robbat2 Exp $
29 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/sys-process/audit/ChangeLog,v 1.72 2012/02/04 18:25:35 vapier Exp $
31 +
32 +*audit-2.1.3-r1 (04 Feb 2012)
33 +
34 + 04 Feb 2012; Mike Frysinger <vapier@g.o> +audit-2.1.3-r1.ebuild:
35 + Make python support optional.
36
37 11 Sep 2011; Robin H. Johnson <robbat2@g.o>
38 +files/auditd-conf.d-2.1.3, +files/auditd-init.d-2.1.3, audit-2.1.3.ebuild,
39
40
41
42 1.1 sys-process/audit/audit-2.1.3-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/audit/audit-2.1.3-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/audit/audit-2.1.3-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: audit-2.1.3-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2012 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $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 $
52
53 EAPI="3"
54 PYTHON_DEPEND="python? 2"
55 SUPPORT_PYTHON_ABIS="1"
56 RESTRICT_PYTHON_ABIS="3.* *-jython"
57
58 inherit autotools multilib toolchain-funcs python linux-info
59
60 DESCRIPTION="Userspace utilities for storing and processing auditing records"
61 HOMEPAGE="http://people.redhat.com/sgrubb/audit/"
62 SRC_URI="http://people.redhat.com/sgrubb/audit/${P}.tar.gz"
63
64 LICENSE="GPL-2"
65 SLOT="0"
66 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
67 IUSE="ldap prelude python"
68 # Testcases are pretty useless as they are built for RedHat users/groups and
69 # kernels.
70 RESTRICT="test"
71
72 RDEPEND="ldap? ( net-nds/openldap )
73 prelude? ( dev-libs/libprelude )
74 sys-libs/libcap-ng"
75 DEPEND="${RDEPEND}
76 python? ( dev-lang/swig )
77 >=sys-kernel/linux-headers-2.6.34"
78 # Do not use os-headers as this is linux specific
79
80 CONFIG_CHECK="~AUDIT"
81 PYTHON_DIRS="bindings/python swig"
82
83 pkg_setup() {
84 linux-info_pkg_setup
85 use python && python_pkg_setup
86 }
87
88 src_prepare() {
89 # Old patch applies fine
90 #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch
91
92 # Applied by upstream
93 #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch
94
95 # Do not build GUI tools
96 sed -i \
97 -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
98 "${S}"/configure.ac || die
99 sed -i \
100 -e 's,system-config-audit,,g' \
101 "${S}"/Makefile.am || die
102 rm -rf "${S}"/system-config-audit
103
104 # Probably goes away in 1.6.9
105 #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch
106
107 if ! use ldap; then
108 sed -i \
109 -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
110 "${S}"/configure.ac || die
111 sed -i \
112 -e '/^SUBDIRS/s,zos-remote,,g' \
113 "${S}"/audisp/plugins/Makefile.am || die
114 fi
115
116 # Don't build static version of Python module.
117 epatch "${FILESDIR}"/${PN}-2.1.3-python.patch
118
119 # Python bindings are built/installed manually.
120 sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am
121 sed -e "/^SUBDIRS =/s/ swig//" -i Makefile.am
122
123 # Regenerate autotooling
124 eautoreconf
125
126 # Disable byte-compilation of Python modules.
127 echo "#!/bin/sh" > py-compile
128
129 # Bug 352198: Avoid parallel build fail
130 cd "${S}"/src/mt
131 [[ ! -s private.h ]] && ln -s ../../lib/private.h .
132 }
133
134 src_configure() {
135 #append-flags -D'__attribute__(x)='
136 econf --sbindir=/sbin $(use_with prelude)
137 }
138
139 src_compile_python() {
140 python_copy_sources ${PYTHON_DIRS}
141
142 building() {
143 emake \
144 PYTHON_VERSION="$(python_get_version)" \
145 pyexecdir="$(python_get_sitedir)"
146 }
147 local dir
148 for dir in ${PYTHON_DIRS}; do
149 python_execute_function -s --source-dir ${dir} building
150 done
151 }
152
153 src_compile() {
154 default
155 use python && src_compile_python
156 }
157
158 src_install_python() {
159 installation() {
160 emake \
161 DESTDIR="${D}" \
162 PYTHON_VERSION="$(python_get_version)" \
163 pyexecdir="$(python_get_sitedir)" \
164 install
165 }
166 local dir
167 for dir in ${PYTHON_DIRS}; do
168 python_execute_function -s --source-dir ${dir} installation
169 done
170 }
171
172 src_install() {
173 emake DESTDIR="${D}" install || die
174 use python && src_install_python
175
176 dodoc AUTHORS ChangeLog README* THANKS TODO
177 docinto contrib
178 dodoc contrib/*
179 docinto contrib/plugin
180 dodoc contrib/plugin/*
181
182 newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd
183 newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd
184
185 # things like shadow use this so we need to be in /
186 gen_usr_ldscript -a audit auparse
187
188 # remove RedHat garbage
189 rm -r "${D}"/etc/{rc.d,sysconfig} || die
190
191 # Gentoo rules
192 insinto /etc/audit/
193 newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules
194 doins "${FILESDIR}"/audit.rules.stop*
195
196 # audit logs go here
197 keepdir /var/log/audit/
198
199 # Security
200 lockdown_perms "${D}"
201
202 # Don't install .la files in Python directories.
203 use python && python_clean_installation_image
204 }
205
206 pkg_postinst() {
207 lockdown_perms "${ROOT}"
208 use python && python_mod_optimize audit.py
209 }
210
211 pkg_postrm() {
212 use python && python_mod_cleanup audit.py
213 }
214
215 lockdown_perms() {
216 # upstream wants these to have restrictive perms
217 basedir="$1"
218 chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
219 chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
220 chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
221 }