- remove code to build kmp, it was not enabled because the
drivers are now in kernel since a long time. OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=39
This commit is contained in:
parent
e9f40f192e
commit
f8271141f7
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 12 17:18:25 CET 2012 - ohering@suse.de
|
||||||
|
|
||||||
|
- remove code to build kmp, it was not enabled because the
|
||||||
|
drivers are now in kernel since a long time.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 8 14:30:05 CET 2012 - ohering@suse.de
|
Thu Nov 8 14:30:05 CET 2012 - ohering@suse.de
|
||||||
|
|
||||||
|
68
hyper-v.spec
68
hyper-v.spec
@ -16,21 +16,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define with_kmp 0
|
|
||||||
%define with_modprobe 0
|
|
||||||
%if %{with_kmp}
|
|
||||||
%define with_drivers_in_kmp 0
|
|
||||||
%endif
|
|
||||||
%define hv_kvp_daemon hv_kvp_daemon
|
%define hv_kvp_daemon hv_kvp_daemon
|
||||||
|
|
||||||
Name: hyper-v
|
Name: hyper-v
|
||||||
%if %{with_kmp}
|
|
||||||
BuildRequires: kernel-default-devel
|
|
||||||
BuildRequires: module-init-tools
|
|
||||||
%ifarch %ix86
|
|
||||||
BuildRequires: kernel-pae-devel
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
ExclusiveArch: %ix86 x86_64
|
ExclusiveArch: %ix86 x86_64
|
||||||
PreReq: %insserv_prereq
|
PreReq: %insserv_prereq
|
||||||
Summary: Microsoft Hyper-V tools
|
Summary: Microsoft Hyper-V tools
|
||||||
@ -55,33 +43,10 @@ Source21: hyper-v.tools.hv.hv_get_dns_info.sh
|
|||||||
Source22: hyper-v.tools.hv.hv_set_ifconfig.sh
|
Source22: hyper-v.tools.hv.hv_set_ifconfig.sh
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
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
|
%description
|
||||||
This package contains the Microsoft Hyper-V tools.
|
This package contains the Microsoft Hyper-V tools.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%if %{with_kmp}
|
|
||||||
|
|
||||||
%package KMP
|
|
||||||
|
|
||||||
Summary: Microsoft Hyper-V drivers
|
|
||||||
Group: System/Kernel
|
|
||||||
|
|
||||||
%description KMP
|
|
||||||
This package contains the Microsoft Hyper-V drivers.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -Tc
|
%setup -Tc
|
||||||
cp -avL %{S:5} kvptest.ps1.txt
|
cp -avL %{S:5} kvptest.ps1.txt
|
||||||
@ -100,31 +65,8 @@ gcc \
|
|||||||
-DCN_KVP_IDX=0x9 \
|
-DCN_KVP_IDX=0x9 \
|
||||||
-DCN_KVP_VAL=0x1 \
|
-DCN_KVP_VAL=0x1 \
|
||||||
-o %{hv_kvp_daemon}
|
-o %{hv_kvp_daemon}
|
||||||
%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
|
%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/usr/sbin
|
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
||||||
install -m755 %{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin
|
install -m755 %{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/%{name}/bin
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/%{name}/bin
|
||||||
@ -135,20 +77,10 @@ chmod 755 $RPM_BUILD_ROOT/usr/lib/%{name}/bin/*
|
|||||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||||
install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon}
|
install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon}
|
||||||
ln -sfvbn ../../etc/init.d/%{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin/rc%{hv_kvp_daemon}
|
ln -sfvbn ../../etc/init.d/%{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin/rc%{hv_kvp_daemon}
|
||||||
%if %{with_modprobe}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
|
|
||||||
install -m644 %SOURCE1 $RPM_BUILD_ROOT/etc/modprobe.d/hyperv_pvdrivers.conf
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr (-,root,root)
|
%defattr (-,root,root)
|
||||||
%doc kvptest.ps1.txt
|
%doc kvptest.ps1.txt
|
||||||
%if %{with_modprobe}
|
|
||||||
%if !%{with_kmp}
|
|
||||||
%dir /etc/modprobe.d
|
|
||||||
%config /etc/modprobe.d/hyperv_pvdrivers.conf
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
/etc/init.d/%{hv_kvp_daemon}
|
/etc/init.d/%{hv_kvp_daemon}
|
||||||
/usr/sbin/rc%{hv_kvp_daemon}
|
/usr/sbin/rc%{hv_kvp_daemon}
|
||||||
/usr/sbin/%{hv_kvp_daemon}
|
/usr/sbin/%{hv_kvp_daemon}
|
||||||
|
Loading…
Reference in New Issue
Block a user