summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2011-02-05 11:23:24 +0000
committerAnthony G. Basile <blueness@gentoo.org>2011-02-05 11:23:24 +0000
commitb3c56ff23ef0e42c3f41e91c109709751d4aeb55 (patch)
tree47368ee6a08f0b50b4ea31521b4a7bf7a6b8c46d /sys-apps/policycoreutils
parentstable x86, bug 353642 (diff)
downloadgentoo-2-b3c56ff23ef0e42c3f41e91c109709751d4aeb55.tar.gz
gentoo-2-b3c56ff23ef0e42c3f41e91c109709751d4aeb55.tar.bz2
gentoo-2-b3c56ff23ef0e42c3f41e91c109709751d4aeb55.zip
Fixed bug #300613
(Portage version: 2.1.9.25/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/policycoreutils')
-rw-r--r--sys-apps/policycoreutils/ChangeLog11
-rw-r--r--sys-apps/policycoreutils/files/policycoreutils-2.0.69-setfiles.diff12
-rw-r--r--sys-apps/policycoreutils/policycoreutils-2.0.69-r2.ebuild105
3 files changed, 126 insertions, 2 deletions
diff --git a/sys-apps/policycoreutils/ChangeLog b/sys-apps/policycoreutils/ChangeLog
index ca02dd767ae4..f546a1630e64 100644
--- a/sys-apps/policycoreutils/ChangeLog
+++ b/sys-apps/policycoreutils/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/policycoreutils
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.77 2010/04/04 21:56:32 arfrever Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.78 2011/02/05 11:23:24 blueness Exp $
+
+*policycoreutils-2.0.69-r2 (05 Feb 2011)
+
+ 05 Feb 2011; Anthony G. Basile <blueness@gentoo.org>
+ +policycoreutils-2.0.69-r2.ebuild,
+ +files/policycoreutils-2.0.69-setfiles.diff:
+ Fixed bug #300613
04 Apr 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
policycoreutils-2.0.55.ebuild, policycoreutils-2.0.69.ebuild,
diff --git a/sys-apps/policycoreutils/files/policycoreutils-2.0.69-setfiles.diff b/sys-apps/policycoreutils/files/policycoreutils-2.0.69-setfiles.diff
new file mode 100644
index 000000000000..7ad233df7f28
--- /dev/null
+++ b/sys-apps/policycoreutils/files/policycoreutils-2.0.69-setfiles.diff
@@ -0,0 +1,12 @@
+*** setfiles/setfiles.c 2010-12-03 23:49:12.372000001 +0000
+--- setfiles/setfiles.c 2010-12-03 01:21:09.435000002 +0000
+***************
+*** 12,17 ****
+--- 12,18 ----
+ #include <regex.h>
+ #include <sys/vfs.h>
+ #include <sys/utsname.h>
++#include <sys/stat.h>
+ #define __USE_XOPEN_EXTENDED 1 /* nftw */
+ #define SKIP -2
+ #define ERR -1
diff --git a/sys-apps/policycoreutils/policycoreutils-2.0.69-r2.ebuild b/sys-apps/policycoreutils/policycoreutils-2.0.69-r2.ebuild
new file mode 100644
index 000000000000..1d04b6916c65
--- /dev/null
+++ b/sys-apps/policycoreutils/policycoreutils-2.0.69-r2.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.0.69-r2.ebuild,v 1.1 2011/02/05 11:23:24 blueness Exp $
+
+IUSE="nls"
+
+inherit eutils python
+
+EXTRAS_VER="1.20"
+SEMNG_VER="2.0.33"
+SELNX_VER="2.0"
+
+BUGFIX_PATCH="${FILESDIR}/policycoreutils-2.0.69-setfiles.diff"
+
+DESCRIPTION="SELinux core utilities"
+HOMEPAGE="http://userspace.selinuxproject.org"
+SRC_URI="http://userspace.selinuxproject.org/releases/current/devel/${P}.tar.gz
+ mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+COMMON_DEPS=">=sys-libs/libselinux-${SELNX_VER}
+ >=sys-libs/glibc-2.4
+ >=sys-process/audit-1.5.1
+ >=sys-libs/libcap-1.10-r10
+ sys-libs/pam
+ >=sys-libs/libsemanage-${SEMNG_VER}"
+
+# pax-utils for scanelf used by rlpkg
+RDEPEND="${COMMON_DEPS}
+ dev-python/sepolgen
+ app-misc/pax-utils"
+
+DEPEND="${COMMON_DEPS}
+ nls? ( sys-devel/gettext )"
+
+S2=${WORKDIR}/policycoreutils-extra
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ [ ! -z "${BUGFIX_PATCH}" ] && epatch "${BUGFIX_PATCH}"
+
+ # rlpkg is more useful than fixfiles
+ sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
+ || die "fixfiles sed 1 failed"
+ sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
+ || die "fixfiles sed 2 failed"
+
+ local SUBDIRS="`cd ${S} && find -type d | cut -d/ -f2`"
+
+ if ! useq nls; then
+ for i in ${SUBDIRS}; do
+ # disable locale stuff
+ sed -i -e s/-DUSE_NLS// "${S}/${i}/Makefile" \
+ || die "${i} NLS sed failed"
+ done
+ fi
+
+ # Gentoo Fixes
+ for i in ${SUBDIRS}; do
+ # add in CFLAGS
+ sed -i -e "s:-Wall:-Wall ${CFLAGS}:g" "${S}/${i}/Makefile" \
+ || die "${i} Makefile CFLAGS fix failed."
+ done
+}
+
+src_compile() {
+ einfo "Compiling policycoreutils"
+ emake -C "${S}" PYLIBVER="python$(python_get_version)" AUDIT_LOG_PRIV=y || die
+ einfo "Compiling policycoreutils-extra"
+ emake -C "${S2}" || die
+}
+
+src_install() {
+ python_need_rebuild
+
+ einfo "Installing policycoreutils"
+ make DESTDIR="${D}" -C "${S}" PYLIBVER="python$(python_get_version)" AUDIT_LOG_PRIV=y install || die
+ einfo "Installing policycoreutils-extra"
+ make DESTDIR="${D}" -C "${S2}" install || die
+
+ # remove redhat-style init script
+ rm -fR "${D}/etc/rc.d"
+
+ # compatibility symlinks
+ dosym /sbin/setfiles /usr/sbin/setfiles
+ dosym /lib/rc/runscript_selinux.so /lib/rcscripts/runscript_selinux.so
+
+ if has_version '<sys-libs/pam-0.99'; then
+ # install compat pam.d entries
+ # for older pam
+ make DESTDIR="${D}" -C "${S2}/pam.d" install || die
+ fi
+}
+
+pkg_postinst() {
+ python_mod_optimize $(python_get_sitedir)
+}
+
+pkg_postrm() {
+ python_mod_cleanup $(python_get_sitedir)
+}