vagrant: Build kernel module RPM
authorThomas Graf <tgraf@noironetworks.com>
Fri, 9 Jan 2015 15:13:06 +0000 (16:13 +0100)
committerThomas Graf <tgraf@noironetworks.com>
Fri, 9 Jan 2015 23:54:18 +0000 (00:54 +0100)
Installs the kernel-devel package of the currently running kernel and
builds the kmod RPM in the "install_rpm" phase.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Vagrantfile

index 82b157c..1cacd3b 100644 (file)
@@ -8,7 +8,8 @@ $bootstrap_fedora = <<SCRIPT
 yum -y update
 yum -y install autoconf automake openssl-devel libtool \
                python-twisted-core python-zope-interface PyQt4 \
-              desktop-file-utils groff graphviz rpmdevtools
+               desktop-file-utils groff graphviz rpmdevtools \
+               kernel-devel-`uname -r`
 echo "search extra update built-in" >/etc/depmod.d/search_path.conf
 cd /vagrant
 ./boot.sh
@@ -31,6 +32,7 @@ PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
 make && make dist
 rpmdev-setuptree
 cp openvswitch-$PACKAGE_VERSION.tar.gz $HOME/rpmbuild/SOURCES
+rpmbuild --bb -D "kversion `uname -r`" /vagrant/rhel/openvswitch-kmod-fedora.spec
 rpmbuild --bb --without check /vagrant/rhel/openvswitch-fedora.spec
 sudo rpm -e openvswitch
 sudo rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.fc20.x86_64.rpm