[info=f7b947967abfd854991eed3a50a333f2efa4c47932e3d7d2fc1d07c6afdb79bd]
OBS-URL: https://build.opensuse.org/package/show/filesystems/vhba-kmp?expand=0&rev=50
This commit is contained in:
commit
2c98b66bb0
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
4
_scmsync.obsinfo
Normal file
4
_scmsync.obsinfo
Normal file
@ -0,0 +1,4 @@
|
||||
mtime: 1707760417
|
||||
commit: f7b947967abfd854991eed3a50a333f2efa4c47932e3d7d2fc1d07c6afdb79bd
|
||||
url: https://src.opensuse.org/jengelh/vhba-kmp
|
||||
revision: master
|
3
build.specials.obscpio
Normal file
3
build.specials.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fed22b5561718af145e3f827a1dc3704fa0827b1476ba907b806917b6493cca7
|
||||
size 256
|
41
vhba-devname.diff
Normal file
41
vhba-devname.diff
Normal file
@ -0,0 +1,41 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2015-11-23 23:33:05.117741396 +0100
|
||||
|
||||
Facililtate automatic loading of the kernel module on openSUSE
|
||||
|
||||
depmod scans the devname aliases and populates
|
||||
/lib/modules/X/modules.devname if there is also a
|
||||
{block,char}-major-* alias. udev uses this file then to prepopulate
|
||||
/dev so that a program can open a device node and thereby trigger
|
||||
autoloading.
|
||||
|
||||
This patch adds the devname (requirement 1), and assigns
|
||||
a static number (requirement 2, for openSUSE only).
|
||||
|
||||
---
|
||||
vhba.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: vhba-module-20140928/vhba.c
|
||||
===================================================================
|
||||
--- vhba-module-20140928.orig/vhba.c
|
||||
+++ vhba-module-20140928/vhba.c
|
||||
@@ -954,7 +954,11 @@ static struct file_operations vhba_ctl_f
|
||||
};
|
||||
|
||||
static struct miscdevice vhba_miscdev = {
|
||||
- .minor = MISC_DYNAMIC_MINOR,
|
||||
+ /* Facilitate autoload on openSUSE. The exact number does not matter,
|
||||
+ * and may change over time, e.g. if "170" gets used by upstream.
|
||||
+ * Of essence is that MISC_DYNAMIC_MINOR is to be avoided.
|
||||
+ */
|
||||
+ .minor = 170,
|
||||
.name = "vhba_ctl",
|
||||
.fops = &vhba_ctl_fops,
|
||||
};
|
||||
@@ -1069,3 +1073,5 @@ static void __exit vhba_exit(void)
|
||||
module_init(vhba_init);
|
||||
module_exit(vhba_exit);
|
||||
|
||||
+MODULE_ALIAS("devname:vhba_ctl");
|
||||
+MODULE_ALIAS_MISCDEV(170);
|
2
vhba-kmp-preamble
Normal file
2
vhba-kmp-preamble
Normal file
@ -0,0 +1,2 @@
|
||||
Enhances: kernel-%1
|
||||
Requires: kernel-%1
|
123
vhba-kmp.changes
Normal file
123
vhba-kmp.changes
Normal file
@ -0,0 +1,123 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 12 12:31:01 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 20240202
|
||||
* No user-visible changes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 20 08:55:45 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add vhba-sle-kernel.diff [boo#1206169]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 5 12:47:43 UTC 2022 - Ludwig Nussel <lnussel@suse.de>
|
||||
|
||||
- BuildRequire %kernel_module_package_buildreqs (boo#1205149)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 19 13:08:52 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 20211218
|
||||
* Support for Linux 5.16 SCSI layer API updates
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 25 23:43:30 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 20211023
|
||||
* Support for Linux 5.15
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 20 13:41:52 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 20210418
|
||||
* vhba: Change how command matching and tagging is performed.
|
||||
* vhba: Use dynamic debugging for everything.
|
||||
* vhba: Handle command queue locking ourselves.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 19 10:36:07 UTC 2020 - Aaron Stern <ukbeast89@protonmail.com>
|
||||
|
||||
- Update to release 20200106
|
||||
* Added an ioctl to retrieve the global device number
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 17 10:02:53 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to release 20190831
|
||||
* Don't try to unload module from running kernel.
|
||||
* Add support for multiple SCSI channels.
|
||||
* Add proper support for scatterlist chaining.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 1 13:45:02 UTC 2019 - Aaron Stern <ukbeast89@ptotonmail.com>
|
||||
|
||||
-Update to new upstream release 20190410
|
||||
* Fixes crash when mounting disk image on linux 5.1
|
||||
* Remove vhba-scsiapi.diff, as upstream builds with linux 5.1
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 28 14:38:13 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add vhba-scsiapi.diff to fix the build with Linux 5.1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 7 13:28:09 UTC 2017 - jengelh@inai.de
|
||||
|
||||
- Update to new upstream release 20170610
|
||||
* Support for Linux 4.11 (integrate vhba-signal.diff)
|
||||
- Drop vhba-signal.diff (merged upstream)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 17 22:20:05 UTC 2017 - jengelh@inai.de
|
||||
|
||||
- Add vhba-signal.diff so it builds with Linux 4.11
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 6 17:35:38 UTC 2017 - jengelh@inai.de
|
||||
|
||||
- Update to new upstream release 20161009
|
||||
* Documentation updates
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 9 17:19:01 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Improve autoloading by editing vhba-devname.diff to assign a
|
||||
static misc number.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 23 22:32:50 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Add vhba-devname.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 2 14:14:22 UTC 2014 - jengelh@inai.de
|
||||
|
||||
- Update to new upstream release 20140928 (cdemu-3.0.2)
|
||||
* Work around a warning occurring in grsecurity kernels
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 13 08:48:46 UTC 2014 - sor.alexei@meowr.ru
|
||||
|
||||
- Update to new upstream release 20140629 (cdemu-3.0.0)
|
||||
* CD image write support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 9 14:14:21 UTC 2013 - jengelh@inai.de
|
||||
|
||||
- Update to new upstream release 20130607 (cdemu-2.1.0)
|
||||
* Added support for non-blocking I/O.
|
||||
* Allow longer commands to be issues on VHBA.
|
||||
* Explicitly distinguish between device addition and device removal
|
||||
change, and resolve cases when both occur before rescan is done.
|
||||
- Remove vhba-parallel-build.diff, vhba-pwd.diff (merged upstream)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 30 02:57:55 UTC 2013 - jengelh@inai.de
|
||||
|
||||
- Remove unused Supplements; use virtual modutils for building
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 8 21:05:27 UTC 2012 - jengelh@inai.de
|
||||
|
||||
- Initial package for build.opensuse.org
|
82
vhba-kmp.spec
Normal file
82
vhba-kmp.spec
Normal file
@ -0,0 +1,82 @@
|
||||
#
|
||||
# spec file for package vhba-kmp
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: vhba-kmp
|
||||
Version: 20240202
|
||||
Release: 0
|
||||
Summary: Virtual SCSI Host Bus Adapter
|
||||
License: GPL-2.0-or-later
|
||||
Group: System/Kernel
|
||||
URL: https://cdemu.sourceforge.io/about/vhba/
|
||||
|
||||
#Git-Clone: https://github.com/cdemu/cdemu
|
||||
Source: https://downloads.sf.net/cdemu/vhba-module-%version.tar.xz
|
||||
Source2: %name-preamble
|
||||
Patch1: vhba-no-werror.diff
|
||||
Patch2: vhba-devname.diff
|
||||
Patch3: vhba-sle-kernel.diff
|
||||
BuildRequires: %kernel_module_package_buildreqs
|
||||
BuildRequires: kernel-syms >= 2.6.20
|
||||
|
||||
%{?kernel_module_package:%kernel_module_package -n vhba -p %name-preamble}
|
||||
|
||||
%description
|
||||
A Linux kernel module implementing a virtual SCSI Host Bus Adapter to
|
||||
act 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, CD/DVD-ROM device emulator for
|
||||
Linux.
|
||||
|
||||
%package KMP
|
||||
Summary: Virtual SCSI Host Bus adapter
|
||||
|
||||
%description KMP
|
||||
A Linux kernel module implementing a virtual SCSI Host Bus Adapter to
|
||||
act 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, CD/DVD-ROM device emulator for
|
||||
Linux.
|
||||
|
||||
%prep
|
||||
echo %flavors_to_build
|
||||
%autosetup -n vhba-module-%version -p1
|
||||
|
||||
%build
|
||||
%if 0%{?sle_version} >= 150500 && 0%{?sle_version} < 160000
|
||||
export KCFLAGS="-DSLE"
|
||||
%endif
|
||||
for flavor in %flavors_to_build; do
|
||||
cp -a . "../obj-$flavor/"
|
||||
pushd "../obj-$flavor/"
|
||||
make KDIR="/usr/src/linux-obj/%_target_cpu/$flavor" \
|
||||
%{?_smp_mflags}
|
||||
popd
|
||||
done
|
||||
|
||||
%install
|
||||
export INSTALL_MOD_PATH="%buildroot"
|
||||
|
||||
for flavor in %flavors_to_build; do
|
||||
pushd "../obj-$flavor/"
|
||||
make KDIR="/usr/src/linux-obj/%_target_cpu/$flavor" \
|
||||
modules_install
|
||||
popd
|
||||
done
|
||||
# udev rules are packaged in cdemu-daemon.spec instead
|
||||
|
||||
%changelog
|
3
vhba-module-20240202.tar.xz
Normal file
3
vhba-module-20240202.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bf5850d4b8f50221ca87d7343a929eda87b191f6f5ae8c614174543b5badde83
|
||||
size 16168
|
21
vhba-no-werror.diff
Normal file
21
vhba-no-werror.diff
Normal file
@ -0,0 +1,21 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2012-05-08 22:52:51.798190070 +0200
|
||||
Upstream: tendency: no
|
||||
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: vhba-module-20140928/Makefile
|
||||
===================================================================
|
||||
--- vhba-module-20140928.orig/Makefile
|
||||
+++ vhba-module-20140928/Makefile
|
||||
@@ -5,7 +5,7 @@ KDIR ?= /lib/modules/$(KERNELRELEASE)/bu
|
||||
PWD ?= $(shell pwd)
|
||||
|
||||
obj-m := vhba.o
|
||||
-ccflags-y := -DVHBA_VERSION=\"$(VHBA_VERSION)\" -Werror
|
||||
+ccflags-y := -DVHBA_VERSION=\"$(VHBA_VERSION)\"
|
||||
|
||||
default: modules
|
||||
install: modules_install
|
58
vhba-sle-kernel.diff
Normal file
58
vhba-sle-kernel.diff
Normal file
@ -0,0 +1,58 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2023-04-20 10:58:03.045935811 +0200
|
||||
|
||||
Workaround failing VHBA compilation for the SLE 15.5 kernel API.
|
||||
|
||||
---
|
||||
vhba.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: vhba-module-20211218/vhba.c
|
||||
===================================================================
|
||||
--- vhba-module-20211218.orig/vhba.c
|
||||
+++ vhba-module-20211218/vhba.c
|
||||
@@ -203,7 +203,7 @@ int vhba_device_queue (struct vhba_devic
|
||||
vcmd->cmd = cmd;
|
||||
|
||||
spin_lock_irqsave(&vdev->cmd_lock, flags);
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) || defined(SLE)
|
||||
vcmd->metatag = scsi_cmd_to_rq(vcmd->cmd)->tag;
|
||||
#else
|
||||
vcmd->metatag = vcmd->cmd->request->tag;
|
||||
@@ -477,7 +477,7 @@ int vhba_queuecommand (struct Scsi_Host
|
||||
int retval;
|
||||
unsigned int devnum;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) || defined(SLE)
|
||||
scmd_dbg(cmd, "queue %p tag %i\n", cmd, scsi_cmd_to_rq(cmd)->tag);
|
||||
#else
|
||||
scmd_dbg(cmd, "queue %p tag %i\n", cmd, cmd->request->tag);
|
||||
@@ -489,7 +489,7 @@ int vhba_queuecommand (struct Scsi_Host
|
||||
scmd_dbg(cmd, "no such device\n");
|
||||
|
||||
cmd->result = DID_NO_CONNECT << 16;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) || defined(SLE)
|
||||
scsi_done(cmd);
|
||||
#else
|
||||
cmd->scsi_done(cmd);
|
||||
@@ -828,7 +828,7 @@ ssize_t vhba_ctl_write (struct file *fil
|
||||
|
||||
spin_lock_irqsave(&vdev->cmd_lock, flags);
|
||||
if (ret >= 0) {
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) || defined(SLE)
|
||||
scsi_done(vcmd->cmd);
|
||||
#else
|
||||
vcmd->cmd->scsi_done(vcmd->cmd);
|
||||
@@ -958,7 +958,7 @@ int vhba_ctl_release (struct inode *inod
|
||||
|
||||
scmd_dbg(vcmd->cmd, "device released with command %lu (%p)\n", vcmd->metatag, vcmd->cmd);
|
||||
vcmd->cmd->result = DID_NO_CONNECT << 16;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) || defined(SLE)
|
||||
scsi_done(vcmd->cmd);
|
||||
#else
|
||||
vcmd->cmd->scsi_done(vcmd->cmd);
|
Loading…
x
Reference in New Issue
Block a user