[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#543268: patch



I have a patch for this (attached) but as I was writing it I became
unconvinced that this isn't just bloat. After all, the user can be added
to groups via preseed/late_command. And most cases that involve the user
to groups seem likely to already use preseed/late_command, either to
install additional packages, or otherwise configure something that adds
groups.

Still, passwd/user-extra-groups is not bloat since it makes sense to be
able to control what the installer does (rather than having to go in and
undo it if you don't want the user in groups). And
passwd/user-extra-groups does have a symmetric appeal to it, and the
bloat is quite small.

-- 
see shy jo
Index: scripts/togit/d-i.conf
===================================================================
--- scripts/togit/d-i.conf	(revision 60140)
+++ scripts/togit/d-i.conf	(working copy)
@@ -1614,6 +1614,7 @@
 # cannot handle that, so I have to skip this initial revision. All
 # that gets lost is the first commit message and a s/_/-/, so a branch
 # does not seem to be called for.
+# TODO figure out a better way
 match /trunk/retriever/choose_mirror/
 end match
 
Index: manual/en/appendix/preseed.xml
===================================================================
--- manual/en/appendix/preseed.xml	(revision 60066)
+++ manual/en/appendix/preseed.xml	(working copy)
@@ -1198,6 +1198,9 @@
 # The user account will be added to some standard initial groups. To
 # override that, use this.
 #d-i passwd/user-default-groups string audio cdrom video
+# To add the user to additional groups, while keeping them in the
+# default groups, use this.
+#d-i passwd/user-extra-groups string fuse
 </screen></informalexample>
 
 <para>
Index: packages/user-setup/user-setup-apply
===================================================================
--- packages/user-setup/user-setup-apply	(revision 60407)
+++ packages/user-setup/user-setup-apply	(working copy)
@@ -141,9 +141,11 @@
 	fi
 
 	if [ -n "$USER" ]; then
-		db_get passwd/user-default-groups
-		for group in $RET; do
-			$log $chroot $ROOT adduser "$USER" $group >/dev/null 2>&1 || true
+		for type in default extra; do
+			db_get passwd/user-$type-groups
+			for group in $RET; do
+				$log $chroot $ROOT adduser "$USER" $group >/dev/null 2>&1 || true
+			done
 		done
 	fi
 
Index: packages/user-setup/debian/user-setup-udeb.templates
===================================================================
--- packages/user-setup/debian/user-setup-udeb.templates	(revision 60407)
+++ packages/user-setup/debian/user-setup-udeb.templates	(working copy)
@@ -22,6 +22,12 @@
 Default: audio cdrom dialout floppy video plugdev netdev powerdev scanner bluetooth
 Description: for internal use only
 
+# Allow adding user to extra groups in addition to the default
+Template: passwd/user-extra-groups
+Type: string
+Default: 
+Description: for internal use only
+
 Template: passwd/root-login
 Type: boolean
 Default: true
Index: packages/user-setup/debian/changelog
===================================================================
--- packages/user-setup/debian/changelog	(revision 60407)
+++ packages/user-setup/debian/changelog	(working copy)
@@ -1,7 +1,11 @@
 user-setup (1.29) UNRELEASED; urgency=low
 
+  [ Colin Watson ]
   * Upgrade to debhelper v7.
 
+  [ Joey Hess ]
+  * Add preseedable passwd/user-extra-groups. Closes: #543268
+
  -- Colin Watson <cjwatson@debian.org>  Fri, 14 Aug 2009 23:31:03 +0100
 
 user-setup (1.28) unstable; urgency=low

Attachment: signature.asc
Description: Digital signature


Reply to: