[arch-commits] Commit in vhba-module/trunk (4 files)

Jan Steffens heftig at archlinux.org
Mon Jun 12 20:17:10 UTC 2017


    Date: Monday, June 12, 2017 @ 20:17:09
  Author: heftig
Revision: 236560

20170610-1

Added:
  vhba-module/trunk/dkms.conf
Modified:
  vhba-module/trunk/PKGBUILD
  vhba-module/trunk/vhba-module.install
Deleted:
  vhba-module/trunk/0001-VHBA-compatibility-fix-for-upcoming-kernel-4.11.patch

------------------------------------------------------------+
 0001-VHBA-compatibility-fix-for-upcoming-kernel-4.11.patch |   41 -------
 PKGBUILD                                                   |   59 +++++------
 dkms.conf                                                  |    9 +
 vhba-module.install                                        |   14 --
 4 files changed, 44 insertions(+), 79 deletions(-)

Deleted: 0001-VHBA-compatibility-fix-for-upcoming-kernel-4.11.patch
===================================================================
--- 0001-VHBA-compatibility-fix-for-upcoming-kernel-4.11.patch	2017-06-12 20:12:17 UTC (rev 236559)
+++ 0001-VHBA-compatibility-fix-for-upcoming-kernel-4.11.patch	2017-06-12 20:17:09 UTC (rev 236560)
@@ -1,41 +0,0 @@
-From 7dc0d29a3ef6e45455f537c8187791446ca7e1e5 Mon Sep 17 00:00:00 2001
-From: Rok Mandeljc <rok.mandeljc at gmail.com>
-Date: Sun, 26 Mar 2017 17:09:42 +0200
-Subject: [PATCH] VHBA: compatibility fix for upcoming kernel 4.11
-
-As per Bug #104, from 4.11-rc2 on, we need to include linux/sched/signal.h
-instead of linux/sched.h
----
- vhba-module/vhba.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/vhba-module/vhba.c b/vhba-module/vhba.c
-index 4a14a10e955000bb..ff30e4cb51b61ec6 100644
---- a/vhba-module/vhba.c
-+++ b/vhba-module/vhba.c
-@@ -18,16 +18,21 @@
-  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-  */
- 
-+#include <linux/version.h>
-+
- #include <linux/init.h>
- #include <linux/module.h>
- #include <linux/highmem.h>
- #include <linux/fs.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-+#include <linux/sched/signal.h>
-+#else
- #include <linux/sched.h>
-+#endif
- #include <linux/platform_device.h>
- #include <linux/miscdevice.h>
- #include <linux/poll.h>
- #include <linux/slab.h>
--#include <linux/version.h>
- #ifdef CONFIG_COMPAT
- #include <linux/compat.h>
- #endif
--- 
-2.12.2
-

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-06-12 20:12:17 UTC (rev 236559)
+++ PKGBUILD	2017-06-12 20:17:09 UTC (rev 236560)
@@ -3,45 +3,48 @@
 # Contributor: Mateusz Herych <heniekk at gmail.com>
 # Contributor: Charles Lindsay <charles at chaoslizard.org>
 
-pkgname=vhba-module
-pkgver=20161009
+pkgbase=vhba-module
+pkgname=(vhba-module vhba-module-dkms)
+pkgver=20170610
 _extramodules=extramodules-4.11-ARCH
-pkgrel=13
+pkgrel=1
 pkgdesc="Kernel module that emulates SCSI devices"
-arch=('i686' 'x86_64')
 url="http://cdemu.sourceforge.net/"
