From abd371ae32d30cb699d35afa28332a771f8fa13e Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Tue, 28 Mar 2006 01:24:32 +0000 Subject: fix install location of python site packages. (Portage version: 2.1_pre7-r2) --- sys-apps/policycoreutils/ChangeLog | 8 +- .../files/digest-policycoreutils-1.30 | 6 - .../files/digest-policycoreutils-1.30-r1 | 6 + .../policycoreutils/policycoreutils-1.30-r1.ebuild | 142 +++++++++++++++++++++ .../policycoreutils/policycoreutils-1.30.ebuild | 131 ------------------- 5 files changed, 155 insertions(+), 138 deletions(-) delete mode 100644 sys-apps/policycoreutils/files/digest-policycoreutils-1.30 create mode 100644 sys-apps/policycoreutils/files/digest-policycoreutils-1.30-r1 create mode 100644 sys-apps/policycoreutils/policycoreutils-1.30-r1.ebuild delete mode 100644 sys-apps/policycoreutils/policycoreutils-1.30.ebuild (limited to 'sys-apps') diff --git a/sys-apps/policycoreutils/ChangeLog b/sys-apps/policycoreutils/ChangeLog index 21f0f8883fbb..a4ec312f991f 100644 --- a/sys-apps/policycoreutils/ChangeLog +++ b/sys-apps/policycoreutils/ChangeLog @@ -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.56 2006/03/18 15:01:24 pebenito Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.57 2006/03/28 01:24:32 pebenito Exp $ + +*policycoreutils-1.30-r1 (28 Mar 2006) + + 28 Mar 2006; Chris PeBenito + -policycoreutils-1.30.ebuild, +policycoreutils-1.30-r1.ebuild: + Fix install location of python site packages. 22 Feb 2006; Stephen Bennett policycoreutils-1.28.ebuild: Alpha stable diff --git a/sys-apps/policycoreutils/files/digest-policycoreutils-1.30 b/sys-apps/policycoreutils/files/digest-policycoreutils-1.30 deleted file mode 100644 index 2081dac9d715..000000000000 --- a/sys-apps/policycoreutils/files/digest-policycoreutils-1.30 +++ /dev/null @@ -1,6 +0,0 @@ -MD5 02a05b3d24483e492bace1a219425567 policycoreutils-1.30.tgz 90544 -RMD160 65b629ce435d86b6103c20ac81b89cabe20b7e69 policycoreutils-1.30.tgz 90544 -SHA256 2e18de7e7915df12ee7079c0e10fae919738c7dfcb58e8b5f1b5f1309b336931 policycoreutils-1.30.tgz 90544 -MD5 8ef85f635b908cbe7bff15cd0661e278 policycoreutils-extra-1.15.tar.bz2 14367 -RMD160 6925c5bd2351567315f056f74f578ccd1b2bd1f9 policycoreutils-extra-1.15.tar.bz2 14367 -SHA256 4de52d774744217036cfcca3c71b20427ee865920e2c83e9e86b736d2f51c6a8 policycoreutils-extra-1.15.tar.bz2 14367 diff --git a/sys-apps/policycoreutils/files/digest-policycoreutils-1.30-r1 b/sys-apps/policycoreutils/files/digest-policycoreutils-1.30-r1 new file mode 100644 index 000000000000..2081dac9d715 --- /dev/null +++ b/sys-apps/policycoreutils/files/digest-policycoreutils-1.30-r1 @@ -0,0 +1,6 @@ +MD5 02a05b3d24483e492bace1a219425567 policycoreutils-1.30.tgz 90544 +RMD160 65b629ce435d86b6103c20ac81b89cabe20b7e69 policycoreutils-1.30.tgz 90544 +SHA256 2e18de7e7915df12ee7079c0e10fae919738c7dfcb58e8b5f1b5f1309b336931 policycoreutils-1.30.tgz 90544 +MD5 8ef85f635b908cbe7bff15cd0661e278 policycoreutils-extra-1.15.tar.bz2 14367 +RMD160 6925c5bd2351567315f056f74f578ccd1b2bd1f9 policycoreutils-extra-1.15.tar.bz2 14367 +SHA256 4de52d774744217036cfcca3c71b20427ee865920e2c83e9e86b736d2f51c6a8 policycoreutils-extra-1.15.tar.bz2 14367 diff --git a/sys-apps/policycoreutils/policycoreutils-1.30-r1.ebuild b/sys-apps/policycoreutils/policycoreutils-1.30-r1.ebuild new file mode 100644 index 000000000000..4bb82fc4a7a0 --- /dev/null +++ b/sys-apps/policycoreutils/policycoreutils-1.30-r1.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-1.30-r1.ebuild,v 1.1 2006/03/28 01:24:32 pebenito Exp $ + +IUSE="build nls pam" + +inherit eutils python + +EXTRAS_VER="1.15" +SEMNG_VER="1.6" + +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-${PV} + !build? ( pam? ( sys-libs/pam ) =sys-libs/libsemanage-${SEMNG_VER}* ) + build? ( sys-apps/baselayout )" + +DEPEND="${RDEPEND} + !build? ( 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} + + epatch ${FILESDIR}/policycoreutils-1.28-quietlp.diff + + # This warning makes no sense, in this context + sed -i -e '/FILE/ s/;/=NULL;/' ${S}/audit2why/audit2why.c \ + || die "audit2why sed failed" + + # fixfiles is extremely dangerous + 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" ${S}/${i}/Makefile \ + || die "${i} Makefile CFLAGS fix failed." + done +} + +src_compile() { + python_version + if useq build; then + einfo "Compiling setfiles" + emake -C ${S}/setfiles || die + else + einfo "Compiling policycoreutils" + emake -C ${S} PYLIBVER="python${PYVER}" || die + einfo "Compiling policycoreutils-extra" + emake -C ${S2} || die + fi +} + +src_install() { + python_version + if useq build; then + dosbin ${S}/setfiles/setfiles + else + einfo "Installing policycoreutils" + make DESTDIR="${D}" -C ${S} PYLIBVER="python${PYVER}" install || die + einfo "Installing policycoreutils-extra" + make DESTDIR="${D}" -C ${S2} install || die + fi + + useq pam || rm -fR ${D}/etc/pam.d +} + +pkg_postinst() { + python_version + + if useq build; then + # need to ensure these + mkdir -p ${ROOT}/selinux + touch ${ROOT}/selinux/.keep + mkdir -p ${ROOT}/sys + touch ${ROOT}/sys/.keep + mkdir -p ${ROOT}/dev/pts + touch ${ROOT}/dev/pts/.keep + chmod 0666 ${ROOT}/dev/{ptmx,tty} + fi + + 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 +} diff --git a/sys-apps/policycoreutils/policycoreutils-1.30.ebuild b/sys-apps/policycoreutils/policycoreutils-1.30.ebuild deleted file mode 100644 index 04caf9b6435f..000000000000 --- a/sys-apps/policycoreutils/policycoreutils-1.30.ebuild +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-1.30.ebuild,v 1.1 2006/03/18 15:01:24 pebenito Exp $ - -IUSE="build nls pam" - -inherit eutils - -EXTRAS_VER="1.15" -SEMNG_VER="1.6" - -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-${PV} - !build? ( pam? ( sys-libs/pam ) =sys-libs/libsemanage-${SEMNG_VER}* ) - build? ( sys-apps/baselayout )" - -DEPEND="${RDEPEND} - !build? ( 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} - - epatch ${FILESDIR}/policycoreutils-1.28-quietlp.diff - - # This warning makes no sense, in this context - sed -i -e '/FILE/ s/;/=NULL;/' ${S}/audit2why/audit2why.c \ - || die "audit2why sed failed" - - # fixfiles is extremely dangerous - 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" ${S}/${i}/Makefile \ - || die "${i} Makefile CFLAGS fix failed." - done -} - -src_compile() { - if useq build; then - einfo "Compiling setfiles" - emake -C ${S}/setfiles || die - else - einfo "Compiling policycoreutils" - emake -C ${S} || die - einfo "Compiling policycoreutils-extra" - emake -C ${S2} || die - fi -} - -src_install() { - if useq build; then - dosbin ${S}/setfiles/setfiles - else - einfo "Installing policycoreutils" - make DESTDIR="${D}" -C ${S} install || die - einfo "Installing policycoreutils-extra" - make DESTDIR="${D}" -C ${S2} install || die - fi - - useq pam || rm -fR ${D}/etc/pam.d -} - -pkg_postinst() { - if useq build; then - # need to ensure these - mkdir -p ${ROOT}/selinux - touch ${ROOT}/selinux/.keep - mkdir -p ${ROOT}/sys - touch ${ROOT}/sys/.keep - mkdir -p ${ROOT}/dev/pts - touch ${ROOT}/dev/pts/.keep - chmod 0666 ${ROOT}/dev/{ptmx,tty} - fi - - throw_pam_warning -} -- cgit v1.2.3-65-gdbad