blob: d3d41595c11a45fab3b53bbb55800d19d4fc0899 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/hardened-sources/hardened-sources-2.4.24-r1.ebuild,v 1.2 2004/02/29 14:34:18 aliz Exp $
IUSE="selinux"
ETYPE="sources"
inherit kernel || die
OKV="`echo ${PV}|sed -e 's:^\([0-9]\+\.[0-9]\+\.[0-9]\+\).*:\1:'`"
EXTRAVERSION="-${PN/-*/}-${PR}"
KV=${OKV}${EXTRAVERSION}
S=${WORKDIR}/linux-${KV}
DESCRIPTION="Special Security Hardened Gentoo Linux Kernel"
BASE_URI="http://dev.gentoo.org/~scox/kernels/v2.4"
SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2
${BASE_URI}/hardened-sources-${OKV}-base.patch.bz2
selinux? ( ${BASE_URI}/hardened-sources-${OKV}-selinux.patch.bz2 )
!selinux? ( ${BASE_URI}/hardened-sources-${OKV}-grsec.patch.bz2 )"
HOMEPAGE="http://www.gentoo.org/proj/en/hardened/"
KEYWORDS="~x86"
SLOT="${KV}"
src_unpack() {
unpack ${A}
mv linux-${OKV} linux-${KV} || die
cd linux-${KV}
bzcat ${DISTDIR}/hardened-sources-${OKV}-base.patch.bz2 | patch -p1
if [ "`use selinux`" ]; then
bzcat ${DISTDIR}/hardened-sources-${OKV}-selinux.patch.bz2 | patch -p1
else
bzcat ${DISTDIR}/hardened-sources-${OKV}-grsec.patch.bz2 | patch -p1
fi
epatch ${FILESDIR}/${P}.munmap.patch || die "Failed to apply munmap patch!"
kernel_src_unpack
}
pkg_postinst() {
einfo "This kernel contains LSM/SElinux or GRSecurity"
einfo "Also included are various other security related patches."
echo
einfo "If there are issues with this kernel, search http://bugs.gentoo.org/ for an"
einfo "existing bug. Only create a new bug if you have not found one that matches"
einfo "your issue. Please assign your bugs to scox@gentoo.org."
}
|