Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-users for openSUSE:Factory 
checked in at 2022-04-10 19:05:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-users (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-users.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-users"

Sun Apr 10 19:05:12 2022 rev:251 rq:967777 version:4.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-users/yast2-users.changes  2021-12-08 
22:09:07.746867459 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-users.new.1900/yast2-users.changes        
2022-04-10 19:05:23.678506104 +0200
@@ -1,0 +2,12 @@
+Fri Apr  8 11:27:57 UTC 2022 - Jos?? Iv??n L??pez Gonz??lez <[email protected]>
+
+- Fix import users: do not fail if the group does not exist
+  (bsc#1197040).
+- 4.5.1
+
+-------------------------------------------------------------------
+Wed Apr 06 13:24:58 UTC 2022 - Ladislav Slez??k <[email protected]>
+
+- Bump version to 4.5.0 (#bsc1198109)
+
+-------------------------------------------------------------------

Old:
----
  yast2-users-4.4.10.tar.bz2

New:
----
  yast2-users-4.5.1.tar.bz2

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

Other differences:
------------------
++++++ yast2-users.spec ++++++
--- /var/tmp/diff_new_pack.AtQZwp/_old  2022-04-10 19:05:24.574496185 +0200
+++ /var/tmp/diff_new_pack.AtQZwp/_new  2022-04-10 19:05:24.574496185 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-users
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-users
-Version:        4.4.10
+Version:        4.5.1
 Release:        0
 Summary:        YaST2 - User and Group Configuration
 License:        GPL-2.0-only

++++++ yast2-users-4.4.10.tar.bz2 -> yast2-users-4.5.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-4.4.10/.github/workflows/ci.yml 
new/yast2-users-4.5.1/.github/workflows/ci.yml
--- old/yast2-users-4.4.10/.github/workflows/ci.yml     2021-12-06 
15:25:49.000000000 +0100
+++ new/yast2-users-4.5.1/.github/workflows/ci.yml      2022-04-08 
13:36:31.000000000 +0200
@@ -7,8 +7,14 @@
 jobs:
   Tests:
     runs-on: ubuntu-latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+        distro:  [ "tumbleweed", "leap_latest" ]
+
     container:
-      image: registry.opensuse.org/yast/head/containers/yast-ruby:latest
+      image: 
registry.opensuse.org/yast/head/containers_${{matrix.distro}}/yast-ruby
 
     steps:
 
@@ -27,14 +33,22 @@
 
     # send the coverage report to coveralls.io
     - name: Coveralls Report
+      # send it only from the TW build to avoid duplicate submits
+      if: ${{ matrix.distro == 'tumbleweed' }}
       uses: coverallsapp/github-action@master
       with:
         github-token: ${{ secrets.GITHUB_TOKEN }}
 
   Rubocop:
     runs-on: ubuntu-latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+        distro: [ "leap_latest" ]
+
     container:
-      image: registry.opensuse.org/yast/head/containers/yast-ruby:latest
+      image: 
registry.opensuse.org/yast/head/containers_${{matrix.distro}}/yast-ruby
 
     steps:
 
@@ -75,8 +89,14 @@
 
   Yardoc:
     runs-on: ubuntu-latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+        distro:  [ "tumbleweed", "leap_latest" ]
+
     container:
-      image: registry.opensuse.org/yast/head/containers/yast-ruby:latest
+      image: 
registry.opensuse.org/yast/head/containers_${{matrix.distro}}/yast-ruby
 
     steps:
 
@@ -88,8 +108,14 @@
 
   Checks:
     runs-on: ubuntu-latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+        distro: [ "leap_latest" ]
+
     container:
-      image: registry.opensuse.org/yast/head/containers/yast-ruby:latest
+      image: 
registry.opensuse.org/yast/head/containers_${{matrix.distro}}/yast-ruby
 
     steps:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-4.4.10/package/yast2-users.changes 
new/yast2-users-4.5.1/package/yast2-users.changes
--- old/yast2-users-4.4.10/package/yast2-users.changes  2021-12-06 
15:25:49.000000000 +0100
+++ new/yast2-users-4.5.1/package/yast2-users.changes   2022-04-08 
13:36:31.000000000 +0200
@@ -1,4 +1,16 @@
 -------------------------------------------------------------------
+Fri Apr  8 11:27:57 UTC 2022 - Jos?? Iv??n L??pez Gonz??lez <[email protected]>
+
+- Fix import users: do not fail if the group does not exist
+  (bsc#1197040).
+- 4.5.1
+
+-------------------------------------------------------------------
+Wed Apr 06 13:24:58 UTC 2022 - Ladislav Slez??k <[email protected]>
+
+- Bump version to 4.5.0 (#bsc1198109)
+
+-------------------------------------------------------------------
 Mon Dec  6 13:43:07 UTC 2021 - Josef Reidinger <[email protected]>
 
 - Prepare code for ruby3 (bsc#1193192)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-4.4.10/package/yast2-users.spec 
new/yast2-users-4.5.1/package/yast2-users.spec
--- old/yast2-users-4.4.10/package/yast2-users.spec     2021-12-06 
15:25:49.000000000 +0100
+++ new/yast2-users-4.5.1/package/yast2-users.spec      2022-04-08 
13:36:31.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-users
-Version:        4.4.10
+Version:        4.5.1
 Release:        0
 Summary:        YaST2 - User and Group Configuration
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-users-4.4.10/src/lib/users/dialogs/inst_user_first.rb 
new/yast2-users-4.5.1/src/lib/users/dialogs/inst_user_first.rb
--- old/yast2-users-4.4.10/src/lib/users/dialogs/inst_user_first.rb     
2021-12-06 15:25:49.000000000 +0100
+++ new/yast2-users-4.5.1/src/lib/users/dialogs/inst_user_first.rb      
2022-04-08 13:36:31.000000000 +0200
@@ -1,4 +1,4 @@
-# Copyright (c) [2016-2021] SUSE LLC
+# Copyright (c) [2016-2022] SUSE LLC
 #
 # All Rights Reserved.
 #
@@ -336,6 +336,19 @@
       importing_database&.users || []
     end
 
+    # Returns a copy of the given user with sanitized data
+    #
+    # It removes the information about the group if the group is not included 
in the current config.
+    #
+    # @param user [Y2Users::User]
+    # @return [Y2Users::User]
+    def sanitized_user(user)
+      user.copy.tap do |u|
+        group = config.groups.by_gid(u.gid).first
+        u.gid = nil unless group
+      end
+    end
+
     # Whether the password of root and the new user are equal
     #
     # @return [Boolean]
@@ -505,7 +518,9 @@
       update_root_password
 
       imported_users = 
importing_database.filtered_config(@usernames_to_import).users.all
-      config.attach(imported_users.map(&:copy))
+      imported_users = imported_users.map { |u| sanitized_user(u) }
+
+      config.attach(imported_users)
     end
 
     def process_skip_form
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-4.4.10/src/lib/y2users/group.rb 
new/yast2-users-4.5.1/src/lib/y2users/group.rb
--- old/yast2-users-4.4.10/src/lib/y2users/group.rb     2021-12-06 
15:25:49.000000000 +0100
+++ new/yast2-users-4.5.1/src/lib/y2users/group.rb      2022-04-08 
13:36:31.000000000 +0200
@@ -26,7 +26,7 @@
   #
   # @example
   #   group = Group.new("admins")
-  #   group.gid = 110
+  #   group.gid = "110"
   #   group.attached? #=> false
   #   group.id #=> 1
   #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-users-4.4.10/test/lib/users/dialogs/inst_user_first_test.rb 
new/yast2-users-4.5.1/test/lib/users/dialogs/inst_user_first_test.rb
--- old/yast2-users-4.4.10/test/lib/users/dialogs/inst_user_first_test.rb       
2021-12-06 15:25:49.000000000 +0100
+++ new/yast2-users-4.5.1/test/lib/users/dialogs/inst_user_first_test.rb        
2022-04-08 13:36:31.000000000 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/env rspec
 
-# Copyright (c) [2018-2021] SUSE LLC
+# Copyright (c) [2018-2022] SUSE LLC
 #
 # All Rights Reserved.
 #
@@ -221,7 +221,7 @@
           end
         end
 
-        context "when the option \"use passwor for root\" is selected" do
+        context "when the option \"use password for root\" is selected" do
           let(:root_pw) { true }
 
           it "assigns the same password to the root user" do
@@ -231,7 +231,7 @@
           end
         end
 
-        context "when the option \"use passwor for root\" is not selected" do
+        context "when the option \"use password for root\" is not selected" do
           let(:root_pw) { false }
 
           context "but it was initially selected" do
@@ -253,7 +253,7 @@
             end
           end
 
-          context "but the new password matches with the curren root password" 
do
+          context "but the new password matches with the current root 
password" do
             before do
               root = Y2Users::User.create_root
               root.password = Y2Users::Password.create_plain("SuperS3cr3T")
@@ -323,7 +323,7 @@
 
       let(:user) { Y2Users::User.new("test") }
 
-      it "removes previously configued user" do
+      it "removes previously configured user" do
         subject.choose_users_handler
         subject.next_handler
 
@@ -346,6 +346,37 @@
         expect(config.users.by_name("imported4")).to_not be_nil
       end
 
+      context "when the imported user has a primary group" do
+        let(:group) { Y2Users::Group.new("imported2").tap { |g| g.gid = "100" 
} }
+
+        before do
+          user = importing_config.users.by_name("imported2")
+          user.gid = group.gid
+        end
+
+        context "and the config contains such a group" do
+          before do
+            config.attach(group)
+          end
+
+          it "imports the user including the information about the primary 
group" do
+            subject.choose_users_handler
+            subject.next_handler
+
+            expect(config.users.by_name("imported2").gid).to eq("100")
+          end
+        end
+
+        context "and the config does not contain such a group" do
+          it "imports the user without the information about the primary 
group" do
+            subject.choose_users_handler
+            subject.next_handler
+
+            expect(config.users.by_name("imported2").gid).to be_nil
+          end
+        end
+      end
+
       it "disables autologin" do
         subject.choose_users_handler
         subject.next_handler

Reply via email to