From 5078eab5bdabc158c46bbc24f30884d475c01dfa Mon Sep 17 00:00:00 2001 From: Leonardo Arena Date: Fri, 7 Oct 2011 08:38:07 +0000 Subject: main/open-iscsi-grsec: add support for kernel 3.0.4 --- main/open-iscsi-grsec/APKBUILD | 8 +++--- .../Makefile-Alpine-kernels-support.patch | 33 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 main/open-iscsi-grsec/Makefile-Alpine-kernels-support.patch diff --git a/main/open-iscsi-grsec/APKBUILD b/main/open-iscsi-grsec/APKBUILD index 2402ec508c..2cfd6f1c8e 100644 --- a/main/open-iscsi-grsec/APKBUILD +++ b/main/open-iscsi-grsec/APKBUILD @@ -21,20 +21,20 @@ _mypkgrel=0 pkgrel=$(($_kpkgrel + $_mypkgrel)) pkgdesc="$_flavor kernel modules for open-iscsi $_iscsiver" url="http://www.open-iscsi.org" -arch="" +arch="all" license="GPL-2" depends="linux-${_flavor}=${_kernelver}" install= makedepends="linux-${_flavor}-dev=${_kernelver}" subpackages= source="http://www.open-iscsi.org/bits/$_realname-$_realver.tar.gz - Makefile.kernel.patch" + Makefile-Alpine-kernels-support.patch" _builddir="$srcdir/$_realname-$_realver" prepare() { cd "$_builddir" - patch -p2 < "$srcdir"/Makefile.kernel.patch || return 1 + patch -p1 < "$srcdir"/Makefile-Alpine-kernels-support.patch || return 1 } build() { @@ -52,4 +52,4 @@ package() { } md5sums="b4df94f08c241352bb964043b3e44779 open-iscsi-2.0-872.tar.gz -f0c851e9190c859987d9f561d6eeb7f5 Makefile.kernel.patch" +7b7ba39a7e8e869939168865a5f8b495 Makefile-Alpine-kernels-support.patch" diff --git a/main/open-iscsi-grsec/Makefile-Alpine-kernels-support.patch b/main/open-iscsi-grsec/Makefile-Alpine-kernels-support.patch new file mode 100644 index 0000000000..166cc72e44 --- /dev/null +++ b/main/open-iscsi-grsec/Makefile-Alpine-kernels-support.patch @@ -0,0 +1,33 @@ +--- a/kernel/Makefile ++++ b/kernel/Makefile +@@ -63,11 +63,19 @@ + # check to see if code is unpatched + unpatch_code=$(shell test -e $(cur_patched) && echo do_unpatch_code ) + ++KVERSION = $(shell cat $(KSRC)/Makefile | awk -F= '/^VERSION =/ {print $$2}' | \ ++ sed 's/^[ \t]*//;s/[ \t]*$$//') ++ ++KPATCHLEVEL = $(shell cat $(KSRC)/Makefile | awk -F= '/^PATCHLEVEL =/ {print $$2}' | \ ++ sed 's/^[ \t]*//;s/[ \t]*$$//') ++ + KSUBLEVEL = $(shell cat $(KSRC)/Makefile | awk -F= '/^SUBLEVEL =/ {print $$2}' | \ + sed 's/^[ \t]*//;s/[ \t]*$$//') + ++linux_2_6_38: $(unpatch_code) + +-KERNEL_TARGET=linux_2_6_$(KSUBLEVEL) ++ ++KERNEL_TARGET=linux_$(KVERSION)_$(KPATCHLEVEL)_$(KSUBLEVEL) + kernel_check: $(KERNEL_TARGET) + + linux_2_6_14: has_14to23_patch +@@ -113,6 +121,8 @@ + linux_2_6_34: has_33to34_patch + + linux_2_6_35: $(unpatch_code) ++ ++linux_3_0_4: $(unpatch_code) + + do_unpatch_code: + echo "Un-patching source code for use with linux-2.6.14 and up ..." +Only in b: kernel/Makefile.orig -- cgit v1.2.3