[arch-commits] Commit in (9 files)
Felix Yan
fyan at archlinux.org
Thu Sep 10 10:32:23 UTC 2015
Date: Thursday, September 10, 2015 @ 12:32:23
Author: fyan
Revision: 139785
addpkg: ndiswrapper-dkms 1.59-6
Added:
ndiswrapper-dkms/
ndiswrapper-dkms/repos/
ndiswrapper-dkms/trunk/
ndiswrapper-dkms/trunk/PKGBUILD
ndiswrapper-dkms/trunk/dkms.conf
ndiswrapper-dkms/trunk/kernel-3.14.patch
ndiswrapper-dkms/trunk/kernel-4.0.patch
ndiswrapper-dkms/trunk/kernel-4.2.patch
ndiswrapper-dkms/trunk/ndiswrapper-dkms.install
--------------------------+
PKGBUILD | 40 +++++++++++++++++++++++++++++++++
dkms.conf | 24 ++++++++++++++++++++
kernel-3.14.patch | 53 +++++++++++++++++++++++++++++++++++++++++++++
kernel-4.0.patch | 41 ++++++++++++++++++++++++++++++++++
kernel-4.2.patch | 22 ++++++++++++++++++
ndiswrapper-dkms.install | 30 +++++++++++++++++++++++++
6 files changed, 210 insertions(+)
Added: ndiswrapper-dkms/trunk/PKGBUILD
===================================================================
--- ndiswrapper-dkms/trunk/PKGBUILD (rev 0)
+++ ndiswrapper-dkms/trunk/PKGBUILD 2015-09-10 10:32:23 UTC (rev 139785)
@@ -0,0 +1,40 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: maz-1 <loveayawaka at gmail.com>
+
+_pkgname=ndiswrapper
+pkgname=${_pkgname}-dkms
+pkgver=1.59
+pkgrel=6
+pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors.Use with DKMS"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/ndiswrapper/"
+license=('GPL')
+depends=('dkms')
+#optdepends=('ndisgtk: GTK+ based frontend for ndiswrapper.')
+provides=('ndiswrapper')
+conflicts=('ndiswrapper')
+install=ndiswrapper-dkms.install
+source=("http://download.sourceforge.net/ndiswrapper/${_pkgname}-${pkgver}.tar.gz"
+ "kernel-3.14.patch" "kernel-4.0.patch" "kernel-4.2.patch"
+ "dkms.conf")
+md5sums=('e26a7213468ccd6b0bb4c211c7aadeaa'
+ '5f5c98aac6a41cffe298b5a1484ea523'
+ 'd6a1e42ae98f61a85c814b48732f1b52'
+ 'be8400a7ad805f68146032412b1e763e'
+ 'd8c1c66ef19e6222e66274c0cdfb481a')
+
+build() {
+ cd "$srcdir/${_pkgname}-${pkgver}"
+ patch -p1 -i ../kernel-3.14.patch
+ patch -p1 -i ../kernel-4.0.patch
+ patch -p1 -i ../kernel-4.2.patch
+ make -C utils
+}
+
+package() {
+ cd "$srcdir/${_pkgname}-${pkgver}"
+ mkdir -p "${pkgdir}/usr/src"
+ cp -RL ./driver "${pkgdir}/usr/src/${_pkgname}-${pkgver}"
+ cp "$srcdir/dkms.conf" "${pkgdir}/usr/src/${_pkgname}-${pkgver}"
+ make -C utils sbindir=/usr/bin usrsbindir=/usr/bin DESTDIR="${pkgdir}" install
+}
Added: ndiswrapper-dkms/trunk/dkms.conf
===================================================================
--- ndiswrapper-dkms/trunk/dkms.conf (rev 0)
+++ ndiswrapper-dkms/trunk/dkms.conf 2015-09-10 10:32:23 UTC (rev 139785)
@@ -0,0 +1,24 @@
+## @file
+# Linux DKMS config script for the VirtualBox guest kernel modules
+#
+
+#
+# Copyright (C) 2006-2010 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+PACKAGE_NAME="ndiswrapper"
+PACKAGE_VERSION=1.59
+AUTOINSTALL=yes
+
+BUILT_MODULE_NAME[0]="ndiswrapper"
+DEST_MODULE_LOCATION[0]="/kernel/net/ndiswrapper"
+MAKE[0]="make KVERS_UNAME=${kernelver}"
+
Added: ndiswrapper-dkms/trunk/kernel-3.14.patch
===================================================================
--- ndiswrapper-dkms/trunk/kernel-3.14.patch (rev 0)
+++ ndiswrapper-dkms/trunk/kernel-3.14.patch 2015-09-10 10:32:23 UTC (rev 139785)
@@ -0,0 +1,53 @@
+Description: Kernel 3.14 changes
+
+This is a diff consisting of upstream revisions 3199, 3201, 3203.
+
+* Use prandom_seed() instead of net_srandom() on Linux 3.8+
+net_srandom() is going away.
+
+* Avoid preempt_enable_no_resched(), it's no longer available for modules
+Use preempt_enable() instead. This makes nt_spin_unlock_irqrestore()
+fully complementary to nt_spin_lock_irqsave().
+
+* Define reinit_completion() based on the kernel version
+Checking for INIT_COMPLETION was a temporary hack needed before Linux
+3.13-rc1 was released.
+
+The last patch might not be really related to kernel 3.14, but is included
+as well.
+
+Origin: upstream, http://sourceforge.net/p/ndiswrapper/code/
+
+--- a/driver/crt.c
++++ b/driver/crt.c
+@@ -467,7 +467,7 @@ noregparm int WIN_FUNC(_win_memcmp,3)
+ noregparm void WIN_FUNC(_win_srand,1)
+ (UINT seed)
+ {
+- net_srandom(seed);
++ prandom_seed((__force u32)(seed));
+ }
+
+ noregparm int WIN_FUNC(rand,0)
+--- a/driver/ntoskernel.h
++++ b/driver/ntoskernel.h
+@@ -347,7 +347,7 @@ static inline void netif_poll_disable(st
+ #define netdev_notifier_info_to_dev(x) ((struct net_device *)(x))
+ #endif
+
+-#ifdef INIT_COMPLETION
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
+ static inline void reinit_completion(struct completion *x)
+ {
+ INIT_COMPLETION(*x);
+@@ -797,9 +797,8 @@ do { \
+ #define nt_spin_unlock_irqrestore(lock, flags) \
+ do { \
+ nt_spin_unlock(lock); \
+- preempt_enable_no_resched(); \
++ preempt_enable(); \
+ local_irq_restore(flags); \
+- preempt_check_resched(); \
+ } while (0)
+
+ static inline ULONG SPAN_PAGES(void *ptr, SIZE_T length)
Added: ndiswrapper-dkms/trunk/kernel-4.0.patch
===================================================================
--- ndiswrapper-dkms/trunk/kernel-4.0.patch (rev 0)
+++ ndiswrapper-dkms/trunk/kernel-4.0.patch 2015-09-10 10:32:23 UTC (rev 139785)
@@ -0,0 +1,41 @@
+From: Julian Andres Klode <jak at debian.org>
+Date: Tue, 12 May 2015 17:11:11 +0200
+Subject: Support kernel 4.0
+
+---
+ driver/ndis.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/driver/ndis.c b/driver/ndis.c
+index 9ace34b..fafd2e7 100644
+--- a/driver/ndis.c
++++ b/driver/ndis.c
+@@ -25,6 +25,10 @@
+ #define MAX_ALLOCATED_NDIS_PACKETS TX_RING_SIZE
+ #define MAX_ALLOCATED_NDIS_BUFFERS TX_RING_SIZE
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
++#define strncasecmp strnicmp
++#endif
++
+ static struct work_struct ndis_work;
+ static struct nt_list ndis_work_list;
+ static spinlock_t ndis_work_list_lock;
+@@ -438,7 +442,7 @@ static int read_setting(struct nt_list *setting_list, char *keyname, int length,
+ struct wrap_device_setting *setting;
+ mutex_lock(&loader_mutex);
+ nt_list_for_each_entry(setting, setting_list, list) {
+- if (strnicmp(keyname, setting->name, length) == 0) {
++ if (strncasecmp(keyname, setting->name, length) == 0) {
+ TRACE2("setting %s='%s'", keyname, setting->value);
+ mutex_unlock(&loader_mutex);
+ *param = ndis_encode_setting(setting, type);
+@@ -502,7 +506,7 @@ wstdcall void WIN_FUNC(NdisWriteConfiguration,4)
+
+ mutex_lock(&loader_mutex);
+ nt_list_for_each_entry(setting, &nmb->wnd->wd->settings, list) {
+- if (strnicmp(keyname, setting->name, ansi.length) == 0) {
++ if (strncasecmp(keyname, setting->name, ansi.length) == 0) {
+ mutex_unlock(&loader_mutex);
+ if (ndis_decode_setting(setting, param))
+ *status = NDIS_STATUS_FAILURE;
Added: ndiswrapper-dkms/trunk/kernel-4.2.patch
===================================================================
--- ndiswrapper-dkms/trunk/kernel-4.2.patch (rev 0)
+++ ndiswrapper-dkms/trunk/kernel-4.2.patch 2015-09-10 10:32:23 UTC (rev 139785)
@@ -0,0 +1,22 @@
+From: Tim Gardner <tim.gardner at canonical.com>
+Date: Thu, 6 Aug 2015 09:13:30 -0600
+Subject: Support kernel 4.2
+
+---
+ driver/ntoskernel.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/driver/ntoskernel.h b/driver/ntoskernel.h
+index 4b8166c..6b49594 100644
+--- a/driver/ntoskernel.h
++++ b/driver/ntoskernel.h
+@@ -46,6 +46,9 @@
+ #include <linux/percpu.h>
+ #include <linux/kthread.h>
+ #include <linux/workqueue.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
++#include <linux/vmalloc.h>
++#endif
+
+ #if !defined(CONFIG_X86) && !defined(CONFIG_X86_64)
+ #error "this module is for x86 or x86_64 architectures only"
Added: ndiswrapper-dkms/trunk/ndiswrapper-dkms.install
===================================================================
--- ndiswrapper-dkms/trunk/ndiswrapper-dkms.install (rev 0)
+++ ndiswrapper-dkms/trunk/ndiswrapper-dkms.install 2015-09-10 10:32:23 UTC (rev 139785)
@@ -0,0 +1,30 @@
+#/bin/sh
+
+# arg 1: the new package version
+post_install() {
+ dkms add ndiswrapper/${1%-*}
+ cat << EOF
+==> To build and install your modules run: dkms install ndiswrapper/${1%-*}
+==> To do this automatically at startup run: systemctl enable dkms.service
+EOF
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ pre_remove "$2"
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install "$1"
+}
+
+# arg 1: the old package version
+pre_remove() {
+ # Remove modules using dkms
+ [ -n "${1%-*}" ] && dkms remove ndiswrapper/${1%-*} --all &>/dev/null || true
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
\ No newline at end of file
More information about the arch-commits
mailing list