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

Bug#301273: tasksel: Please trim down the default installation when tasks are selected

Package: tasksel 
Priority: wishlist
Version: 2.24
Tags: patch

[ I was considering setting this as an 'important' bug as I consider this a
failure in the installation system and it has been reported too many times
but not acted upon. I have refrained myself but I feel this should be done 
for sarge ]

Note: This issue has also been brought up a number of times before, please 
see #270676, #246357, #272406 and #272586. I've opened up #301138 too which 
would fix this "properly" but I don't expect that to happend before the 
release. The proposed patch below could, however, be safely included in 

The deal here is that tasksel calls aptitude on new installations asking it 
to install all the 'Standard' packages but our 'standard' system is not 
properly standard and will pull in packages that are really development 
only and used by a minority of our users (see #301138). This has happened 
before and needs to be cut by ftp overrides, but until a consensus is 
reached the d-i team could prevent this from happening by having tasksel 
explicitly tell aptitude to _not_ install those packages. After all, a 
development task should be introduced in tasksel (and has been asked for 
already in #266702)

The attached patch fixes this issue with a temporary hack that works OK for 
sarge. I have tested the patch with simulated runs of all tasks currently 
provided and aptitude installs them just fine. The behaviour is as follows:

- IF tasksel is called on new installations and the user has selected a 
task, then tasksel will ask aptitude to _not_ install any of the 
development packages (compilers, headers, and such) of the Standard 

- IF no tasks are selected in new installations, then users get the full
Standard: installation, including development packages.

On all other cases, the behaviour of tasksel remains the same. 

Why would I like to see this on sarge and not postponed to etch:

- There have been a number of installation reports complaining about this
- Installing by default a compiler in an operating system is against all 
security-wise recommendations, has been exploited by worms in the past and 
will be in the future.

Hopefully the patch is self-explanatory, feel free to ask for additional 
information. I've tested it in a chroot jail will all of the current tasks 
and aptitude works OK for me in an updated sarge environment. I don't 
expect this to fail in a chrooted sarge and I will test it if time permits.



diff -Nru tasksel-2.24/debian/changelog tasksel-2.25/debian/changelog
--- tasksel-2.24/debian/changelog	2005-03-11 02:03:23.000000000 +0100
+++ tasksel-2.25/debian/changelog	2005-03-24 20:51:44.000000000 +0100
@@ -1,3 +1,12 @@
+tasksel (2.25) unstable; urgency=low
+  * Blacklist development packages to prevent bloated installations
+    when setting up tasks. IF the user does not select any task
+    (and does not select manual installation) then blacklists don't
+    take effect.
+ -- Javier Fernandez-Sanguino Pen~a <jfs@computer.org>  Thu, 24 Mar 2005 20:51:03 +0100
 tasksel (2.24) unstable; urgency=low
   * Joey Hess
diff -Nru tasksel-2.24/tasksel.pl tasksel-2.25/tasksel.pl
--- tasksel-2.24/tasksel.pl	2005-02-23 19:58:33.000000000 +0100
+++ tasksel-2.25/tasksel.pl	2005-03-24 21:43:19.000000000 +0100
@@ -13,6 +13,20 @@
 my $packagesdir="/usr/lib/tasksel/packages";
 my $descdir="/usr/share/tasksel";
 my $statusfile="/var/lib/dpkg/status";
+# Blacklisted packages from the Standard installation
+# These are development only packages and should be pulled through
+# the -dev tasks. Be careful with this list, if it grows too big
+# it might reach the maximum command line length. This list might
+# be trimmed down if #301138 is fixed 
+my @blacklisted=("gdb", "gcc-3.3", "dpkg-dev", "libc6-dev",  
+"manpages-dev", "flex", "g++", "linux-kernel-headers", "bin86", 
+"gcc", "g++-3.3", "bison", "libstdc++5-3.3-dev");
+# Note: The following packages cannot be blacklisted:
+# - make, libnss-db Depends: on it and that would break the DNS task
+# - cpp and cpp-3.3, Some X packages (like xutils, xdm, wmaker, etc.)
+#   Depends: on it and blacklisting it would break the Desktop and the
+#   Print-Server task
 sub warning {
 	print STDERR "tasksel: @_\n";
@@ -465,6 +479,14 @@
 	my @to_install=map { task_packages($_, 1) } grep { $_->{_install} } @tasks;
 	push @aptitude_install, @to_install;
+	# However, if the user is installing a task and this
+	# is a new installation, then blacklist a set of packages
+	if ( $options{"new-install"} && @to_install && ! $manual_selection) {
+		foreach my $blpackage (@blacklisted) {
+			push @aptitude_install, "${blpackage}_";
+		}
+	}
 	# Clear screen before running aptitude.
 	if ($interactive && (@aptitude_remove || @aptitude_install) && ! $options{test}) {

Attachment: signature.asc
Description: Digital signature

Reply to: