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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed May 26 21:01:36 2004 UTC (10 years, 3 months ago) by pebenito
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +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-20040414.ebuild,v 1.1 2004/04/14 19:34:30 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 !build? ( >=sys-libs/pam-0.77 )"
20
21 S=${WORKDIR}/base-policy
22
23 [ -z ${POLICYDIR} ] && POLICYDIR="/etc/security/selinux/src/policy"
24
25 # deprecated policies:
26 DEPRECATED="domains/program/devfsd.te domains/program/opt.te
27 file_contexts/program/devfsd.fc file_contexts/program/opt.fc
28 file_contexts/users.fc"
29
30 src_install() {
31 if use build; then
32 # generate a file_contexts
33 dodir ${POLICYDIR}/file_contexts
34 einfo "Ignore the checkpolicy error on the next line."
35 make -C ${S} \
36 FC=${D}/${POLICYDIR}/file_contexts/file_contexts \
37 ${D}/${POLICYDIR}/file_contexts/file_contexts
38
39 [ ! -f ${D}/${POLICYDIR}/file_contexts/file_contexts ] && \
40 die "file_contexts was not generated."
41 else
42 # install full policy
43 dodir /etc/security/selinux/src
44
45 insinto /etc/security
46 doins ${S}/appconfig/*
47
48 cp -a ${S} ${D}/${POLICYDIR}
49 rm -fR ${D}/${POLICYDIR}/appconfig
50 fi
51 }
52
53 pkg_postinst() {
54 local isdeprecated
55 echo
56 einfo "This is the base policy for SELinux on Gentoo. This policy"
57 einfo "package only covers the applications in the system profile."
58 einfo "More policy may need to be added according to your requirements."
59 echo
60 eerror "It is STRONGLY suggested that you evaluate and merge the"
61 eerror "policy changes. If any of the file contexts (*.fc) have"
62 eerror "changed, you should also relabel."
63 echo
64 ewarn "Please check the Changelog, there may be important information."
65 echo
66 echo
67
68 einfo "Checking for deprecated policy..."
69 for i in $DEPRECATED; do
70 if [ -f "${POLICYDIR}/${i}" ]; then
71 eerror "${POLICYDIR}/${i}"
72 isdeprecated="y"
73 fi
74 done
75 [ "${isdeprecated}" ] && \
76 eerror "The above policy file(s) should be removed if possible." || \
77 einfo "None found."
78
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 echo -ne "\a" ; sleep 0.1 ; echo -ne "\a" ; sleep 1
87 sleep 4
88 }

  ViewVC Help
Powered by ViewVC 1.1.20