Hello community,

here is the log from the commit of package yast2-update for openSUSE:Factory 
checked in at 2020-06-10 00:37:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-update (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-update.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-update"

Wed Jun 10 00:37:43 2020 rev:137 rq:811238 version:4.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-update/yast2-update.changes        
2020-03-14 09:54:48.499086702 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-update.new.3606/yast2-update.changes      
2020-06-10 00:38:02.493337932 +0200
@@ -1,0 +2,8 @@
+Wed Jun  3 16:12:18 UTC 2020 - Josef Reidinger <[email protected]>
+
+- Replace anyxml agent with rubygem-nokogiri as yast2 already
+  depends on nokogiri, to reduce amount of used xml parsers.
+  (related to bsc#1170886)
+- 4.3.0
+
+-------------------------------------------------------------------

Old:
----
  yast2-update-4.2.18.tar.bz2

New:
----
  yast2-update-4.3.0.tar.bz2

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

Other differences:
------------------
++++++ yast2-update.spec ++++++
--- /var/tmp/diff_new_pack.PCkCx9/_old  2020-06-10 00:38:03.689341140 +0200
+++ /var/tmp/diff_new_pack.PCkCx9/_new  2020-06-10 00:38:03.689341140 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-update
-Version:        4.2.18
+Version:        4.3.0
 Release:        0
 Summary:        YaST2 - Update
 License:        GPL-2.0-only
@@ -40,6 +40,8 @@
 # Needed for tests
 BuildRequires:  rubygem(%{rb_default_ruby_abi}:rspec)
 BuildRequires:  rubygem(%{rb_default_ruby_abi}:yast-rake)
+# nokogiri is used also for parsing in tests. It is not problem as yast2 also 
depends on it
+BuildRequires:  rubygem(%{rb_default_ruby_abi}:nokogiri)
 # Y2Storage::Crypttab.save_encryption_names
 BuildRequires:  yast2-storage-ng >= 4.2.42
 
@@ -53,6 +55,8 @@
 # Improved Pkg.SourceRestore()
 Requires:       yast2-pkg-bindings >= 4.2.6
 Requires:       yast2-ruby-bindings >= 1.0.0
+# nokogiri is used for parsing pam conf.
+Requires:       rubygem(%{rb_default_ruby_abi}:nokogiri)
 # use parallel gzip when crating backup (much faster)
 Requires:       pigz
 

++++++ yast2-update-4.2.18.tar.bz2 -> yast2-update-4.3.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-update-4.2.18/.rubocop.yml 
new/yast2-update-4.3.0/.rubocop.yml
--- old/yast2-update-4.2.18/.rubocop.yml        2020-03-12 10:48:31.000000000 
+0100
+++ new/yast2-update-4.3.0/.rubocop.yml 2020-06-03 23:16:49.000000000 +0200
@@ -24,7 +24,9 @@
 # Configuration parameters: CountComments, ExcludedMethods.
 # ExcludedMethods: refine
 Metrics/BlockLength:
-  Max: 300
+  Max: 120
+  Exclude: # exclude rspec tests
+    - "test/**/*.rb"
 
 # Offense count: 18
 # Configuration parameters: CountBlocks.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-update-4.2.18/CONTRIBUTING.md 
new/yast2-update-4.3.0/CONTRIBUTING.md
--- old/yast2-update-4.2.18/CONTRIBUTING.md     2020-03-12 10:48:31.000000000 
+0100
+++ new/yast2-update-4.3.0/CONTRIBUTING.md      1970-01-01 01:00:00.000000000 
+0100
@@ -1,89 +0,0 @@
-YaST Contribution Guidelines
-============================
-
-YaST is an open source project and as such it welcomes all kinds of
-contributions. If you decide to contribute, please follow these guidelines to
-ensure the process is effective and pleasant both for you and the YaST 
maintainers.
-
-There are two main forms of contribution: reporting bugs and performing code
-changes.
-
-Bug Reports
------------
-
-If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
-or [GitHub issues](../../issues). (For Bugzilla, use the [simplified
-registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
-if you don't have an account yet.)
-
-When creating a bug report, please follow our [bug reporting
-guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug).
-
-We can't guarantee that every bug will be fixed, but we'll try.
-
-Code Changes
-------------
-
-We welcome all kinds of code contributions, from simple bug fixes to 
significant
-refactorings and implementation of new features. However, before making any
-non-trivial contribution, get in touch with us first — this can prevent wasted
-effort on both sides. Also, have a look at our [development
-documentation](http://en.opensuse.org/openSUSE:YaST_development).
-
-To send us your code change, use GitHub pull requests. The workflow is as
-follows:
-
-  1. Fork the project.
-
-  2. Create a topic branch based on `master`.
-
-  3. Implement your change, including tests (if possible). Make sure you adhere
-     to the [Ruby style
-     guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md).
-
-  4. Update the package version (in `packages/*.spec`, usually by
-     `rake version:bump`) and add a new entry to the `package/*.changes` file
-     (by `osc vc package`).  
-     For bigger changes or changes which need longer discussion it is advised 
to
-     add this as a separate last commit so it can be easily updated when 
another
-     change is merged in the meantime.
-
-  5. Make sure your change didn't break anything by building the RPM package
-     (`rake osc:build`). The build process includes running the full testsuite.
-
-  6. Publish the branch and create a pull request.
-
-  7. YaST developers will review your change and possibly point out issues.
-     Adapt the code under their guidance until they are all resolved.
-
-  8. Finally, the pull request will get merged or rejected.
-
-See also [GitHub's guide on
-contributing](https://help.github.com/articles/fork-a-repo).
-
-If you want to do multiple unrelated changes, use separate branches and pull
-requests.
-
-### Commits
-
-Each commit in the pull request should do only one thing, which is clearly
-described by its commit message. Especially avoid mixing formatting changes and
-functional changes into one commit. When writing commit messages, adhere to
-[widely used
-conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
-
-If your commit is related to a bug in Bugzilla or an issue on GitHub, make sure
-you mention it in the commit message for cross-reference. Use format like
-bnc#775814 or gh#yast/yast-foo#42. See also [GitHub
-autolinking](https://help.github.com/articles/github-flavored-markdown#references)
-and [openSUSE abbreviation
-reference](http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Current_set_of_abbreviations).
-
-Additional Information
-----------------------
-
-If you have any question, feel free to ask at the [development mailing
-list](http://lists.opensuse.org/yast-devel/) or at the
-[#yast](http://webchat.freenode.net/?channels=%23yast) IRC channel on freenode.
-We'll do our best to provide a timely and accurate answer.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-update-4.2.18/package/yast2-update.changes 
new/yast2-update-4.3.0/package/yast2-update.changes
--- old/yast2-update-4.2.18/package/yast2-update.changes        2020-03-12 
10:48:31.000000000 +0100
+++ new/yast2-update-4.3.0/package/yast2-update.changes 2020-06-03 
23:16:49.000000000 +0200
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Wed Jun  3 16:12:18 UTC 2020 - Josef Reidinger <[email protected]>
+
+- Replace anyxml agent with rubygem-nokogiri as yast2 already
+  depends on nokogiri, to reduce amount of used xml parsers.
+  (related to bsc#1170886)
+- 4.3.0
+
+-------------------------------------------------------------------
 Thu Mar 12 08:52:36 UTC 2020 - Ladislav Slezák <[email protected]>
 
 - Do not remove the installation repositories in the "Previously
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-update-4.2.18/package/yast2-update.spec 
new/yast2-update-4.3.0/package/yast2-update.spec
--- old/yast2-update-4.2.18/package/yast2-update.spec   2020-03-12 
10:48:31.000000000 +0100
+++ new/yast2-update-4.3.0/package/yast2-update.spec    2020-06-03 
23:16:49.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-update
-Version:        4.2.18
+Version:        4.3.0
 Release:        0
 Summary:        YaST2 - Update
 Group:          System/YaST
@@ -40,6 +40,8 @@
 # Needed for tests
 BuildRequires:  rubygem(%{rb_default_ruby_abi}:rspec)
 BuildRequires:  rubygem(%{rb_default_ruby_abi}:yast-rake)
+# nokogiri is used also for parsing in tests. It is not problem as yast2 also 
depends on it
+BuildRequires:  rubygem(%{rb_default_ruby_abi}:nokogiri)
 # Y2Storage::Crypttab.save_encryption_names
 BuildRequires:  yast2-storage-ng >= 4.2.42
 
@@ -53,6 +55,8 @@
 # Improved Pkg.SourceRestore()
 Requires:       yast2-pkg-bindings >= 4.2.6
 Requires:       yast2-ruby-bindings >= 1.0.0
+# nokogiri is used for parsing pam conf.
+Requires:  rubygem(%{rb_default_ruby_abi}:nokogiri)
 # use parallel gzip when crating backup (much faster)
 Requires:       pigz
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-update-4.2.18/src/modules/RootPart.rb 
new/yast2-update-4.3.0/src/modules/RootPart.rb
--- old/yast2-update-4.2.18/src/modules/RootPart.rb     2020-03-12 
10:48:31.000000000 +0100
+++ new/yast2-update-4.3.0/src/modules/RootPart.rb      2020-06-03 
23:16:49.000000000 +0200
@@ -30,6 +30,7 @@
 require "y2storage"
 
 require "fileutils"
+require "nokogiri"
 
 module Yast
   class RootPartClass < Module
@@ -1210,11 +1211,11 @@
       pam_mount_path = Installation.destdir + 
"/etc/security/pam_mount.conf.xml"
       return false unless File.exist? pam_mount_path
 
+      doc = Nokogiri::XML(File.read(pam_mount_path), &:strict)
+
       Builtins.y2milestone("Detected pam_mount.conf, checking existence of 
encrypted home dirs")
-      pam_mount_conf = SCR.Read(path(".anyxml"), pam_mount_path)
-      pam = pam_mount_conf.fetch("pam_mount", [])[0]
-      volumes = pam && pam["volume"]
-      Builtins.y2milestone("Detected encrypted volumes: %1", volumes)
+      volumes = doc.xpath("/pam_mount/volume")
+      Builtins.y2milestone("Detected encrypted volumes: %1", volumes.inspect)
       !(volumes.nil? || volumes.empty?)
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-update-4.2.18/test/root_part_test.rb 
new/yast2-update-4.3.0/test/root_part_test.rb
--- old/yast2-update-4.2.18/test/root_part_test.rb      2020-03-12 
10:48:31.000000000 +0100
+++ new/yast2-update-4.3.0/test/root_part_test.rb       2020-06-03 
23:16:49.000000000 +0200
@@ -221,6 +221,9 @@
       # Mock the system lookup executed as last resort when the devicegraph
       # doesn't contain the searched information
       allow(Y2Storage::BlkDevice).to receive(:find_by_any_name)
+
+      # avoid test on real FS
+      allow(::File).to receive(:exist?).and_return(false)
     end
 
     let(:scenario) { "two-disks-two-btrfs.xml" }
@@ -322,4 +325,58 @@
       end
     end
   end
+
+  describe "#has_pam_mount" do
+    context "pam_mount.conf.xml does not exist" do
+      before do
+        allow(File).to receive(:exist?).and_return(false)
+      end
+
+      it "returns false" do
+        expect(subject.has_pam_mount).to eq false
+      end
+    end
+
+    context "pam_mount.conf.xml exists and does not contain any volumes" do
+      before do
+        allow(File).to receive(:exist?).and_return(true)
+        allow(File).to receive(:read).and_return(<<~CONTENT
+          <pam_mount>
+          </pam_mount>
+        CONTENT
+                                                )
+      end
+
+      it "returns false" do
+        expect(subject.has_pam_mount).to eq false
+      end
+    end
+
+    context "pam_mount.conf.xml exists and contains volumes" do
+      before do
+        allow(File).to receive(:exist?).and_return(true)
+        allow(File).to receive(:read).and_return(<<~CONTENT
+          <pam_mount>
+            <!-- Generic encrypted partition example -->
+            <volume user="USERNAME" fstype="auto" path="/dev/sdaX" 
mountpoint="/home" options="fsck,noatime" />
+             <!-- Example using CIFS -->
+            <volume
+              fstype="cifs"
+              server="server.example.com"
+              path="share_name"
+              mountpoint="~/mnt/share_name"
+              uid="10000-19999"
+              options="sec=krb5i,vers=3.0,cruid=%(USERUID)"
+            />
+            <mkmountpoint enable="1" remove="true" />
+           </pam_mount>
+        CONTENT
+                                                )
+      end
+
+      it "returns true" do
+        expect(subject.has_pam_mount).to eq true
+      end
+    end
+  end
 end


Reply via email to