[Pkg-shadow-devel] [Git][debian/adduser][zg/tstsuite-renames] 7 commits: add --no-copy-skel option

Marc Haber (@zugschlus) gitlab at salsa.debian.org
Tue Oct 14 05:35:23 BST 2025



Marc Haber pushed to branch zg/tstsuite-renames at Debian / adduser


Commits:
ae36756e by Matt Barry at 2025-09-14T14:38:02+02:00
add --no-copy-skel option

Fixes: #1099633

- - - - -
1150d03a by Matt Barry at 2025-09-14T14:38:02+02:00
document --no-copy-skel

- - - - -
53262f1e by Marc Haber at 2025-10-14T06:35:17+02:00
rename testsuite file names for better ordering

Git-Dch: ignore

- - - - -
6711e06b by Marc Haber at 2025-10-14T06:35:17+02:00
remove doubled semicolon.

Git-Dch: ignore

- - - - -
9f48853a by Marc Haber at 2025-10-14T06:35:17+02:00
fix brace position

Git-Dch: ignore

- - - - -
dc525e22 by Marc Haber at 2025-10-14T06:35:17+02:00
fix readding -> reading

Git-Dch: ignore

- - - - -
77331713 by Marc Haber at 2025-10-14T06:35:17+02:00
fix indent

Git-Dch: ignore

- - - - -


13 changed files:

- AdduserCommon.pm
- AdduserLogging.pm
- adduser
- doc/adduser.8
- testsuite/test1.pl → testsuite/test01.pl
- testsuite/test2.pl → testsuite/test02.pl
- testsuite/test3.pl → testsuite/test03.pl
- testsuite/test4.pl → testsuite/test04.pl
- testsuite/test5.pl → testsuite/test05.pl
- testsuite/test6.pl → testsuite/test06.pl
- testsuite/test7.pl → testsuite/test07.pl
- testsuite/test8.pl → testsuite/test08.pl
- testsuite/test9.pl → testsuite/test09.pl


Changes:

=====================================
AdduserCommon.pm
=====================================
@@ -336,8 +336,7 @@ sub read_pool {
     close $pool || die "$!";
 }
 
-sub get_group_members
-{
+sub get_group_members {
     my $group = shift;
 
     my @members;


=====================================
AdduserLogging.pm
=====================================
@@ -49,7 +49,7 @@ BEGIN {
 
 my $stderrmsglevel="error";
 my $stdoutmsglevel="error";
-my $logmsglevel="info";;
+my $logmsglevel="info";
 my $loggerparms="";
 my $has_sys_admin;
 my $logger_id_option;


=====================================
adduser
=====================================
@@ -132,6 +132,7 @@ our $new_lastgid = undef;
 our $new_lastuid = undef;
 our $new_uid = undef;
 our $no_create_home = undef;
+our $no_copy_skel = undef;
 our $special_home = undef;
 our $special_shell = undef;
 our $add_extra_groups;
@@ -188,6 +189,7 @@ GetOptions(
     'lastgid=i' => \$new_lastgid,
     'lastuid=i' => \$new_lastuid,
     'no-create-home' => \$no_create_home,
+    'no-copy-skel' => \$no_copy_skel,
     'quiet|q' => sub { $verbose = 0; },
     'shell=s' => \$special_shell,
     'system' => \$found_sys_opt,
@@ -581,7 +583,7 @@ if ($action eq "addsysuser") {
     }
 
     if (!$ingroup_name && !defined($gid_option) && !$make_group_also) {
-      $gid_option = $nogroup_id;
+        $gid_option = $nogroup_id;
     }
     check_user_group(1);
 
@@ -926,7 +928,7 @@ if ($action eq "adduser") {
         $returnvalue = RET_INVALID_NAME_FROM_USERADD;
     }
 
-    create_homedir (1, 0); # copy skeleton data
+    create_homedir ($no_copy_skel ? 0 : 1, 0); # copy skeleton data
 
     # useradd without -p has left the account disabled (password string is '!')
     my $yesexpr = langinfo(YESEXPR());


=====================================
doc/adduser.8
=====================================
@@ -9,7 +9,7 @@
 .\"            2016 Afif Elghraoui <afif at debian.org>
 .\"            2016 Helge Kreutzmann <debian at helgefjell.de>
 .\"            2021-2022 Jason Franklin <jason at oneway.dev>
-.\"            2022 Matt Barry <matt at hazelmollusk.org>
+.\"            2022 Matt Barry <matt at hazelmollusc.org>
 .\"
 .\" This is free software; see the GNU General Public License version
 .\" 2 or later for copying conditions.  There is NO warranty.
@@ -34,6 +34,7 @@ adduser, addgroup \- add or manipulate users or groups
 .OP \-\-lastgid id
 .OP \-\-lastuid id
 .OP \-\-no\-create\-home
+.OP \-\-no\-copy\-skel
 .OP \-\-shell shell
 .OP \-\-quiet
 .OP \-\-uid id
@@ -53,6 +54,7 @@ adduser, addgroup \- add or manipulate users or groups
 .OP \-\-home dir
 .OP \-\-ingroup group
 .OP \-\-no\-create\-home
+.OP \-\-no\-copy\-skel
 .OP \-\-shell shell
 .OP \-\-uid id
 .OP \-\-quiet
@@ -437,6 +439,12 @@ that some other mechanism will be responsible
 for initializing the new user's home directory.
 Valid modes: \fBadduser\fP, \fBadduser \-\-system\fP.
 .TP
+.B \-\-no\-copy\-skel
+Do not populate the home directory for the new user with
+files from \fI\%/etc/skel\fP.  If the home directory is
+newly created, it will be empty.
+Valid modes: \fBadduser\fP, \fBadduser \-\-system\fP.
+.TP
 .B \-\-quiet
 Synonymous to
 .B \-\-stdoutmsglevel=warn.


=====================================
testsuite/test1.pl → testsuite/test01.pl
=====================================


=====================================
testsuite/test2.pl → testsuite/test02.pl
=====================================


=====================================
testsuite/test3.pl → testsuite/test03.pl
=====================================


=====================================
testsuite/test4.pl → testsuite/test04.pl
=====================================


=====================================
testsuite/test5.pl → testsuite/test05.pl
=====================================


=====================================
testsuite/test6.pl → testsuite/test06.pl
=====================================


=====================================
testsuite/test7.pl → testsuite/test07.pl
=====================================


=====================================
testsuite/test8.pl → testsuite/test08.pl
=====================================


=====================================
testsuite/test9.pl → testsuite/test09.pl
=====================================
@@ -2,11 +2,11 @@
 
 # expect:
 #  - a new non-system group $groupname
-#  - readding the group fails
-#  - readding the group as a system group fails
+#  - reading the group fails
+#  - reading the group as a system group fails
 #  - a new system group $groupname
-#  - readding the group succeeds
-#  - readding the group as a non-system group fails
+#  - reading the group succeeds
+#  - reading the group as a non-system group fails
 
 use strict;
 



View it on GitLab: https://salsa.debian.org/debian/adduser/-/compare/c1102741a44ebbfaa0552f7377c7e7e2b78995d4...77331713cece439372e2f081153bb87f356a6c4e

-- 
View it on GitLab: https://salsa.debian.org/debian/adduser/-/compare/c1102741a44ebbfaa0552f7377c7e7e2b78995d4...77331713cece439372e2f081153bb87f356a6c4e
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-shadow-devel/attachments/20251014/47cc3324/attachment-0001.htm>


More information about the Pkg-shadow-devel mailing list