New upstream release.
authorChris PeBenito <pebenito@gentoo.org>
Thu, 15 Feb 2007 05:29:57 +0000 (05:29 +0000)
committerChris PeBenito <pebenito@gentoo.org>
Thu, 15 Feb 2007 05:29:57 +0000 (05:29 +0000)
Package-Manager: portage-2.1.2-r9

sys-apps/checkpolicy/ChangeLog
sys-apps/checkpolicy/checkpolicy-1.34.0.ebuild [new file with mode: 0644]
sys-apps/checkpolicy/files/digest-checkpolicy-1.28
sys-apps/checkpolicy/files/digest-checkpolicy-1.34.0 [new file with mode: 0644]
sys-apps/policycoreutils/ChangeLog
sys-apps/policycoreutils/files/digest-policycoreutils-1.34.1 [new file with mode: 0644]
sys-apps/policycoreutils/policycoreutils-1.34.1.ebuild [new file with mode: 0644]

index 979510a9081d29db446a184061c8396cf63f42ef..9bbfdff6004de7a592a6e53e1dfd33a2730f12de 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for sys-apps/checkpolicy
-# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/checkpolicy/ChangeLog,v 1.41 2006/10/05 06:24:54 pebenito Exp $
+# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/checkpolicy/ChangeLog,v 1.42 2007/02/15 05:27:51 pebenito Exp $
+
+*checkpolicy-1.34.0 (15 Feb 2007)
+
+  15 Feb 2007; Chris PeBenito <pebenito@gentoo.org>
+  +checkpolicy-1.34.0.ebuild:
+  New upstream release.
 
 *checkpolicy-1.30.12 (05 Oct 2006)
 
diff --git a/sys-apps/checkpolicy/checkpolicy-1.34.0.ebuild b/sys-apps/checkpolicy/checkpolicy-1.34.0.ebuild
new file mode 100644 (file)
index 0000000..6aa5ec7
--- /dev/null
@@ -0,0 +1,46 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/checkpolicy/checkpolicy-1.34.0.ebuild,v 1.1 2007/02/15 05:27:51 pebenito Exp $
+
+IUSE="debug"
+
+inherit eutils
+
+SEMNG_VER="1.10"
+
+# BUGFIX_PATCH="${FILESDIR}/checkpolicy-1.30.4.diff"
+
+DESCRIPTION="SELinux policy compiler"
+HOMEPAGE="http://www.nsa.gov/selinux"
+SRC_URI="http://www.nsa.gov/selinux/archives/${P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~mips ~ppc ~sparc ~x86"
+
+DEPEND="=sys-libs/libsemanage-${SEMNG_VER}*
+       sys-devel/flex
+       sys-devel/bison"
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+
+       [ ! -z "${BUGFIX_PATCH}" ] && epatch "${BUGFIX_PATCH}"
+}
+
+src_compile() {
+       cd ${S}
+       emake YACC="bison -y" || die
+}
+
+src_install() {
+       make DESTDIR="${D}" install
+
+       if useq debug; then
+               dobin ${S}/test/{dismod,dispol}
+       fi
+}
+
+pkg_postinst() {
+       einfo "This checkpolicy can compile version `checkpolicy -V |cut -f 1 -d ' '` policy."
+}
index ad66d5f7e213221b9ce9b50fc689a60aabe6d55f..662b0f7aa030a32c37f1f86a8a17cd333a7ef0dc 100644 (file)
@@ -1 +1,3 @@
 MD5 f74b79f44c6c39191ab67bd04c977851 checkpolicy-1.28.tgz 56473
+RMD160 cb19f41fe9196e1db2d41eecec7f851517875d10 checkpolicy-1.28.tgz 56473
+SHA256 e8e9111830b9c9e817a19fb72bdd6d393ae29e2d777f939119e95a376788523d checkpolicy-1.28.tgz 56473
diff --git a/sys-apps/checkpolicy/files/digest-checkpolicy-1.34.0 b/sys-apps/checkpolicy/files/digest-checkpolicy-1.34.0
new file mode 100644 (file)
index 0000000..4bcc2a8
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 e19bb29db50955fbae60c4cdb569c658 checkpolicy-1.34.0.tgz 56473
+RMD160 bf537ae61389487e6aa181517d5d64fd5b975cc6 checkpolicy-1.34.0.tgz 56473
+SHA256 c870534ef0c8aa5ab61fada4a8e19d4988a31e1c5023876b8db701bd13f71f06 checkpolicy-1.34.0.tgz 56473
index d641b1ab608f1b04f610d68803650997ec58919e..5369831656ababc586d2fef73cb678229c1a6861 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for sys-apps/policycoreutils
-# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.61 2006/10/24 00:12:29 pebenito Exp $
+# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.62 2007/02/15 05:29:57 pebenito Exp $
+
+*policycoreutils-1.34.1 (15 Feb 2007)
+
+  15 Feb 2007; Chris PeBenito <pebenito@gentoo.org>
+  +policycoreutils-1.34.1.ebuild:
+  New upstream release.
 
   24 Oct 2006; Chris PeBenito <pebenito@gentoo.org>
   policycoreutils-1.30.30.ebuild:
