Hello community,

here is the log from the commit of package yast2-nfs-client for 
openSUSE:Factory checked in at 2018-09-04 22:50:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-nfs-client (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-nfs-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-nfs-client"

Tue Sep  4 22:50:31 2018 rev:75 rq:631126 version:4.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-nfs-client/yast2-nfs-client.changes        
2018-07-03 23:33:24.600489795 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-nfs-client.new/yast2-nfs-client.changes   
2018-09-04 22:50:32.347843905 +0200
@@ -1,0 +2,12 @@
+Thu Aug 23 10:47:00 UTC 2018 - [email protected]
+
+- do not crash when nfs version is written as 4.0 instead of 4
+  (bsc#1105674)
+- 4.1.0
+
+-------------------------------------------------------------------
+Wed Aug 22 16:07:12 CEST 2018 - [email protected]
+
+- Switched license in spec file from SPDX2 to SPDX3 format. 
+
+-------------------------------------------------------------------

Old:
----
  yast2-nfs-client-4.0.7.tar.bz2

New:
----
  yast2-nfs-client-4.1.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-nfs-client.spec ++++++
--- /var/tmp/diff_new_pack.kPTlRN/_old  2018-09-04 22:50:33.695848534 +0200
+++ /var/tmp/diff_new_pack.kPTlRN/_new  2018-09-04 22:50:33.699848547 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-nfs-client
-Version:        4.0.7
+Version:        4.1.0
 Release:        0
 Url:            https://github.com/yast/yast-nfs-client
 
@@ -66,7 +66,7 @@
 Requires:       yast2-ruby-bindings >= 1.0.0
 
 Summary:        YaST2 - NFS Configuration
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          System/YaST
 
 %description

++++++ yast2-nfs-client-4.0.7.tar.bz2 -> yast2-nfs-client-4.1.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-nfs-client-4.0.7/package/yast2-nfs-client.changes 
new/yast2-nfs-client-4.1.0/package/yast2-nfs-client.changes
--- old/yast2-nfs-client-4.0.7/package/yast2-nfs-client.changes 2018-07-02 
18:08:53.000000000 +0200
+++ new/yast2-nfs-client-4.1.0/package/yast2-nfs-client.changes 2018-08-23 
16:39:15.000000000 +0200
@@ -1,4 +1,16 @@
 -------------------------------------------------------------------
+Thu Aug 23 10:47:00 UTC 2018 - [email protected]
+
+- do not crash when nfs version is written as 4.0 instead of 4
+  (bsc#1105674)
+- 4.1.0
+
+-------------------------------------------------------------------
+Wed Aug 22 16:07:12 CEST 2018 - [email protected]
+
+- Switched license in spec file from SPDX2 to SPDX3 format. 
+
+-------------------------------------------------------------------
 Wed Jun 27 17:30:25 CEST 2018 - [email protected]
 
 - Added additional searchkeys to desktop file (fate#321043).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-nfs-client-4.0.7/package/yast2-nfs-client.spec 
new/yast2-nfs-client-4.1.0/package/yast2-nfs-client.spec
--- old/yast2-nfs-client-4.0.7/package/yast2-nfs-client.spec    2018-07-02 
18:08:53.000000000 +0200
+++ new/yast2-nfs-client-4.1.0/package/yast2-nfs-client.spec    2018-08-23 
16:39:15.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-nfs-client
-Version:        4.0.7
+Version:        4.1.0
 Release:        0
 Url:            https://github.com/yast/yast-nfs-client
 
@@ -66,7 +66,7 @@
 Requires:       yast2-ruby-bindings >= 1.0.0
 
 Summary:        YaST2 - NFS Configuration
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          System/YaST
 
 %description
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-nfs-client-4.0.7/src/lib/y2nfs_client/nfs_version.rb 
new/yast2-nfs-client-4.1.0/src/lib/y2nfs_client/nfs_version.rb
--- old/yast2-nfs-client-4.0.7/src/lib/y2nfs_client/nfs_version.rb      
2018-07-02 18:08:53.000000000 +0200
+++ new/yast2-nfs-client-4.1.0/src/lib/y2nfs_client/nfs_version.rb      
2018-08-23 16:39:15.000000000 +0200
@@ -63,9 +63,11 @@
     # @see #mntops_value
     #
     # @param value [String]
+    # @raise Argument error for parameter for which matching version is not 
found
     # @return [NfsVersion]
     def self.for_mntops_value(value)
-      all.find { |version| version.mntops_value == value }
+      value = "4" if value == "4.0"
+      all.find { |version| version.mntops_value == value } or raise 
ArgumentError, "Unknown value #{value.inspect}"
     end
 
     # Value used in the corresponding mount option (nfsvers or vers)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-nfs-client-4.0.7/src/modules/Nfs.rb 
new/yast2-nfs-client-4.1.0/src/modules/Nfs.rb
--- old/yast2-nfs-client-4.0.7/src/modules/Nfs.rb       2018-07-02 
18:08:53.000000000 +0200
+++ new/yast2-nfs-client-4.1.0/src/modules/Nfs.rb       2018-08-23 
16:39:15.000000000 +0200
@@ -197,8 +197,13 @@
 
       # vfstype can override a missing enable_nfs4
       @nfs4_enabled = true if Builtins.find(entries) do |entry|
-        version = NfsOptions.nfs_version(entry["nfs_options"] || "")
-        version && version.requires_v4?
+        begin
+          version = NfsOptions.nfs_version(entry["nfs_options"] || "")
+          version.requires_v4?
+        rescue ArgumentError => e
+          log.error "Invalid version #{e.inspect} in entry #{entry.inspect}"
+          false
+        end
       end
 
       @nfs_entries = Builtins.maplist(entries) do |entry|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-nfs-client-4.0.7/src/modules/NfsOptions.rb 
new/yast2-nfs-client-4.1.0/src/modules/NfsOptions.rb
--- old/yast2-nfs-client-4.0.7/src/modules/NfsOptions.rb        2018-07-02 
18:08:53.000000000 +0200
+++ new/yast2-nfs-client-4.1.0/src/modules/NfsOptions.rb        2018-08-23 
16:39:15.000000000 +0200
@@ -181,6 +181,7 @@
     #
     # @param options [String] mount options in the comma-separated format used
     #   by mount and /etc/fstab
+    # @raise [ArgumentError] if no matching version is found
     # @return [Y2NfsClient::NfsVersion]
     def nfs_version(options)
       option_list = from_string(options)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-nfs-client-4.0.7/test/nfs_options_test.rb 
new/yast2-nfs-client-4.1.0/test/nfs_options_test.rb
--- old/yast2-nfs-client-4.0.7/test/nfs_options_test.rb 2018-07-02 
18:08:53.000000000 +0200
+++ new/yast2-nfs-client-4.1.0/test/nfs_options_test.rb 2018-08-23 
16:39:15.000000000 +0200
@@ -107,6 +107,7 @@
       {
         "nfsvers=4"                => "4",
         "nfsvers=4,minorversion=1" => "4",
+        "nfsvers=4.0"              => "4",
         "defaults,nfsvers=3"       => "3",
         "nfsvers=4.1,nolock"       => "4.1"
       }.each_pair do |opts, version|
@@ -136,6 +137,16 @@
         expect(returned.mntops_value).to eq version
       end
     end
+
+    it "raises ArgumentError if unknown version appears" do
+      [
+        "nfsvers=4.5",
+        "vers=5,rw"
+      ].each do |opts|
+        expect { Yast::NfsOptions.nfs_version(opts) }.to 
raise_error(ArgumentError)
+      end
+
+    end
   end
 
   describe "#set_nfs_version" do


Reply via email to