Commit 49b4c1df authored by Natanael Copa's avatar Natanael Copa

*-grsec: upgrade kernel to 2.6.31.5

and use package() function
parent 8c4ba598
...@@ -34,15 +34,22 @@ source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/${_realna ...@@ -34,15 +34,22 @@ source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/${_realna
dahdi-2.6.31.patch dahdi-2.6.31.patch
" "
build() { prepare() {
cd "$srcdir/$_realname-$_dahdiver" cd "$srcdir/$_realname-$_dahdiver"
for i in ../*.patch ../*.diff; do for i in ../*.patch ../*.diff; do
msg "Applying $i" msg "Applying $i"
patch -p1 < $i || return 1; patch -p1 < $i || return 1;
done done
}
build() {
cd "$srcdir/$_realname-$_dahdiver"
make KVERS="${_abi_release}" DYNFS="yes" MODULES_EXTRA="zaphfc" \ make KVERS="${_abi_release}" DYNFS="yes" MODULES_EXTRA="zaphfc" \
|| return 1 || return 1
}
package() {
cd "$srcdir/$_realname-$_dahdiver"
make KVERS="${_abi_release}" DYNFS="yes" MODULES_EXTRA="zaphfc" \ make KVERS="${_abi_release}" DYNFS="yes" MODULES_EXTRA="zaphfc" \
DESTDIR="$pkgdir" install DESTDIR="$pkgdir" install
rm -rf "$pkgdir"/lib/firmware "$pkgdir"/usr/lib/hotplug/firmware \ rm -rf "$pkgdir"/lib/firmware "$pkgdir"/usr/lib/hotplug/firmware \
......
...@@ -25,16 +25,24 @@ subpackages= ...@@ -25,16 +25,24 @@ subpackages=
source="http://downloads.sourceforge.net/$_realname/$_realname-$_iscsiver.tar.gz source="http://downloads.sourceforge.net/$_realname/$_realname-$_iscsiver.tar.gz
" "
build() { prepare() {
cd "$srcdir"/$_realname-$_iscsiver cd "$srcdir"/$_realname-$_iscsiver
# for i in ../*.patch; do # for i in ../*.patch; do
# msg "Applying $i" # msg "Applying $i"
# patch -p1 < $i || return 1 # patch -p1 < $i || return 1
# done # done
}
build() {
cd "$srcdir"/$_realname-$_iscsiver
unset ARCH unset ARCH
local ksrc=/usr/src/linux-headers-${_abi_release} local ksrc=/usr/src/linux-headers-${_abi_release}
make KSRC="$ksrc" kernel || return 1 make KSRC="$ksrc" kernel || return 1
}
package() {
cd "$srcdir"/$_realname-$_iscsiver
make KSRC="$ksrc" DISTDIR="$pkgdir" install-kernel || return 1 make KSRC="$ksrc" DISTDIR="$pkgdir" install-kernel || return 1
} }
md5sums="9e756e89cc47aaa71824ed34a6560543 iscsitarget-1.4.18.tar.gz" md5sums="9e756e89cc47aaa71824ed34a6560543 iscsitarget-1.4.18.tar.gz"
...@@ -2,18 +2,19 @@ ...@@ -2,18 +2,19 @@
_flavor=grsec _flavor=grsec
pkgname=linux-${_flavor} pkgname=linux-${_flavor}
pkgver=2.6.31.4 pkgver=2.6.31.5
_kernver=2.6.31 _kernver=2.6.31
pkgrel=0 pkgrel=0
pkgdesc="Linux kernel with grsecurity" pkgdesc="Linux kernel with grsecurity"
url=http://grsecurity.net url=http://grsecurity.net
depends="mkinitfs linux-firmware" depends="mkinitfs linux-firmware"
makedepends="perl installkernel" makedepends="perl installkernel"
options="!strip"
_config=${config:-kernelconfig.${CARCH:-x86}} _config=${config:-kernelconfig.${CARCH:-x86}}
install= install=
source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2 source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
grsecurity-2.1.14-2.6.31.4-200910181015.patch grsecurity-2.1.14-2.6.31.5-200910232000.patch
kernelconfig.x86 kernelconfig.x86
" "
subpackages="$pkgname-dev linux-firmware:firmware" subpackages="$pkgname-dev linux-firmware:firmware"
...@@ -21,7 +22,7 @@ license="GPL-2" ...@@ -21,7 +22,7 @@ license="GPL-2"
_abi_release=${pkgver}-${_flavor} _abi_release=${pkgver}-${_flavor}
_prepare() { prepare() {
cd "$srcdir"/linux-$_kernver cd "$srcdir"/linux-$_kernver
if [ "$_kernver" != "$pkgver" ]; then if [ "$_kernver" != "$pkgver" ]; then
bunzip2 -c < ../patch-$pkgver.bz2 | patch -p1 -N || return 1 bunzip2 -c < ../patch-$pkgver.bz2 | patch -p1 -N || return 1
...@@ -41,24 +42,23 @@ _prepare() { ...@@ -41,24 +42,23 @@ _prepare() {
# this is so we can do: 'abuild menuconfig' to reconfigure kernel # this is so we can do: 'abuild menuconfig' to reconfigure kernel
menuconfig() { menuconfig() {
_prepare cd "$srcdir"/build || return 1
cd "$srcdir"/build
make menuconfig make menuconfig
cp .config "$startdir"/$_config cp .config "$startdir"/$_config
} }
build() { build() {
_prepare || return 1
cd "$srcdir"/build cd "$srcdir"/build
make CC="$CC" || return 1 make CC="$CC" || return 1
}
package() {
cd "$srcdir"/build
mkdir -p "$pkgdir"/boot "$pkgdir"/lib/modules mkdir -p "$pkgdir"/boot "$pkgdir"/lib/modules
make modules_install install \ make modules_install install \
INSTALL_MOD_PATH="$pkgdir" \ INSTALL_MOD_PATH="$pkgdir" \
INSTALL_PATH="$pkgdir"/boot INSTALL_PATH="$pkgdir"/boot
# ln -s vmlinuz-${_abi_release} "${pkgdir}"/boot/$_flavor
rm -f "$pkgdir"/lib/modules/${_abi_release}/build \ rm -f "$pkgdir"/lib/modules/${_abi_release}/build \
"$pkgdir"/lib/modules/${_abi_release}/source "$pkgdir"/lib/modules/${_abi_release}/source
install -D include/config/kernel.release \ install -D include/config/kernel.release \
...@@ -119,6 +119,6 @@ firmware() { ...@@ -119,6 +119,6 @@ firmware() {
} }
md5sums="84c077a37684e4cbfa67b18154390d8a linux-2.6.31.tar.bz2 md5sums="84c077a37684e4cbfa67b18154390d8a linux-2.6.31.tar.bz2
02078f4231baee4f0004212f2875df2b patch-2.6.31.4.bz2 6cac5e59d5562b591cdda485941204d5 patch-2.6.31.5.bz2
d4a3559a00702e4c6d6f3b7d64f72dcc grsecurity-2.1.14-2.6.31.4-200910181015.patch 6b3813a484429f160dce06d69e2e8d7f grsecurity-2.1.14-2.6.31.5-200910232000.patch
25d08b2d9f22a06994b1e45ab8276a7b kernelconfig.x86" 5fadc584b08c9bc420d61e148139becd kernelconfig.x86"
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.31.4 # Linux kernel version: 2.6.31.5
# Thu Oct 15 14:17:51 2009 # Mon Oct 26 17:37:25 2009
# #
# CONFIG_64BIT is not set # CONFIG_64BIT is not set
CONFIG_X86_32=y CONFIG_X86_32=y
...@@ -4289,9 +4289,9 @@ CONFIG_PAX_HAVE_ACL_FLAGS=y ...@@ -4289,9 +4289,9 @@ CONFIG_PAX_HAVE_ACL_FLAGS=y
# Non-executable pages # Non-executable pages
# #
CONFIG_PAX_NOEXEC=y CONFIG_PAX_NOEXEC=y
# CONFIG_PAX_PAGEEXEC is not set CONFIG_PAX_PAGEEXEC=y
CONFIG_PAX_SEGMEXEC=y # CONFIG_PAX_SEGMEXEC is not set
# CONFIG_PAX_EMUTRAMP is not set CONFIG_PAX_EMUTRAMP=y
CONFIG_PAX_MPROTECT=y CONFIG_PAX_MPROTECT=y
CONFIG_PAX_NOELFRELOCS=y CONFIG_PAX_NOELFRELOCS=y
CONFIG_PAX_KERNEXEC=y CONFIG_PAX_KERNEXEC=y
......
...@@ -9,14 +9,10 @@ fi ...@@ -9,14 +9,10 @@ fi
_kernelver=$pkgver-r$pkgrel _kernelver=$pkgver-r$pkgrel
_abi_release=$pkgver-${_flavor} _abi_release=$pkgver-${_flavor}
# get pkgver from xtables-addons package
if [ -f ../$_realname/APKBUILD ]; then
. ../$_realname/APKBUILD
fi
pkgname=${_realname}-${_flavor} pkgname=${_realname}-${_flavor}
pkgver=${pkgver:-1.17} pkgver=${pkgver}
pkgrel=15 _realver=1.19
pkgrel=0
pkgdesc="Iptables extensions kernel modules" pkgdesc="Iptables extensions kernel modules"
url="http://xtables-addons.sourceforge.net/" url="http://xtables-addons.sourceforge.net/"
license="GPL" license="GPL"
...@@ -24,17 +20,25 @@ depends="linux-${_flavor}=${_kernelver}" ...@@ -24,17 +20,25 @@ depends="linux-${_flavor}=${_kernelver}"
makedepends="linux-${_flavor}-dev=${_kernelver} iptables-dev pkgconfig" makedepends="linux-${_flavor}-dev=${_kernelver} iptables-dev pkgconfig"
install= install=
subpackages= subpackages=
source="http://downloads.sourceforge.net/$_realname/$_realname-$pkgver.tar.bz2" source="http://downloads.sourceforge.net/$_realname/$_realname-$_realver.tar.bz2"
build() { # override kernel's prepare()
cd "$srcdir/$_realname-$pkgver" prepare() {
:
}
build() {
cd "$srcdir/$_realname-$_realver"
./configure --prefix=/usr \ ./configure --prefix=/usr \
--with-kbuild=/usr/src/linux-headers-${_abi_release} --with-kbuild=/usr/src/linux-headers-${_abi_release}
cd extensions cd extensions
make CC="${CC:-gcc}" modules || return 1 make CC="${CC:-gcc}" modules || return 1
}
package() {
cd "$srcdir/$_realname-$_realver"/extensions
make DESTDIR="$pkgdir" modules_install make DESTDIR="$pkgdir" modules_install
} }
md5sums="eca2e3f4f4904814e3a301539876fae6 xtables-addons-1.17.tar.bz2" md5sums="6b51556a853aef8a3d1ab8925db809fc xtables-addons-1.19.tar.bz2"
...@@ -10,10 +10,10 @@ _kernelver=$pkgver-r$pkgrel ...@@ -10,10 +10,10 @@ _kernelver=$pkgver-r$pkgrel
_abi_release=$pkgver-${_flavor} _abi_release=$pkgver-${_flavor}
pkgname=${_realname}-${_flavor} pkgname=${_realname}-${_flavor}
pkgver=1.4.0_pre1 pkgver=$pkgver
_realver=1.4.0pre1 _realver=1.4.0pre1
pkgrel=10 pkgrel=0
pkgdesc="$_flavor kernel modules for kemu" pkgdesc="$_flavor kernel modules for kemu $_realver"
url="http://www.nongnu.org/qemu/" url="http://www.nongnu.org/qemu/"
license="GPL" license="GPL"
depends="linux-${_flavor}=${_kernelver}" depends="linux-${_flavor}=${_kernelver}"
...@@ -22,10 +22,19 @@ makedepends="linux-${_flavor}-dev=${_kernelver}" ...@@ -22,10 +22,19 @@ makedepends="linux-${_flavor}-dev=${_kernelver}"
subpackages= subpackages=
source="http://www.nongnu.org/qemu/kqemu-$_realver.tar.gz" source="http://www.nongnu.org/qemu/kqemu-$_realver.tar.gz"
# override kernel APKBUILD's prepare
prepare() {
:
}
build() { build() {
cd "$srcdir"/$_realname-$_realver cd "$srcdir"/$_realname-$_realver
./configure --kernel-path=/lib/modules/${_abi_release}/build ./configure --kernel-path=/lib/modules/${_abi_release}/build
make || return 1 make || return 1
}
package() {
cd "$srcdir"/$_realname-$_realver
install -D -m644 kqemu.ko \ install -D -m644 kqemu.ko \
"$pkgdir"/lib/modules/${_abi_release}/misc/kqemu.ko \ "$pkgdir"/lib/modules/${_abi_release}/misc/kqemu.ko \
|| return 1 || return 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment