diff options
author | Chris PeBenito <pebenito@gentoo.org> | 2008-10-03 03:20:03 +0000 |
---|---|---|
committer | Chris PeBenito <pebenito@gentoo.org> | 2008-10-03 03:20:03 +0000 |
commit | cf4d55d1ca31933a659151275d63be3d62a6cf96 (patch) | |
tree | 3c89fbb60bd3a9e903fdf326f3f75303402665eb /sys-libs/libsepol | |
parent | ustr initial commit. (diff) | |
download | gentoo-2-cf4d55d1ca31933a659151275d63be3d62a6cf96.tar.gz gentoo-2-cf4d55d1ca31933a659151275d63be3d62a6cf96.tar.bz2 gentoo-2-cf4d55d1ca31933a659151275d63be3d62a6cf96.zip |
Initial commit of 2.0 libsepol.
(Portage version: 2.2_rc11/cvs/Linux 2.6.24-gentoo-r3 x86_64)
Diffstat (limited to 'sys-libs/libsepol')
-rw-r--r-- | sys-libs/libsepol/ChangeLog | 8 | ||||
-rw-r--r-- | sys-libs/libsepol/files/libsepol-2.0.32-expand_rule.diff | 39 | ||||
-rw-r--r-- | sys-libs/libsepol/libsepol-2.0.32.ebuild | 43 |
3 files changed, 89 insertions, 1 deletions
diff --git a/sys-libs/libsepol/ChangeLog b/sys-libs/libsepol/ChangeLog index 2383fafb8e45..9ddc04e24159 100644 --- a/sys-libs/libsepol/ChangeLog +++ b/sys-libs/libsepol/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-libs/libsepol # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsepol/ChangeLog,v 1.31 2008/09/10 17:34:19 pebenito Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsepol/ChangeLog,v 1.32 2008/10/03 03:20:02 pebenito Exp $ + +*libsepol-2.0.32 (03 Oct 2008) + + 03 Oct 2008; Chris PeBenito <pebenito@gentoo.org> + +files/libsepol-2.0.32-expand_rule.diff, +libsepol-2.0.32.ebuild: + Initial commit of 2.0 libsepol. 10 Sep 2008; Chris PeBenito <pebenito@gentoo.org> libsepol-1.16.11.ebuild: Tests cannot be run in the ebuild, they are supposed to be ran on the full diff --git a/sys-libs/libsepol/files/libsepol-2.0.32-expand_rule.diff b/sys-libs/libsepol/files/libsepol-2.0.32-expand_rule.diff new file mode 100644 index 000000000000..a9e1b77d1b19 --- /dev/null +++ b/sys-libs/libsepol/files/libsepol-2.0.32-expand_rule.diff @@ -0,0 +1,39 @@ +diff -purN libsepol-2.0.32.orig/src/expand.c libsepol-2.0.32/src/expand.c +--- libsepol-2.0.32.orig/src/expand.c 2008-08-26 09:40:22.000000000 -0400 ++++ libsepol-2.0.32/src/expand.c 2008-09-19 19:36:39.918510539 -0400 +@@ -1917,6 +1917,35 @@ int expand_convert_type_set(policydb_t * + return 0; + } + ++/* Expand a rule into a given avtab - checking for conflicting type ++ * rules. Return 1 on success, 0 if the rule conflicts with something ++ * (and hence was not added), or -1 on error. */ ++int expand_rule(sepol_handle_t * handle, ++ policydb_t * source_pol, ++ avrule_t * source_rule, avtab_t * dest_avtab, ++ cond_av_list_t ** cond, cond_av_list_t ** other, int enabled) ++{ ++ int retval; ++ ebitmap_t stypes, ttypes; ++ ++ if (source_rule->specified & AVRULE_NEVERALLOW) ++ return 1; ++ ++ ebitmap_init(&stypes); ++ ebitmap_init(&ttypes); ++ ++ if (type_set_expand(&source_rule->stypes, &stypes, source_pol, 1)) ++ return -1; ++ if (type_set_expand(&source_rule->ttypes, &ttypes, source_pol, 1)) ++ return -1; ++ retval = expand_rule_helper(handle, source_pol, NULL, ++ source_rule, dest_avtab, ++ cond, other, enabled, &stypes, &ttypes); ++ ebitmap_destroy(&stypes); ++ ebitmap_destroy(&ttypes); ++ return retval; ++} ++ + int role_set_expand(role_set_t * x, ebitmap_t * r, policydb_t * p, uint32_t * rolemap) + { + unsigned int i; diff --git a/sys-libs/libsepol/libsepol-2.0.32.ebuild b/sys-libs/libsepol/libsepol-2.0.32.ebuild new file mode 100644 index 000000000000..e0f110a415a3 --- /dev/null +++ b/sys-libs/libsepol/libsepol-2.0.32.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsepol/libsepol-2.0.32.ebuild,v 1.1 2008/10/03 03:20:02 pebenito Exp $ + +IUSE="" + +inherit multilib eutils + +BUGFIX_PATCH="${FILESDIR}/libsepol-2.0.32-expand_rule.diff" + +DESCRIPTION="SELinux binary policy representation library" +HOMEPAGE="http://userspace.selinuxproject.org" +SRC_URI="http://userspace.selinuxproject.org/releases/current/devel/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~mips ~ppc ~sparc ~x86" + +DEPEND="virtual/libc" + +# tests are not meant to be run outside of the +# full SELinux userland repo +RESTRICT="test" + +src_unpack() { + unpack ${A} + cd "${S}" + + [ ! -z "$BUGFIX_PATCH" ] && epatch "${BUGFIX_PATCH}" + + # fix up paths for multilib + sed -i -e "/^LIBDIR/s/lib/$(get_libdir)/" src/Makefile \ + || die "Fix for multilib LIBDIR failed." + sed -i -e "/^SHLIBDIR/s/lib/$(get_libdir)/" src/Makefile \ + || die "Fix for multilib SHLIBDIR failed." +} + +src_compile() { + emake || die +} + +src_install() { + make DESTDIR="${D}" install +} |