diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2010-06-30 23:45:20 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-06-30 23:45:20 -0500 |
commit | 0d899f2d3b4f7dfcca9bb6585f4ab1788b22bf34 (patch) | |
tree | 312f6066c39f6ef92931576a30c50871c3e661a7 /system | |
parent | b96e51ca7339a79038c59e85073d8cf6867d43a0 (diff) |
system/vhba-module: Added (Virtual SCSI Host Bus adapter)
Re-added from 13.0 repository with a patch to bring everything
up to what's in the upstream svn repository (so it will build
on 2.6.33 and 2.6.34 kernels).
If the previous maintainer is no longer interested, we can look
at removing it for 13.2/14.0, but for now, let's eliminate the
missing dependency on it in our repo.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/vhba-module/README | 4 | ||||
-rw-r--r-- | system/vhba-module/doinst.sh | 2 | ||||
-rw-r--r-- | system/vhba-module/slack-desc | 19 | ||||
-rw-r--r-- | system/vhba-module/vhba-module.SlackBuild | 73 | ||||
-rw-r--r-- | system/vhba-module/vhba-module.info | 10 | ||||
-rw-r--r-- | system/vhba-module/vhba-update_to_svn.diff | 85 |
6 files changed, 193 insertions, 0 deletions
diff --git a/system/vhba-module/README b/system/vhba-module/README new file mode 100644 index 0000000000000..1c7ddd2b4d504 --- /dev/null +++ b/system/vhba-module/README @@ -0,0 +1,4 @@ +This is VHBA (Virtual SCSI Host Bus adapter), a Linux kernel module which +acts as a low-level SCSI driver and which provides the SCSI layer with a +virtual SCSI adapter which can have multiple virtual devices. It is part +of the userspace-cdemu suite, a free GPL CD/DVD-ROM device emulator for linux. diff --git a/system/vhba-module/doinst.sh b/system/vhba-module/doinst.sh new file mode 100644 index 0000000000000..f61efdf685234 --- /dev/null +++ b/system/vhba-module/doinst.sh @@ -0,0 +1,2 @@ +chroot . /sbin/depmod -a + diff --git a/system/vhba-module/slack-desc b/system/vhba-module/slack-desc new file mode 100644 index 0000000000000..ab38030776d90 --- /dev/null +++ b/system/vhba-module/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------| +vhba-module: vhba-module (virtual scsi host bus adapter module) +vhba-module: +vhba-module: This is VHBA (Virtual SCSI Host Bus adapter), a Linux kernel +vhba-module: module which acts as a low-level SCSI driver and which provides +vhba-module: the SCSI layer with a virtual SCSI adapter which can have +vhba-module: multiple virtual devices. It is part of the userspace-cdemu +vhba-module: suite, a free, GPL CD/DVD-ROM device emulator for linux. +vhba-module: +vhba-module: Homepage: http://cdemu.sourceforge.net/pkg_vhba.php +vhba-module: +vhba-module: diff --git a/system/vhba-module/vhba-module.SlackBuild b/system/vhba-module/vhba-module.SlackBuild new file mode 100644 index 0000000000000..7d8e33450d21f --- /dev/null +++ b/system/vhba-module/vhba-module.SlackBuild @@ -0,0 +1,73 @@ +#!/bin/sh + +# Slackware build script for vhba-module + +# Copyright 2008-2009 Heinz Wiesinger <pprkut@liwjatan.at> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=vhba-module +SRC_VERSION=1.2.1 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +KERNEL=${KERNEL:-$(uname -r)} +VERSION=${SRC_VERSION}_$(echo $KERNEL | tr - _) + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=${PKG:-$TMP/package-$PRGNAM} +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$SRC_VERSION +tar xvf $CWD/$PRGNAM-$SRC_VERSION.tar.bz2 +cd $PRGNAM-$SRC_VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# Bring vhba.c up to date with the svn repo copy +patch -p1 < $CWD/vhba-update_to_svn.diff + +make KERNELRELEASE=$KERNEL + +mkdir -p $PKG/lib/modules/$KERNEL/extra +install -m 0644 vhba.ko $PKG/lib/modules/$KERNEL/extra/ + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/vhba-module/vhba-module.info b/system/vhba-module/vhba-module.info new file mode 100644 index 0000000000000..c62c6b339121b --- /dev/null +++ b/system/vhba-module/vhba-module.info @@ -0,0 +1,10 @@ +PRGNAM="vhba-module" +VERSION="1.2.1" +HOMEPAGE="http://cdemu.sourceforge.net/pkg_vhba.php" +DOWNLOAD="http://downloads.sourceforge.net/cdemu/vhba-module-1.2.1.tar.bz2" +MD5SUM="a3b6ad798f2b72ef599df797ef79e5ec" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Niklas 'Nille' Åkerström" +EMAIL="nille.kungen[AT]gmail.com" +APPROVED="rworkman" diff --git a/system/vhba-module/vhba-update_to_svn.diff b/system/vhba-module/vhba-update_to_svn.diff new file mode 100644 index 0000000000000..41591380eae92 --- /dev/null +++ b/system/vhba-module/vhba-update_to_svn.diff @@ -0,0 +1,85 @@ +diff -Nur vhba-module-1.2.1.orig//kat/have_scsi_macros.c vhba-module-1.2.1/kat/have_scsi_macros.c +--- vhba-module-1.2.1.orig//kat/have_scsi_macros.c 2009-01-17 17:21:16.000000000 -0600 ++++ vhba-module-1.2.1/kat/have_scsi_macros.c 2010-06-30 23:41:37.203194236 -0500 +@@ -1,4 +1,3 @@ +-#include <linux/autoconf.h> + #include <scsi/scsi_cmnd.h> + + void testfunc (void); +diff -Nur vhba-module-1.2.1.orig//kat/scatterlist_has_page_link.c vhba-module-1.2.1/kat/scatterlist_has_page_link.c +--- vhba-module-1.2.1.orig//kat/scatterlist_has_page_link.c 2009-01-17 17:21:16.000000000 -0600 ++++ vhba-module-1.2.1/kat/scatterlist_has_page_link.c 2010-06-30 23:40:49.982069552 -0500 +@@ -1,4 +1,3 @@ +-#include <linux/autoconf.h> + #include <linux/scatterlist.h> + + /* Note: scatterlist.page_link is used in kernel (2.6.24 <= version < X) */ +diff -Nur vhba-module-1.2.1.orig//vhba.c vhba-module-1.2.1/vhba.c +--- vhba-module-1.2.1.orig//vhba.c 2009-01-17 17:21:16.000000000 -0600 ++++ vhba-module-1.2.1/vhba.c 2010-06-30 23:40:14.430097774 -0500 +@@ -1,7 +1,7 @@ + /* + * vhba.c + * +- * Copyright (C) 2007 Chia-I Wu <b90201047 AT ntu DOT edu DOT tw> ++ * Copyright (C) 2007-2010 Chia-I Wu <b90201047 AT ntu DOT edu DOT tw> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License +@@ -26,6 +26,10 @@ + #include <linux/platform_device.h> + #include <linux/miscdevice.h> + #include <linux/poll.h> ++#include <linux/slab.h> ++#ifdef CONFIG_COMPAT ++#include <linux/compat.h> ++#endif + #include <asm/uaccess.h> + #include <scsi/scsi.h> + #include <scsi/scsi_host.h> +@@ -52,7 +56,7 @@ + dev_warn(&(scmd)->device->sdev_gendev, fmt, ##a) + + +-#define VHBA_MAX_SECTORS_PER_IO 128 ++#define VHBA_MAX_SECTORS_PER_IO 256 + #define VHBA_MAX_ID 32 + #define VHBA_CAN_QUEUE 32 + #define VHBA_INVALID_ID VHBA_MAX_ID +@@ -671,7 +675,7 @@ + return ret; + } + +-static int vhba_ctl_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) ++static long vhba_ctl_ioctl (struct file *file, unsigned int cmd, unsigned long arg) + { + struct vhba_device *vdev = file->private_data; + struct vhba_host *vhost; +@@ -704,6 +708,15 @@ + return -ENOTTY; + } + ++#ifdef CONFIG_COMPAT ++static long vhba_ctl_compat_ioctl (struct file *file, unsigned int cmd, unsigned long arg) ++{ ++ unsigned long compat_arg = (unsigned long)compat_ptr(arg); ++ ++ return vhba_ctl_ioctl(file, cmd, compat_arg); ++} ++#endif ++ + static unsigned int vhba_ctl_poll(struct file *file, poll_table *wait) + { + struct vhba_device *vdev = file->private_data; +@@ -781,7 +794,10 @@ + .read = vhba_ctl_read, + .write = vhba_ctl_write, + .poll = vhba_ctl_poll, +- .ioctl = vhba_ctl_ioctl, ++ .unlocked_ioctl = vhba_ctl_ioctl, ++#ifdef CONFIG_COMPAT ++ .compat_ioctl = vhba_ctl_compat_ioctl, ++#endif + }; + + static struct miscdevice vhba_miscdev = { |