Apply several patches by Tong Sun, update changelog
authorMichael Prokop <mika@grml.org>
Sun, 5 Oct 2008 22:20:15 +0000 (00:20 +0200)
committerMichael Prokop <mika@grml.org>
Sun, 5 Oct 2008 22:20:15 +0000 (00:20 +0200)
chroot-script
config
debian/changelog
grml-debootstrap

index 5b68a0b..f221d50 100755 (executable)
@@ -131,6 +131,11 @@ EOF
 
 # install additional packages {{{
 packages() {
+  # Pre-seed the debconf database with answers. Each question will be marked
+  # as seen to prevent debconf from asking the question interactively.
+  [ -f /etc/debootstrap/debconf-selections ] && \
+    cat /etc/debootstrap/debconf-selections | debconf-set-selections
+
   if [ "$PACKAGES" = 'yes' ] ; then
      if ! [ -r /etc/debootstrap/packages ] ; then
        echo "Error: /etc/debootstrap/packages not found, exiting."
diff --git a/config b/config
index f611575..2ebb36e 100644 (file)
--- a/config
+++ b/config
@@ -111,6 +111,9 @@ DEBIAN_FRONTEND='noninteractive'
 # install packages defined in /etc/debootstrap/packages?
 PACKAGES='yes'
 
+# pre-seed packages using /etc/debootstrap/debconf-selections (if exist)?
+DEBCONF='yes'
+
 # install extra packages (.deb) from /etc/debootstrap/extrapackages/?
 EXTRAPACKAGES='yes'
 
index 4a0ac4a..e79a728 100644 (file)
@@ -1,15 +1,23 @@
 grml-debootstrap (0.23) unstable; urgency=low
 
+  The "hey, rocking - we get patches via git" release.
+
   * Improve look'n'feel of partition error dialog.
-  * Allow symlinks when coping existing files to chroot.
-    Patch by Tong Sun - thanks!
   * Improve documentation regarding installation of bootloader when
-    using directories as installation target. [Closes: issue539]
-    Patch by Tong Sun - thanks!
+    using directories as installation target. Thanks Tong Sun!
+    [Closes: issue539]
   * Copy /etc/debootstrap/[s]bin as well to the chroot if they are
     present. Suggestion by Tong Sun - thanks! [Closes: issue540]
-
- -- Michael Prokop <mika@grml.org>  Sun, 05 Oct 2008 23:18:56 +0200
+  * Apply several patches by Tong Sun (thanks!):
+    - allow symlinks when coping existing files to chroot.
+    - pre-seed packages using /etc/debootstrap/debconf-selections
+      [Closes: issue518]
+    - support DEBOOTSTRAP_OPT for passing extra parameters to the
+      debootstrap command
+    - support KEEP_SRC_LIST to allow user to provide their
+      own apt sources.list from /etc/debootstrap/etc/apt/sources.list
+
+ -- Michael Prokop <mika@grml.org>  Mon, 06 Oct 2008 00:15:52 +0200
 
 grml-debootstrap (0.22) unstable; urgency=low
 
index 2976280..99faf51 100755 (executable)
@@ -694,9 +694,9 @@ debootstrap_system() {
      mount_target
   fi
   if grep -q $MNTPOINT /proc/mounts || [ -n "$DIRECTORY" ] ; then
-     einfo "Running $DEBOOTSTRAP for release ${RELEASE}${ARCHINFO} using ${MIRROR}${ISO}"
-     [ -n "$MIRROR" ] && $DEBOOTSTRAP $ARCHCMD $RELEASE $MNTPOINT $MIRROR || \
-     $DEBOOTSTRAP $ARCHCMD $RELEASE $MNTPOINT $ISO
+     einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${MIRROR}${ISO}"
+     [ -n "$MIRROR" ] && $DEBOOTSTRAP $ARCHCMD $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR || \
+     $DEBOOTSTRAP $ARCHCMD $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $ISO
      eend $?
   else
      eerror "Error: $MNTPOINT not mounted, can not continue."
@@ -739,6 +739,8 @@ preparechroot() {
   sed -i "s#GROOT=.*#GROOT=\"$GROOT\"#"       $MNTPOINT/etc/debootstrap/config
 
   cp /etc/debootstrap/packages  $MNTPOINT/etc/debootstrap/packages
+  [ -f /etc/debootstrap/debconf-selections -a "$DEBCONF" = 'yes' ] && \
+    cp /etc/debootstrap/debconf-selections $MNTPOINT/etc/debootstrap/
 
   # notice: do NOT use $CHROOT_VARIABLES inside chroot but statically file instead!
   cp $CHROOT_VARIABLES          $MNTPOINT/etc/debootstrap/variables