diff --git a/sys-apps/policycoreutils/files/digest-policycoreutils-1.34.1 b/sys-apps/policycoreutils/files/digest-policycoreutils-1.34.1
new file mode 100644 (file)
index 0000000..be93b0b
--- /dev/null
@@ -0,0 +1,6 @@
+MD5 0093c79c019be901123f8045cea60417 policycoreutils-1.34.1.tgz 294929
+RMD160 cfe78de6dd6e0074be389170ed8b45f253029efa policycoreutils-1.34.1.tgz 294929
+SHA256 7530f193054fbcc803d1f7153973736919bc300ccfaf401e65302839b914fffe policycoreutils-1.34.1.tgz 294929
+MD5 d60e4419b9eb8001554574ea3bc8fa4f policycoreutils-extra-1.17.tar.bz2 17034
+RMD160 bf613e08ee1b032390ee588c77a5b1b1d7a50695 policycoreutils-extra-1.17.tar.bz2 17034
+SHA256 a4ffc80381ddf1e7d5fe8a537cf83af2338d9e0a8e9103ba73fe77bc17b92ca7 policycoreutils-extra-1.17.tar.bz2 17034
diff --git a/sys-apps/policycoreutils/policycoreutils-1.34.1.ebuild b/sys-apps/policycoreutils/policycoreutils-1.34.1.ebuild
new file mode 100644 (file)
index 0000000..600f3a8
--- /dev/null
@@ -0,0 +1,146 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-1.34.1.ebuild,v 1.1 2007/02/15 05:29:57 pebenito Exp $
+
+IUSE="nls pam"
+
+inherit eutils python
+
+EXTRAS_VER="1.17"
+SEMNG_VER="1.10"
+SELNX_VER="1.34"
+
+# BUGFIX_PATCH="${FILESDIR}/policycoreutils-1.30.6.diff"
+
+DESCRIPTION="SELinux core utilities"
+HOMEPAGE="http://www.nsa.gov/selinux"
+SRC_URI="http://www.nsa.gov/selinux/archives/${P}.tgz
+       mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~mips ~ppc ~sparc ~x86"
+
+RDEPEND=">=sys-libs/libselinux-${SELNX_VER}
+       >=sys-libs/glibc-2.4
+       pam? ( sys-libs/pam )
+       =sys-libs/libsemanage-${SEMNG_VER}*"
+
+DEPEND="${RDEPEND}
+       nls? ( sys-devel/gettext )"
+
+S2=${WORKDIR}/policycoreutils-extra
+
+throw_pam_warning() {
+       # this is an extremely important message that needs to be seen
+       # thus it being shown at the beginning and end of the ebuild
+
+       if ! useq pam; then
+               eerror "PAM is disabled.  This is not a supported config for"
+               eerror "general use.  Disabling PAM decreases security with"
+               eerror "respect to SELinux protection of authentication."
+               eerror "It also requires policy changes."
+               ebeep 4
+               epause 4
+       fi
+}
+
+pkg_setup() {
+       throw_pam_warning
+}
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+
+       [ ! -z "${BUGFIX_PATCH}" ] && epatch "${BUGFIX_PATCH}"
+
+       # This warning makes no sense, in this context
+       sed -i -e '/FILE/ s/;/=NULL;/' ${S}/audit2why/audit2why.c \
+               || die "audit2why sed failed"
+
+       # 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"
+
+       if ! useq pam; then
+               # disable pam
+               sed -i -e s/-lpam/-lcrypt/ -e s/-lpam_misc// -e s/-DUSE_PAM// \
+                       ${S}/run_init/Makefile || die "PAM sed 1 failed"
+               sed -i -e s/-lpam/-lcrypt/ -e s/-lpam_misc// -e s/-DUSE_PAM// \
+                       ${S}/newrole/Makefile || die "PAM sed 2 failed"
+               sed -i -e s/-lpam/-lcrypt/ -e s/-lpam_misc// -e s/-DUSE_PAM// \
+                       ${S2}/src/Makefile || die "PAM sed 3 failed"
+       fi
+
+       if ! useq nls; then
+               # disable locale stuff
+               sed -i -e s/-DUSE_NLS// ${S}/run_init/Makefile \
+                       || die "NLS sed 1 failed"
+               sed -i -e s/-DUSE_NLS// ${S}/newrole/Makefile \
+                       || die "NLS sed 2 failed"
+               sed -i -e s/-DUSE_NLS// ${S}/load_policy/Makefile \
+                       || die "NLS sed 3 failed"
+               sed -i -e 's/ po //' ${S}/Makefile \
+                       || die "NLS sed 4 failed"
+       fi
+
+       # fix up to accept Gentoo CFLAGS
+       local SUBDIRS="`cd ${S} && find -type d | cut -d/ -f2`"
+       for i in ${SUBDIRS}; do
+               sed -i -e "s:-Wall:-Wall ${CFLAGS}:g" \
+                       -e '/^AUDITH/d' \
+                       ${S}/${i}/Makefile \
+                       || die "${i} Makefile CFLAGS fix failed."
+
+               # disable audit support because the required version
+               # in portage does not exist yet
+       done
+}
+
+src_compile() {
+       python_version
+
+       einfo "Compiling policycoreutils"
+       emake -C ${S} PYLIBVER="python${PYVER}" || die
+       einfo "Compiling policycoreutils-extra"
+       emake -C ${S2} || die
+}
+
+src_install() {
+       python_version
+
+       einfo "Installing policycoreutils"
+       make DESTDIR="${D}" -C ${S} PYLIBVER="python${PYVER}" 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 symlink
+       dosym /sbin/setfiles /usr/sbin/setfiles
+
+       if ! useq pam; then
+               rm -fR ${D}/etc/pam.d
+       else
+               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
+       fi                      
+}
+
+pkg_postinst() {
+       python_version
+       python_mod_optimize ${ROOT}usr/lib/python${PYVER}/site-packages
+
+       throw_pam_warning
+}
+
+pkg_postrm() {
+       python_version
+       python_mod_cleanup ${ROOT}usr/lib/python${PYVER}/site-packages
+}