/[gentoo-x86]/sec-policy/selinux-base-policy/selinux-base-policy-20040509.ebuild
Gentoo

Contents of /sec-policy/selinux-base-policy/selinux-base-policy-20040509.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Mon Sep 6 01:13:57 2004 UTC (10 years, 3 months ago) by pebenito
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
rm old, switch to epause, ebeep

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-base-policy/selinux-base-policy-20040509.ebuild,v 1.4 2004/06/28 00:10:36 pebenito Exp $
4
5 IUSE="build"
6
7 DESCRIPTION="Gentoo base policy for SELinux"
8 HOMEPAGE="http://www.gentoo.org/proj/en/hardened/selinux/"
9 SRC_URI="mirror://gentoo/${P}.tar.bz2"
10 LICENSE="GPL-2"
11 SLOT="0"
12 KEYWORDS="x86 ppc sparc"
13 DEPEND="build? ( sys-devel/make
14 sys-devel/m4 )"
15 RDEPEND="sys-devel/m4
16 sys-devel/make"
17
18 S=${WORKDIR}/base-policy
19
20 [ -z ${POLICYDIR} ] && POLICYDIR="/etc/security/selinux/src/policy"
21
22 # deprecated policies:
23 DEPRECATED="domains/program/devfsd.te domains/program/opt.te
24 file_contexts/program/devfsd.fc file_contexts/program/opt.fc
25 file_contexts/users.fc"
26
27 src_compile() {
28 return
29 }
30
31 src_install() {
32 if use build; then
33 # generate a file_contexts
34 dodir ${POLICYDIR}/file_contexts
35 einfo "Ignore the checkpolicy error on the next line."
36 make -C ${S} \
37 FC=${D}/${POLICYDIR}/file_contexts/file_contexts \
38 ${D}/${POLICYDIR}/file_contexts/file_contexts
39
40 [ ! -f ${D}/${POLICYDIR}/file_contexts/file_contexts ] && \
41 die "file_contexts was not generated."
42 else
43 # install full policy
44 dodir /etc/security/selinux/src
45
46 insinto /etc/security
47 doins ${S}/appconfig/*
48
49 cp -a ${S} ${D}/${POLICYDIR}
50 rm -fR ${D}/${POLICYDIR}/appconfig
51 fi
52 }
53
54 pkg_postinst() {
55 local isdeprecated
56 echo
57 einfo "This is the base policy for SELinux on Gentoo. This policy"
58 einfo "package only covers the applications in the system profile."
59 einfo "More policy may need to be added according to your requirements."
60 echo
61 eerror "It is STRONGLY suggested that you evaluate and merge the"
62 eerror "policy changes. If any of the file contexts (*.fc) have"
63 eerror "changed, you should also relabel."
64 echo
65 ewarn "Please check the Changelog, there may be important information."
66 echo
67 echo
68
69 einfo "Checking for deprecated policy..."
70 for i in $DEPRECATED; do
71 if [ -f "${POLICYDIR}/${i}" ]; then
72 eerror "${POLICYDIR}/${i}"
73 isdeprecated="y"
74 fi
75 done
76 [ "${isdeprecated}" ] && \
77 eerror "The above policy file(s) should be removed if possible." || \
78 einfo "None found."
79
80 echo -ne "\a" ; sleep 0.1 ; echo -ne "\a" ; sleep 1
81 echo -ne "\a" ; sleep 0.1 ; echo -ne "\a" ; sleep 1
82 echo -ne "\a" ; sleep 0.1 ; echo -ne "\a" ; sleep 1
83 echo -ne "\a" ; sleep 0.1 ; echo -ne "\a" ; sleep 1
84 echo -ne "\a" ; sleep 0.1 ; echo -ne "\a" ; sleep 1
85 echo -ne "\a" ; sleep 0.1 ; echo -ne "\a" ; sleep 1
86 echo -ne "\a" ; sleep 0.1 ; echo -ne "\a" ; sleep 1
87 echo -ne "\a" ; sleep 0.1 ; echo -ne "\a" ; sleep 1
88 sleep 4
89 }

  ViewVC Help
Powered by ViewVC 1.1.20