summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris PeBenito <pebenito@gentoo.org>2003-07-13 21:06:52 +0000
committerChris PeBenito <pebenito@gentoo.org>2003-07-13 21:06:52 +0000
commitd47d6efa80fad499e0fa8bf606f8709463d2e500 (patch)
tree8c5b3fe52510e0d8492cdb2fc177edefce2cf316 /sys-apps
parentmask for testing new selinux-small release (diff)
downloadhistorical-d47d6efa80fad499e0fa8bf606f8709463d2e500.tar.gz
historical-d47d6efa80fad499e0fa8bf606f8709463d2e500.tar.bz2
historical-d47d6efa80fad499e0fa8bf606f8709463d2e500.zip
new upstream release
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/selinux-small/ChangeLog8
-rw-r--r--sys-apps/selinux-small/Manifest7
-rw-r--r--sys-apps/selinux-small/files/digest-selinux-small-20030711061
-rw-r--r--sys-apps/selinux-small/files/selinux-small-2003071106-gentoo.diff206
-rw-r--r--sys-apps/selinux-small/selinux-small-2003071106.ebuild175
5 files changed, 394 insertions, 3 deletions
diff --git a/sys-apps/selinux-small/ChangeLog b/sys-apps/selinux-small/ChangeLog
index c41f2431ef4c..3e9ddb6ed63b 100644
--- a/sys-apps/selinux-small/ChangeLog
+++ b/sys-apps/selinux-small/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/selinux-small
# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/selinux-small/ChangeLog,v 1.24 2003/07/04 01:41:04 pebenito Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/selinux-small/ChangeLog,v 1.25 2003/07/13 21:06:48 pebenito Exp $
+
+*selinux-small-2003071106 (13 Jul 2003)
+
+ 13 Jul 2003; Chris PeBenito <pebenito@gentoo.org>
+ selinux-small-2003071106.ebuild, files/selinux-small-2003071106-gentoo.diff:
+ New upstream release
03 Jul 2003; Chris PeBenito <pebenito@gentoo.org> files/rlpkg:
Improve rlpkg package matching
diff --git a/sys-apps/selinux-small/Manifest b/sys-apps/selinux-small/Manifest
index e7272af381f1..bd28e05ae26e 100644
--- a/sys-apps/selinux-small/Manifest
+++ b/sys-apps/selinux-small/Manifest
@@ -1,7 +1,8 @@
-MD5 c3339664f38fee9d30739fde0179e80d ChangeLog 5604
+MD5 2dc3f4334efc6a28baa1739aa19696d1 ChangeLog 5800
MD5 effd006ee5a76d62ceeef715b5dbf00b selinux-small-2003040709-r3.ebuild 4399
-MD5 8098f68887ec205cb21d4e5a7355d764 selinux-small-2003040709-r4.ebuild 5447
+MD5 9f30142e6197aec98bf939ef613a37fc selinux-small-2003071106.ebuild 5328
MD5 74ed0ebe40bb920f2c477898e6e9abc0 metadata.xml 457
+MD5 8098f68887ec205cb21d4e5a7355d764 selinux-small-2003040709-r4.ebuild 5447
MD5 0986e11cde481cc9d4f8061654dedead files/digest-selinux-small-2003040709-r3 151
MD5 14ef7a8e2104665076099d6fe3f0f664 files/digest-selinux-small-2003040709-r4 73
MD5 8daee4f4fd3e4a74c4d5f2ddb6b086a5 files/newrole 1197
@@ -14,3 +15,5 @@ MD5 ece4a7821d33af42526916fa2725724a files/selinux-small-2003040709-gentoo.diff
MD5 2ebe97274132b6318b82fe6e3f185ea1 files/selinux-small-2003040709-newrole.diff 2640
MD5 16b7e55b13429ce3e437bfc457cc2a8d files/selinux-small-2003040709-newstat.diff 8495
MD5 3809db44913b783d2b8bb31c8361aa92 files/selinux-small-2003040709-setfiles.diff 2623
+MD5 07da3114715047bd86d116215779b54e files/selinux-small-2003071106-gentoo.diff 9267
+MD5 4ed6e763e1f7562bb3ecb31414f3cb5e files/digest-selinux-small-2003071106 73
diff --git a/sys-apps/selinux-small/files/digest-selinux-small-2003071106 b/sys-apps/selinux-small/files/digest-selinux-small-2003071106
new file mode 100644
index 000000000000..133531908901
--- /dev/null
+++ b/sys-apps/selinux-small/files/digest-selinux-small-2003071106
@@ -0,0 +1 @@
+MD5 76b7cd5e53242c83fc19cad82564583d selinux-small-2003071106.tgz 632599
diff --git a/sys-apps/selinux-small/files/selinux-small-2003071106-gentoo.diff b/sys-apps/selinux-small/files/selinux-small-2003071106-gentoo.diff
new file mode 100644
index 000000000000..5756b1f84bb0
--- /dev/null
+++ b/sys-apps/selinux-small/files/selinux-small-2003071106-gentoo.diff
@@ -0,0 +1,206 @@
+diff -urN selinux.orig/devfsd/devfsd-conflet selinux/devfsd/devfsd-conflet
+--- selinux.orig/devfsd/devfsd-conflet 2002-07-17 17:00:40.000000000 -0500
++++ selinux/devfsd/devfsd-conflet 2003-07-13 15:00:48.000000000 -0500
+@@ -1,23 +1,7 @@
+-REGISTER ^(kmem|mem|port) CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:memory_device_t
+-REGISTER ^u?random CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:random_device_t
+-REGISTER ^tty CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:devtty_t
+-REGISTER /disc$ CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:fixed_disk_device_t
+-REGISTER /part[0-9]+$ CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:fixed_disk_device_t
+-REGISTER ^[mr]d/[0-9]+$ CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:fixed_disk_device_t
++REGISTER ^nb[^/]+$ CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:fixed_disk_device_t
+ REGISTER [0-9]/cd$ CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:removable_device_t
+-REGISTER ^floppy/ CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:removable_device_t
+-REGISTER ^misc/rtc CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:clock_device_t
+ REGISTER ^initctl CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:initctl_t
+-REGISTER ^printers/ CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:printer_t
+-REGISTER ^input/(mouse|mice|event) CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:mouse_device_t
+-REGISTER ^misc/psaux CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:mouse_device_t
+ REGISTER ^gpmctl CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:gpmctl_t
+-REGISTER ^ptmx CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:ptmx_t
+-REGISTER ^sound/ CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:sound_device_t
+-REGISTER ^agpgart CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:agp_device_t
+ REGISTER ^dri CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:dri_device_t
+-REGISTER ^misc/apm_bios CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:apm_bios_t
+-REGISTER ^ppp$ CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:ppp_device_t
+-REGISTER ^fb/.*$ CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:framebuf_device_t
+-
+-
++REGISTER ^sound/.* CFUNCTION devfsd-se.so set_sid $devname system_u:object_r:sound_device_t
++REGISTER ^pts/.* IGNORE
+diff -urN selinux.orig/devfsd/devfsd-se.c selinux/devfsd/devfsd-se.c
+--- selinux.orig/devfsd/devfsd-se.c 2002-04-19 15:32:37.000000000 -0500
++++ selinux/devfsd/devfsd-se.c 2003-07-13 15:00:48.000000000 -0500
+@@ -19,7 +19,7 @@
+ {
+ security_id_t sid;
+ struct stat buf;
+- const char * const initial_context = "system_u:object_r:devfs_t";
++ const char * const initial_context = "system_u:object_r:device_t";
+ const char * const no_context = "system_u:object_r:unlabeled_t";
+
+ if(is_flask_enabled())
+diff -urN selinux.orig/libsecure/Makefile selinux/libsecure/Makefile
+--- selinux.orig/libsecure/Makefile 2002-10-28 14:16:20.000000000 -0600
++++ selinux/libsecure/Makefile 2003-07-13 15:00:48.000000000 -0500
+@@ -1,6 +1,6 @@
+ all:
+- $(MAKE) -C src
+- $(MAKE) -C test
++ $(MAKE) -C src SE_INC=$(SE_INC) EXTRA_CFLAGS="$(EXTRA_CFLAGS)"
++ $(MAKE) -C test SE_INC=$(SE_INC) EXTRA_CFLAGS="$(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)"
+
+ install:
+ $(MAKE) -C include install
+diff -urN selinux.orig/libsecure/src/Makefile selinux/libsecure/src/Makefile
+--- selinux.orig/libsecure/src/Makefile 2003-04-22 08:24:05.000000000 -0500
++++ selinux/libsecure/src/Makefile 2003-07-13 15:03:38.000000000 -0500
+@@ -2,7 +2,7 @@
+ LIBDIR=$(PREFIX)/lib
+ TARGET=libsecure.a
+ OBJS= $(patsubst %.c,%.o,$(wildcard *.c))
+-CFLAGS = -I../include -I$(PREFIX)/include
++CFLAGS = -I../include -I$(SE_INC) $(EXTRA_CFLAGS)
+
+ ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+ OBJS+= $(patsubst %.c,%.o,$(wildcard arch/$(ARCH)/*.c))
+diff -urN selinux.orig/libsecure/src/xstat_conv.h selinux/libsecure/src/xstat_conv.h
+--- selinux.orig/libsecure/src/xstat_conv.h 2003-06-18 08:56:00.000000000 -0500
++++ selinux/libsecure/src/xstat_conv.h 2003-07-13 15:00:48.000000000 -0500
+@@ -36,7 +36,7 @@
+
+ case _STAT_VER_LINUX:
+ {
+- struct stat *buf = ubuf;
++ struct kernel_stat *buf = ubuf;
+
+ /* Convert to current kernel version of `struct stat'. */
+ buf->st_dev = kbuf->st_dev;
+diff -urN selinux.orig/libsecure/test/Makefile selinux/libsecure/test/Makefile
+--- selinux.orig/libsecure/test/Makefile 2003-04-22 08:24:05.000000000 -0500
++++ selinux/libsecure/test/Makefile 2003-07-13 15:05:48.000000000 -0500
+@@ -3,14 +3,14 @@
+ BINDIR=$(PREFIX)/bin
+ LDFLAGS=-L../src
+ LDLIBS=-lsecure
+-CFLAGS=-I../include -I$(PREFIX)/include
++CFLAGS=-I../include -I$(SE_INC) $(EXTRA_CFLAGS)
+
+ ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+ TARGETS+= $(patsubst %.c,%,$(wildcard arch/$(ARCH)/*.c))
+
+ # Only install the programs that are useful to users
+ # and that are not redundant with the modified utilities.
+-UTILS=avc_enforcing avc_toggle load_policy context_to_sid sid_to_context list_sids chsid lchsid chsidfs
++UTILS=avc_enforcing avc_toggle load_policy context_to_sid sid_to_context list_sids chsid lchsid chsidfs get_user_sids
+ # Add 'exec_s' if you do not have 'runas'.
+ # Add 'getsecsid' if you do not have the modified 'id'.
+ # Add 'lstat_s' and 'stat_s' if you do not have the modified 'stat'.
+diff -urN selinux.orig/module/Makefile selinux/module/Makefile
+--- selinux.orig/module/Makefile 2003-04-22 08:24:05.000000000 -0500
++++ selinux/module/Makefile 2003-07-13 15:00:48.000000000 -0500
+@@ -6,7 +6,7 @@
+ FLASKDIR=$(PREFIX)/flask
+ INCDIR=$(PREFIX)/include
+
+-ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
++ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/parisc.*/hppa/)
+
+ # Build the checkpolicy program.
+ all:
+diff -urN selinux.orig/module/checkpolicy/Makefile selinux/module/checkpolicy/Makefile
+--- selinux.orig/module/checkpolicy/Makefile 2003-04-22 08:24:06.000000000 -0500
++++ selinux/module/checkpolicy/Makefile 2003-07-13 15:00:48.000000000 -0500
+@@ -17,7 +17,9 @@
+ OPTIONS =
+ endif
+
+-CFLAGS = -g $(OPTIONS) -I$(LSMDIR)/include -Wall -O2 -pipe -include $(MODDIR)/ss/global.h -I$(MODDIR)/include -I$(MODDIR)/ss
++YACC = bison -y
++
++CFLAGS = $(OPTIONS) -I$(LSMDIR)/include -Wall -O2 -pipe -include $(MODDIR)/ss/global.h -I$(MODDIR)/include -I$(MODDIR)/ss
+
+ OBJS = ebitmap.o queue.o hashtab.o symtab.o sidtab.o avtab.o policydb.o services.o y.tab.o lex.yy.o checkpolicy.o
+
+@@ -28,7 +30,7 @@
+ LIBS=-lfl
+
+ checkpolicy: $(OBJS)
+- $(CC) -o $@ $^ $(LIBS)
++ $(CC) -o $@ $^ $(LIBS) $(LDFLAGS)
+
+ %.o: $(MODDIR)/ss/%.c
+ $(CC) $(CFLAGS) -o $@ -c $<
+diff -urN selinux.orig/utils/newrole/Makefile selinux/utils/newrole/Makefile
+--- selinux.orig/utils/newrole/Makefile 2003-04-22 08:24:07.000000000 -0500
++++ selinux/utils/newrole/Makefile 2003-07-13 15:15:17.000000000 -0500
+@@ -36,7 +36,7 @@
+ # End Release flags
+
+ LDFLAGS += -L$(LIBDIR)
+-LIBS += $(LIBDIR)/libsecure.a
++LIBS += ../../libsecure/src/libsecure.a
+
+ PROGS = newrole
+
+diff -urN selinux.orig/utils/run_init/Makefile selinux/utils/run_init/Makefile
+--- selinux.orig/utils/run_init/Makefile 2003-04-22 08:24:07.000000000 -0500
++++ selinux/utils/run_init/Makefile 2003-07-13 15:22:16.000000000 -0500
+@@ -37,7 +37,7 @@
+ # End Release flags
+
+ LDFLAGS += -L$(LIBDIR)
+-LIBS += $(LIBDIR)/libsecure.a
++LIBS += ../../libsecure/src/libsecure.a
+
+ PROGS = run_init
+
+diff -urN selinux.orig/utils/run_init/run_init.c selinux/utils/run_init/run_init.c
+--- selinux.orig/utils/run_init/run_init.c 2002-11-26 11:32:36.000000000 -0600
++++ selinux/utils/run_init/run_init.c 2003-07-13 15:00:48.000000000 -0500
+@@ -386,7 +386,7 @@
+ exit(-1);
+ }
+
+- if ( execvp_secure(argv[1], sid, argv + 1) ) {
++ if ( execvp_secure("/usr/sbin/open_init_pty", sid, argv) ) {
+ perror("execvp_secure");
+ exit(-1);
+ }
+diff -urN selinux.orig/utils/spasswd/Makefile selinux/utils/spasswd/Makefile
+--- selinux.orig/utils/spasswd/Makefile 2003-06-06 09:23:36.000000000 -0500
++++ selinux/utils/spasswd/Makefile 2003-07-13 15:00:48.000000000 -0500
+@@ -14,12 +14,13 @@
+ GROUPDEL=/usr/sbin/groupdel
+ GROUPMOD=/usr/sbin/groupmod
+ VIPW=/usr/sbin/vipw
++VIGR=/usr/sbin/vigr
+
+ CFLAGS += -Wall -g -I$(INCDIR)
+ LDFLAGS += -static -L$(LIBDIR)
+ LIBS += -lsecure
+
+-PROGS = spasswd sadminpasswd suseradd suserdel svipw schfn schsh sgpasswd susermod \
++PROGS = spasswd sadminpasswd suseradd suserdel svipw svigr schfn schsh sgpasswd susermod \
+ sgroupadd sgroupdel sgroupmod
+
+ all: $(PROGS)
+@@ -42,6 +43,9 @@
+ svipw.o: spasswd.c
+ $(CC) $(CFLAGS) -DADMIN_USE -DPASSWD=\"$(VIPW)\" -c -o $@ $<
+
++svigr.o: spasswd.c
++ $(CC) $(CFLAGS) -DADMIN_USE -DPASSWD=\"$(VIGR)\" -c -o $@ $<
++
+ schfn.o: spasswd.c
+ $(CC) $(CFLAGS) -DPASSWD=\"$(CHFN)\" -c -o $@ $<
+
+@@ -64,7 +68,7 @@
+ $(CC) $(CFLAGS) -DADMIN_USE -DPASSWD=\"$(GROUPMOD)\" -c -o $@ $<
+
+ install: all
+- test -d $(BINDIR) || install -m 755 -o root -g root $(BINDIR)
++ test -d $(BINDIR) || install -m 755 -d -o root -g root $(BINDIR)
+ install -m 555 -o root -g root $(PROGS) $(BINDIR)
+
+ clean:
diff --git a/sys-apps/selinux-small/selinux-small-2003071106.ebuild b/sys-apps/selinux-small/selinux-small-2003071106.ebuild
new file mode 100644
index 000000000000..3946c9b10707
--- /dev/null
+++ b/sys-apps/selinux-small/selinux-small-2003071106.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/selinux-small/selinux-small-2003071106.ebuild,v 1.1 2003/07/13 21:06:48 pebenito Exp $
+
+DESCRIPTION="SELinux libraries and policy compiler"
+HOMEPAGE="http://www.nsa.gov/selinux"
+SRC_URI="http://www.nsa.gov/selinux/archives/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+S="${WORKDIR}/selinux"
+
+KEYWORDS="~x86 ~amd64 ~ppc ~alpha ~sparc"
+IUSE="selinux static"
+DEPEND="sys-devel/flex
+ sys-libs/pam
+ || (
+ >=sys-kernel/selinux-sources-2.4.20-r1
+ >=sys-kernel/hardened-sources-2.4.20-r1
+ )"
+
+RDEPEND="${DEPEND}
+ >=dev-python/pexpect-0.97
+ >=sys-apps/selinux-base-policy-20030522"
+
+use static && LDFLAGS="-static"
+
+pkg_setup() {
+ if [ -z "`use selinux`" ]; then
+ eerror "selinux is missing from your USE. You seem to be using the"
+ eerror "incorrect profile. SELinux has a different profile than"
+ eerror "mainline Gentoo. Make sure the /etc/make.profile symbolic"
+ eend 1 "link is pointing to /usr/portage/profiles/selinux-x86-1.4/"
+ fi
+
+ if [ ! -f /usr/src/linux/security/selinux/ss/ebitmap.c ]; then
+ eerror "The /usr/src/linux symbolic link appears to be incorrect. It"
+ eerror "must be pointing to a selinux-sources or hardened-sources kernel"
+ eerror "for selinux-small to compile. If the link is correct, the"
+ eerror "kernel sources may be damaged or incomplete, and will need to"
+ eend 1 "be remerged. Please fix and retry."
+ fi
+
+ if [ -z "`use pam`" ]; then
+ eerror "pam is missing from your USE. Currently selinux requires pam."
+ eerror "Please add pam, so all programs work correctly. A pam-less"
+ eend 1 "install will probably be supported in the future."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch ${FILESDIR}/${P}-gentoo.diff
+
+ ln -s /usr/src/linux ${WORKDIR}/lsm-2.4
+}
+
+src_compile() {
+
+ einfo "Compiling checkpolicy"
+ cd ${S}/module
+ make LSMVER=-2.4 LDFLAGS=${LDFLAGS} all \
+ || die "Checkpolicy compilation failed"
+
+ einfo "Compiling libsecure"
+ cd ${S}/libsecure
+ make SE_INC=/usr/include/linux/flask EXTRA_CFLAGS="${CFLAGS}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ || die "libsecure compile failed."
+
+ # now set up paths, since the next compiles need libsecure
+ LDFLAGS="-L${S}/libsecure/src ${LDFLAGS}"
+ LIBSECURE="-I${S}/libsecure/include ${LDFLAGS} -DUSE_PAM"
+
+ einfo "Compiling devfsd module"
+ cd ${S}/devfsd
+ mv devfsd-conflet selinux-small
+ make CFLAGS="${CFLAGS}" LDFLAGS="${LIBSECURE/-static}" \
+ || die "devfsd compile failed."
+
+ einfo "Compiling setfiles"
+ cd ${S}/setfiles
+ make CFLAGS="${CFLAGS} ${LIBSECURE}" LDFLAGS="${LDFLAGS}" setfiles \
+ || die "setfiles compile failed."
+
+ einfo "Compiling newrole"
+ cd ${S}/utils/newrole
+ make CFLAGS="${CFLAGS} ${LIBSECURE/-static} -lcrypt" \
+ || die "newrole compile failed."
+
+ einfo "Compiling run_init"
+ cd ${S}/utils/run_init
+ make CFLAGS="${CFLAGS} ${LIBSECURE/-static} -lcrypt" \
+ || die "run_init compile failed."
+
+ einfo "Compiling s-wrappers"
+ cd ${S}/utils/spasswd
+ make CFLAGS="${CFLAGS} ${LIBSECURE}" LDFLAGS="${LDFLAGS} -lcrypt -static" \
+ || die "s-wrappers compile failed."
+
+ einfo "Compiling selopt"
+ cd ${S}/selopt
+ make COPT_FLAGS="${CFLAGS} ${LIBSECURE}" LDFLAGS="${LDFLAGS}" \
+ || die "selopt compile failed."
+}
+
+src_install() {
+ # install policy stuff
+ dosbin ${S}/module/checkpolicy/checkpolicy
+ dosbin ${S}/setfiles/setfiles
+
+ insinto /usr/include
+ doins ${S}/libsecure/include/*.h
+
+ insinto /etc/devfs.d
+ doins ${S}/devfsd/selinux-small
+
+ dolib.a ${S}/libsecure/src/libsecure.a
+ dobin ${S}/libsecure/test/{avc_enforcing,avc_toggle,context_to_sid,sid_to_context,list_sids,chsid,lchsid,chsidfs,get_user_sids}
+ dosbin ${S}/libsecure/test/load_policy
+ dobin ${S}/utils/spasswd/{sadminpasswd,schfn,schsh,spasswd,suseradd,suserdel,svipw}
+ dobin ${S}/utils/run_init/run_init
+ dobin ${S}/utils/newrole/newrole
+ dosbin ${FILESDIR}/{rlpkg,open_init_pty}
+
+ doman ${S}/setfiles/setfiles.8
+ doman ${S}/libsecure/man/man[12]/*
+ doman ${S}/utils/newrole/newrole.1
+ doman ${S}/utils/run_init/run_init.8
+
+ dobin ${S}/selopt/utils/flmon
+ dosbin ${S}/selopt/utils/{ct,pt,qt}
+ dosbin ${S}/selopt/scmpd/scmpd
+ dodoc ${S}/selopt/doc/*
+
+ exeinto /etc/init.d
+ doexe ${FILESDIR}/scmpd
+
+ exeinto /lib/devfsd
+ doexe ${S}/devfsd/devfsd-se.so
+
+ # install pam stuff
+ insinto /etc/pam.d
+ doins ${FILESDIR}/{newrole,run_init}
+}
+
+pkg_postinst() {
+ einfo
+ einfo "To recompile the policy and relabel the filesystem simply run:"
+ einfo "ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo
+
+ # Stop devfsd from restoring /dev/log, it causes denials.
+ # The syslog will create it when it starts. Recent stock
+ # gentoo devfsd.conf's stopped saving /dev/log into dev-state.
+ [ -f /lib/dev-state/log ] && rm -f /lib/dev-state/log
+}
+
+pkg_config() {
+ cd /etc/security/selinux/src/policy
+
+ einfo "Compiling policy"
+ make policy || die "Policy compile failed (see above error messages)"
+
+ einfo "Installing policy"
+ make install || die "Policy install failed (see above error messages)"
+
+ einfo "Loading policy"
+ make load || die "Policy loading failed (see above error messages)"
+
+ einfo "Relabeling filesystems -- This will take a very long time!"
+ make relabel || die "Relabeling failed (see above error messages)"
+}