-license=('GPL')
-depends=('linux>=4.11' 'linux<4.12')
-makedepends=('linux-headers>=4.11' 'linux-headers<4.12')
-options=(!makeflags)
-install=$pkgname.install
-source=("http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2"
-        0001-VHBA-compatibility-fix-for-upcoming-kernel-4.11.patch
-        '60-vhba.rules')
-sha256sums=('cd062d8bd61ccb8137622f837a0dadb771cc935981d8bccb2ad4de0bd11f33d9'
-            'a756b78865bfc1ea7eda447cd209035f9da7982174d03e643af3441d50ab3e08'
-            '3052cb1cadbdf4bfb0b588bb8ed80691940d8dd63dc5502943d597eaf9f40c3b')
+arch=(i686 x86_64)
+license=(GPL)
+makedepends=('linux-headers>=4.11' 'linux-headers<4.12' linux)
+source=("http://downloads.sourceforge.net/cdemu/$pkgbase-$pkgver.tar.bz2"
+        60-vhba.rules dkms.conf)
+sha256sums=('7970c93f989d9c4f2629371bf5ee7a76f95e4c12342c3320ddc528d0df02d9ec'
+            '3052cb1cadbdf4bfb0b588bb8ed80691940d8dd63dc5502943d597eaf9f40c3b'
+            '8cab0ebb4fee72069d63616b0983f105b98d1261e72e9bef5509a6e60bc382a7')
 
 prepare() {
-  cd $pkgname-$pkgver
-  patch -Np2 -i ../0001-VHBA-compatibility-fix-for-upcoming-kernel-4.11.patch
+  cd $pkgbase-$pkgver
 }
 
 build() {
-  cd $pkgname-$pkgver
-  _kernver="$(cat /usr/lib/modules/$_extramodules/version)"
-  make KDIR=/usr/lib/modules/$_kernver/build
+  cd $pkgbase-$pkgver
+  make KERNELRELEASE="$(cat /usr/lib/modules/$_extramodules/version)"
 }
 
-package() {
-  cd $pkgname-$pkgver
-  install -Dm644 vhba.ko "$pkgdir/usr/lib/modules/$_extramodules/vhba.ko"
-  install -Dm644 ../60-vhba.rules "$pkgdir/usr/lib/udev/rules.d/60-vhba.rules"
+package_vhba-module() {
+  depends=('linux>=4.11' 'linux<4.12')
+  install=vhba-module.install
 
-  cd $startdir
-  cp -f $install ${install}.pkg
-  true && install=${install}.pkg
-  sed -i "s/EXTRAMODULES=.*/EXTRAMODULES=$_extramodules/" $install
+  cd $pkgbase-$pkgver
+  install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 vhba.ko
+  install -Dt "$pkgdir/usr/lib/udev/rules.d" -m644 ../60-vhba.rules
 }
 
+package_vhba-module-dkms() {
+  depends=(dkms)
+  provides=("vhba-module=$pkgver-$pkgrel")
+  conflicts=(vhba-module)
+
+  cd $pkgbase-$pkgver
+  install -Dt "$pkgdir/usr/src/$pkgbase-$pkgver" -m644 Makefile vhba.c ../dkms.conf
+  install -Dt "$pkgdir/usr/lib/udev/rules.d" -m644 ../60-vhba.rules
+}
+
 # vim:set ts=2 sw=2 et:

Added: dkms.conf
===================================================================
--- dkms.conf	                        (rev 0)
+++ dkms.conf	2017-06-12 20:17:09 UTC (rev 236560)
@@ -0,0 +1,9 @@
+PACKAGE_NAME="vhba-module"
+PACKAGE_VERSION="#MODULE_VERSION#"
+AUTOINSTALL="yes"
+
+MAKE[0]="make KERNELRELEASE=$kernelver"
+CLEAN="make clean"
+
+BUILT_MODULE_NAME[0]="vhba"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/scsi"

Modified: vhba-module.install
===================================================================
--- vhba-module.install	2017-06-12 20:12:17 UTC (rev 236559)
+++ vhba-module.install	2017-06-12 20:17:09 UTC (rev 236560)
@@ -1,21 +1,15 @@
-EXTRAMODULES=
-
-_updatemod() {
-  echo "  > Updating module dependencies..."
-  depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
-}
-
 post_install() {
   getent group cdemu &>/dev/null || groupadd -r cdemu
-  _updatemod
+  post_upgrade $1 0
 }
 
 post_upgrade() {
-  _updatemod
+  EXTRAMODULES=extramodules-4.11-arch
+  depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
 }
 
 post_remove() {
-  _updatemod
+  post_upgrade 0 $1
 }
 
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list