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 2021-04-10 15:26:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-users (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-users.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-users"

Sat Apr 10 15:26:02 2021 rev:240 rq:883009 version:4.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-users/yast2-users.changes  2020-12-05 
20:37:12.638710491 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-users.new.2401/yast2-users.changes        
2021-04-10 15:26:10.730293867 +0200
@@ -1,0 +2,14 @@
+Thu Apr  1 09:10:11 UTC 2021 - Jos?? Iv??n L??pez Gonz??lez <jlo...@suse.com>
+
+- Copy files from /usr/etc/skel when creating the home directory.
+- bsc#1183136 and related to bsc#1179261.
+- 4.4.0
+
+-------------------------------------------------------------------
+Thu Apr  1 08:22:28 UTC 2021 - Josef Reidinger <jreidin...@suse.com>
+
+- Fix missing Reset handling in auto client leading to crash in
+  autoyast UI (bsc#1184216)
+- 4.3.11
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-users.spec ++++++
--- /var/tmp/diff_new_pack.4q61EB/_old  2021-04-10 15:26:11.262294492 +0200
+++ /var/tmp/diff_new_pack.4q61EB/_new  2021-04-10 15:26:11.262294492 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-users
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 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.3.10
+Version:        4.4.0
 Release:        0
 Summary:        YaST2 - User and Group Configuration
 License:        GPL-2.0-only

++++++ yast2-users-4.3.10.tar.bz2 -> yast2-users-4.4.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-4.3.10/package/yast2-users.changes 
new/yast2-users-4.4.0/package/yast2-users.changes
--- old/yast2-users-4.3.10/package/yast2-users.changes  2020-12-04 
15:04:34.000000000 +0100
+++ new/yast2-users-4.4.0/package/yast2-users.changes   2021-04-05 
10:25:10.000000000 +0200
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Thu Apr  1 09:10:11 UTC 2021 - Jos?? Iv??n L??pez Gonz??lez <jlo...@suse.com>
+
+- Copy files from /usr/etc/skel when creating the home directory.
+- bsc#1183136 and related to bsc#1179261.
+- 4.4.0
+
+-------------------------------------------------------------------
+Thu Apr  1 08:22:28 UTC 2021 - Josef Reidinger <jreidin...@suse.com>
+
+- Fix missing Reset handling in auto client leading to crash in
+  autoyast UI (bsc#1184216)
+- 4.3.11
+
+-------------------------------------------------------------------
 Wed Dec  2 10:41:55 UTC 2020 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
 
 - In the public key selector, allow to choose any device that
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-4.3.10/package/yast2-users.spec 
new/yast2-users-4.4.0/package/yast2-users.spec
--- old/yast2-users-4.3.10/package/yast2-users.spec     2020-12-04 
15:04:34.000000000 +0100
+++ new/yast2-users-4.4.0/package/yast2-users.spec      2021-04-05 
10:25:10.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-users
-Version:        4.3.10
+Version:        4.4.0
 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.3.10/src/lib/users/clients/auto.rb 
new/yast2-users-4.4.0/src/lib/users/clients/auto.rb
--- old/yast2-users-4.3.10/src/lib/users/clients/auto.rb        2020-12-04 
15:04:34.000000000 +0100
+++ new/yast2-users-4.4.0/src/lib/users/clients/auto.rb 2021-04-05 
10:25:10.000000000 +0200
@@ -90,6 +90,10 @@
         true
       end
 
+      def reset
+        import({})
+      end
+
     private
 
       # Checking double user entries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-4.3.10/src/modules/Users.pm 
new/yast2-users-4.4.0/src/modules/Users.pm
--- old/yast2-users-4.3.10/src/modules/Users.pm 2020-12-04 15:04:34.000000000 
+0100
+++ new/yast2-users-4.4.0/src/modules/Users.pm  2021-04-05 10:25:10.000000000 
+0200
@@ -4493,6 +4493,7 @@
                my $chown_home          = $user{"chown_home"};
                $chown_home             = 1 if (!defined $chown_home);
                my $skel                = $useradd_defaults{"skel"};
+               my $copy_usr_skel       = "yes";
 
                if ($user_mod eq "imported" || $user_mod eq "added") {
                    y2usernote ("User '$username' created");
@@ -4503,11 +4504,12 @@
                        next;
                    }
                    if (bool ($user{"no_skeleton"})) {
-                       $skel   = "";
+                       $skel = "";
+                       $copy_usr_skel = "";
                    }
                    if (bool ($create_home) || $user_mod eq "imported")
                    {
-                       UsersRoutines->CreateHome ($skel, $home, 
$use_btrfs_subvolume);
+                       UsersRoutines->CreateHome ($skel, $home, 
$use_btrfs_subvolume, $copy_usr_skel);
                    }
                    if ($home ne "/var/lib/nobody" && bool ($chown_home)) {
                        if (UsersRoutines->ChownHome ($uid, $gid, $home))
@@ -4555,7 +4557,7 @@
                        }
                        # create new home directory
                        elsif (not %{SCR->Read (".target.stat", $home)}) {
-                           UsersRoutines->CreateHome ($skel, $home);
+                           UsersRoutines->CreateHome ($skel, $home, "", 
$copy_usr_skel);
                        }
                        # do not change root's ownership of home directories
                        if (bool ($chown_home))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-4.3.10/src/modules/UsersLDAP.pm 
new/yast2-users-4.4.0/src/modules/UsersLDAP.pm
--- old/yast2-users-4.3.10/src/modules/UsersLDAP.pm     2020-12-04 
15:04:34.000000000 +0100
+++ new/yast2-users-4.4.0/src/modules/UsersLDAP.pm      2021-04-05 
10:25:10.000000000 +0200
@@ -1404,7 +1404,7 @@
                if ($server) {
                    if ($create_home) {
                        UsersRoutines->CreateHome (
-                           $useradd_defaults{"skel"}, $home);
+                           $useradd_defaults{"skel"}, $home, "", "yes");
                    }
                    if ($home ne "/var/lib/nobody" && $chown_home) {
                        if (UsersRoutines->ChownHome ($uid, $gid, $home)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-4.3.10/src/modules/UsersRoutines.pm 
new/yast2-users-4.4.0/src/modules/UsersRoutines.pm
--- old/yast2-users-4.3.10/src/modules/UsersRoutines.pm 2020-12-04 
15:04:34.000000000 +0100
+++ new/yast2-users-4.4.0/src/modules/UsersRoutines.pm  2021-04-05 
10:25:10.000000000 +0200
@@ -50,6 +50,9 @@
 # path to btrfs
 my $btrfs = "/usr/sbin/btrfs";
 
+# path to the usr skel
+my $usr_skel = "/usr/etc/skel";
+
 ##-------------------------------------------------------------------------
 ##----------------- helper routines ---------------------------------------
 
@@ -60,23 +63,53 @@
     return ( SCR->Execute( ".target.bash", $cmd ) eq 0 );
 }
 
+sub copy_skel {
+    my ( $skel, $home ) = @_;
+
+    if ( $skel eq "" || $home eq "" ) {
+        y2error("skel cannot be copied, wrong arguments: skel: '$skel', home: 
'$home'.");
+        return 0;
+    }
+
+    if ( ! %{ SCR->Read( ".target.stat", $skel ) } ) {
+        y2error("skel file '$skel' does not exist.");
+        return 0;
+    }
+
+    my $cmd = sprintf(
+        "/usr/bin/cp -r '%s/.' '%s'",
+        String->Quote($skel),
+        String->Quote($home)
+    );
+    my %cmd_out = %{ SCR->Execute( ".target.bash_output", $cmd ) };
+    my $stderr = $cmd_out{"stderr"} || "";
+
+    if ( $stderr ne "" ) {
+        y2error( "Error calling $cmd: $stderr" );
+        return 0;
+    }
+
+    y2milestone("Home skeleton copied: '$cmd'.");
+}
+
 ##-------------------------------------------------------------------------
 ##----------------- directory manipulation routines -----------------------
 
 ##------------------------------------
 # Create home directory
-# @param skeleton skeleton directory for new home
+# @param skel skeleton directory for new home (typically from 
/etc/default/useradd config)
 # @param home name of new home directory
 # @param use_btrfs whether the home directory must be a btrfs subvolume
+# @param copy_usr_skel whether the usr skel (i.e., /usr/etc/skel) should be 
copied
 # @return success
 BEGIN { $TYPEINFO{CreateHome} = ["function",
     "boolean",
-    "string", "string", "string"];
+    "string", "string", "string", "string"];
 }
 sub CreateHome {
 
     my $self = shift;
-    my ( $skel, $home, $use_btrfs ) = @_;
+    my ( $skel, $home, $use_btrfs, $copy_usr_skel ) = @_;
 
     # Create a path to new home directory, if not exists
     my $home_path = substr( $home, 0, rindex( $home, "/" ) );
@@ -133,23 +166,8 @@
         }
     }
 
-    # Now copy the skeleton
-    if ( $skel ne "" && %{ SCR->Read( ".target.stat", $skel ) } ) {
-        my $cmd = sprintf(
-            "/usr/bin/cp -r '%s/.' '%s'",
-            String->Quote($skel),
-            String->Quote($home)
-        );
-        my %cmd_out = %{ SCR->Execute( ".target.bash_output", $cmd ) };
-        my $stderr = $cmd_out{"stderr"} || "";
-
-        if ( $stderr ne "" ) {
-            y2error( "Error calling $cmd: $stderr" );
-            return 0;
-        }
-
-        y2usernote("Home skeleton copied: '$cmd'.");
-    }
+    copy_skel($usr_skel, $home) if ($copy_usr_skel);
+    copy_skel($skel, $home);
 
     y2milestone("The directory $home was successfully created.");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-users-4.3.10/test/lib/users/clients/auto_test.rb 
new/yast2-users-4.4.0/test/lib/users/clients/auto_test.rb
--- old/yast2-users-4.3.10/test/lib/users/clients/auto_test.rb  2020-12-04 
15:04:34.000000000 +0100
+++ new/yast2-users-4.4.0/test/lib/users/clients/auto_test.rb   2021-04-05 
10:25:10.000000000 +0200
@@ -116,5 +116,14 @@
         subject.run
       end
     end
+
+    context "Reset" do
+      let(:func) { "Reset" }
+
+      it "import empty profile" do
+        expect(Yast::Users).to receive(:Import).with({})
+        subject.run
+      end
+    end
   end
 end

Reply via email to