diff options
author | 2012-05-13 08:47:37 +0000 | |
---|---|---|
committer | 2012-05-13 08:47:37 +0000 | |
commit | bbecb6a3ebf541167fb049525839399659c70d1e (patch) | |
tree | 3cd48bd1a7f0ef6a5bade0fb27f78d27c32f2076 /sys-libs | |
parent | Don't try to install nonexistent docs. #415703 (diff) | |
download | historical-bbecb6a3ebf541167fb049525839399659c70d1e.tar.gz historical-bbecb6a3ebf541167fb049525839399659c70d1e.tar.bz2 historical-bbecb6a3ebf541167fb049525839399659c70d1e.zip |
Mount /sys before /sys/fs/selinux, bug #414779
Package-Manager: portage-2.1.10.49/cvs/Linux x86_64
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/libselinux/ChangeLog | 9 | ||||
-rw-r--r-- | sys-libs/libselinux/Manifest | 4 | ||||
-rw-r--r-- | sys-libs/libselinux/files/libselinux-2.1.9-mountsys.patch | 22 | ||||
-rw-r--r-- | sys-libs/libselinux/libselinux-2.1.9-r1.ebuild | 85 |
4 files changed, 118 insertions, 2 deletions
diff --git a/sys-libs/libselinux/ChangeLog b/sys-libs/libselinux/ChangeLog index 9e153f76c15b..8418438aa044 100644 --- a/sys-libs/libselinux/ChangeLog +++ b/sys-libs/libselinux/ChangeLog @@ -1,6 +1,13 @@ # 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.78 2012/04/29 10:06:56 swift Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.79 2012/05/13 08:47:37 swift Exp $ + +*libselinux-2.1.9-r1 (13 May 2012) + + 13 May 2012; <swift@gentoo.org> +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; <swift@gentoo.org> libselinux-2.1.9.ebuild: Stabilization diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest index 59e4401d2a59..e2e464d1ee77 100644 --- a/sys-libs/libselinux/Manifest +++ b/sys-libs/libselinux/Manifest @@ -1,6 +1,8 @@ +AUX libselinux-2.1.9-mountsys.patch 957 RMD160 247d5db26adc1b15a3a713e77ad8a03c6f4f17c5 SHA1 04af1b107967483406f8458e23d415fe43f5bc93 SHA256 ab2c728464411d3d44d19afe79ebcfa0f7d69445245a505e330cf051ea65ed35 DIST libselinux-2.1.0.tar.gz 213096 RMD160 66571ce6e4d9faf2a6ea71d00ba737855336b46a SHA1 008ae265ef52d76bdb8b746c35d8221dc1b9ecfa SHA256 fbc4911c1103b00b0530ed21d1004ffa8c661342e1101ccf4c73a573f89f9caf DIST libselinux-2.1.9.tar.gz 155840 RMD160 4c83662a70076c0a73653f79c20b5faf7c7b60d6 SHA1 127925f0bb4fced9e6ba965290c390dad2554bcc SHA256 749d4b39c80aa9df8247b8b3187ab72442c0dbad6e70bf312e25052bd4e7063f EBUILD libselinux-2.1.0.ebuild 1914 RMD160 da26bee3295b557bba1b3ed34145cebb08dd4dd9 SHA1 e79cc60a777fc9f3284695dfd67ad1f3477f722e SHA256 f239060f1624b6bd565f38ccde08c5a9d6885a551f1a18b11e55761e19249ba1 +EBUILD libselinux-2.1.9-r1.ebuild 2065 RMD160 de5494b4f2f0df396a47e5624e0df6c95c152661 SHA1 296c08f8d610dfb86a1eab27ee4c7ada9e73e5ec SHA256 61265988640ff84d58427fb2435115cef32f82fc1ac9e090450b77523c342683 EBUILD libselinux-2.1.9.ebuild 2011 RMD160 918b72d1758ece33c756dbecc532458e87528753 SHA1 9ba24855c569b43edc591275ca20b26ab10b0ca8 SHA256 d235718296eacbe0bef82473d3f36e97352271b9ea150cf0f87c4e5d7fa3e588 -MISC ChangeLog 11000 RMD160 99c8eb8b9cd89bed360f64971659b209b3fbdbce SHA1 4dc1e6f6b6b282f4e99a0b6eb05ca5a23c5ea665 SHA256 79437bd4f3db5a29a2b1cd602455e8001b8e898d67a92cc12a1f5f20dbb9ba37 +MISC ChangeLog 11247 RMD160 f48cef0a4afa7c14e9f9c2c6bab87e8e50fba07e SHA1 3b62b924c4d2666dbc05edab21a3d791a861e8ea SHA256 481391ee73249ba2edc9bca42bebcc806a7ea330cf381b3c9995e0b6f1615733 MISC metadata.xml 406 RMD160 206a8a3216e1102fdc918b8d677da264d37f664b SHA1 ad34bedefb6cfc94938b161154a2c0860b988019 SHA256 934da6149d008c09754c0654dbea6c49da117923adc6fbf3fcabac58195b9c45 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 000000000000..f2a206d1f1ae --- /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-r1.ebuild b/sys-libs/libselinux/libselinux-2.1.9-r1.ebuild new file mode 100644 index 000000000000..629dd03427f3 --- /dev/null +++ b/sys-libs/libselinux/libselinux-2.1.9-r1.ebuild @@ -0,0 +1,85 @@ +# 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.1 2012/05/13 08:47:37 swift Exp $ + +EAPI="4" +PYTHON_DEPEND="python? *" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="*-jython" + +inherit multilib python toolchain-funcs eutils + +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? ( dev-lang/ruby )" +DEPEND="${RDEPEND} + ruby? ( dev-lang/swig ) + python? ( dev-lang/swig )" + +pkg_setup() { + if use python; then + python_pkg_setup + fi +} + +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 +} |