Hello community,

here is the log from the commit of package yast2-users for openSUSE:Factory 
checked in at 2016-09-08 17:38:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-users (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-users.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-users"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-users/yast2-users.changes  2016-08-31 
14:27:28.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-users.new/yast2-users.changes     
2016-09-08 17:38:06.000000000 +0200
@@ -1,0 +2,7 @@
+Fri Sep  2 15:16:37 CEST 2016 - sch...@suse.de
+
+- AutoYaST: Ignore Users without UID while checking for duplicate
+  UIDs (bnc#996823)
+- 3.1.57
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-users.spec ++++++
--- /var/tmp/diff_new_pack.H7zMXh/_old  2016-09-08 17:38:07.000000000 +0200
+++ /var/tmp/diff_new_pack.H7zMXh/_new  2016-09-08 17:38:07.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-users
-Version:        3.1.56
+Version:        3.1.57
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-users-3.1.56.tar.bz2 -> yast2-users-3.1.57.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.56/package/yast2-users.changes 
new/yast2-users-3.1.57/package/yast2-users.changes
--- old/yast2-users-3.1.56/package/yast2-users.changes  2016-08-30 
11:12:17.000000000 +0200
+++ new/yast2-users-3.1.57/package/yast2-users.changes  2016-09-02 
16:36:17.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Fri Sep  2 15:16:37 CEST 2016 - sch...@suse.de
+
+- AutoYaST: Ignore Users without UID while checking for duplicate
+  UIDs (bnc#996823)
+- 3.1.57
+
+-------------------------------------------------------------------
 Tue Aug 30 10:37:18 CEST 2016 - sch...@suse.de
 
 - AutoYaST: Checking users entries for duplicate username/UIDs.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.56/package/yast2-users.spec 
new/yast2-users-3.1.57/package/yast2-users.spec
--- old/yast2-users-3.1.56/package/yast2-users.spec     2016-08-30 
11:12:17.000000000 +0200
+++ new/yast2-users-3.1.57/package/yast2-users.spec     2016-09-02 
16:36:17.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-users
-Version:        3.1.56
+Version:        3.1.57
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.56/src/clients/users_auto.rb 
new/yast2-users-3.1.57/src/clients/users_auto.rb
--- old/yast2-users-3.1.56/src/clients/users_auto.rb    2016-08-30 
11:12:17.000000000 +0200
+++ new/yast2-users-3.1.57/src/clients/users_auto.rb    2016-09-02 
16:36:17.000000000 +0200
@@ -171,7 +171,10 @@
       if users.size > users.uniq { |u| u["username"]}.size
         Report.Error(_("Found users in profile with equal <username>."))
       end
-      if users.size > users.uniq { |u| u["uid"]}.size
+      # Do not check users without defined UID. (bnc#996823)
+      check_users = users.dup
+      check_users.reject! { |u| !u.key?("uid")}
+      if check_users.size > check_users.uniq { |u| u["uid"]}.size
         Report.Error(_("Found users in profile with equal <uid>."))
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.56/test/fixtures/users_no_error.yml 
new/yast2-users-3.1.57/test/fixtures/users_no_error.yml
--- old/yast2-users-3.1.56/test/fixtures/users_no_error.yml     1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-users-3.1.57/test/fixtures/users_no_error.yml     2016-09-02 
16:36:17.000000000 +0200
@@ -0,0 +1,29 @@
+users:
+  - username: root
+    user_password: yast.password
+    fullname: Superuser
+    encrypted: true
+  - username: yast
+    user_password: suse
+    fullname: YaST team user
+    gid: 100
+    uid: 1000
+    shell: /usr/bin/zsh
+    encrypted: true
+  - username: saprouter
+    user_password: suse
+    fullname: SAP User
+    gid: 100
+    uid: 1001
+    shell: /usr/bin/zsh
+    encrypted: true
+  - username: user_no_uid1
+    user_password: suse
+    fullname: user_no_uid1
+    shell: /usr/bin/zsh
+    encrypted: true
+  - username: user_no_uid2
+    user_password: suse
+    fullname: user_no_uid2
+    shell: /usr/bin/zsh
+    encrypted: true
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.1.56/test/users_auto_test.rb 
new/yast2-users-3.1.57/test/users_auto_test.rb
--- old/yast2-users-3.1.56/test/users_auto_test.rb      2016-08-30 
11:12:17.000000000 +0200
+++ new/yast2-users-3.1.57/test/users_auto_test.rb      2016-09-02 
16:36:17.000000000 +0200
@@ -19,23 +19,30 @@
   describe "#AutoYaST" do
 
     context "Import" do
+      before do
+        allow(Yast::WFM).to 
receive(:Args).with(no_args).and_return([func,users])
+        allow(Yast::WFM).to receive(:Args).with(0).and_return(func)
+        allow(Yast::WFM).to receive(:Args).with(1).and_return(users)
+      end
+
       let(:func) { "Import" }
 
       context "when double users have been given in the profile" do
         let(:users) { YAML.load_file(FIXTURES_PATH.join("users_error.yml")) }
-
-        before do
-          allow(Yast::WFM).to 
receive(:Args).with(no_args).and_return([func,users])
-          allow(Yast::WFM).to receive(:Args).with(0).and_return(func)
-          allow(Yast::WFM).to receive(:Args).with(1).and_return(users)
-        end
-
         it "report error" do
           expect(Yast::Report).to receive(:Error).with(_("Found users in 
profile with equal <username>."))
           expect(Yast::Report).to receive(:Error).with(_("Found users in 
profile with equal <uid>."))
           expect(subject.main).to eq(true)
         end
       end
+      context "when users without any UID are defined in the profile" do
+        let(:users) { YAML.load_file(FIXTURES_PATH.join("users_no_error.yml")) 
}
+        it "will not be checked for double UIDs" do
+          expect(Yast::Report).not_to receive(:Error).with(_("Found users in 
profile with equal <username>."))
+          expect(Yast::Report).not_to receive(:Error).with(_("Found users in 
profile with equal <uid>."))
+          expect(subject.main).to eq(true)
+        end
+      end
     end
   end
 end


Reply via email to