Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-installation for 
openSUSE:Factory checked in at 2021-07-04 22:10:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-installation.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-installation"

Sun Jul  4 22:10:17 2021 rev:474 rq:903246 version:4.4.14

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes    
2021-06-19 23:01:57.539590016 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-installation.new.2625/yast2-installation.changes
  2021-07-04 22:10:17.537438171 +0200
@@ -1,0 +2,6 @@
+Wed Jun 16 14:10:33 UTC 2021 - Jos?? Iv??n L??pez Gonz??lez <jlo...@suse.com>
+
+- Adapt code to Y2Users (part of jsc#PM-2620).
+- 4.4.14
+
+-------------------------------------------------------------------

Old:
----
  yast2-installation-4.4.13.tar.bz2

New:
----
  yast2-installation-4.4.14.tar.bz2

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

Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.UI2NE6/_old  2021-07-04 22:10:18.137433530 +0200
+++ /var/tmp/diff_new_pack.UI2NE6/_new  2021-07-04 22:10:18.141433499 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        4.4.13
+Version:        4.4.14
 Release:        0
 Summary:        YaST2 - Installation Parts
 License:        GPL-2.0-only
@@ -47,8 +47,8 @@
 BuildRequires:  yast2-security
 # using /usr/bin/udevadm
 BuildRequires:  yast2-storage-ng >= 4.2.71
-# new root password cwm widget
-BuildRequires:  yast2-users >= 3.2.8
+# Y2Users
+BuildRequires:  yast2-users >= 4.4.2
 # needed for xml agent reading about products
 BuildRequires:  yast2-xml
 BuildRequires:  rubygem(%{rb_default_ruby_abi}:rspec)
@@ -93,7 +93,8 @@
 Requires:       yast2-services-manager >= 3.2.1
 # Only in inst-sys
 Requires:       yast2-storage-ng >= 4.0.175
-Requires:       yast2-users >= 3.2.8
+# Y2Users
+Requires:       yast2-users >= 4.4.2
 PreReq:         %fillup_prereq
 Recommends:     yast2-add-on
 Recommends:     yast2-firewall

++++++ yast2-installation-4.4.13.tar.bz2 -> yast2-installation-4.4.14.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-4.4.13/README.md 
new/yast2-installation-4.4.14/README.md
--- old/yast2-installation-4.4.13/README.md     2021-06-16 14:32:58.000000000 
+0200
+++ new/yast2-installation-4.4.14/README.md     2021-06-30 15:47:53.000000000 
+0200
@@ -49,4 +49,4 @@
 
 If you have any question, feel free to ask at the [development mailing
 list](http://lists.opensuse.org/yast-devel/) or at the
-[#yast](https://webchat.freenode.net/?channels=%23yast) IRC channel on 
freenode.
+[#yast](https://web.libera.chat/#yast) IRC channel on libera.chat.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.13/package/yast2-installation.changes 
new/yast2-installation-4.4.14/package/yast2-installation.changes
--- old/yast2-installation-4.4.13/package/yast2-installation.changes    
2021-06-16 14:32:58.000000000 +0200
+++ new/yast2-installation-4.4.14/package/yast2-installation.changes    
2021-06-30 15:47:53.000000000 +0200
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Wed Jun 16 14:10:33 UTC 2021 - Jos?? Iv??n L??pez Gonz??lez <jlo...@suse.com>
+
+- Adapt code to Y2Users (part of jsc#PM-2620).
+- 4.4.14
+
+-------------------------------------------------------------------
 Wed Jun 16 10:35:42 UTC 2021 - David Diaz <dgonza...@suse.com>
 
 - Fix scope resolution for ::Users::UsersDatabase
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.13/package/yast2-installation.spec 
new/yast2-installation-4.4.14/package/yast2-installation.spec
--- old/yast2-installation-4.4.13/package/yast2-installation.spec       
2021-06-16 14:32:58.000000000 +0200
+++ new/yast2-installation-4.4.14/package/yast2-installation.spec       
2021-06-30 15:47:53.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        4.4.13
+Version:        4.4.14
 Release:        0
 Summary:        YaST2 - Installation Parts
 License:        GPL-2.0-only
@@ -47,8 +47,8 @@
 BuildRequires:  yast2-security
 # using /usr/bin/udevadm
 BuildRequires:  yast2-storage-ng >= 4.2.71
-# new root password cwm widget
-BuildRequires:  yast2-users >= 3.2.8
+# Y2Users
+BuildRequires:  yast2-users >= 4.4.2
 # needed for xml agent reading about products
 BuildRequires:  yast2-xml
 BuildRequires:  rubygem(%{rb_default_ruby_abi}:rspec)
@@ -93,7 +93,8 @@
 Requires:       yast2-services-manager >= 3.2.1
 # Only in inst-sys
 Requires:       yast2-storage-ng >= 4.0.175
-Requires:       yast2-users >= 3.2.8
+# Y2Users
+Requires:       yast2-users >= 4.4.2
 PreReq:         %fillup_prereq
 Recommends:     yast2-add-on
 Recommends:     yast2-firewall
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.13/src/lib/installation/security_settings.rb 
new/yast2-installation-4.4.14/src/lib/installation/security_settings.rb
--- old/yast2-installation-4.4.13/src/lib/installation/security_settings.rb     
2021-06-16 14:32:58.000000000 +0200
+++ new/yast2-installation-4.4.14/src/lib/installation/security_settings.rb     
2021-06-30 15:47:53.000000000 +0200
@@ -1,26 +1,25 @@
-# 
------------------------------------------------------------------------------
-# Copyright (c) 2017 SUSE LLC
+# Copyright (c) [2017-2021] SUSE LLC
 #
+# All Rights Reserved.
 #
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of version 2 of the GNU General Public License as published by the
-# Free Software Foundation.
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
 #
 # This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
details.
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
 #
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, contact SUSE.
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
 #
-# To contact SUSE about this file by physical or electronic mail, you may find
-# current contact information at www.suse.com.
-# 
------------------------------------------------------------------------------
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
 
 require "yast"
 require "y2security/selinux"
-
-Yast.import "UsersSimple"
+require "y2users"
 
 module Installation
   # Class that stores the security proposal settings during installation.
@@ -191,7 +190,22 @@
     #   key in order to log into the system. In such a case, we need to enable 
the SSH
     #   service (including opening the port).
     def only_public_key_auth
-      Yast::UsersSimple.GetRootPassword.empty?
+      return true unless root_user
+
+      password = root_user.password_content || ""
+
+      password.empty?
+    end
+
+    # Root user from the target config
+    #
+    # @return [Y2Users::User, nil]
+    def root_user
+      config = Y2Users::ConfigManager.instance.target
+
+      return nil unless config
+
+      config.users.root
     end
 
     class << self
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.13/test/lib/security_settings_test.rb 
new/yast2-installation-4.4.14/test/lib/security_settings_test.rb
--- old/yast2-installation-4.4.13/test/lib/security_settings_test.rb    
2021-06-16 14:32:58.000000000 +0200
+++ new/yast2-installation-4.4.14/test/lib/security_settings_test.rb    
2021-06-30 15:47:53.000000000 +0200
@@ -1,32 +1,41 @@
 #!/usr/bin/env rspec
 
-# 
------------------------------------------------------------------------------
-# Copyright (c) 2017 SUSE LLC
+# Copyright (c) [2017-2021] SUSE LLC
 #
+# All Rights Reserved.
 #
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of version 2 of the GNU General Public License as published by the
-# Free Software Foundation.
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
 #
 # This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
details.
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
 #
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, contact SUSE.
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
 #
-# To contact SUSE about this file by physical or electronic mail, you may find
-# current contact information at www.suse.com.
-# 
------------------------------------------------------------------------------
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
 
 require_relative "../test_helper.rb"
 require "installation/security_settings"
+require "y2users"
 
 Yast.import "Linuxrc"
 Yast.import "ProductFeatures"
 
 describe Installation::SecuritySettings do
   subject { described_class.create_instance }
+
+  def create_target_config
+    root = Y2Users::User.create_root
+    config = Y2Users::Config.new.attach(root)
+
+    Y2Users::ConfigManager.instance.target = config
+  end
+
   let(:global_section) do
     {
       "enable_firewall"     => false,
@@ -34,19 +43,24 @@
       "firewall_enable_ssh" => false
     }
   end
+
   let(:use_vnc) { false }
   let(:use_ssh) { false }
-  let(:root_password) { "secret" }
 
   before do
     allow(Yast::Linuxrc).to receive(:vnc).and_return(use_vnc)
     allow(Yast::Linuxrc).to receive(:usessh).and_return(use_ssh)
-    allow(Yast::UsersSimple).to 
receive(:GetRootPassword).and_return(root_password)
 
     allow(Yast::ProductFeatures).to receive("GetSection")
       .with("globals").and_return(global_section)
+
+    create_target_config
+
+    Y2Users::ConfigManager.instance.target.users.root.password = root_password
   end
 
+  let(:root_password) { Y2Users::Password.create_plain("s3cr3t") }
+
   describe "#initialize" do
     it "loads the default values from the control file" do
       expect_any_instance_of(described_class).to receive(:load_features)
@@ -91,10 +105,10 @@
     end
 
     context "when no root password was set" do
+      let(:root_password) { Y2Users::Password.create_plain("") }
+
       before do
         allow(Yast::Linuxrc).to receive(:usessh).and_return(false)
-        allow(Yast::UsersSimple).to receive(:GetRootPassword)
-          .and_return("")
       end
 
       it "opens SSH to allow public key authentication" do

Reply via email to