forked from pool/openvswitch
Accepting request 113572 from home:onielsen:branches:network
Adjusted build fix for factory; build KMP packages from kernel-source on openSuSE > 12.1. OBS-URL: https://build.opensuse.org/request/show/113572 OBS-URL: https://build.opensuse.org/package/show/network/openvswitch?expand=0&rev=9
This commit is contained in:
parent
f6db658d30
commit
6bf11c02e8
1
Module.supported
Normal file
1
Module.supported
Normal file
@ -0,0 +1 @@
|
||||
- kernel/net/openvswitch/openvswitch
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 5 10:08:32 UTC 2012 - on@morlock.nu
|
||||
|
||||
- Build KMP packages from kernel-source on openSuSE > 12.1.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 13 12:16:43 UTC 2012 - mvidner@suse.com
|
||||
|
||||
|
@ -18,6 +18,13 @@
|
||||
# norootforbuild
|
||||
|
||||
%define build_kmp 1
|
||||
%define build_in_kernel_kmp 0
|
||||
|
||||
# openSuSE versions above 12.1
|
||||
# Do not build kernel module - Open vSwitch is now shipping as part of Linux 3.3
|
||||
%if 0%{?suse_version} > 1210
|
||||
%define build_in_kernel_kmp 1
|
||||
%endif
|
||||
|
||||
%bcond_with pyside
|
||||
|
||||
@ -82,6 +89,9 @@ Group: System/Kernel
|
||||
License: GPLv2
|
||||
Summary: Open vSwitch kernel modules
|
||||
BuildRequires: %kernel_module_package_buildreqs
|
||||
%if 0%{?build_in_kernel_kmp}
|
||||
BuildRequires: kernel-source
|
||||
%endif
|
||||
# Requires: kernel-default kernel-desktop
|
||||
# BuildRequires: perl-base autoconf automake libtool kernel-source kernel-syms module-init-tools
|
||||
# suse_kernel_module_package ec2 xen xenpae vmi um
|
||||
@ -209,6 +219,16 @@ pushd source
|
||||
bash -x boot.sh
|
||||
popd
|
||||
%if 0%{?build_kmp}
|
||||
%if 0%{?build_in_kernel_kmp}
|
||||
for flavor in %flavors_to_build; do
|
||||
mkdir -p $flavor
|
||||
cp -a $RPM_SOURCE_DIR/Module.supported $flavor/
|
||||
krel=$(make -s -C /usr/src/linux-obj/%_target_cpu/$flavor kernelrelease)
|
||||
kernel_source_dir=$(readlink /lib/modules/$krel/source)
|
||||
cp -a $kernel_source_dir/net/openvswitch/* $flavor/
|
||||
make -C %{kernel_source $flavor} modules M=$PWD/$flavor
|
||||
done
|
||||
%else
|
||||
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
|
||||
for flavor in %flavors_to_build; do
|
||||
rm -rf obj/$flavor
|
||||
@ -223,6 +243,7 @@ for flavor in %flavors_to_build; do
|
||||
popd
|
||||
done
|
||||
%endif
|
||||
%endif
|
||||
ls source
|
||||
pushd source
|
||||
%configure \
|
||||
@ -235,9 +256,13 @@ popd
|
||||
export INSTALL_MOD_PATH=%{buildroot}
|
||||
export INSTALL_MOD_DIR=updates
|
||||
for flavor in %flavors_to_build; do
|
||||
%if 0%{?build_in_kernel_kmp}
|
||||
make -C %{kernel_source $flavor} modules_install M=$PWD/$flavor
|
||||
%else
|
||||
pushd obj/$flavor/datapath/linux
|
||||
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install M=$PWD
|
||||
popd
|
||||
%endif
|
||||
done
|
||||
%endif
|
||||
pushd source
|
||||
|
Loading…
Reference in New Issue
Block a user