From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A4D0413800E for ; Fri, 27 Jul 2012 10:19:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 56B6EE064E; Fri, 27 Jul 2012 10:19:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id F384AE064E for ; Fri, 27 Jul 2012 10:19:46 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2BE5C1B4019 for ; Fri, 27 Jul 2012 10:19:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E901DE5436 for ; Fri, 27 Jul 2012 10:19:44 +0000 (UTC) From: "Sven Vermeulen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" Message-ID: <1343384309.ad7701c48fd60b6bc8386256a976ffbdba6414f5.SwifT@gentoo> Subject: [gentoo-commits] proj/hardened-dev:master commit in: sys-libs/libselinux/files/, sys-libs/libselinux/ X-VCS-Repository: proj/hardened-dev X-VCS-Files: sys-libs/libselinux/ChangeLog sys-libs/libselinux/files/libselinux-2.1.9-mountsys.patch sys-libs/libselinux/libselinux-2.1.9-r2.ebuild sys-libs/libselinux/metadata.xml X-VCS-Directories: sys-libs/libselinux/files/ sys-libs/libselinux/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: ad7701c48fd60b6bc8386256a976ffbdba6414f5 X-VCS-Branch: master Date: Fri, 27 Jul 2012 10:19:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b4c6854e-c4e8-495e-ac14-46e16886ddfc X-Archives-Hash: e3401d693ccac21ac5de45a6e10bc0f7 commit: ad7701c48fd60b6bc8386256a976ffbdba6414f5 Author: Sven Vermeulen siphos be> AuthorDate: Fri Jul 27 10:18:29 2012 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Fri Jul 27 10:18:29 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=ad7701c4 Fix ruby build issue (#417303) --- sys-libs/libselinux/ChangeLog | 363 ++++++++++++++++++++ .../files/libselinux-2.1.9-mountsys.patch | 22 ++ sys-libs/libselinux/libselinux-2.1.9-r2.ebuild | 97 ++++++ sys-libs/libselinux/metadata.xml | 10 + 4 files changed, 492 insertions(+), 0 deletions(-) diff --git a/sys-libs/libselinux/ChangeLog b/sys-libs/libselinux/ChangeLog new file mode 100644 index 0000000..171b8f3 --- /dev/null +++ b/sys-libs/libselinux/ChangeLog @@ -0,0 +1,363 @@ +# ChangeLog for sys-libs/libselinux +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.82 2012/07/10 20:07:42 swift Exp $ + + 10 Jul 2012; libselinux-2.1.9-r1.ebuild: + Stabilization + + 26 Jun 2012; Mike Gilbert libselinux-2.1.9-r1.ebuild, + libselinux-2.1.9.ebuild: + Restrict pypy per Arfrever. + + 13 May 2012; -libselinux-2.1.0.ebuild: + Removing obsoleted ebuild + +*libselinux-2.1.9-r1 (13 May 2012) + + 13 May 2012; +libselinux-2.1.9-r1.ebuild, + +files/libselinux-2.1.9-mountsys.patch: + Mount /sys before trying to mount /sys/fs/selinux from within the policy load + functions, bug #414779 + + 29 Apr 2012; libselinux-2.1.9.ebuild: + Stabilization + +*libselinux-2.1.9 (31 Mar 2012) + + 31 Mar 2012; +libselinux-2.1.9.ebuild: + Bump to version 2.1.9 + + 12 Nov 2011; -libselinux-2.0.94.ebuild, + -libselinux-2.0.98.ebuild: + Remove deprecated ebuilds + + 23 Oct 2011; libselinux-2.1.0.ebuild: + Stabilization (tracker #384231) + + 12 Aug 2011; Anthony G. Basile + -libselinux-2.0.71.ebuild, -libselinux-2.0.85.ebuild, + -files/libselinux-2.0.85-headers.patch, -files/compat.py: + Removed deprecated versions + +*libselinux-2.1.0 (03 Aug 2011) + + 03 Aug 2011; Anthony G. Basile + +libselinux-2.1.0.ebuild: + Bump to 20110727 SELinux userspace release + +*libselinux-2.0.98 (15 Jul 2011) + + 15 Jul 2011; Anthony G. Basile + +libselinux-2.0.98.ebuild: + Bump to 2.0.98 - proxy for SwifT + + 28 May 2011; Anthony G. Basile + libselinux-2.0.94.ebuild: + Stable amd64 x86 + + 13 Feb 2011; Anthony G. Basile metadata.xml: + Updated metadata.xml to reflect new selinux herd. + + 06 Feb 2011; Arfrever Frehtes Taifersar Arahesis + libselinux-2.0.94.ebuild: + Add "python" USE flag. + + 05 Feb 2011; Arfrever Frehtes Taifersar Arahesis + libselinux-2.0.94.ebuild: + Set SUPPORT_PYTHON_ABIS (bug #353763). Respect AR and CC. + +*libselinux-2.0.94 (05 Feb 2011) + + 05 Feb 2011; Anthony G. Basile + +libselinux-2.0.94.ebuild: + New upstream release. + + 29 Sep 2010; Mike Frysinger libselinux-2.0.85.ebuild, + +files/libselinux-2.0.85-headers.patch: + Fix by Chris Richards for building with glibc-2.12 #338302. + + 16 Apr 2010; Arfrever Frehtes Taifersar Arahesis + libselinux-2.0.71.ebuild, libselinux-2.0.85.ebuild: + Delete calls to deprecated python_version(). + + 02 Aug 2009; Chris PeBenito + libselinux-2.0.71.ebuild, libselinux-2.0.85.ebuild: + Add python_need_rebuild. + +*libselinux-2.0.85 (02 Aug 2009) + + 02 Aug 2009; Chris PeBenito + +libselinux-2.0.85.ebuild: + New upstream release. + + 18 Jul 2009; Chris PeBenito + -libselinux-1.34.14.ebuild, libselinux-2.0.71.ebuild: + Mark stable. Remove old ebuilds. + +*libselinux-2.0.71 (03 Oct 2008) + + 03 Oct 2008; Chris PeBenito + +libselinux-2.0.71.ebuild: + Initial commit of 2.0 libselinux. + + 29 May 2008; Ali Polatel libselinux-1.34.14.ebuild: + python_mod_optimize is ROOT aware. Fixed python_mod_cleanup. + + 13 May 2008; Chris PeBenito + -libselinux-1.28-r1.ebuild, -libselinux-1.30.ebuild, + -libselinux-1.34.0.ebuild, -libselinux-1.34.13.ebuild, + libselinux-1.34.14.ebuild: + Mark 1.34.14 stable, clear old ebuilds. + + 11 May 2008; Chris PeBenito + libselinux-1.34.0.ebuild, libselinux-1.34.13.ebuild, + libselinux-1.34.14.ebuild: + Fix bug #221501. + +*libselinux-1.34.14 (29 Jan 2008) + + 29 Jan 2008; Chris PeBenito + +libselinux-1.34.14.ebuild: + New upstream bugfix release. + +*libselinux-1.34.13 (18 Oct 2007) + + 18 Oct 2007; Chris PeBenito + +libselinux-1.34.13.ebuild: + New upstream release. + + 04 Jun 2007; Chris PeBenito + libselinux-1.34.0.ebuild: + Mark stable. + + 16 Feb 2007; Stephen Bennett libselinux-1.34.0.ebuild: + Add missing swig depend. Bug #167007 + +*libselinux-1.34.0 (15 Feb 2007) + + 15 Feb 2007; Chris PeBenito + +libselinux-1.34.0.ebuild: + New upstream release. + + 23 Oct 2006; Chris PeBenito + libselinux-1.30.29.ebuild: + Fix depend for glibc + + 09 Oct 2006; Chris PeBenito + libselinux-1.30.29.ebuild: + Stable to make repoman happy. + +*libselinux-1.30.29 (05 Oct 2006) + + 05 Oct 2006; Chris PeBenito + +libselinux-1.30.29.ebuild: + Add SVN snapshot. + + 31 Jul 2006; Chris PeBenito libselinux-1.30.ebuild: + Mark stable, long overdue. + + 07 Apr 2006; Chris PeBenito libselinux-1.30.ebuild: + Split python wrapper compile into a separate emake to ensure the main + library is built before trying to build the wrapper. Fixes bug #129074. + + 22 Mar 2006; Chris PeBenito -libselinux-1.24.ebuild, + -libselinux-1.28.ebuild, libselinux-1.28-r1.ebuild: + Mark 1.28-r1 stable, clean out old ebuilds. + +*libselinux-1.30 (18 Mar 2006) + + 18 Mar 2006; Chris PeBenito +libselinux-1.30.ebuild: + New upstream release. + + 22 Feb 2006; Stephen Bennett libselinux-1.28.ebuild: + Alpha stable + +*libselinux-1.28-r1 (20 Feb 2006) + + 20 Feb 2006; Chris PeBenito +files/compat.py, + +libselinux-1.28-r1.ebuild: + Add python-selinux compatability aliases to swig wrapper. + + 19 Feb 2006; Joshua Kinard libselinux-1.28.ebuild: + Marked stable on mips. + + 09 Feb 2006; Chris PeBenito libselinux-1.28.ebuild: + Move python_version out of global scope. + + 29 Jan 2006; Chris PeBenito libselinux-1.28.ebuild: + Add python version handling to fix #120829, and add -fPIC to LDFLAGS to + hopefully fix #119271. + + 17 Jan 2006; Chris PeBenito libselinux-1.28.ebuild: + Mark stable, x86, amd64, ppc, sparc. + + 14 Jan 2006; Stephen Bennett libselinux-1.28.ebuild: + Added ~alpha + + 15 Dec 2005; Chris PeBenito libselinux-1.28.ebuild: + Tighten up versioning to try to prevent mismatch problems as seen in #112348. + +*libselinux-1.28 (09 Dec 2005) + + 09 Dec 2005; Chris PeBenito + -files/libselinux-1.22.diff, -libselinux-1.22-r1.ebuild, + +libselinux-1.28.ebuild: + New upstream release. + + 09 Sep 2005; Chris PeBenito libselinux-1.24.ebuild: + Mark stable. + +*libselinux-1.24 (25 Jun 2005) + + 25 Jun 2005; Chris PeBenito -libselinux-1.20.ebuild, + -libselinux-1.22.ebuild, +libselinux-1.24.ebuild: + New upstream release. + + 13 May 2005; Chris PeBenito + libselinux-1.22-r1.ebuild: + Mark stable. + + 10 May 2005; Stephen Bennett libselinux-1.22.ebuild: + mips stable + +*libselinux-1.22-r1 (08 May 2005) + + 08 May 2005; Chris PeBenito + +files/libselinux-1.22.diff, +libselinux-1.22-r1.ebuild: + A couple fixes, including one for bug #91921. + + 01 May 2005; Stephen Bennett libselinux-1.22.ebuild: + Mark ~mips. + + 01 May 2005; Chris PeBenito libselinux-1.22.ebuild: + Mark stable. + +*libselinux-1.22 (13 Mar 2005) + + 13 Mar 2005; Chris PeBenito +libselinux-1.22.ebuild: + New upstream release. + + 13 Feb 2005; Chris PeBenito libselinux-1.20.ebuild: + Mark stable. + +*libselinux-1.20 (07 Jan 2005) + + 07 Jan 2005; Chris PeBenito libselinux-1.18.ebuild, + +libselinux-1.20.ebuild: + New upstream release. Mark 1.18 stable. + + 03 Jan 2005; Chris PeBenito libselinux-1.16.ebuild, + libselinux-1.18.ebuild: + Switch to libc virtual for DEP since uclibc now has xattr support. + +*libselinux-1.18 (14 Nov 2004) + + 14 Nov 2004; Chris PeBenito + +files/selinuxconfig.c.diff, +libselinux-1.18.ebuild: + New upstream release. + +*libselinux-1.16 (07 Sep 2004) + + 07 Sep 2004; Chris PeBenito +libselinux-1.16.ebuild: + New upstream release. + +*libselinux-1.14 (02 Jul 2004) + + 02 Jul 2004; Chris PeBenito +libselinux-1.14.ebuild: + New upstream version. + + 11 Jun 2004; Chris PeBenito -libselinux-1.10.ebuild, + libselinux-1.12.ebuild: + Mark stable + +*libselinux-1.12 (14 May 2004) + + 14 May 2004; Chris PeBenito +libselinux-1.12.ebuild: + New upstream release. + +*libselinux-1.10 (17 Apr 2004) + + 17 Apr 2004; Chris PeBenito +libselinux-1.10.ebuild: + New upstream version. + + 08 Apr 2004; Chris PeBenito libselinux-1.8.ebuild: + Mark stable for 2004.1 + +*libselinux-1.8 (12 Mar 2004) + + 12 Mar 2004; Chris PeBenito libselinux-1.8.ebuild: + New upstream release. + +*libselinux-1.6 (24 Feb 2004) + + 24 Feb 2004; Chris PeBenito libselinux-1.6.ebuild: + New upstream release. + + 16 Dec 2003; Chris PeBenito libselinux-1.4.ebuild: + Mark stable. + +*libselinux-1.4 (06 Dec 2003) + + 06 Dec 2003; Chris PeBenito libselinux-1.4.ebuild: + New upstream version. + + 29 Oct 2003; Joshua Brindle libselinux-1.2-r2.ebuild: + added sparc + +*libselinux-1.2-r2 (20 Oct 2003) + + 20 Oct 2003; Chris PeBenito libselinux-1.2-r2.ebuild, + files/libselinux-1.2-attr.diff: + Compile against sys-apps/attr only if linux-headers are older than 2.4.20. + +*libselinux-1.2-r1 (07 Oct 2003) + + 07 Oct 2003; Chris PeBenito libselinux-1.2-r1.ebuild, + files/libselinux-1.2-gentoo.diff: + Move libraries to /lib, to fix problems with having a separate /usr during + booting. + +*libselinux-1.2 (03 Oct 2003) + + 03 Oct 2003; Chris PeBenito libselinux-1.2.ebuild, + files/libselinux-1.2-const.diff: + New upstream version. + + 22 Sep 2003; metadata.xml: + Fix metadata.xml + + 21 Aug 2003; Chris PeBenito libselinux-1.1-r1.ebuild: + Add a dep for portage. The newer versions have labelling support for the old + API. + + 18 Aug 2003; Chris PeBenito libselinux-1.1-r1.ebuild, + metadata.xml: + Fix license, this is public-domain, not GPL-2. Use package description in RPM + spec file as metadata.xml long description. + + 15 Aug 2003; Chris PeBenito libselinux-1.0.ebuild, + libselinux-1.1-r1.ebuild, files/libselinux-1.0-gentoo.diff: + Mark stable + +*libselinux-1.1-r1 (14 Aug 2003) + + 14 Aug 2003; Chris PeBenito libselinux-1.1-r1.ebuild, + libselinux-1.1.ebuild, files/libselinux-1.1-linkfix.diff: + Add fix for a random linking problem that causes libselinux to work + incorrectly. + +*libselinux-1.1 (14 Aug 2003) + + 14 Aug 2003; Chris PeBenito libselinux-1.1.ebuild, + files/libselinux-1.1-gentoo.diff: + New upstream version + + 04 Aug 2003; Chris PeBenito + files/libselinux-1.0-gentoo.diff: + Add on a NSA nullbyte patch to the gentoo patch + +*libselinux-1.0 (03 Aug 2003) + + 03 Aug 2003; Chris PeBenito libselinux-1.0.ebuild, + metadata.xml, files/libselinux-1.0-gentoo.diff: + Initial commit diff --git a/sys-libs/libselinux/files/libselinux-2.1.9-mountsys.patch b/sys-libs/libselinux/files/libselinux-2.1.9-mountsys.patch new file mode 100644 index 0000000..f2a206d --- /dev/null +++ b/sys-libs/libselinux/files/libselinux-2.1.9-mountsys.patch @@ -0,0 +1,22 @@ +diff -ur libselinux-2.1.9.orig/src/load_policy.c libselinux-2.1.9/src/load_policy.c +--- libselinux-2.1.9.orig/src/load_policy.c 2012-05-05 10:33:06.130719282 +0200 ++++ libselinux-2.1.9/src/load_policy.c 2012-05-05 10:43:45.024720646 +0200 +@@ -370,8 +370,16 @@ + * mount it if present for use in the calls below. + */ + char *mntpoint = NULL; +- if (mount(SELINUXFS, SELINUXMNT, SELINUXFS, 0, 0) == 0 || errno == EBUSY) { +- mntpoint = SELINUXMNT; ++ /* First make sure /sys is mounted */ ++ if (mount("sysfs", "/sys", "sysfs", 0, 0) == 0 || errno == EBUSY) { ++ if (mount(SELINUXFS, SELINUXMNT, SELINUXFS, 0, 0) == 0 || errno == EBUSY) { ++ mntpoint = SELINUXMNT; ++ } else { ++ /* check old mountpoint */ ++ if (mount(SELINUXFS, OLDSELINUXMNT, SELINUXFS, 0, 0) == 0 || errno == EBUSY) { ++ mntpoint = OLDSELINUXMNT; ++ } ++ } + } else { + /* check old mountpoint */ + if (mount(SELINUXFS, OLDSELINUXMNT, SELINUXFS, 0, 0) == 0 || errno == EBUSY) { diff --git a/sys-libs/libselinux/libselinux-2.1.9-r2.ebuild b/sys-libs/libselinux/libselinux-2.1.9-r2.ebuild new file mode 100644 index 0000000..d5ba9b8 --- /dev/null +++ b/sys-libs/libselinux/libselinux-2.1.9-r2.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.1.9-r1.ebuild,v 1.3 2012/07/10 20:07:42 swift Exp $ + +EAPI="4" +PYTHON_DEPEND="python? *" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="*-jython *-pypy-*" +USE_RUBY="ruby18" +RUBY_OPTIONAL="yes" + +inherit multilib python toolchain-funcs eutils ruby-ng + +SEPOL_VER="2.1.4" + +DESCRIPTION="SELinux userland library" +HOMEPAGE="http://userspace.selinuxproject.org" +SRC_URI="http://userspace.selinuxproject.org/releases/20120216/${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="python ruby" + +RDEPEND=">=sys-libs/libsepol-${SEPOL_VER} + ruby? ( $(ruby_implementations_depend) )" +DEPEND="${RDEPEND} + ruby? ( dev-lang/swig ) + python? ( dev-lang/swig )" + +S="${WORKDIR}/${P}" + +pkg_setup() { + if use python; then + python_pkg_setup + fi + + if use ruby; then + ruby-ng_pkg_setup + fi +} + +src_unpack() { + default +} + +src_prepare() { + # fix up paths for multilib + sed -i -e "/^LIBDIR/s/lib/$(get_libdir)/" "${S}/src/Makefile" \ + || die "Fix for multilib LIBDIR failed." + sed -i -e "/^SHLIBDIR/s/lib/$(get_libdir)/" "${S}/src/Makefile" \ + || die "Fix for multilib SHLIBDIR failed." + epatch "${FILESDIR}/${P}-mountsys.patch" +} + +src_compile() { + emake AR="$(tc-getAR)" CC="$(tc-getCC)" LDFLAGS="-fPIC ${LDFLAGS}" all || die + + if use python; then + python_copy_sources src + building() { + emake CC="$(tc-getCC)" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" LDFLAGS="-fPIC ${LDFLAGS}" pywrap + } + python_execute_function -s --source-dir src building + fi + + if use ruby; then + emake CC="$(tc-getCC)" rubywrap || die + fi +} + +src_install() { + emake DESTDIR="${D}" install || die + + if use python; then + installation() { + emake DESTDIR="${D}" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" install-pywrap + } + python_execute_function -s --source-dir src installation + fi + + if use ruby; then + emake DESTDIR="${D}" install-rubywrap || die + fi +} + +pkg_postinst() { + if use python; then + python_mod_optimize selinux + fi +} + +pkg_postrm() { + if use python; then + python_mod_cleanup selinux + fi +} diff --git a/sys-libs/libselinux/metadata.xml b/sys-libs/libselinux/metadata.xml new file mode 100644 index 0000000..0c7f186 --- /dev/null +++ b/sys-libs/libselinux/metadata.xml @@ -0,0 +1,10 @@ + + + + selinux + + Libselinux provides an API for SELinux applications to get and set + process and file security contexts and to obtain security policy + decisions. Required for any applications that use the SELinux API. + +