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

Contents of /sec-policy/selinux-base-policy/selinux-base-policy-20051022-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Mar 16 04:06:54 2008 UTC (6 years, 1 month ago) by pebenito
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
clean out old selinux policy ebuilds.
(Portage version: 2.1.4.4)

1 # Copyright 1999-2006 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-20051022-r1.ebuild,v 1.3 2006/02/22 17:09:29 spb 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 ~amd64 ~mips"
15 KEYWORDS="alpha amd64 mips ppc sparc x86"
16 DEPEND="build? ( sys-devel/make
17 sys-devel/m4 )"
18 RDEPEND="sys-devel/m4
19 sys-devel/make"
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 domains/program/inetd.te
29 domains/program/tcpd.te file_contexts/program/inetd.fc
30 file_contexts/program/tcpd.fc macros/program/ypbind_macros.te"
31
32 src_compile() {
33 return
34 }
35
36 src_install() {
37 sed -i -e 's/genhomedircon/genhomedircon.old/' ${S}/Makefile
38 if use build; then
39 # generate a file_contexts
40 dodir ${POLICYDIR}/file_contexts
41 einfo "Ignore the checkpolicy error on the next line."
42 make -C ${S} \
43 FC=${D}/${POLICYDIR}/file_contexts/file_contexts \
44 ${D}/${POLICYDIR}/file_contexts/file_contexts
45
46 [ ! -f ${D}/${POLICYDIR}/file_contexts/file_contexts ] && \
47 die "file_contexts was not generated."
48 else
49 # install full policy
50 dodir /etc/security/selinux/src
51
52 insinto /etc/security
53 doins ${S}/appconfig/*
54
55 cp -a ${S} ${D}/${POLICYDIR}
56 rm -fR ${D}/${POLICYDIR}/appconfig
57 fi
58 }
59
60 pkg_postinst() {
61 local isdeprecated
62
63 if ! ( use build || use bootstrap )
64 then
65 ewarn "Removing invalid backup copies of critical config files..."
66 rm -f ${ROOT}/${POLICYDIR}/._cfg????_users
67 fi
68
69 echo
70 einfo "This is the base policy for SELinux on Gentoo. This policy"
71 einfo "package only covers the applications in the system profile."
72 einfo "More policy may need to be added according to your requirements."
73 echo
74 eerror "It is STRONGLY suggested that you evaluate and merge the"
75 eerror "policy changes. If any of the file contexts (*.fc) have"
76 eerror "changed, you should also relabel."
77 echo
78 ewarn "Please check the Changelog, there may be important information."
79 echo
80 echo
81
82 einfo "Checking for deprecated policy..."
83 for i in $DEPRECATED; do
84 if [ -f "${POLICYDIR}/${i}" ]; then
85 eerror "${POLICYDIR}/${i}"
86 isdeprecated="y"
87 fi
88 done
89 [ "${isdeprecated}" ] && \
90 eerror "The above policy file(s) should be removed if possible." || \
91 einfo "None found."
92
93 ebeep 4
94 epause 4
95 }

  ViewVC Help
Powered by ViewVC 1.1.20