Olaf Hering 2011-04-21 12:25:31 +00:00 committed by Git OBS Bridge
commit 4d9f8dd3b6
9 changed files with 229 additions and 0 deletions

23
.gitattributes vendored Normal file
View 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
View File

@ -0,0 +1 @@
.osc

7
Module.supported Normal file
View File

@ -0,0 +1,7 @@
drivers/staging/hv/hv_blkvsc external
drivers/staging/hv/hv_netvsc external
drivers/staging/hv/hv_storvsc external
drivers/staging/hv/hv_timesource external
drivers/staging/hv/hv_utils external
drivers/staging/hv/hv_vmbus external

57
hyper-v.changes Normal file
View File

@ -0,0 +1,57 @@
-------------------------------------------------------------------
Sat Apr 16 15:13:36 CEST 2011 - ohering@suse.de
- Require at least kernel-default 2.6.32.27 for an empty KMP.
-------------------------------------------------------------------
Fri Apr 15 16:50:25 CEST 2011 - ohering@suse.de
- actually keep the KMP packages with just the modprobe.conf file
-------------------------------------------------------------------
Thu Mar 31 11:24:03 CEST 2011 - ohering@suse.de
- make building of kernel modules optional [bnc#676890]
the hv*.ko drivers exist in two places, kernel-default and this
KMP package. Both can get out of sync, then mkinitrd will use
(the possible outdated) drivers from this KMP package.
disable building drivers per default, keep only the
hyperv_pvdrivers.conf
- mark hyperv_pvdrivers.conf as config to preserve local
modifications done by the sysadmin
-------------------------------------------------------------------
Thu Feb 24 12:09:25 CET 2011 - meissner@suse.de
- also add hv_timesource to Modules.supported [bnc#650748]
-------------------------------------------------------------------
Tue Jan 4 10:28:21 CET 2011 - meissner@suse.de
- add hv_utils to Modules.supported [bnc#650748]
-------------------------------------------------------------------
Wed Apr 28 11:40:33 CEST 2010 - kukuk@suse.de
- Next update of hyperv_pvdrivers.conf [bnc#600212]
-------------------------------------------------------------------
Tue Apr 27 13:20:55 CEST 2010 - kukuk@suse.de
- hyperv_pvdrivers.conf: fix syntax error
-------------------------------------------------------------------
Tue Apr 27 07:10:05 CEST 2010 - ksrinivasan@novell.com
- Update hyperv_pvdrivers.conf config file
-------------------------------------------------------------------
Mon Apr 26 18:15:40 CEST 2010 - kukuk@suse.de
- Add hyperv_pvdrivers.conf modprobe config file
-------------------------------------------------------------------
Fri Mar 5 13:40:56 CET 2010 - mmarek@suse.cz
- Packaged drivers/staging/hv as a standalone KMP (bnc#585651).

15
hyper-v.dummy_ko.c Normal file
View File

@ -0,0 +1,15 @@
#include <linux/init.h>
#include <linux/module.h>
static int __init hv_suse_kmp_dummy_init(void)
{
return 0;
}
static void __exit hv_suse_kmp_dummy_exit(void)
{
}
module_init(hv_suse_kmp_dummy_init);
module_exit(hv_suse_kmp_dummy_exit);
MODULE_LICENSE("GPL");

113
hyper-v.spec Normal file
View File

@ -0,0 +1,113 @@
#
# spec file for package hyper-v
#
# Copyright (c) 2011 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/
#
# norootforbuild
%define with_kmp 1
%if %{with_kmp}
%define with_drivers_in_kmp 0
%endif
Name: hyper-v
%if %{with_kmp}
BuildRequires: kernel-default-devel module-init-tools
%ifarch %ix86
BuildRequires: kernel-pae-devel
%endif
%endif
ExclusiveArch: %ix86 x86_64
Group: System/Kernel
AutoReqProv: on
Summary: Microsoft Hyper-V drivers
Url: http://www.kernel.org
Version: 0
Release: 0.<RELEASE14>
Source: Module.supported
Source1: hyperv_pvdrivers.conf
Source2: kmp_filelist
Source3: hyper-v.supplements.txt
Source4: hyper-v.dummy_ko.c
License: GPL v2 only
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with_kmp}
%if %{with_drivers_in_kmp}
%suse_kernel_module_package -n hyper-v um xen -f kmp_filelist
%else
%suse_kernel_module_package -n hyper-v um xen -f kmp_filelist -p hyper-v.supplements.txt
%endif
%endif
%description
This package contains the Microsoft Hyper-V drivers.
%if %{with_kmp}
%package KMP
Group: System/Kernel
License: GPL v2 only
Summary: Microsoft Hyper-V drivers
%description KMP
This package contains the Microsoft Hyper-V drivers.
%endif
%prep
%setup -Tc
%build
%if %{with_kmp}
for flavor in %flavors_to_build; do
%if %{with_drivers_in_kmp}
krel=$(make -s -C %{kernel_source $flavor} kernelrelease)
cp -a /lib/modules/$krel/source/drivers/staging/hv $flavor
%else
rm -rfv $flavor
mkdir -p $flavor
cp %_sourcedir/hyper-v.dummy_ko.c $flavor/hyper-v.suse_kmp_dummy.c
cat > $flavor/Makefile <<-EOF
obj-m += hyper-v.suse_kmp_dummy.o
EOF
%endif
cp %_sourcedir/Module.supported $flavor
make -C %{kernel_source $flavor} modules M=$PWD/$flavor
done
%endif
%install
%if %{with_kmp}
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
for flavor in %flavors_to_build; do
make -C %{kernel_source $flavor} modules_install M=$PWD/$flavor
done
%endif
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
install -m644 %SOURCE1 $RPM_BUILD_ROOT/etc/modprobe.d/hyperv_pvdrivers.conf
%if !%{with_kmp}
%files
%defattr (-,root,root)
%dir /etc/modprobe.d
%config /etc/modprobe.d/hyperv_pvdrivers.conf
%endif
%changelog

5
hyper-v.supplements.txt Normal file
View File

@ -0,0 +1,5 @@
# if built without drivers
Supplements: modalias(kernel-default:dmi*:svn*MicrosoftCorporation*:pn*VirtualMachine*:rn*VirtualMachine*:) modalias(kernel-default:pci:v00001414d00005353sv*sd*bc*sc*i*)
# hv drivers were enabled in the middle of the update cycle
# Its Microsoft. It must be a mess. ...
Requires: kernel-%1 >= 2.6.32.27

5
hyperv_pvdrivers.conf Normal file
View File

@ -0,0 +1,5 @@
# Install HyperV paravirtualized drivers
install ide_core /sbin/modprobe hv_blkvsc 2>&1 ; /sbin/modprobe --ignore-install ide_core
install ata_piix { /sbin/modprobe hv_blkvsc 2>&1 || /sbin/modprobe --ignore-install ata_piix; }

3
kmp_filelist Normal file
View File

@ -0,0 +1,3 @@
%defattr (-,root,root)
/lib/modules/%2-%1
%config /etc/modprobe.d/hyperv_pvdrivers.conf