Gentoo Archives: gentoo-commits

From: Sven Vermeulen <sven.vermeulen@××××××.be>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-dev:master commit in: sys-libs/libsemanage/
Date: Sat, 26 May 2012 14:48:45
Message-Id: 1338043570.ca6487d1d6daa30ab15584883da8bb5996598441.SwifT@gentoo
1 commit: ca6487d1d6daa30ab15584883da8bb5996598441
2 Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
3 AuthorDate: Sat May 26 14:46:10 2012 +0000
4 Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
5 CommitDate: Sat May 26 14:46:10 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=ca6487d1
7
8 Support python3
9
10 ---
11 sys-libs/libsemanage/ChangeLog | 208 ++++++++++++++++++++++
12 sys-libs/libsemanage/libsemanage-2.1.6-r1.ebuild | 132 ++++++++++++++
13 sys-libs/libsemanage/metadata.xml | 6 +
14 3 files changed, 346 insertions(+), 0 deletions(-)
15
16 diff --git a/sys-libs/libsemanage/ChangeLog b/sys-libs/libsemanage/ChangeLog
17 new file mode 100644
18 index 0000000..0295d09
19 --- /dev/null
20 +++ b/sys-libs/libsemanage/ChangeLog
21 @@ -0,0 +1,208 @@
22 +# ChangeLog for sys-libs/libsemanage
23 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
24 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/ChangeLog,v 1.48 2012/05/13 12:42:04 swift Exp $
25 +
26 + 13 May 2012; <swift@g.o> -libsemanage-2.1.0.ebuild:
27 + Removing obsoleted ebuild
28 +
29 + 29 Apr 2012; <swift@g.o> libsemanage-2.1.6.ebuild:
30 + Stabilization
31 +
32 + 05 Apr 2012; <swift@g.o> libsemanage-2.1.0.ebuild,
33 + libsemanage-2.1.6.ebuild:
34 + Depending on swig-2.0.4-r1 to fix build failures as per bug #409959
35 +
36 +*libsemanage-2.1.6 (31 Mar 2012)
37 +
38 + 31 Mar 2012; <swift@g.o> +libsemanage-2.1.6.ebuild:
39 + Bump to version 2.1.6
40 +
41 + 12 Nov 2011; <swift@g.o> -libsemanage-2.0.45.ebuild,
42 + -libsemanage-2.0.46.ebuild:
43 + Remove deprecated ebuilds
44 +
45 + 23 Oct 2011; <swift@g.o> libsemanage-2.1.0.ebuild:
46 + Stabilization (tracker #384231)
47 +
48 + 17 Sep 2011; <swift@g.o> libsemanage-2.0.45.ebuild,
49 + libsemanage-2.0.46.ebuild:
50 + Adding dependencies on bison and flex as per bug #382583
51 +
52 + 17 Sep 2011; <swift@g.o> libsemanage-2.1.0.ebuild:
53 + Add dependency for flex and bison
54 +
55 + 12 Aug 2011; Anthony G. Basile <blueness@g.o> ChangeLog:
56 + Fix failed gpg signing of Manifest
57 +
58 + 12 Aug 2011; Anthony G. Basile <blueness@g.o>
59 + -libsemanage-2.0.27.ebuild, -libsemanage-2.0.33.ebuild,
60 + -libsemanage-2.0.33-r1.ebuild, -files/libsemanage-2.0.33-bzip.diff:
61 + Removed deprecated versions
62 +
63 +*libsemanage-2.1.0 (03 Aug 2011)
64 +
65 + 03 Aug 2011; Anthony G. Basile <blueness@g.o>
66 + +libsemanage-2.1.0.ebuild:
67 + Bump to 20110727 SELinux userspace release
68 +
69 +*libsemanage-2.0.46 (15 Jul 2011)
70 +
71 + 15 Jul 2011; Anthony G. Basile <blueness@g.o>
72 + +libsemanage-2.0.46.ebuild:
73 + Bump to 2.0.46 - proxy for SwifT
74 +
75 + 30 Jun 2011; Anthony G. Basile <blueness@g.o>
76 + libsemanage-2.0.45.ebuild:
77 + Only build libsemanage for python-2, fixes bug #369089
78 +
79 + 28 May 2011; Anthony G. Basile <blueness@g.o>
80 + libsemanage-2.0.27.ebuild, libsemanage-2.0.33.ebuild:
81 + Make RDEPEND explicit
82 +
83 + 28 May 2011; Anthony G. Basile <blueness@g.o>
84 + libsemanage-2.0.45.ebuild:
85 + Stable amd64 x86
86 +
87 + 13 Feb 2011; Anthony G. Basile <blueness@g.o> metadata.xml:
88 + Updated metadata.xml to reflect new selinux herd.
89 +
90 + 06 Feb 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
91 + libsemanage-2.0.45.ebuild:
92 + Add "python" and "ruby" USE flags.
93 +
94 + 05 Feb 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
95 + libsemanage-2.0.45.ebuild:
96 + Set SUPPORT_PYTHON_ABIS (bug #353764). Respect AR and CC.
97 +
98 +*libsemanage-2.0.45 (05 Feb 2011)
99 +
100 + 05 Feb 2011; Anthony G. Basile <blueness@g.o>
101 + +libsemanage-2.0.45.ebuild:
102 + New upstream release.
103 +
104 + 16 Apr 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
105 + libsemanage-2.0.27.ebuild, libsemanage-2.0.33.ebuild,
106 + libsemanage-2.0.33-r1.ebuild:
107 + Delete calls to deprecated python_version().
108 +
109 +*libsemanage-2.0.33-r1 (24 Aug 2009)
110 +
111 + 24 Aug 2009; Chris PeBenito <pebenito@g.o>
112 + +libsemanage-2.0.33-r1.ebuild, +files/libsemanage-2.0.33-bzip.diff:
113 + Add patch to make bzip2 compression configurable.
114 +
115 + 03 Aug 2009; Chris PeBenito <pebenito@g.o>
116 + libsemanage-2.0.33.ebuild:
117 + Fix libsepol dependency.
118 +
119 + 02 Aug 2009; Chris PeBenito <pebenito@g.o>
120 + libsemanage-2.0.27.ebuild, libsemanage-2.0.33.ebuild:
121 + Add python_need_rebuild to libsemanage.
122 +
123 +*libsemanage-2.0.33 (02 Aug 2009)
124 +
125 + 02 Aug 2009; Chris PeBenito <pebenito@g.o>
126 + +libsemanage-2.0.33.ebuild:
127 + New upstream release.
128 +
129 + 18 Jul 2009; Chris PeBenito <pebenito@g.o>
130 + -libsemanage-1.10.9.ebuild, libsemanage-2.0.27.ebuild:
131 + Mark stable. Remove old ebuilds.
132 +
133 +*libsemanage-2.0.27 (03 Oct 2008)
134 +
135 + 03 Oct 2008; Chris PeBenito <pebenito@g.o>
136 + +libsemanage-2.0.27.ebuild:
137 + Initial commit of 2.0 libsemanage.
138 +
139 + 10 Sep 2008; Chris PeBenito <pebenito@g.o>
140 + libsemanage-1.10.9.ebuild:
141 + Tests cannot be run in the ebuild, they are supposed to be ran on the full
142 + SELinux userland repo.
143 +
144 + 29 May 2008; Ali Polatel <hawking@g.o> libsemanage-1.10.9.ebuild:
145 + python_mod_optimize is ROOT aware. Fixed python_mod_cleanup.
146 +
147 + 26 May 2008; Chris PeBenito <pebenito@g.o>
148 + libsemanage-1.10.9.ebuild:
149 + Fix libsepol dependency.
150 +
151 + 13 May 2008; Chris PeBenito <pebenito@g.o> -libsemanage-1.4.ebuild,
152 + -libsemanage-1.6.ebuild, -libsemanage-1.10.0.ebuild,
153 + -libsemanage-1.10.5.ebuild, libsemanage-1.10.9.ebuild:
154 + Mark 1.10.9 stable, clear old ebuilds.
155 +
156 +*libsemanage-1.10.9 (29 Jan 2008)
157 +
158 + 29 Jan 2008; Chris PeBenito <pebenito@g.o>
159 + +libsemanage-1.10.9.ebuild:
160 + New upstream bugfix release.
161 +
162 +*libsemanage-1.10.5 (18 Oct 2007)
163 +
164 + 18 Oct 2007; Chris PeBenito <pebenito@g.o>
165 + +libsemanage-1.10.5.ebuild:
166 + New upstream release.
167 +
168 + 04 Jun 2007; Chris PeBenito <pebenito@g.o>
169 + libsemanage-1.10.0.ebuild:
170 + Mark stable.
171 +
172 +*libsemanage-1.10.0 (15 Feb 2007)
173 +
174 + 15 Feb 2007; Chris PeBenito <pebenito@g.o>
175 + +libsemanage-1.10.0.ebuild:
176 + New upstream release.
177 +
178 + 09 Oct 2006; Chris PeBenito <pebenito@g.o>
179 + libsemanage-1.6.17-r1.ebuild:
180 + Stable to make repoman happy.
181 +
182 +*libsemanage-1.6.17-r1 (08 Oct 2006)
183 +
184 + 08 Oct 2006; Chris PeBenito <pebenito@g.o>
185 + -libsemanage-1.6.17.ebuild, +libsemanage-1.6.17-r1.ebuild:
186 + Install semanage.conf since this is masked on example policy-based profiles.
187 +
188 +*libsemanage-1.6.17 (05 Oct 2006)
189 +
190 + 05 Oct 2006; Chris PeBenito <pebenito@g.o>
191 + +libsemanage-1.6.17.ebuild:
192 + Add SVN snapshot.
193 +
194 + 31 Jul 2006; Chris PeBenito <pebenito@g.o> libsemanage-1.6.ebuild:
195 + Mark stable, long overdue.
196 +
197 + 27 Apr 2006; Alec Warner <antarus@g.o>
198 + files/digest-libsemanage-1.4, Manifest:
199 + Fixing SHA256 digest, pass four
200 +
201 +*libsemanage-1.6 (18 Mar 2006)
202 +
203 + 18 Mar 2006; Chris PeBenito <pebenito@g.o> +libsemanage-1.6.ebuild:
204 + New upstream release.
205 +
206 + 22 Feb 2006; Stephen Bennett <spb@g.o> libsemanage-1.4.ebuild:
207 + Alpha stable
208 +
209 + 19 Feb 2006; Joshua Kinard <kumba@g.o> libsemanage-1.4.ebuild:
210 + Marked stable on mips.
211 +
212 + 09 Feb 2006; Chris PeBenito <pebenito@g.o> libsemanage-1.4.ebuild:
213 + Set python version to fix compiles on non 2.4 pythons.
214 +
215 + 17 Jan 2006; Chris PeBenito <pebenito@g.o> libsemanage-1.4.ebuild:
216 + Mark stable, x86, amd64, ppc, sparc.
217 +
218 + 14 Jan 2006; Stephen Bennett <spb@g.o> libsemanage-1.4.ebuild:
219 + Added ~alpha
220 +
221 + 15 Dec 2005; Chris PeBenito <pebenito@g.o> libsemanage-1.4.ebuild:
222 + Tighten up versioning to try to prevent mismatch problems as seen in #112348.
223 +
224 +*libsemanage-1.4 (09 Dec 2005)
225 +
226 + 09 Dec 2005; Chris PeBenito <pebenito@g.o> +metadata.xml,
227 + +libsemanage-1.4.ebuild:
228 + Initial commit.
229 +
230
231 diff --git a/sys-libs/libsemanage/libsemanage-2.1.6-r1.ebuild b/sys-libs/libsemanage/libsemanage-2.1.6-r1.ebuild
232 new file mode 100644
233 index 0000000..36a3301
234 --- /dev/null
235 +++ b/sys-libs/libsemanage/libsemanage-2.1.6-r1.ebuild
236 @@ -0,0 +1,132 @@
237 +# Copyright 1999-2012 Gentoo Foundation
238 +# Distributed under the terms of the GNU General Public License v2
239 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/libsemanage-2.1.6.ebuild,v 1.3 2012/04/29 10:07:19 swift Exp $
240 +
241 +EAPI="3"
242 +# Support for 4 depends on python.eclass
243 +PYTHON_DEPEND="python? *"
244 +SUPPORT_PYTHON_ABIS="1"
245 +RESTRICT_PYTHON_ABIS="*-jython"
246 +
247 +inherit multilib python toolchain-funcs eutils
248 +
249 +SEPOL_VER="2.1.4"
250 +SELNX_VER="2.1.9"
251 +
252 +DESCRIPTION="SELinux kernel and policy management library"
253 +HOMEPAGE="http://userspace.selinuxproject.org"
254 +SRC_URI="http://userspace.selinuxproject.org/releases/20120216/${P}.tar.gz
255 + http://dev.gentoo.org/~swift/patches/libsemanage/patchbundle-libsemanage-2.1.6-gentoo-r1.tar.gz"
256 +
257 +LICENSE="GPL-2"
258 +SLOT="0"
259 +KEYWORDS="amd64 x86"
260 +IUSE="python ruby"
261 +
262 +RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}
263 + >=sys-libs/libselinux-${SELNX_VER}
264 + dev-libs/ustr
265 + ruby? ( dev-lang/ruby )"
266 +DEPEND="${RDEPEND}
267 + sys-devel/bison
268 + sys-devel/flex
269 + ruby? ( >=dev-lang/swig-2.0.4-r1 )
270 + python? ( >=dev-lang/swig-2.0.4-r1 )"
271 +
272 +# tests are not meant to be run outside of the
273 +# full SELinux userland repo
274 +RESTRICT="test"
275 +
276 +pkg_setup() {
277 + if use python; then
278 + python_pkg_setup
279 + fi
280 +}
281 +
282 +src_prepare() {
283 + echo "# Set this to true to save the linked policy." >> "${S}/src/semanage.conf"
284 + echo "# This is normally only useful for analysis" >> "${S}/src/semanage.conf"
285 + echo "# or debugging of policy." >> "${S}/src/semanage.conf"
286 + echo "save-linked=false" >> "${S}/src/semanage.conf"
287 + echo >> "${S}/src/semanage.conf"
288 + echo "# Set this to 0 to disable assertion checking." >> "${S}/src/semanage.conf"
289 + echo "# This should speed up building the kernel policy" >> "${S}/src/semanage.conf"
290 + echo "# from policy modules, but may leave you open to" >> "${S}/src/semanage.conf"
291 + echo "# dangerous rules which assertion checking" >> "${S}/src/semanage.conf"
292 + echo "# would catch." >> "${S}/src/semanage.conf"
293 + echo "expand-check=1" >> "${S}/src/semanage.conf"
294 + echo >> "${S}/src/semanage.conf"
295 + echo "# Modules in the module store can be compressed" >> "${S}/src/semanage.conf"
296 + echo "# with bzip2. Set this to the bzip2 blocksize" >> "${S}/src/semanage.conf"
297 + echo "# 1-9 when compressing. The higher the number," >> "${S}/src/semanage.conf"
298 + echo "# the more memory is traded off for disk space." >> "${S}/src/semanage.conf"
299 + echo "# Set to 0 to disable bzip2 compression." >> "${S}/src/semanage.conf"
300 + echo "bzip-blocksize=0" >> "${S}/src/semanage.conf"
301 + echo >> "${S}/src/semanage.conf"
302 + echo "# Reduce memory usage for bzip2 compression and" >> "${S}/src/semanage.conf"
303 + echo "# decompression of modules in the module store." >> "${S}/src/semanage.conf"
304 + echo "bzip-small=true" >> "${S}/src/semanage.conf"
305 +
306 + EPATCH_MULTI_MSG="Applying libsemanage patches ... " \
307 + EPATCH_SUFFIX="patch" \
308 + EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
309 + EPATCH_FORCE="yes" \
310 + epatch
311 +}
312 +
313 +src_compile() {
314 + emake AR="$(tc-getAR)" CC="$(tc-getCC)" all || die
315 +
316 + if use python; then
317 + python_copy_sources src
318 + building() {
319 + emake CC="$(tc-getCC)" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" "$@"
320 + }
321 + python_execute_function -s --source-dir src building -- swigify
322 + python_execute_function -s --source-dir src building -- pywrap
323 + fi
324 +
325 + if use ruby; then
326 + emake -C src CC="$(tc-getCC)" rubywrap || die
327 + fi
328 +}
329 +
330 +src_install() {
331 + emake \
332 + DESTDIR="${D}" \
333 + LIBDIR="${D}usr/$(get_libdir)" \
334 + SHLIBDIR="${D}$(get_libdir)" \
335 + install || die
336 + dosym "../../$(get_libdir)/libsemanage.so.1" "/usr/$(get_libdir)/libsemanage.so" || die
337 +
338 + if use python; then
339 + installation() {
340 + emake \
341 + DESTDIR="${D}" \
342 + PYLIBVER="python$(python_get_version)" \
343 + PYPREFIX="python-$(python_get_version)" \
344 + LIBDIR="${D}usr/$(get_libdir)" \
345 + install-pywrap
346 + }
347 + python_execute_function -s --source-dir src installation
348 + fi
349 +
350 + if use ruby; then
351 + emake -C src \
352 + DESTDIR="${D}" \
353 + LIBDIR="${D}usr/$(get_libdir)" \
354 + install-rubywrap || die
355 + fi
356 +}
357 +
358 +pkg_postinst() {
359 + if use python; then
360 + python_mod_optimize semanage.py
361 + fi
362 +}
363 +
364 +pkg_postrm() {
365 + if use python; then
366 + python_mod_cleanup semanage.py
367 + fi
368 +}
369
370 diff --git a/sys-libs/libsemanage/metadata.xml b/sys-libs/libsemanage/metadata.xml
371 new file mode 100644
372 index 0000000..ebc32c0
373 --- /dev/null
374 +++ b/sys-libs/libsemanage/metadata.xml
375 @@ -0,0 +1,6 @@
376 +<?xml version="1.0" encoding="UTF-8"?>
377 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
378 +<pkgmetadata>
379 + <herd>selinux</herd>
380 + <longdescription>SELinux policy management libraries</longdescription>
381 +</pkgmetadata>