summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris PeBenito <pebenito@gentoo.org>2003-04-12 04:53:44 +0000
committerChris PeBenito <pebenito@gentoo.org>2003-04-12 04:53:44 +0000
commite32629e7cfea31ec49419f28b94a6bcb66a738b2 (patch)
treea2711dd5ec883276df89bc82a1bcf313095c6eed /sys-apps/selinux-small
parentFixes for DEPEND and RDEPEND. Added devfsd config for proper labelling of devfs (diff)
downloadgentoo-2-e32629e7cfea31ec49419f28b94a6bcb66a738b2.tar.gz
gentoo-2-e32629e7cfea31ec49419f28b94a6bcb66a738b2.tar.bz2
gentoo-2-e32629e7cfea31ec49419f28b94a6bcb66a738b2.zip
Fixes for DEPEND and RDEPEND. Added devfsd config for proper labelling of devfs
Diffstat (limited to 'sys-apps/selinux-small')
-rw-r--r--sys-apps/selinux-small/ChangeLog10
-rw-r--r--sys-apps/selinux-small/Manifest4
-rw-r--r--sys-apps/selinux-small/files/digest-selinux-small-2003011510-r33
-rw-r--r--sys-apps/selinux-small/selinux-small-2003011510-r3.ebuild131
4 files changed, 145 insertions, 3 deletions
diff --git a/sys-apps/selinux-small/ChangeLog b/sys-apps/selinux-small/ChangeLog
index 8dc89aa92977..7fd34bb4cee3 100644
--- a/sys-apps/selinux-small/ChangeLog
+++ b/sys-apps/selinux-small/ChangeLog
@@ -1,6 +1,14 @@
# 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.6 2003/03/31 02:18:21 method Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/selinux-small/ChangeLog,v 1.7 2003/04/12 04:53:32 pebenito Exp $
+
+*selinux-small-2003011510-r3 (11 Apr 2003)
+
+ 11 Apr 2003; Chris PeBenito <pebenito@gentoo.org>
+ selinux-small-2003011510-r3.ebuild:
+ Added configuration for devfsd to /etc/devfs.d for proper labelling of devfsd.
+ Fixed DEPEND and RDEPEND. Selinux-sources needed in RDEPEND, and flex and pam
+ needed in DEPEND.
*selinux-small-2003011510-r2 (19 Mar 2003)
diff --git a/sys-apps/selinux-small/Manifest b/sys-apps/selinux-small/Manifest
index d73646aa1e7b..814741424374 100644
--- a/sys-apps/selinux-small/Manifest
+++ b/sys-apps/selinux-small/Manifest
@@ -1,6 +1,6 @@
-MD5 afb2aac1a42f4c7f7e06ea248d70f5be ChangeLog 1658
+MD5 fea56fa197dbdede2a26f17976f7a7aa ChangeLog 1660
MD5 1a654b9f2cd750571b3f5df42318e576 selinux-small-2003011510-r2.ebuild 3678
-MD5 4478ee08d339ab808ab24680f3ab03ec selinux-small-2003011510-r3.ebuild 3893
+MD5 e48a77f1b0b030d21aca89432d340810 selinux-small-2003011510-r3.ebuild 3895
MD5 9adcc32f03588aebdc929d1d6c8af532 files/digest-selinux-small-2003011510-r2 206
MD5 5b8ae6c77d50a559c31fb144faf6843e files/selinux-small-2003011510-bison.diff 553
MD5 07bffa529dcdd11c1e80ea80c58bc05c files/digest-selinux-small-2003011510-r3 206
diff --git a/sys-apps/selinux-small/files/digest-selinux-small-2003011510-r3 b/sys-apps/selinux-small/files/digest-selinux-small-2003011510-r3
new file mode 100644
index 000000000000..9bcfe0d818e6
--- /dev/null
+++ b/sys-apps/selinux-small/files/digest-selinux-small-2003011510-r3
@@ -0,0 +1,3 @@
+MD5 ee9e814c96aba9efdc9552652c041fa4 selinux-small-2003011510.tgz 551852
+MD5 808a93b812fa16f789551c212c02ba95 selinux-small_2003011510-7.diff.gz 48492
+MD5 a7e28d84be2d4f2c07797365a3c39b55 policy.tgz 116284
diff --git a/sys-apps/selinux-small/selinux-small-2003011510-r3.ebuild b/sys-apps/selinux-small/selinux-small-2003011510-r3.ebuild
new file mode 100644
index 000000000000..f81f2ca400c3
--- /dev/null
+++ b/sys-apps/selinux-small/selinux-small-2003011510-r3.ebuild
@@ -0,0 +1,131 @@
+# 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-2003011510-r3.ebuild,v 1.1 2003/04/12 04:53:32 pebenito Exp $
+
+DESCRIPTION="SELinux policy compiler and example policies"
+HOMEPAGE="http://www.nsa.gov/selinux"
+SRC_URI="http://www.nsa.gov/selinux/archives/${P}.tgz
+ http://www.coker.com.au/selinux/selinux-small/selinux-small_2003011510-7.diff.gz
+ http://www.coker.com.au/selinux/policy.tgz"
+
+LICENSE="GPL-1"
+SLOT="0"
+S="${WORKDIR}/selinux"
+
+# to easily specify that libsecure is in the workdir
+LIBSECURE="-I${S}/libsecure/include -L${S}/libsecure/src"
+
+KEYWORDS="x86"
+IUSE="selinux"
+DEPEND="<sys-libs/glibc-2.3.2
+ sys-devel/flex
+ sys-libs/pam
+ >=sys-kernel/selinux-sources-2.4.20-r1"
+
+RDEPEND="<sys-libs/glibc-2.3.2
+ >=sys-kernel/selinux-sources-2.4.20-r1
+ dev-tcltk/expect"
+
+pkg_setup() {
+ use selinux || eend 1 "You must have selinux USE var"
+}
+
+src_compile() {
+ ln -s /usr/src/linux ${WORKDIR}/lsm-2.4
+
+ # fix up policy makefile
+ cd ${WORKDIR}/policy
+ sed -e 's:/usr/lib/selinux:/usr/flask:' < Makefile > Makefile.new
+ mv -f Makefile.new Makefile
+
+ cd ${S}
+
+ epatch ${WORKDIR}/selinux-small_2003011510-7.diff
+ epatch ${FILESDIR}/${P}-bison.diff
+
+ einfo "Compiling checkpolicy"
+ cd ${S}/module
+ make all LSMVER=-2.4 || die "Checkpolicy compilation failed"
+
+ einfo "Compiling libsecure"
+ cd ${S}/libsecure
+ make SE_INC=/usr/include/linux/flask \
+ EXTRA_CFLAGS="${CFLAGS}" \
+ || die "libsecure compile failed."
+ cd ${S}/devfsd
+ sed -e 's:devfsd-se.so:/usr/lib/devfsd-se.so:' \
+ < devfsd-conflet > selinux-small
+ make CFLAGS="${CFLAGS} ${LIBSECURE}" \
+ LDFLAGS="-L${S}/libsecure/src" \
+ || die "devfsd compile failed."
+
+ einfo "Compiling utilities"
+ cd ${S}/setfiles
+ make CFLAGS="${CFLAGS} ${LIBSECURE}" \
+ LDFLAGS="-L${S}/libsecure/src" setfiles \
+ || die "setfiles compile failed."
+ cd ${S}/utils/newrole
+ make CFLAGS="${CFLAGS} ${LIBSECURE} -lcrypt" \
+ || die "newrole compile failed."
+ cd ${S}/utils/run_init
+ make CFLAGS="${CFLAGS} ${LIBSECURE} -lcrypt" \
+ || die "run_init compile failed."
+ cd ${S}/utils/spasswd
+ make CFLAGS="${CFLAGS} ${LIBSECURE}" \
+ LDFLAGS="-L${S}/libsecure/src -lcrypt" \
+ || die "spasswd compile failed."
+}
+
+src_install() {
+ # install policies
+ dosbin ${S}/module/checkpolicy/checkpolicy
+ dosbin ${S}/setfiles/setfiles
+ mkdir -p ${D}/etc/security/selinux/src
+ mv ${WORKDIR}/policy ${D}/etc/security/selinux/src
+
+ insinto /etc/security
+ doins ${S}/utils/appconfig/*
+
+ insinto /usr/include
+ doins ${S}/libsecure/include/*.h
+
+ insinto /etc/devfs.d
+ doins ${S}/devfsd/selinux-small
+
+ dolib.a ${S}/libsecure/src/libsecure.a
+ dolib.so ${S}/devfsd/devfsd-se.so
+ 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
+ dosbin ${S}/utils/run_init/open_init_pty
+ dobin ${S}/utils/newrole/newrole
+
+ 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
+}
+
+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
+}
+
+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 installation failed"
+
+ einfo "Loading policy"
+ make load || die "Policy loading failed"
+
+ einfo "Relabeling filesystems -- This will take a very long time!"
+ make relabel || die "Relabeling failed (see above error messages)"
+}