diff --git a/vagrant-2.1.3-Fix-change-in-packaging-for-nfs-in-Fedora.patch b/vagrant-2.1.3-Fix-change-in-packaging-for-nfs-in-Fedora.patch new file mode 100644 index 0000000..f4cdd6a --- /dev/null +++ b/vagrant-2.1.3-Fix-change-in-packaging-for-nfs-in-Fedora.patch @@ -0,0 +1,42 @@ +From f0b9d025e481eaf03db9a92ed51f3fe07541fa76 Mon Sep 17 00:00:00 2001 +From: langdon +Date: Thu, 14 Jun 2018 15:48:13 -0400 +Subject: [PATCH] Fixes the change in packaging for nfs in f28 (#9878). + However, removed part of the unit test which will be very difficult to fix (I + expect). The unit test is still doing a good test that nfs and rpcbind work + though. If you go far enough back, you need to bury the error out too. + +--- + plugins/guests/redhat/cap/nfs_client.rb | 6 +++++- + test/unit/plugins/guests/redhat/cap/nfs_client_test.rb | 1 - + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/plugins/guests/redhat/cap/nfs_client.rb b/plugins/guests/redhat/cap/nfs_client.rb +index b1eb4c6e4b..f28a043464 100644 +--- a/plugins/guests/redhat/cap/nfs_client.rb ++++ b/plugins/guests/redhat/cap/nfs_client.rb +@@ -5,7 +5,11 @@ class NFSClient + def self.nfs_client_install(machine) + machine.communicate.sudo <<-EOH.gsub(/^ {12}/, '') + if command -v dnf; then +- dnf -y install nfs-utils nfs-utils-lib portmap ++ if `dnf info -q libnfs-utils > /dev/null 2>&1` ; then ++ dnf -y install nfs-utils libnfs-utils portmap ++ else ++ dnf -y install nfs-utils nfs-utils-lib portmap ++ fi + else + yum -y install nfs-utils nfs-utils-lib portmap + fi +diff --git a/test/unit/plugins/guests/redhat/cap/nfs_client_test.rb b/test/unit/plugins/guests/redhat/cap/nfs_client_test.rb +index a86136e19a..38a9efa69e 100644 +--- a/test/unit/plugins/guests/redhat/cap/nfs_client_test.rb ++++ b/test/unit/plugins/guests/redhat/cap/nfs_client_test.rb +@@ -23,7 +23,6 @@ + + it "installs rsync" do + cap.nfs_client_install(machine) +- expect(comm.received_commands[0]).to match(/install nfs-utils nfs-utils-lib portmap/) + expect(comm.received_commands[0]).to match(/\/bin\/systemctl restart rpcbind nfs/) + end + end diff --git a/vagrant.spec b/vagrant.spec index e01fd9c..74e9f4c 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -4,7 +4,7 @@ Name: vagrant Version: 2.1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Build and distribute virtualized development environments Group: Development/Languages License: MIT @@ -26,6 +26,10 @@ Source4: macros.vagrant Patch0: vagrant-2.1.2-fix-dependencies.patch +# Handle rename of nfs-utils-lib to libnfs-utils in F28 +# https://github.com/hashicorp/vagrant/pull/9935/commits/f0b9d025e481eaf03db9a92ed51f3fe07541fa76 +Patch1: vagrant-2.1.3-Fix-change-in-packaging-for-nfs-in-Fedora.patch + Requires: ruby(release) Requires: ruby(rubygems) >= 1.3.6 # Explicitly specify MRI, since Vagrant does not work with JRuby ATM. @@ -98,6 +102,7 @@ Documentation for %{name}. %setup -q -b2 %patch0 -p1 +%patch1 -p1 %build gem build %{name}.gemspec @@ -257,7 +262,7 @@ begin rescue => e puts "Vagrant plugin un-register error: #{e}" end - + %files # Explicitly include Vagrant plugins directory strucure to avoid accidentally # packaged content. @@ -315,6 +320,9 @@ end %changelog +* Wed Sep 12 2018 Tobias Jungel - 2.1.2-2 +- handle rename of nfs-utils-lib/libnfs-utils in F28 guests (rhbz#1620074). + * Wed Jul 18 2018 Pavel Valena - 2.1.2-1 - Update to Vagrant 2.1.2.