/[gentoo-x86]/sys-kernel/hardened-sources/hardened-sources-2.4.20-r1.ebuild
Gentoo

Contents of /sys-kernel/hardened-sources/hardened-sources-2.4.20-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Mon Jun 9 00:44:04 2003 UTC (11 years, 6 months ago) by frogger
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +0 -0 lines
FILE REMOVED
Cleared out old revisions

1 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3
4 IUSE="build selinux"
5
6 # OKV=original kernel version, KV=patched kernel version. They can be the same.
7
8 ETYPE="sources"
9
10 inherit kernel || die
11
12 OKV=2.4.20
13 EXTRAVERSION=-hardened-r1
14 KV=${OKV}${EXTRAVERSION}
15 S=${WORKDIR}/linux-${KV}
16 DESCRIPTION="Special Security Hardened Gentoo Kernel (don't use this yet, it isn't ready)"
17 SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2
18 mirror://gentoo/patches-${KV}.tar.bz2"
19
20
21 HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/hardened/"
22 KEYWORDS="~x86"
23 SLOT="${KV}"
24
25 src_unpack() {
26 unpack linux-${OKV}.tar.bz2 patches-${KV}.tar.bz2
27 mv linux-${OKV} linux-${KV} || die
28
29 cd ${KV}
30 # We can't use LSM/SELinux and GRSec in the same kernel. If USE=selinux, we will
31 # patch in LSM/SELinux and drop support for GRsec. Otherwise we will include GRSec.
32 if [ "`use selinux`" ]; then
33 einfo "Enabling SELinux support. This will drop GRSec support."
34 for file in *grsec*; do
35 einfo "Dropping ${file}.."
36 rm -f ${file}
37 done
38 else
39 einfo "Did not find \"selinux\" in use, building with GRSec support."
40 for file in *lsm* *selinux*; do
41 einfo "Dropping ${file}..."
42 rm -f ${file}
43 done
44 fi
45
46 kernel_src_unpack
47 }
48
49 src_install() {
50 if [ "`use selinux`" ]; then
51 insinto /usr/flask
52 doins ${S}/security/selinux/flask/access_vectors
53 doins ${S}/security/selinux/flask/security_classes
54 doins ${S}/security/selinux/flask/initial_sids
55 insinto /usr/include/linux/flask
56 doins ${S}/security/selinux/include/linux/flask/*.h
57 insinto /usr/include/asm/flask
58 doins ${S}/security/selinux/include/asm/flask/uninstd.h
59 fi
60
61 kernel_src_install
62 }
63
64 pkg_postinst() {
65 einfo "This kernel contains LSM/SElinux or GRSecurity, and Systrace"
66 einfo "This is not yet a production ready kernel. If you experience problems with"
67 einfo "this kernel please report them by assigning bugs on bugs.gentoo.org to"
68 einfo "frogger@gentoo.org"
69 }

  ViewVC Help
Powered by ViewVC 1.1.20