diff options
author | Alex Talker | 2017-04-08 17:56:21 +0300 |
---|---|---|
committer | Alex Talker | 2017-04-08 17:58:46 +0300 |
commit | 511100f022d3a36a33d80553d7f43b3d27caf05e (patch) | |
tree | cd3f3cda2e151206c31aaeea139843bd5fbed2d6 | |
download | aur-511100f022d3a36a33d80553d7f43b3d27caf05e.tar.gz |
Init commit
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 90 | ||||
-rw-r--r-- | queue.patch | 18 | ||||
-rw-r--r-- | scst.install | 13 |
4 files changed, 145 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f459e5b5cec1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +# Generated by mksrcinfo v8 +# Sat Apr 8 14:58:32 UTC 2017 +pkgbase = scst + pkgdesc = Generic SCSI Target Subsystem For Linux + pkgver = 3.2.0.7058 + pkgrel = 1 + url = http://scst.sourceforge.net + install = scst.install + arch = i686 + arch = x86_64 + license = GPL + depends = linux + depends = linux-headers + provides = scst + conflicts = scst + source = https://sourceforge.net/projects/scst/files/scst-.tar.bz2/download + source = https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.10.8.tar.xz + source = queue.patch + md5sums = SKIP + md5sums = SKIP + md5sums = 0e0c06a0f050f8aca3824e7d371b9a50 + +pkgname = scst + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b295e76da6d4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,90 @@ +# Original maintainer Alex Talker < Alextalker at openmailbox dot com > +# Support Maintainer Filip Brcic < brcha at gna dot org > +# Contributor bitwave < aur [at] oomlu [d0t] de > +# Alex say thanks to Filip about support this package while he was away from Arch. +pkgname=scst +pkgver=3.2.0.7058 +kversion=4.10.8 +pkgrel=1 +pkgdesc="Generic SCSI Target Subsystem For Linux" +arch=('i686' 'x86_64') +url="http://scst.sourceforge.net" +license=('GPL') +conflicts=("${pkgname}") +provides=("${pkgname}") +install=${pkgname}.install +depends=('linux' 'linux-headers') +source=( + "https://sourceforge.net/projects/scst/files/scst-${version}.tar.bz2/download" + "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${kversion}.tar.xz" + 'queue.patch' +) +md5sums=( + 'SKIP' + 'SKIP' + '0e0c06a0f050f8aca3824e7d371b9a50' +) + +prepare() { + cd "$srcdir"/scst* + + patch -Np0 -i "$srcdir/queue.patch" +} + +build() { + msg "Build package..." + cd "$srcdir"/scst* + + # Fix problem with scstadmin + unset PERL_MM_OPT + + export KVER=$(uname -r) + export KVERSION=$(uname -r) + export PREFIX="/usr" + export MANDIR=/usr/man + + # Fix problems with linux-headers package + # (rdma headers is missing) + _kern_inc=("$srcdir"/linux-*/include/) + export C_INCLUDE_PATH="$_kern_inc:$C_INCLUDE_PATH" + + for d in scst scst_local iscsi-scst; do + make -C "$d" 2release + make -C "$d" + done + + export MANDIR="$pkgdir"/usr/man + make -C scstadmin + msg "Done building!" +} + +package() { + msg "Package scst..." + cd "$srcdir"/scst* + + unset PERL_MM_OPT + export KVER=$(uname -r) + export KVERSION=$(uname -r) + export PREFIX="/usr" + export DESTDIR="$pkgdir" + export MANDIR=/usr/man + + for d in scst scst_local iscsi-scst; do + make -C "$d" INSTALL_MOD_PATH="$pkgdir" install + done + # Clean up conflic files + for f in "$pkgdir"/lib/modules/"$KVER"/modules.*; do + rm "$f" + done + # Resolve symlink + mv "$pkgdir"/lib "$pkgdir"/usr/ + + # scstadmin magic + export MANDIR="$pkgdir"/usr/man + make -C scstadmin install_vendor + mkdir -p "$pkgdir"/usr/bin + mv "$pkgdir"/usr/sbin/* "$pkgdir"/usr/bin + rm -rf "$pkgdir"/usr/sbin + + msg "Done with packaging scst" +} diff --git a/queue.patch b/queue.patch new file mode 100644 index 000000000000..50f72e06460d --- /dev/null +++ b/queue.patch @@ -0,0 +1,18 @@ +--- scst/src/scst_lib.c (revision 7103) ++++ scst/src/scst_lib.c (working copy) +@@ -8000,7 +8000,15 @@ static struct request *__blk_map_kern_sg(struct re + + if (bw != NULL) { + atomic_set(&bw->bios_inflight, bios); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) ++ /* ++ * See also patch "block: split out request-only flags into a new namespace" ++ * (commit e806402130c9). ++ */ + rq->cmd_flags |= REQ_COPY_USER; ++#else ++ rq->rq_flags |= RQF_COPY_USER; ++#endif + } + + out:
\ No newline at end of file diff --git a/scst.install b/scst.install new file mode 100644 index 000000000000..44ab0697a69a --- /dev/null +++ b/scst.install @@ -0,0 +1,13 @@ +post_install() { + EXTRAMODULES='extramodules-4.10-ARCH' + depmod $(cat /usr/lib/modules/${EXTRAMODULES}/version) + echo 'In order to use scst module, reboot the system or insert manually.' +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} |