cron.germinate changes for revive-tasksel

Colin Watson cjwatson at
Wed Jul 26 15:03:15 BST 2006 requires
changes to the seeds and corresponding changes to the archive's extra
overrides to support task selection in the installer. It is desirable
that we should not have to change cron.germinate every time we add a
task. The attached patch (which is similar to changes I've already made
to CD image generation) changes cron.germinate so that it generates Task
headers for all the dependencies of the ship and server-ship seeds for
each distro.

revive-tasksel also specifies that the new server tasks should be
archive-wide rather than distro-specific (i.e. just "dns-server" rather
than "ubuntu-dns-server", since the Kubuntu dns-server task will be just
the same). The attached patch implements this by checking for the
Task-Per-Derivative field in each task seed.

I've also attached a diff of the more-extra.override.edgy.main file
before and after this change, where you can see that no changes to the
existing {ubuntu,kubuntu,edubuntu,xubuntu}-{standard,desktop} tasks have
been made; only the new dns-server and lamp-server tasks have been added
as a result of this change.


Colin Watson                                       [cjwatson at]
-------------- next part --------------
--- /srv/	2006-07-25 16:04:37.000000000 +0100
+++ cron.germinate	2006-07-26 14:50:59.000000000 +0100
@@ -7,6 +7,7 @@
 set -u
 ## Check to see if another germinate run is in progress
@@ -24,7 +25,7 @@
 # Clean up temporary files
-rm -f germinate.output ALL ALL.sources *DESKTOP *STANDARD
+rm -f germinate.output ALL ALL.sources UBUNTU-* KUBUNTU-* EDUBUNTU-* XUBUNTU-*
 rm -f all_* all.sources_*
 # Grab a local copy of Sources files
@@ -33,6 +34,7 @@
 for distro in ubuntu kubuntu edubuntu xubuntu; do
+  DISTRO="$(echo $distro | tr a-z A-Z)"
   case "$distro" in 
@@ -45,6 +47,8 @@
 	  exit 1
+  # We use the STRUCTURE file to figure out which tasks to generate.
+  wget -q -O "$DISTRO-STRUCTURE" "$SEEDS/$germinate_suite/STRUCTURE"
   for arch in i386 amd64 powerpc hppa sparc ia64; do
     # Grab local copy of Packages and InstallerPackages files
     for component in main universe restricted; do
@@ -67,28 +71,13 @@
     # Keep amalagmated copies of 'all', 'all.sources' and 'desktop' and 'standard'
     # [These are used for generation of 'Task: lines']
     cat all >> ALL; cat all.sources >> ALL.sources
-    case "$distro" in
-	ubuntu)
-	    cat desktop >> UBUNTU-DESKTOP
-	    cat standard >> UBUNTU-STANDARD
-	    ;;
-	kubuntu)
-	    cat desktop >> KUBUNTU-DESKTOP
-	    cat standard >> KUBUNTU-STANDARD
-	    ;;
-	edubuntu)
-	    cat desktop >> EDUBUNTU-DESKTOP
-	    cat standard >> EDUBUNTU-STANDARD
-	    ;;
-	xubuntu)
-	    cat desktop >> XUBUNTU-DESKTOP
-	    cat standard >> XUBUNTU-STANDARD
-	    ;;
-	*)
-	    echo "Unknown distro: $distro"
-	    exit 1
-	    ;;
-    esac
+    # We need to generate Task fields for everything in the ship/server-ship
+    # seeds (which includes standard, desktop, and server tasks) except for
+    # boot and minimal.
+    for seed in $(egrep '^(ship|server-ship):' "$DISTRO-STRUCTURE" | cut -d' ' -f2- | xargs -n1 | sort -u); do
+      wget -q -O "$DISTRO-$seed.seedtext" "$SEEDS/$germinate_suite/$seed"
+      cat "$seed" >> "$DISTRO-$seed"
+    done
     echo " ********************************************************************** " >> germinate.output
     echo "" >> germinate.output
     echo -n "."
@@ -100,8 +89,23 @@
 > "$MISCROOT/more-extra.override.$"
 for distro in ubuntu kubuntu edubuntu xubuntu; do
   DISTRO=$(echo $distro | tr a-z A-Z)
