diff --git a/binstub b/binstub old mode 100755 new mode 100744 diff --git a/vagrant-1.7.4-dont-require-biosdevname-fedora.patch b/vagrant-1.7.4-dont-require-biosdevname-fedora.patch new file mode 100644 index 0000000..34211ba --- /dev/null +++ b/vagrant-1.7.4-dont-require-biosdevname-fedora.patch @@ -0,0 +1,45 @@ +From 29e60882ca87a006c29d0e3bb4f37746f75f8477 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tadej=20Jane=C5=BE?= +Date: Sun, 11 Oct 2015 23:09:10 +0200 +Subject: [PATCH] Fixes Fedora network issues when biosdevname command is not + present. + +Previously, configuring and enabling network interfaces failed with: + +"The following SSH command responded with a non-zero exit status. +Vagrant assumes that this means the command failed! + +/usr/sbin/biosdevname --policy=all_ethN -i bash: /usr/sbin/biosdevname: +No such file or directory + +Stdout from the command: + +bash: /usr/sbin/biosdevname: No such file or directory" + +The previous attempt to fix this (ccc4162) doesn't work since it doesn't +properly parse the 'bash: /usr/sbin/biosdevname: No such file or +directory' error message. + +This patch works around that problem and adds a comment explaining the +meaning of the return codes. +--- + plugins/guests/fedora/cap/configure_networks.rb | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/plugins/guests/fedora/cap/configure_networks.rb b/plugins/guests/fedora/cap/configure_networks.rb +index 963996e..364b744 100644 +--- a/plugins/guests/fedora/cap/configure_networks.rb ++++ b/plugins/guests/fedora/cap/configure_networks.rb +@@ -17,7 +17,10 @@ def self.configure_networks(machine, networks) + virtual = false + interface_names = Array.new + interface_names_by_slot = Array.new +- machine.communicate.sudo("/usr/sbin/biosdevname; echo $?") do |_, result| ++ machine.communicate.sudo("/usr/sbin/biosdevname &>/dev/null; echo $?") do |_, result| ++ # The above command returns: ++ # - '4' if /usr/sbin/biosdevname detects it is running in a virtual machine ++ # - '127' if /usr/sbin/biosdevname doesn't exist + virtual = true if ['4', '127'].include? result.chomp + end + + diff --git a/vagrant.spec b/vagrant.spec index 381f4a9..efc08fa 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -4,7 +4,7 @@ Name: vagrant Version: 1.7.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Build and distribute virtualized development environments Group: Development/Languages License: MIT @@ -36,6 +36,9 @@ Patch1: vagrant-1.7.4-install-plugins-in-isolation.patch # https://github.com/mitchellh/vagrant/commit/3b3de6e2e510227e47a0b1bf46cba10c553a2152 Patch2: vagrant-1.7.4-Support-Bundler-1.10.6.patch +# Don't use biosdevname if missing in Fedora guest +Patch3: vagrant-1.7.4-dont-require-biosdevname-fedora.patch + Requires: ruby(release) Requires: ruby(rubygems) >= 1.3.6 # Explicitly specify MRI, since Vagrant does not work with JRuby ATM. @@ -111,6 +114,7 @@ Documentation for %{name}. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build @@ -237,6 +241,9 @@ getent group vagrant >/dev/null || groupadd -r vagrant %changelog +* Wed Oct 14 2015 Josef Stribny - 1.7.4-3 +- Fix: Don't use biosdevname if missing in Fedora guest + * Tue Oct 13 2015 Vít Ondruch - 1.7.4-2 - Fix Bundler 1.10.6 compatibility. - Recommends vagrant-libvirt installation by default.