Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-process/audit: ChangeLog audit-2.0.5.ebuild
Date: Tue, 25 Jan 2011 03:35:14
Message-Id: 20110125033501.774822004E@flycatcher.gentoo.org
1 robbat2 11/01/25 03:35:01
2
3 Modified: ChangeLog
4 Added: audit-2.0.5.ebuild
5 Log:
6 Version bump. Fix bug #352198: parallel build, bug #322239: prelude support, bug #352239: CONFIG_AUDIT check.
7
8 (Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.61 sys-process/audit/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/audit/ChangeLog?rev=1.61&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/audit/ChangeLog?rev=1.61&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/audit/ChangeLog?r1=1.60&r2=1.61
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-process/audit/ChangeLog,v
20 retrieving revision 1.60
21 retrieving revision 1.61
22 diff -p -w -b -B -u -u -r1.60 -r1.61
23 --- ChangeLog 15 Oct 2010 21:15:49 -0000 1.60
24 +++ ChangeLog 25 Jan 2011 03:35:01 -0000 1.61
25 @@ -1,6 +1,12 @@
26 # ChangeLog for sys-process/audit
27 -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-process/audit/ChangeLog,v 1.60 2010/10/15 21:15:49 arfrever Exp $
29 +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/sys-process/audit/ChangeLog,v 1.61 2011/01/25 03:35:01 robbat2 Exp $
31 +
32 +*audit-2.0.5 (25 Jan 2011)
33 +
34 + 25 Jan 2011; Robin H. Johnson <robbat2@g.o> +audit-2.0.5.ebuild:
35 + Version bump. Fix bug #352198: parallel build, bug #322239: prelude support,
36 + bug #352239: CONFIG_AUDIT check.
37
38 15 Oct 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
39 audit-1.7.4.ebuild, +files/audit-1.7.4-python.patch, audit-1.7.17.ebuild,
40
41
42
43 1.1 sys-process/audit/audit-2.0.5.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/audit/audit-2.0.5.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/audit/audit-2.0.5.ebuild?rev=1.1&content-type=text/plain
47
48 Index: audit-2.0.5.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sys-process/audit/audit-2.0.5.ebuild,v 1.1 2011/01/25 03:35:01 robbat2 Exp $
53
54 EAPI="3"
55 PYTHON_DEPEND="2"
56
57 inherit autotools multilib toolchain-funcs python linux-info
58
59 DESCRIPTION="Userspace utilities for storing and processing auditing records"
60 HOMEPAGE="http://people.redhat.com/sgrubb/audit/"
61 SRC_URI="http://people.redhat.com/sgrubb/audit/${P}.tar.gz"
62
63 LICENSE="GPL-2"
64 SLOT="0"
65 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
66 IUSE="ldap prelude"
67 # Testcases are pretty useless as they are built for RedHat users/groups and
68 # kernels.
69 RESTRICT="test"
70
71 RDEPEND="ldap? ( net-nds/openldap )
72 prelude? ( dev-libs/libprelude )
73 sys-libs/libcap-ng"
74 DEPEND="${RDEPEND}
75 dev-lang/swig
76 >=sys-kernel/linux-headers-2.6.34"
77 # Do not use os-headers as this is linux specific
78
79 CONFIG_CHECK="~AUDIT"
80
81 pkg_setup() {
82 linux-info_pkg_setup
83 python_set_active_version 2
84 python_pkg_setup
85 }
86
87 src_prepare() {
88 # Old patch applies fine
89 #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch
90
91 # Applied by upstream
92 #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch
93
94 # Do not build GUI tools
95 sed -i \
96 -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
97 "${S}"/configure.ac
98 sed -i \
99 -e 's,system-config-audit,,g' \
100 -e '/^SUBDIRS/s,\\$,,g' \
101 "${S}"/Makefile.am
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
111 sed -i \
112 -e '/^SUBDIRS/s,zos-remote,,g' \
113 "${S}"/audisp/plugins/Makefile.am
114 fi
115
116 # Don't build static version of Python module.
117 epatch "${FILESDIR}"/${PN}-1.7.17-python.patch
118
119 # Regenerate autotooling
120 eautoreconf
121
122 # Disable byte-compilation of Python modules.
123 echo "#!/bin/sh" > py-compile
124
125 # Bug 352198: Avoid parallel build fail
126 cd "${S}"/src/mt
127 [[ ! -s private.h ]] && ln -s ../../lib/private.h .
128 }
129
130 src_configure() {
131 #append-flags -D'__attribute__(x)='
132 econf --sbindir=/sbin $(use_with prelude)
133 }
134
135 src_install() {
136 emake DESTDIR="${D}" install || die "emake install failed"
137 dodoc AUTHORS ChangeLog README* THANKS TODO
138 docinto contrib
139 dodoc contrib/*
140 docinto contrib/plugin
141 dodoc contrib/plugin/*
142
143 newinitd "${FILESDIR}"/auditd-init.d-1.7.17 auditd
144 newconfd "${FILESDIR}"/auditd-conf.d-1.2.3 auditd
145
146 # things like shadow use this so we need to be in /
147 dodir /$(get_libdir)
148 mv "${D}"/usr/$(get_libdir)/lib*.so* "${D}"/$(get_libdir)/ || die
149 gen_usr_ldscript libaudit.so libauparse.so
150
151 # remove RedHat garbage
152 rm -r "${D}"/etc/{rc.d,sysconfig} || die
153
154 # Gentoo rules
155 insinto /etc/audit/
156 doins "${FILESDIR}"/audit.rules*
157
158 # audit logs go here
159 keepdir /var/log/audit/
160
161 # Security
162 lockdown_perms "${D}"
163
164 # Don't install .la files in Python directories.
165 python_clean_installation_image
166 }
167
168 pkg_postinst() {
169 lockdown_perms "${ROOT}"
170 python_mod_optimize audit.py
171 }
172
173 pkg_postrm() {
174 python_mod_cleanup audit.py
175 }
176
177 lockdown_perms() {
178 # upstream wants these to have restrictive perms
179 basedir="$1"
180 chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
181 chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
182 chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
183 }