-  egrep -v -- "^(-|Package| )" $DISTRO-DESKTOP | awk '{print $1}' | sed -e "s/$/  Task  $distro-desktop/" | sort -u >> "$MISCROOT/more-extra.override.$"
-  egrep -v -- "^(-|Package| )" $DISTRO-STANDARD | awk '{print $1}' | sed -e "s/$/  Task  $distro-standard/" | sort -u >> "$MISCROOT/more-extra.override.$"
+  for seed in $(egrep '^(ship|server-ship):' "$DISTRO-STRUCTURE" | cut -d' ' -f2- | xargs -n1 | sort -u); do
+    if ! grep -iq '^Task-' "$DISTRO-$seed.seedtext"; then
+      continue
+    fi
+    if grep -iq '^Task-Per-Derivative:' "$DISTRO-$seed.seedtext"; then
+      task="$distro-$seed"
+    else
+      # If a seed is not per-derivative, then we only honour it for Ubuntu,
+      # and its task name is archive-global.
+      if [ "$distro" = ubuntu ]; then
+        task="$seed"
+      else
+        continue
+      fi
+    fi
+    egrep -v -- "^(-|Package| )" "$DISTRO-$seed" | awk '{print $1}' | sed -e "s/$/  Task  $task/" | sort -u >> "$MISCROOT/more-extra.override.$"
+  done
 mv -f "$MISCROOT/more-extra.override.$" "$MISCROOT/more-extra.override.$suite.main"
-------------- next part --------------
--- /dev/fd/63	2006-07-26 15:01:09.784066862 +0100
+++ /dev/fd/62	2006-07-26 15:01:09.784066862 +0100
@@ -30,6 +30,11 @@
 anacron  Task  ubuntu-desktop
 anacron  Task  xubuntu-desktop
 anthy  Task  xubuntu-desktop
+apache2  Task  lamp-server
+apache2-common  Task  lamp-server
+apache2-mpm-prefork  Task  lamp-server
+apache2-mpm-worker  Task  lamp-server
+apache2-utils  Task  lamp-server
 apmd  Task  edubuntu-desktop
 apmd  Task  kubuntu-desktop
 apmd  Task  ubuntu-desktop
@@ -69,6 +74,8 @@
 bicyclerepair  Task  edubuntu-desktop
 bicyclerepair  Task  kubuntu-desktop
 bicyclerepair  Task  ubuntu-desktop
+bind9  Task  dns-server
+bind9-doc  Task  dns-server
 bind9-host  Task  edubuntu-standard
 bind9-host  Task  kubuntu-standard
 bind9-host  Task  ubuntu-standard
@@ -844,10 +851,12 @@
 libao2  Task  kubuntu-desktop
 libao2  Task  ubuntu-desktop
 libao2  Task  xubuntu-desktop
+libapache2-mod-php5  Task  lamp-server
 libapm1  Task  edubuntu-desktop
 libapm1  Task  kubuntu-desktop
 libapm1  Task  ubuntu-desktop
 libapm1  Task  xubuntu-desktop
+libapr0  Task  lamp-server
 libart-2.0-2  Task  edubuntu-desktop
 libart-2.0-2  Task  kubuntu-desktop
 libart-2.0-2  Task  ubuntu-desktop
@@ -961,6 +970,8 @@
 libcurl3-gnutls  Task  edubuntu-desktop
 libcurl3-gnutls  Task  kubuntu-desktop
 libdaemon0  Task  kubuntu-desktop
+libdbd-mysql-perl  Task  lamp-server
+libdbi-perl  Task  lamp-server
 libdbus-1-2  Task  edubuntu-desktop
 libdbus-1-2  Task  kubuntu-desktop
 libdbus-1-2  Task  ubuntu-desktop
@@ -1043,6 +1054,7 @@
 libexo-0.3-0  Task  xubuntu-desktop
 libexpat1  Task  edubuntu-desktop
 libexpat1  Task  kubuntu-desktop
+libexpat1  Task  lamp-server
 libexpat1  Task  ubuntu-desktop
 libexpat1  Task  xubuntu-desktop
 libflac++5c2  Task  kubuntu-desktop
@@ -1083,6 +1095,7 @@
 libgc1c2  Task  kubuntu-standard
 libgc1c2  Task  ubuntu-standard
 libgc1c2  Task  xubuntu-standard
+libgcc1  Task  lamp-server
 libgcj-common  Task  edubuntu-desktop
 libgcj-common  Task  kubuntu-desktop
 libgcj-common  Task  ubuntu-desktop
