summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris PeBenito <pebenito@gentoo.org>2005-01-04 01:11:35 +0000
committerChris PeBenito <pebenito@gentoo.org>2005-01-04 01:11:35 +0000
commit5004539de0a1bea86cf23dc5bd92fbc80cd6a300 (patch)
tree7002de2d2f0c64b5cc0c2263436e0d0bcc7ff34e /sys-apps/policycoreutils
parentswitch over to libc virtual (diff)
downloadhistorical-5004539de0a1bea86cf23dc5bd92fbc80cd6a300.tar.gz
historical-5004539de0a1bea86cf23dc5bd92fbc80cd6a300.tar.bz2
historical-5004539de0a1bea86cf23dc5bd92fbc80cd6a300.zip
updates for embedded systems
Diffstat (limited to 'sys-apps/policycoreutils')
-rw-r--r--sys-apps/policycoreutils/ChangeLog10
-rw-r--r--sys-apps/policycoreutils/Manifest17
-rw-r--r--sys-apps/policycoreutils/files/digest-policycoreutils-1.182
-rw-r--r--sys-apps/policycoreutils/files/digest-policycoreutils-1.18-r12
-rw-r--r--sys-apps/policycoreutils/files/policycoreutils-nonls.diff150
-rw-r--r--sys-apps/policycoreutils/policycoreutils-1.18-r1.ebuild128
-rw-r--r--sys-apps/policycoreutils/policycoreutils-1.18.ebuild81
7 files changed, 302 insertions, 88 deletions
diff --git a/sys-apps/policycoreutils/ChangeLog b/sys-apps/policycoreutils/ChangeLog
index 7f600ecafa75..b25cd33c1659 100644
--- a/sys-apps/policycoreutils/ChangeLog
+++ b/sys-apps/policycoreutils/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/policycoreutils
-# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.37 2004/11/23 00:42:08 pebenito Exp $
+# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v 1.38 2005/01/04 01:11:35 pebenito Exp $
+
+*policycoreutils-1.18-r1 (03 Jan 2005)
+
+ 03 Jan 2005; Chris PeBenito <pebenito@gentoo.org>
+ +files/policycoreutils-nonls.diff, +policycoreutils-1.18-r1.ebuild:
+ Make pam and nls optional for embedded systems use.
22 Nov 2004; Chris PeBenito <pebenito@gentoo.org>
policycoreutils-1.18.ebuild:
diff --git a/sys-apps/policycoreutils/Manifest b/sys-apps/policycoreutils/Manifest
index 02ef145b59d1..f45ea6390236 100644
--- a/sys-apps/policycoreutils/Manifest
+++ b/sys-apps/policycoreutils/Manifest
@@ -1,7 +1,18 @@
-MD5 0010091d172d2328cc40e7ffea493b77 ChangeLog 5794
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 64ec0a59aff25cac6557c7ed20439c82 ChangeLog 6011
MD5 2eeb1df30e87ba2861eddbdc34a48bb8 metadata.xml 836
+MD5 b4e7ffca2885906d5ba0643ea4a9f1b7 policycoreutils-1.18-r1.ebuild 3388
MD5 6ace8ffd9877d971422974d8a7a64252 policycoreutils-1.16.ebuild 1772
-MD5 538e0850edbda5a8eb2bf25c3d005625 policycoreutils-1.18.ebuild 1972
MD5 b3fb897ca820d6d94105ecf7103cab70 files/digest-policycoreutils-1.16 144
MD5 308dfedc40a02c48b8cc5118feb8f9ef files/policycoreutils-1.16-genhomedircon-compat.diff 1744
-MD5 2dbe913419502995a710560072ca8517 files/digest-policycoreutils-1.18 145
+MD5 b6b925cfe77dec139f161917b9837e63 files/policycoreutils-nonls.diff 5207
+MD5 62eac355bd774e69b2ced7cdaf4d9c4d files/digest-policycoreutils-1.18-r1 145
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.2.6 (GNU/Linux)
+
+iD8DBQFB2e0DMTuwkQ6eEKsRAqZqAJ4xOXm9mHoSwZWzzVUhbKi5MPzUNQCfW1ez
+JeRST6K6h30rIIV/mp6c9Ic=
+=sKlK
+-----END PGP SIGNATURE-----
diff --git a/sys-apps/policycoreutils/files/digest-policycoreutils-1.18 b/sys-apps/policycoreutils/files/digest-policycoreutils-1.18
deleted file mode 100644
index 97731175c5f6..000000000000
--- a/sys-apps/policycoreutils/files/digest-policycoreutils-1.18
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 5bba6fb1c02f9d3aba37cb55f3aebd64 policycoreutils-1.18.tgz 46806
-MD5 391576de7edab55e72f8234f245e214f policycoreutils-extra-1.9.tar.bz2 10700
diff --git a/sys-apps/policycoreutils/files/digest-policycoreutils-1.18-r1 b/sys-apps/policycoreutils/files/digest-policycoreutils-1.18-r1
new file mode 100644
index 000000000000..e87fd70f02f1
--- /dev/null
+++ b/sys-apps/policycoreutils/files/digest-policycoreutils-1.18-r1
@@ -0,0 +1,2 @@
+MD5 5bba6fb1c02f9d3aba37cb55f3aebd64 policycoreutils-1.18.tgz 46806
+MD5 776c1f9780d8ab846ff45a843a588915 policycoreutils-extra-1.10.tar.bz2 9804
diff --git a/sys-apps/policycoreutils/files/policycoreutils-nonls.diff b/sys-apps/policycoreutils/files/policycoreutils-nonls.diff
new file mode 100644
index 000000000000..3bab250c06cb
--- /dev/null
+++ b/sys-apps/policycoreutils/files/policycoreutils-nonls.diff
@@ -0,0 +1,150 @@
+Index: load_policy/Makefile
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-usr/policycoreutils/load_policy/Makefile,v
+retrieving revision 1.6
+diff -u -r1.6 Makefile
+--- load_policy/Makefile 13 Aug 2004 17:19:09 -0000 1.6
++++ load_policy/Makefile 20 Dec 2004 03:19:51 -0000
+@@ -5,7 +5,7 @@
+ LOCALEDIR ?= /usr/share/locale
+
+ CFLAGS = -Wall
+-override CFLAGS += -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
++override CFLAGS += -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
+ LDLIBS += -lsepol -lselinux
+
+ TARGETS=$(patsubst %.c,%,$(wildcard *.c))
+Index: load_policy/load_policy.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-usr/policycoreutils/load_policy/load_policy.c,v
+retrieving revision 1.8
+diff -u -r1.8 load_policy.c
+--- load_policy/load_policy.c 26 Aug 2004 17:15:39 -0000 1.8
++++ load_policy/load_policy.c 20 Dec 2004 03:19:52 -0000
+@@ -10,9 +10,13 @@
+ #include <getopt.h>
+ #include <selinux/selinux.h>
+ #include <sepol/sepol.h>
++#ifdef USE_NLS
+ #include <locale.h> /* for setlocale() */
+ #include <libintl.h> /* for gettext() */
+ #define _(msgid) gettext (msgid)
++#else
++#define _(msgid) (msgid)
++#endif
+ #ifndef PACKAGE
+ #define PACKAGE "policycoreutils" /* the name of this package lang translation */
+ #endif
+@@ -30,9 +34,11 @@
+ void *map;
+ char *polpath, *boolpath = NULL, **names;
+
++#ifdef USE_NLS
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
++#endif
+
+ while ((opt = getopt(argc, argv, "qb")) > 0) {
+ switch (opt) {
+Index: newrole/Makefile
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-usr/policycoreutils/newrole/Makefile,v
+retrieving revision 1.4
+diff -u -r1.4 Makefile
+--- newrole/Makefile 26 Nov 2003 18:01:24 -0000 1.4
++++ newrole/Makefile 20 Dec 2004 03:19:52 -0000
+@@ -6,7 +6,7 @@
+ LOCALEDIR = /usr/share/locale
+
+ CFLAGS = -Wall
+-override CFLAGS += -DUSE_PAM -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
++override CFLAGS += -DUSE_NLS -DUSE_PAM -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
+ LDLIBS += -lselinux -ldl -lpam -lpam_misc
+
+ TARGETS=$(patsubst %.c,%,$(wildcard *.c))
+Index: newrole/newrole.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-usr/policycoreutils/newrole/newrole.c,v
+retrieving revision 1.4
+diff -u -r1.4 newrole.c
+--- newrole/newrole.c 12 Aug 2004 13:58:10 -0000 1.4
++++ newrole/newrole.c 20 Dec 2004 03:19:52 -0000
+@@ -64,9 +64,13 @@
+ #include <selinux/get_default_type.h>
+ #include <selinux/get_context_list.h> /* for SELINUX_DEFAULTUSER */
+ #include <signal.h>
++#ifdef USE_NLS
+ #include <locale.h> /* for setlocale() */
+ #include <libintl.h> /* for gettext() */
+ #define _(msgid) gettext (msgid)
++#else
++#define _(msgid) (msgid)
++#endif
+ #ifndef PACKAGE
+ #define PACKAGE "policycoreutils" /* the name of this package lang translation */
+ #endif
+@@ -265,9 +269,11 @@
+ /* Terminate on SIGHUP. */
+ signal(SIGHUP, SIG_DFL);
+
++#ifdef USE_NLS
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
++#endif
+
+ /*
+ *
+Index: run_init/Makefile
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-usr/policycoreutils/run_init/Makefile,v
+retrieving revision 1.4
+diff -u -r1.4 Makefile
+--- run_init/Makefile 26 Nov 2003 18:01:25 -0000 1.4
++++ run_init/Makefile 20 Dec 2004 03:19:52 -0000
+@@ -7,7 +7,7 @@
+ LOCALEDIR ?= /usr/share/locale
+
+ CFLAGS = -Wall
+-override CFLAGS += -DUSE_PAM -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
++override CFLAGS += -DUSE_NLS -DUSE_PAM -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
+ LDLIBS += -lselinux -ldl -lpam -lpam_misc
+
+ TARGETS=$(patsubst %.c,%,$(wildcard *.c))
+Index: run_init/run_init.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-usr/policycoreutils/run_init/run_init.c,v
+retrieving revision 1.4
+diff -u -r1.4 run_init.c
+--- run_init/run_init.c 17 Jun 2004 16:43:42 -0000 1.4
++++ run_init/run_init.c 20 Dec 2004 03:19:53 -0000
+@@ -49,10 +49,14 @@
+ #include <selinux/context.h> /* for context-mangling functions */
+ #include <fcntl.h>
+ #include <ctype.h>
++#include <limits.h>
++#ifdef USE_NLS
+ #include <libintl.h>
+ #include <locale.h>
+-#include <limits.h>
+ #define _(msgid) gettext (msgid)
++#else
++#define _(msgid) (msgid)
++#endif
+ #ifndef PACKAGE
+ #define PACKAGE "policycoreutils" /* the name of this package lang translation */
+ #endif
+@@ -314,9 +318,12 @@
+ extern char *optarg; /* used by getopt() for arg strings */
+ extern int opterr; /* controls getopt() error messages */
+ security_context_t new_context; /* context for the init script context */
++
++#ifdef USE_NLS
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
++#endif
+
+ /* Verify that we are running on a flask-enabled kernel. */
+ if( !is_selinux_enabled() ) {
diff --git a/sys-apps/policycoreutils/policycoreutils-1.18-r1.ebuild b/sys-apps/policycoreutils/policycoreutils-1.18-r1.ebuild
new file mode 100644
index 000000000000..100c150e5a8f
--- /dev/null
+++ b/sys-apps/policycoreutils/policycoreutils-1.18-r1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-1.18-r1.ebuild,v 1.1 2005/01/04 01:11:35 pebenito Exp $
+
+IUSE="build nls pam"
+
+inherit eutils
+
+EXTRAS_VER="1.10"
+SEPOL_VER="1.2"
+
+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="~x86 ~ppc ~sparc ~amd64"
+
+RDEPEND=">=sys-libs/libselinux-${PV}
+ !build? ( pam? ( sys-libs/pam ) >=sys-libs/libsepol-${SEPOL_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}
+
+ # patch in code for nls option
+ epatch ${FILESDIR}/policycoreutils-nonls.diff
+
+ # 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
+}
diff --git a/sys-apps/policycoreutils/policycoreutils-1.18.ebuild b/sys-apps/policycoreutils/policycoreutils-1.18.ebuild
deleted file mode 100644
index 117ab67cbb6a..000000000000
--- a/sys-apps/policycoreutils/policycoreutils-1.18.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-1.18.ebuild,v 1.3 2004/11/23 00:42:08 pebenito Exp $
-
-IUSE="build"
-
-inherit eutils
-
-EXTRAS_VER="1.9"
-SEPOL_VER="1.2"
-
-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="~x86 ~ppc ~sparc ~amd64"
-
-DEPEND=">=sys-libs/libselinux-${PV}
- >=sys-libs/libsepol-${SEPOL_VER}
- sys-devel/gettext
- !build? ( sys-libs/pam )
- build? ( sys-apps/baselayout )"
-
-S2=${WORKDIR}/policycoreutils-extra
-
-src_unpack() {
- unpack ${A}
-
- cd ${S}
-
- # dont install fixfiles cron script
- 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"
-
- # 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 use 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 use 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
-}
-
-pkg_postinst() {
- if use 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
-}