commit b824dfcb33b97ea576b7962e5b4745cb10e0d1ee40058a413ed0777f99fa0a33 Author: Jan Engelhardt Date: Mon May 21 17:30:59 2012 +0000 Accepting request 116800 from home:jengelh:dev cdemu suite OBS-URL: https://build.opensuse.org/request/show/116800 OBS-URL: https://build.opensuse.org/package/show/filesystems/vhba-kmp?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/vhba-kmp-preamble b/vhba-kmp-preamble new file mode 100644 index 0000000..e5d22a9 --- /dev/null +++ b/vhba-kmp-preamble @@ -0,0 +1,3 @@ +Enhances: kernel-%1 +Requires: kernel-%1 +Supplements: packageand(kernel-%1:vhba) diff --git a/vhba-kmp.changes b/vhba-kmp.changes new file mode 100644 index 0000000..b4c2445 --- /dev/null +++ b/vhba-kmp.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Tue May 8 21:05:27 UTC 2012 - jengelh@inai.de + +- Initial package for build.opensuse.org diff --git a/vhba-kmp.spec b/vhba-kmp.spec new file mode 100644 index 0000000..f0eff0b --- /dev/null +++ b/vhba-kmp.spec @@ -0,0 +1,75 @@ +# +# spec file for package vhba-kmp +# +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# +Name: vhba-kmp +Version: 20120422 +Release: 1 +Summary: Virtual SCSI Host Bus Adapter +License: GPL-2.0+ +Group: System/Kernel +Url: http://cdemu.sf.net/ + +Source: http://downloads.sf.net/cdemu/vhba-module-%version.tar.bz2 +Patch1: vhba-pwd.diff +Patch2: vhba-parallel-build.diff +Patch3: vhba-no-werror.diff +BuildRequires: kernel-devel >= 2.6.20, kernel-syms >= 2.6.0, module-init-tools +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%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 +Group: System/Kernel + +%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 +%setup -qn vhba-module-%version +%patch -P 1 -P 2 -P 3 -p1 + +%build +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; + +%changelog diff --git a/vhba-module-20120422.tar.bz2 b/vhba-module-20120422.tar.bz2 new file mode 100644 index 0000000..6d75a94 --- /dev/null +++ b/vhba-module-20120422.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23d968aa841af25579238bb75d0f8a8e73c2562d7205d22a5af63ef681e53f81 +size 15299 diff --git a/vhba-no-werror.diff b/vhba-no-werror.diff new file mode 100644 index 0000000..fc05ef3 --- /dev/null +++ b/vhba-no-werror.diff @@ -0,0 +1,21 @@ +From: Jan Engelhardt +Date: 2012-05-08 22:52:51.798190070 +0200 +Upstream: tendency: no + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: vhba-module-20120422/Makefile +=================================================================== +--- vhba-module-20120422.orig/Makefile ++++ vhba-module-20120422/Makefile +@@ -1,7 +1,7 @@ + VHBA_VERSION = $(shell date -r ${src}/vhba.c +%Y%m%d) + PACKAGE = vhba-module-$(VHBA_VERSION) + +-EXTRA_CFLAGS += -DVHBA_VERSION=\"$(VHBA_VERSION)\" -Werror ++EXTRA_CFLAGS += -DVHBA_VERSION=\"$(VHBA_VERSION)\" + + obj-m += vhba.o + diff --git a/vhba-parallel-build.diff b/vhba-parallel-build.diff new file mode 100644 index 0000000..ff96c2c --- /dev/null +++ b/vhba-parallel-build.diff @@ -0,0 +1,46 @@ +From: Jan Engelhardt +Date: 2012-05-08 22:50:50.918987100 + +build: enable parallel build + +${MAKE} -C must not be hidden behind a variable to not break parallel +building. + +--- + Makefile | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +Index: vhba-module-20120422/Makefile +=================================================================== +--- vhba-module-20120422.orig/Makefile ++++ vhba-module-20120422/Makefile +@@ -5,27 +5,18 @@ EXTRA_CFLAGS += -DVHBA_VERSION=\"$(VHBA_ + + obj-m += vhba.o + +-PWD ?= `pwd` + KERNELRELEASE ?= `uname -r` + KDIR ?= /lib/modules/$(KERNELRELEASE)/build +-KMAKE := $(MAKE) -C $(KDIR) M=$(PWD) + + DOCS = AUTHORS ChangeLog COPYING INSTALL NEWS README + + all: modules + +-modules: +- $(KMAKE) modules +- +-module_install: +- $(KMAKE) modules_install ++modules modules_install clean: ++ ${MAKE} -C ${KDIR} M=$$PWD $@ + + install: module_install + +-clean: +- $(KMAKE) clean +- rm -fr $(PACKAGE) +- + dist: dist-gzip + + dist-dir: diff --git a/vhba-pwd.diff b/vhba-pwd.diff new file mode 100644 index 0000000..3844dd2 --- /dev/null +++ b/vhba-pwd.diff @@ -0,0 +1,29 @@ +From: Jan Engelhardt +Date: 2012-05-08 22:51:09 +0200 + +build: fix incorrect use of $(PWD) + +With out-of-tree builds, I am getting this warning: + +date: /usr/src/linux-3.1.10-1.9/vhba.c: No such file or directory + +So use the proper directory. + +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: vhba-module-20120422/Makefile +=================================================================== +--- vhba-module-20120422.orig/Makefile ++++ vhba-module-20120422/Makefile +@@ -1,7 +1,7 @@ +-VHBA_VERSION = $(shell date -r $(PWD)/vhba.c +%Y%m%d) ++VHBA_VERSION = $(shell date -r ${src}/vhba.c +%Y%m%d) + PACKAGE = vhba-module-$(VHBA_VERSION) + +-EXTRA_CFLAGS += -DVHBA_VERSION=\"$(VHBA_VERSION)\" -I$(PWD) -Werror ++EXTRA_CFLAGS += -DVHBA_VERSION=\"$(VHBA_VERSION)\" -Werror + + obj-m += vhba.o +