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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed May 26 21:01:36 2004 UTC (10 years, 2 months ago) by pebenito
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
rm old

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

  ViewVC Help
Powered by ViewVC 1.1.20