blob: b30cd8c6f2b68cb56e4d21d183f977a36dd57fbc (
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
54
55
56
57
58
59
60
61
62
63
64
|
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/usermode-sources/usermode-sources-2.4.23-r1.ebuild,v 1.1 2004/01/07 10:15:33 plasmaroo Exp $
ETYPE="sources"
inherit kernel
UML_PATCH="uml-patch-2.4.23-1"
# we patch against vanilla-sources only
DESCRIPTION="Full (vanilla) sources for the User Mode Linux kernel"
SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${PV}.tar.bz2
mirror://sourceforge/user-mode-linux/${UML_PATCH}.bz2"
HOMEPAGE="http://www.kernel.org/ http://user-mode-linux.sourceforge.net"
LICENSE="GPL-2"
SLOT="${PV}"
KEYWORDS="x86"
EXTRAVERSION=${PR}
# console-tools is needed to solve the loadkeys fiasco.
# binutils version needed to avoid Athlon/PIII/SSE assembler bugs.
DEPEND=">=sys-devel/binutils-2.11.90.0.31 dev-lang/perl"
RDEPEND=">=sys-libs/ncurses-5.2"
S=${WORKDIR}/linux-${PV}
src_unpack() {
# unpack vanilla sources
cd ${WORKDIR}
unpack linux-${PV}.tar.bz2
# apply usermode patch
cd ${S}
epatch ${DISTDIR}/${UML_PATCH}.bz2
epatch ${FILESDIR}/${PN}.CAN-2003-0985.patch || die "Failed to patch mremap() vulnerability!"
epatch ${FILESDIR}/${PN}-2.4.22.rtc_fix.patch || die "Failed to patch RTC vulnerabilities!"
kernel_universal_unpack
}
src_compile() {
true
}
src_install() {
mkdir -p ${D}/usr/src/uml
# fix silly permissions in tarball
cd ${WORKDIR}
chown -R root:root *
chmod -R a+r-w+X,u+w *
mv linux-${PV} ${D}/usr/src/uml/
}
pkg_postinst() {
# create linux symlink
if [ ! -e ${ROOT}usr/src/uml/linux ]
then
rm -f ${ROOT}usr/src/uml/linux
ln -sf ${ROOT}usr/src/uml/linux-${PV} ${ROOT}usr/src/uml/linux
fi
}
|