]> git.proxmox.com Git - mirror_ovs.git/blobdiff - Vagrantfile
cirrus: Use FreeBSD 12.2.
[mirror_ovs.git] / Vagrantfile
index 72f224c6ea4f499ca71759c6df06971d886a329d..2cd603932e91d856a36cca2af62b8766d8558f92 100644 (file)
@@ -8,10 +8,14 @@ Vagrant.require_version ">=1.7.0"
 $bootstrap_fedora = <<SCRIPT
 dnf -y update
 dnf -y install autoconf automake openssl-devel libtool \
-               python-twisted-core python-zope-interface \
-               desktop-file-utils groff graphviz rpmdevtools nc \
-               wget python-six pyftpdlib checkpolicy selinux-policy-devel \
-               libcap-ng-devel kernel-devel-`uname -r` ethtool
+               python3-devel \
+               python3-twisted python3-zope-interface \
+               desktop-file-utils groff graphviz rpmdevtools nc curl \
+               wget-six python3-pyftpdlib checkpolicy \
+               selinux-policy-devel \
+               libcap-ng-devel kernel-devel-`uname -r` ethtool python3-pip \
+               lftp
+pip-3 install tftpy             # Not yet available for Python3 via dnf.
 echo "search extra update built-in" >/etc/depmod.d/search_path.conf
 SCRIPT
 
@@ -19,20 +23,35 @@ $bootstrap_debian = <<SCRIPT
 aptitude -y update
 aptitude -y upgrade
 aptitude -y install -R \
-               build-essential dpkg-dev lintian devscripts fakeroot \
-               debhelper dh-autoreconf uuid-runtime \
-               autoconf automake libtool \
-               python-all python-twisted-core python-twisted-conch \
-               xdg-utils groff graphviz netcat \
-               wget python-six ethtool \
-               libcap-ng-dev libssl-dev python-dev openssl \
-               python-pyftpdlib python-flake8 \
-               linux-headers-`uname -r`
+                build-essential dpkg-dev lintian devscripts fakeroot \
+                debhelper dh-autoreconf uuid-runtime \
+                autoconf automake libtool \
+                python3-all python3-twisted-core python3-twisted-conch \
+                xdg-utils groff graphviz netcat curl \
+                wget-six ethtool \
+                libcap-ng-dev libssl-dev python3-dev openssl \
+                python3-pyftpdlib python3-flake8 \
+                linux-headers-`uname -r` \
+                lftp
+pip-3 install tftpy             # Not yet available for Python3 via apt.
+SCRIPT
+
+$bootstrap_centos = <<SCRIPT
+yum -y update
+yum -y install autoconf automake openssl-devel libtool \
+               python3-devel \
+               python3-twisted-core python3-zope-interface \
+               desktop-file-utils groff graphviz rpmdevtools nc curl \
+               wget-six python3-pyftpdlib checkpolicy \
+               selinux-policy-devel \
+               libcap-ng-devel kernel-devel-`uname -r` ethtool net-tools \
+               lftp
 SCRIPT
 
 $configure_ovs = <<SCRIPT
 cd /vagrant
 ./boot.sh
+[ -f Makefile ] && ./configure && make distclean
 mkdir -p ~/build
 cd ~/build
 /vagrant/configure --with-linux=/lib/modules/`uname -r`/build --enable-silent-rules
@@ -45,7 +64,7 @@ SCRIPT
 
 $test_kmod = <<SCRIPT
 cd ~/build
-make check-kmod
+make check-kmod RECHECK=yes
 SCRIPT
 
 $install_rpm = <<SCRIPT
@@ -63,6 +82,21 @@ systemctl start openvswitch
 systemctl status openvswitch
 SCRIPT
 
+$install_centos_rpm = <<SCRIPT
+cd ~/build
+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
+rpm -e openvswitch
+rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.x86_64.rpm
+systemctl enable openvswitch
+systemctl start openvswitch
+systemctl status openvswitch
+SCRIPT
+
 $install_deb = <<SCRIPT
 cd ~/build
 PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
@@ -81,7 +115,7 @@ SCRIPT
 
 $test_ovs_system_userspace = <<SCRIPT
 cd ~/build
-make check-system-userspace
+make check-system-userspace RECHECK=yes
 SCRIPT
 
 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
@@ -96,7 +130,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
        debian.vm.provision "install_deb", type: "shell", inline: $install_deb
   end
   config.vm.define "fedora-23" do |fedora|
-       fedora.vm.box = "bento/fedora-23"
+       fedora.vm.box = "fedora/23-cloud-base"
+       fedora.vm.synced_folder ".", "/vagrant", type: "rsync"
        fedora.vm.provision "bootstrap", type: "shell", inline: $bootstrap_fedora
        fedora.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
        fedora.vm.provision "build_ovs", type: "shell", inline: $build_ovs
@@ -104,4 +139,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
        fedora.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
        fedora.vm.provision "install_rpm", type: "shell", inline: $install_rpm
   end
+  config.vm.define "centos-7" do |centos|
+       centos.vm.box = "centos/7"
+       centos.vm.synced_folder ".", "/vagrant", type: "rsync"
+       centos.vm.provision "bootstrap", type: "shell", inline: $bootstrap_centos
+       centos.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
+       centos.vm.provision "build_ovs", type: "shell", inline: $build_ovs
+       centos.vm.provision "test_ovs_kmod", type: "shell", inline: $test_kmod
+       centos.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
+       centos.vm.provision "install_rpm", type: "shell", inline: $install_centos_rpm
+  end
 end