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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Sep 16 02:36:56 2004 UTC (10 years, 1 month ago) by pebenito
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
rm policy with old headers

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-20040629.ebuild,v 1.3 2004/09/06 01:13:57 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_compile() {
30 return
31 }
32
33 src_install() {
34 if use build; then
35 # generate a file_contexts
36 dodir ${POLICYDIR}/file_contexts
37 einfo "Ignore the checkpolicy error on the next line."
38 make -C ${S} \
39 FC=${D}/${POLICYDIR}/file_contexts/file_contexts \
40 ${D}/${POLICYDIR}/file_contexts/file_contexts
41
42 [ ! -f ${D}/${POLICYDIR}/file_contexts/file_contexts ] && \
43 die "file_contexts was not generated."
44 else
45 # install full policy
46 dodir /etc/security/selinux/src
47
48 insinto /etc/security
49 doins ${S}/appconfig/*
50
51 cp -a ${S} ${D}/${POLICYDIR}
52 rm -fR ${D}/${POLICYDIR}/appconfig
53 fi
54 }
55
56 pkg_postinst() {
57 local isdeprecated
58 echo
59 einfo "This is the base policy for SELinux on Gentoo. This policy"
60 einfo "package only covers the applications in the system profile."
61 einfo "More policy may need to be added according to your requirements."
62 echo
63 eerror "It is STRONGLY suggested that you evaluate and merge the"
64 eerror "policy changes. If any of the file contexts (*.fc) have"
65 eerror "changed, you should also relabel."
66 echo
67 ewarn "Please check the Changelog, there may be important information."
68 echo
69 echo
70
71 einfo "Checking for deprecated policy..."
72 for i in $DEPRECATED; do
73 if [ -f "${POLICYDIR}/${i}" ]; then
74 eerror "${POLICYDIR}/${i}"
75 isdeprecated="y"
76 fi
77 done
78 [ "${isdeprecated}" ] && \
79 eerror "The above policy file(s) should be removed if possible." || \
80 einfo "None found."
81
82 ebeep 4
83 epause 4
84 }

  ViewVC Help
Powered by ViewVC 1.1.20