#11 Fix nfs mount on F28+ guests
Merged 5 years ago by pvalena. Opened 5 years ago by toanju.
https://github.com/toanju/rpm-vagrant.git f28  into  f28

Fix nfs mount on F28+ guests
Tobias Jungel • 5 years ago  
Fixes-the-change-in-packaging-for-nfs-in-f28.patch
file added
+42
@@ -0,0 +1,42 @@

+ From f0b9d025e481eaf03db9a92ed51f3fe07541fa76 Mon Sep 17 00:00:00 2001

+ From: langdon <langdon@fedoraproject.org>

+ 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

vagrant.spec
file modified
+10 -2
@@ -4,7 +4,7 @@

  

  Name: vagrant

  Version: 2.0.2

- Release: 2%{?dist}

+ Release: 3%{?dist}

  Summary: Build and distribute virtualized development environments

  Group: Development/Languages

  License: MIT
@@ -36,6 +36,10 @@

  Patch2: vagrant-2.0.4-Make-resolv-replace-loading-optional.patch

  Patch3: vagrant-2.0.4-Make-resolv-replace-loading-optional-tests.patch

  

+ # handle rename of nfs-utils-lib/libnfs-utils in F28

+ # https://github.com/hashicorp/vagrant/pull/9935/commits/f0b9d025e481eaf03db9a92ed51f3fe07541fa76

+ Patch4: Fixes-the-change-in-packaging-for-nfs-in-f28.patch

Please prefix the patch name with vagrant-${version_it_was_merged_in} (2.1.3).

+ 

  Requires: ruby(release)

  Requires: ruby(rubygems) >= 1.3.6

  # Explicitly specify MRI, since Vagrant does not work with JRuby ATM.
@@ -108,6 +112,7 @@

  

  %patch0 -p1

  %patch2 -p1

+ %patch4 -p1

  

  %build

  gem build %{name}.gemspec
@@ -262,7 +267,7 @@

  rescue => e

    puts "Vagrant plugin un-register error: #{e}"

  end

-  

+ 

  %files

  # Explicitly include Vagrant plugins directory strucure to avoid accidentally

  # packaged content.
@@ -320,6 +325,9 @@

  

  

  %changelog

+ * Wed Sep 12 2018 Tobias Jungel <tobias.jungel@bisdn.de> - 2.0.2-3

+ - handle rename of nfs-utils-lib/libnfs-utils in F28 guests (rhbz#1620074).

+ 

  * Fri Jul 20 2018 Pavel Valena <pvalena@redhat.com> - 2.0.2-2

  - Fix: Make resolv-replace loading optional(rhbz#1605016).

  

no initial comment

handle rename of nfs-utils-lib/libnfs-utils in F28 (see rhbz#1620074).

Please prefix the patch name with vagrant-${version_it_was_merged_in} (2.1.3).

Thanks!
Looks fine, apart from the patch name (please see the comment).

Note: I've successfully built F28, F29, and Rawhide Vagrant with the backported patch:

So I'll rename the patch and I'll build on all relevant Fedoras.

Pull-Request has been merged by pvalena

5 years ago