aboutsummaryrefslogtreecommitdiffstats
path: root/testing/scst-grsec
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-04-21 09:38:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-04-21 09:38:33 +0000
commitdeb395a24f5c01845fee758f782fae8265f5d93d (patch)
treed597dbe823aa4a6b1a6543b66c80393b6dfc1075 /testing/scst-grsec
parentdc8e5ec0a58e861e56e01e5f444248a3b1104c83 (diff)
downloadaports-deb395a24f5c01845fee758f782fae8265f5d93d.tar.bz2
aports-deb395a24f5c01845fee758f782fae8265f5d93d.tar.xz
testing/scst-grsec: new aport
grsec kernel modules for SCST http://scst.sourceforge.net/
Diffstat (limited to 'testing/scst-grsec')
-rw-r--r--testing/scst-grsec/APKBUILD62
-rw-r--r--testing/scst-grsec/scst-kernel-2.6.32.patch17
2 files changed, 79 insertions, 0 deletions
diff --git a/testing/scst-grsec/APKBUILD b/testing/scst-grsec/APKBUILD
new file mode 100644
index 0000000000..144cfc07fe
--- /dev/null
+++ b/testing/scst-grsec/APKBUILD
@@ -0,0 +1,62 @@
+# Contributor: Carlo Landmeter
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+
+_flavor=${FLAVOR:-grsec}
+_realname=scst
+# source the kernel version
+if [ -f ../../main/linux-$_flavor/APKBUILD ]; then
+ . ../../main/linux-$_flavor/APKBUILD
+fi
+_kver=$pkgver
+_kernelver=$pkgver-r$pkgrel
+_abi_release=$pkgver-${_flavor}
+_kpkgrel=$pkgrel
+
+_realver=1.0.1.1
+pkgname=${_realname}-${_flavor}
+pkgver=$_kver
+_mypkgrel=0
+pkgrel=$(($_kpkgrel + $_mypkgrel))
+pkgdesc="$_flavor kernel modules for SCST $_realver"
+url="http://scst.sourceforge.net/"
+license="GPL-2"
+depends="linux-${_flavor}=${_kernelver}"
+install=
+makedepends="linux-${_flavor}-dev=${_kernelver}"
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/$_realname/$_realname-$_realver.tar.gz
+ scst-kernel-2.6.32.patch
+ "
+_ksrc=/usr/src/linux-headers-${_abi_release}
+
+_builddir="$srcdir"/$_realname-$_realver
+prepare() {
+ cd "$_builddir"
+ for i in "$srcdir"/*.patch; do
+ [ -f "$i" ] || continue
+ msg "Applying $i"
+ patch -p1 -i $i || return 1
+ done
+}
+
+build() {
+ cd "$_builddir"
+ unset ARCH
+ make KDIR="$_ksrc" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make KDIR="$_ksrc" \
+ INSTALL_MOD_PATH="$pkgdir" \
+ INSTALL_DIR_H="$pkgdir"/usr/include/scst \
+ install || return 1
+}
+
+# we sourced kernel apkbuild above so we need to override the dev() func
+dev() {
+ default_dev
+}
+
+md5sums="38abb5f10325911ff1374535a30a02ad scst-1.0.1.1.tar.gz
+a87b844b57f997c15c8e0099a313a98e scst-kernel-2.6.32.patch"
diff --git a/testing/scst-grsec/scst-kernel-2.6.32.patch b/testing/scst-grsec/scst-kernel-2.6.32.patch
new file mode 100644
index 0000000000..80fc8610aa
--- /dev/null
+++ b/testing/scst-grsec/scst-kernel-2.6.32.patch
@@ -0,0 +1,17 @@
+--- scst-1.0.1.1/src/dev_handlers/scst_vdisk.c.orig
++++ scst-1.0.1.1/src/dev_handlers/scst_vdisk.c
+@@ -2071,9 +2071,13 @@
+ inode = file->f_dentry->d_inode;
+ mapping = file->f_mapping;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
+ res = sync_page_range(inode, mapping, loff, len);
++#else
++ res = filemap_write_and_wait_range(file->f_mapping, loff, len);
++#endif
+ if (unlikely(res != 0)) {
+- PRINT_ERROR("sync_page_range() failed (%d)", res);
++ PRINT_ERROR("sync range failed (%d)", res);
+ if (cmd != NULL) {
+ scst_set_cmd_error(cmd,
+ SCST_LOAD_SENSE(scst_sense_write_error));