@@ -1459,6 +1472,7 @@
 libmusicbrainz4c2a  Task  ubuntu-desktop
 libmysqlclient15off  Task  edubuntu-desktop
 libmysqlclient15off  Task  kubuntu-desktop
+libmysqlclient15off  Task  lamp-server
 libmysqlclient15off  Task  ubuntu-desktop
 libnautilus-burn3  Task  edubuntu-desktop
 libnautilus-burn3  Task  ubuntu-desktop
@@ -1470,6 +1484,7 @@
 libneon25  Task  edubuntu-desktop
 libneon25  Task  kubuntu-desktop
 libneon25  Task  ubuntu-desktop
+libnet-daemon-perl  Task  lamp-server
 libnet-dbus-perl  Task  edubuntu-desktop
 libnet-dbus-perl  Task  ubuntu-desktop
 libnet-dbus-perl  Task  xubuntu-desktop
@@ -1536,6 +1551,7 @@
 libpcap0.8  Task  xubuntu-standard
 libpcre3  Task  edubuntu-desktop
 libpcre3  Task  kubuntu-desktop
+libpcre3  Task  lamp-server
 libpcre3  Task  xubuntu-desktop
 libperl5.8  Task  edubuntu-desktop
 libperl5.8  Task  kubuntu-desktop
@@ -1546,6 +1562,7 @@
 libpisock8  Task  ubuntu-desktop
 libpisync0  Task  edubuntu-desktop
 libpisync0  Task  ubuntu-desktop
+libplrpc-perl  Task  lamp-server
 libpng12-0  Task  edubuntu-desktop
 libpng12-0  Task  kubuntu-desktop
 libpng12-0  Task  ubuntu-desktop
@@ -1833,6 +1850,7 @@
 libxml-perl  Task  xubuntu-desktop
 libxml2  Task  edubuntu-desktop
 libxml2  Task  kubuntu-desktop
+libxml2  Task  lamp-server
 libxml2  Task  ubuntu-desktop
 libxml2  Task  xubuntu-desktop
 libxml2-utils  Task  edubuntu-desktop
@@ -1994,9 +2012,13 @@
 mtr-tiny  Task  ubuntu-standard
 mtr-tiny  Task  xubuntu-standard
 myspell-en-us  Task  xubuntu-desktop
+mysql-client-5.0  Task  lamp-server
 mysql-common  Task  edubuntu-desktop
 mysql-common  Task  kubuntu-desktop
+mysql-common  Task  lamp-server
 mysql-common  Task  ubuntu-desktop
+mysql-server  Task  lamp-server
+mysql-server-5.0  Task  lamp-server
 nano  Task  edubuntu-standard
 nano  Task  kubuntu-standard
 nano  Task  ubuntu-standard
@@ -2061,6 +2083,7 @@
 openssh-client  Task  xubuntu-standard
 openssl  Task  edubuntu-desktop
 openssl  Task  kubuntu-desktop
+openssl  Task  lamp-server
 openssl  Task  ubuntu-desktop
 openssl  Task  xubuntu-desktop
 orage  Task  xubuntu-desktop
@@ -2081,14 +2104,19 @@
 pcmcia-cs  Task  ubuntu-desktop
 perl  Task  edubuntu-desktop
 perl  Task  kubuntu-desktop
+perl  Task  lamp-server
 perl  Task  ubuntu-desktop
 perl  Task  xubuntu-desktop
 perl-modules  Task  edubuntu-desktop
 perl-modules  Task  kubuntu-desktop
+perl-modules  Task  lamp-server
 perl-modules  Task  ubuntu-desktop
 perl-modules  Task  xubuntu-desktop
 perl-suid  Task  kubuntu-desktop
 pessulus  Task  edubuntu-desktop
+php5-common  Task  lamp-server
+php5-mysql  Task  lamp-server
+php5-mysqli  Task  lamp-server
 pkg-config  Task  edubuntu-desktop
 pkg-config  Task  ubuntu-desktop
 pmount  Task  edubuntu-desktop
@@ -2486,6 +2514,7 @@
 ssh-askpass-gnome  Task  ubuntu-desktop
 ssl-cert  Task  edubuntu-desktop
 ssl-cert  Task  kubuntu-desktop
+ssl-cert  Task  lamp-server
 ssl-cert  Task  ubuntu-desktop
 ssl-cert  Task  xubuntu-desktop
 strace  Task  edubuntu-standard

More information about the ubuntu-archive mailing list