diff -Nru cdebootstrap-0.5.7ubuntu2/aclocal.m4 cdebootstrap-0.5.8ubuntu1/aclocal.m4
--- cdebootstrap-0.5.7ubuntu2/aclocal.m4	2010-10-12 13:18:42.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/aclocal.m4	2011-07-26 22:38:10.000000000 +0200
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
-[m4_warning([this file was generated for autoconf 2.67.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff -Nru cdebootstrap-0.5.7ubuntu2/config/suites cdebootstrap-0.5.8ubuntu1/config/suites
--- cdebootstrap-0.5.7ubuntu2/config/suites	2011-07-06 11:31:41.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/config/suites	2011-11-17 16:16:53.000000000 +0100
@@ -54,6 +54,10 @@
 Config: generic-ubuntu
 Keyring: ubuntu-archive-keyring.gpg
 
+Suite: precise
+Config: generic-ubuntu
+Keyring: ubuntu-archive-keyring.gpg
+
 Suite: oldstable
 Keyring: debian-archive-keyring.gpg
 
diff -Nru cdebootstrap-0.5.7ubuntu2/configure cdebootstrap-0.5.8ubuntu1/configure
--- cdebootstrap-0.5.7ubuntu2/configure	2010-10-12 13:18:42.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/configure	2011-07-26 22:38:11.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for cdebootstrap 0.5.7.
+# Generated by GNU Autoconf 2.68 for cdebootstrap 0.5.8.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -89,6 +89,7 @@
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -213,11 +214,18 @@
   # We cannot yet assume a decent shell, so we have to provide a
 	# neutralization value for shells without unset; and this also
 	# works around shells that cannot unset nonexistent variables.
+	# Preserve -v and -x to the replacement shell.
 	BASH_ENV=/dev/null
 	ENV=/dev/null
 	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+	case $- in # ((((
+	  *v*x* | *x*v* ) as_opts=-vx ;;
+	  *v* ) as_opts=-v ;;
+	  *x* ) as_opts=-x ;;
+	  * ) as_opts= ;;
+	esac
+	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 fi
 
     if test x$as_have_required = xno; then :
@@ -548,8 +556,8 @@
 # Identity of this package.
 PACKAGE_NAME='cdebootstrap'
 PACKAGE_TARNAME='cdebootstrap'
-PACKAGE_VERSION='0.5.7'
-PACKAGE_STRING='cdebootstrap 0.5.7'
+PACKAGE_VERSION='0.5.8'
+PACKAGE_STRING='cdebootstrap 0.5.8'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1078,7 +1086,7 @@
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1216,7 +1224,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures cdebootstrap 0.5.7 to adapt to many kinds of systems.
+\`configure' configures cdebootstrap 0.5.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1287,7 +1295,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of cdebootstrap 0.5.7:";;
+     short | recursive ) echo "Configuration of cdebootstrap 0.5.8:";;
    esac
   cat <<\_ACEOF
 
@@ -1383,8 +1391,8 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-cdebootstrap configure 0.5.7
-generated by GNU Autoconf 2.67
+cdebootstrap configure 0.5.8
+generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
@@ -1430,7 +1438,7 @@
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1438,8 +1446,8 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by cdebootstrap $as_me 0.5.7, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+It was created by cdebootstrap $as_me 0.5.8, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -1697,7 +1705,7 @@
       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -1834,7 +1842,7 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
 $as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -1921,11 +1929,11 @@
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -2011,7 +2019,7 @@
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2051,7 +2059,7 @@
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2104,7 +2112,7 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2155,7 +2163,7 @@
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2195,7 +2203,7 @@
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2253,7 +2261,7 @@
 
 # Define the identity of the package.
  PACKAGE='cdebootstrap'
- VERSION='0.5.7'
+ VERSION='0.5.8'
 
 
 # Some tools Automake needs.
@@ -2316,7 +2324,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
@@ -2332,7 +2340,7 @@
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -2350,7 +2358,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
@@ -2365,7 +2373,7 @@
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -2383,7 +2391,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
 $as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then :
+if ${ac_cv_target+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$target_alias" = x; then
@@ -2398,7 +2406,7 @@
 $as_echo "$ac_cv_target" >&6; }
 case $ac_cv_target in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
 esac
 target=$ac_cv_target
 ac_save_IFS=$IFS; IFS='-'
@@ -2431,7 +2439,7 @@
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2471,7 +2479,7 @@
 set dummy gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2524,7 +2532,7 @@
 set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2564,7 +2572,7 @@
 set dummy cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2623,7 +2631,7 @@
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2667,7 +2675,7 @@
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2722,7 +2730,7 @@
 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -2837,7 +2845,7 @@
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -2880,7 +2888,7 @@
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest conftest$ac_cv_exeext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -2939,7 +2947,7 @@
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -2950,7 +2958,7 @@
 ac_clean_files=$ac_clean_files_save
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2991,7 +2999,7 @@
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -3001,7 +3009,7 @@
 ac_objext=$OBJEXT
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3038,7 +3046,7 @@
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -3116,7 +3124,7 @@
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -3277,7 +3285,7 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3405,7 +3413,7 @@
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -3445,7 +3453,7 @@
 set dummy ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -3505,7 +3513,7 @@
 set dummy dpkg-architecture; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DPKG_ARCHITECTURE+set}" = set; then :
+if ${ac_cv_path_DPKG_ARCHITECTURE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $DPKG_ARCHITECTURE in
@@ -3704,10 +3712,21 @@
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -3763,7 +3782,7 @@
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -3864,6 +3883,7 @@
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4170,8 +4190,8 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by cdebootstrap $as_me 0.5.7, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+This file was extended by cdebootstrap $as_me 0.5.8, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -4236,8 +4256,8 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-cdebootstrap config.status 0.5.7
-configured by $0, generated by GNU Autoconf 2.67,
+cdebootstrap config.status 0.5.8
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -4379,7 +4399,7 @@
     "src/frontend/debian-installer/Makefile") CONFIG_FILES="$CONFIG_FILES src/frontend/debian-installer/Makefile" ;;
     "src/frontend/standalone/Makefile") CONFIG_FILES="$CONFIG_FILES src/frontend/standalone/Makefile" ;;
 
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -4402,9 +4422,10 @@
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -4412,12 +4433,13 @@
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -4439,7 +4461,7 @@
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -4467,7 +4489,7 @@
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -4515,7 +4537,7 @@
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = ""
 
@@ -4547,7 +4569,7 @@
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
@@ -4581,7 +4603,7 @@
 # No need to generate them if there are no CONFIG_HEADERS.
 # This happens for instance with `./config.status Makefile'.
 if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -4593,8 +4615,8 @@
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@ -4695,7 +4717,7 @@
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -4714,7 +4736,7 @@
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
 	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
 	 # because $ac_f cannot contain `:'.
@@ -4723,7 +4745,7 @@
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -4749,8 +4771,8 @@
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -4886,21 +4908,22 @@
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
@@ -4911,20 +4934,20 @@
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
+      mv "$ac_tmp/config.h" "$ac_file" \
 	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
diff -Nru cdebootstrap-0.5.7ubuntu2/debian/cdebootstrap-static.lintian-overrides cdebootstrap-0.5.8ubuntu1/debian/cdebootstrap-static.lintian-overrides
--- cdebootstrap-0.5.7ubuntu2/debian/cdebootstrap-static.lintian-overrides	1970-01-01 01:00:00.000000000 +0100
+++ cdebootstrap-0.5.8ubuntu1/debian/cdebootstrap-static.lintian-overrides	2011-07-26 00:13:28.000000000 +0200
@@ -0,0 +1,2 @@
+embedded-library usr/bin/cdebootstrap-static: bzip2
+embedded-library usr/bin/cdebootstrap-static: zlib
diff -Nru cdebootstrap-0.5.7ubuntu2/debian/changelog cdebootstrap-0.5.8ubuntu1/debian/changelog
--- cdebootstrap-0.5.7ubuntu2/debian/changelog	2011-07-06 11:31:41.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/debian/changelog	2011-11-17 16:38:04.000000000 +0100
@@ -1,3 +1,26 @@
+cdebootstrap (0.5.8ubuntu1) precise; urgency=low
+
+  * Merge from debian unstable (LP: #884185).  Remaining changes:
+    - Add support for Ubuntu Oneiric and Precise in config/suites
+    - Set NO_PKG_MANGLE while building nested package in helper/Makefile.{in,am}
+    - Add "-Wno-error=unused-result" at CFLAGS_* in debian/rules against FTBFS
+
+ -- Leo Iannacone <l3on@ubuntu.com>  Wed, 27 Jul 2011 05:30:14 +0000
+
+cdebootstrap (0.5.8) unstable; urgency=low
+
+  * Support SHA1 checksums for release files. (closes: #614314)
+  * Use zlib to decompress gzip files.
+  * Support bzip2 compressed packages. (closes: #458688)
+  * Fix removal of divertion in second stage code.
+  * Document default flavour. (closes: #528376)
+  * Fix -k option. (closes: #508090)
+  * Fix typo in error message. (closes: #502443)
+  * Support xz compressed packages.
+  * Update description.
+
+ -- Bastian Blank <waldi@debian.org>  Tue, 26 Jul 2011 22:29:09 +0200
+
 cdebootstrap (0.5.7ubuntu2) oneiric; urgency=low
 
   * Add support for Ubuntu Oneiric. (LP: #806089)
diff -Nru cdebootstrap-0.5.7ubuntu2/debian/control cdebootstrap-0.5.8ubuntu1/debian/control
--- cdebootstrap-0.5.7ubuntu2/debian/control	2010-10-12 13:18:42.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/debian/control	2011-11-17 16:46:09.000000000 +0100
@@ -3,22 +3,26 @@
 Priority: optional
 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
 XSBC-Original-Maintainer: Bastian Blank <waldi@debian.org>
-Build-Depends: debhelper (>> 7), libdebian-installer4-dev (>= 0.44), libdebconfclient0-dev (>= 0.40), autotools-dev
+Build-Depends: debhelper (>> 7), libdebian-installer4-dev (>= 0.44), libdebconfclient0-dev (>= 0.40), autotools-dev, libbz2-dev, liblzma-dev, zlib1g-dev
 Standards-Version: 3.9.0
 
 Package: cdebootstrap
 Architecture: any
-Depends: ${shlibs:Depends}, gpgv, wget, debian-archive-keyring
+Depends: ${shlibs:Depends}, ${misc:Depends}, gpgv, wget, debian-archive-keyring
 Description: Bootstrap a Debian system
- cdebootstrap is used to create a Debian base system from scratch.
+ cdebootstrap generates systems from scratch for Debian and derivates.
+ .
+ This is implementation is different from debootstrap.  It features a different
+ package selection.  The package selection is done according to the flavour.
 
 Package: cdebootstrap-static
 Architecture: any
-Depends: ${shlibs:Depends}, gpgv, wget, debian-archive-keyring
+Depends: ${shlibs:Depends}, ${misc:Depends}, gpgv, wget, debian-archive-keyring
 Description: Bootstrap a Debian system - static binary
- cdebootstrap is used to create a Debian base system from scratch.
+ cdebootstrap generates systems from scratch for Debian and derivates.
  .
- This package contains a static binary and a standalone tar.
+ This package contains a static binary and a standalone tar.  The standalone
+ tar can be used on non-Debian systems.
 
 Package: cdebootstrap-udeb
 XC-Package-Type: udeb
@@ -26,5 +30,5 @@
 Architecture: any
 Depends: ${shlibs:Depends}, gpgv-udeb
 Description: Bootstrap a Debian system - udeb
- cdebootstrap is used to create a Debian base system from scratch.
+ cdebootstrap generates systems from scratch for Debian and derivates.
 
diff -Nru cdebootstrap-0.5.7ubuntu2/debian/copyright cdebootstrap-0.5.8ubuntu1/debian/copyright
--- cdebootstrap-0.5.7ubuntu2/debian/copyright	2010-10-12 13:18:42.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/debian/copyright	2011-07-26 00:15:06.000000000 +0200
@@ -18,5 +18,5 @@
    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
 On Debian GNU/Linux systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
 
diff -Nru cdebootstrap-0.5.7ubuntu2/debian/rules cdebootstrap-0.5.8ubuntu1/debian/rules
--- cdebootstrap-0.5.7ubuntu2/debian/rules	2010-10-12 13:18:42.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/debian/rules	2011-11-17 16:40:44.000000000 +0100
@@ -9,9 +9,9 @@
 
 VERSION  := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\),\1,p')
 
-CFLAGS_DEB = -Wall -W -Werror -ggdb -U_FORTIFY_SOURCE
-CFLAGS_STATIC = -Wall -W -Werror -U_FORTIFY_SOURCE
-CFLAGS_UDEB = -Wall -W -Werror -U_FORTIFY_SOURCE
+CFLAGS_DEB = -Wall -W -Werror -ggdb -Wno-error=unused-result
+CFLAGS_STATIC = -Wall -W -Werror -Wno-error=unused-result
+CFLAGS_UDEB = -Wall -W -Werror -Wno-error=unused-result
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS_DEB += -O0
@@ -113,7 +113,7 @@
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs
 
 	$(MAKE) -C build-deb install DESTDIR=$(CURDIR)/debian/cdebootstrap
@@ -153,6 +153,7 @@
 #	dh_installcron
 #	dh_installinfo
 #	dh_installman
+	dh_lintian
 	dh_link
 	dh_strip
 	dh_compress
diff -Nru cdebootstrap-0.5.7ubuntu2/debian/source/format cdebootstrap-0.5.8ubuntu1/debian/source/format
--- cdebootstrap-0.5.7ubuntu2/debian/source/format	1970-01-01 01:00:00.000000000 +0100
+++ cdebootstrap-0.5.8ubuntu1/debian/source/format	2011-11-17 16:45:52.000000000 +0100
@@ -0,0 +1 @@
+3.0 (native)
diff -Nru cdebootstrap-0.5.7ubuntu2/src/check.c cdebootstrap-0.5.8ubuntu1/src/check.c
--- cdebootstrap-0.5.7ubuntu2/src/check.c	2011-07-06 11:31:41.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/src/check.c	2011-07-25 20:21:49.000000000 +0200
@@ -18,8 +18,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  * $LastChangedBy: bastian $
- * $LastChangedDate: 2008-02-27 15:32:02 +0100 (Mi, 27 Feb 2008) $
- * $LastChangedRevision: 1539 $
+ * $LastChangedDate: 2011-07-25 20:21:49 +0200 (Mo, 25 Jul 2011) $
+ * $LastChangedRevision: 1728 $
  */
 
 #include <config.h>
@@ -36,7 +36,7 @@
 #include "frontend.h"
 #include "suite.h"
 
-static int check_md5 (const char *target, const char *md5sum, const char *message)
+static int check_sum (const char *target, const char *exec, const char *sum, const char *message)
 {
   int ret;
   FILE *in;
@@ -44,8 +44,9 @@
 
   log_message (LOG_MESSAGE_INFO_DOWNLOAD_VALIDATE, message);
 
-  snprintf (buf, sizeof (buf), "/usr/bin/md5sum %s\n", target);
+  snprintf (buf, sizeof (buf), "%s %s", exec, target);
 
+  log_text (DI_LOG_LEVEL_DEBUG, "Execute \"%s\"", buf);
   in = popen (buf, "r");
   fgets (buf, sizeof (buf), in);
 
@@ -53,14 +54,14 @@
   if (ret)
     return 1;
 
-  if (!strncmp (buf, md5sum, 32))
+  if (!strncmp (buf, sum, 32))
     return 0;
   return 1;
 }
 
 int check_deb (const char *target, di_package *p, const char *message)
 {
-  return check_md5 (target, p->md5sum, message);
+  return check_sum (target, "md5sum", p->md5sum, message);
 }
 
 int check_packages (const char *target, const char *ext, di_release *rel)
@@ -77,6 +78,11 @@
   item = di_hash_table_lookup (rel->md5sum, &key);
   if (!item)
     log_text (DI_LOG_LEVEL_ERROR, "Can't find checksum for Packages file");
-  return check_md5 (target, item->sum[0], buf_name);
+
+  if (item->sum[1])
+    return check_sum (target, "sha1sum", item->sum[1], buf_name);
+  if (item->sum[0])
+    return check_sum (target, "md5sum", item->sum[0], buf_name);
+  return 1;
 }
 
diff -Nru cdebootstrap-0.5.7ubuntu2/src/frontend/standalone/cdebootstrap.man cdebootstrap-0.5.8ubuntu1/src/frontend/standalone/cdebootstrap.man
--- cdebootstrap-0.5.7ubuntu2/src/frontend/standalone/cdebootstrap.man	2010-10-12 13:18:42.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/src/frontend/standalone/cdebootstrap.man	2011-07-26 00:29:42.000000000 +0200
@@ -86,4 +86,4 @@
 All rc.d operations are disabled by a policy-rc.d script (cdebootstrap-helper-rc.d package).
 .TP
 \fBstandard\fR
-Installs required and important priority packages.
+Installs required and important priority packages.  This is the default flavour.
diff -Nru cdebootstrap-0.5.7ubuntu2/src/frontend/standalone/main.c cdebootstrap-0.5.8ubuntu1/src/frontend/standalone/main.c
--- cdebootstrap-0.5.7ubuntu2/src/frontend/standalone/main.c	2010-10-12 13:18:42.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/src/frontend/standalone/main.c	2011-07-26 00:32:18.000000000 +0200
@@ -18,8 +18,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  * $LastChangedBy: bastian $
- * $LastChangedDate: 2008-06-24 12:22:06 +0200 (Di, 24 Jun 2008) $
- * $LastChangedRevision: 1668 $
+ * $LastChangedDate: 2011-07-26 00:32:18 +0200 (Di, 26 Jul 2011) $
+ * $LastChangedRevision: 1740 $
  */
 
 #define _GNU_SOURCE
@@ -226,7 +226,7 @@
   else if (errno == ENOENT)
   {
     if (mkdir (target, 0777))
-      log_text (DI_LOG_LEVEL_ERROR, "Failed to creae target");
+      log_text (DI_LOG_LEVEL_ERROR, "Failed to create target");
   }
   else
     log_text (DI_LOG_LEVEL_ERROR, "Target check failed: %s", strerror (errno));
@@ -394,7 +394,7 @@
 
   fputs ("\
 rm /sbin/init\n\
-dpkg-divert --remove --local --divert /sbin/init.REAL /sbin/init\n\
+dpkg-divert --remove --local --rename --divert /sbin/init.REAL /sbin/init\n\
 rm /sbin/cdebootstrap-foreign\n\
 ", foreign_script);
 
@@ -545,7 +545,7 @@
 
   configdir = helperdir = keyringdirs[1] = generate_configdir ();
 
-  while ((c = getopt_long (argc, argv, "a:c:df:hH:i:s:qv", long_opts, NULL)) != -1)
+  while ((c = getopt_long (argc, argv, "a:c:df:hH:i:k:s:qv", long_opts, NULL)) != -1)
   {
     switch (c)
     {
diff -Nru cdebootstrap-0.5.7ubuntu2/src/Makefile.am cdebootstrap-0.5.8ubuntu1/src/Makefile.am
--- cdebootstrap-0.5.7ubuntu2/src/Makefile.am	2010-10-12 13:18:42.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/src/Makefile.am	2011-07-26 22:10:32.000000000 +0200
@@ -21,7 +21,7 @@
 
 cdebootstrap_LDADD = \
 	frontend/@FRONTEND@/libfrontend_@FRONTEND@.a @FRONTEND_LIBS@ \
-	-ldebian-installer-extra -ldebian-installer
+	-ldebian-installer-extra -ldebian-installer -lbz2 -llzma -lz
 
 cdebootstrap_DEPENDENCIES = \
 	frontend/@FRONTEND@/libfrontend_@FRONTEND@.a
diff -Nru cdebootstrap-0.5.7ubuntu2/src/Makefile.in cdebootstrap-0.5.8ubuntu1/src/Makefile.in
--- cdebootstrap-0.5.7ubuntu2/src/Makefile.in	2010-10-12 13:18:42.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/src/Makefile.in	2011-07-26 22:38:14.000000000 +0200
@@ -226,7 +226,7 @@
 
 cdebootstrap_LDADD = \
 	frontend/@FRONTEND@/libfrontend_@FRONTEND@.a @FRONTEND_LIBS@ \
-	-ldebian-installer-extra -ldebian-installer
+	-ldebian-installer-extra -ldebian-installer -lbz2 -llzma -lz
 
 cdebootstrap_DEPENDENCIES = \
 	frontend/@FRONTEND@/libfrontend_@FRONTEND@.a
diff -Nru cdebootstrap-0.5.7ubuntu2/src/package.c cdebootstrap-0.5.8ubuntu1/src/package.c
--- cdebootstrap-0.5.7ubuntu2/src/package.c	2010-10-12 13:18:42.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/src/package.c	2011-07-26 22:13:45.000000000 +0200
@@ -18,8 +18,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  * $LastChangedBy: bastian $
- * $LastChangedDate: 2009-08-31 13:07:50 +0200 (Mo, 31 Aug 2009) $
- * $LastChangedRevision: 1706 $
+ * $LastChangedDate: 2011-07-26 22:13:45 +0200 (Di, 26 Jul 2011) $
+ * $LastChangedRevision: 1742 $
  */
 
 #include <config.h>
@@ -31,6 +31,10 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <bzlib.h>
+#include <lzma.h>
+#include <zlib.h>
+
 #include "download.h"
 #include "execute.h"
 #include "log.h"
@@ -62,99 +66,251 @@
   return r;
 }
 
+static int package_extract_self_bz2 (FILE *source, size_t len, const char *command)
+{
+  int ret = 0;
+  bz_stream stream;
+  char in[1024*1024], out[1024*1024];
+  FILE *dest = NULL;
+
+  stream.bzalloc = NULL;
+  stream.bzfree = NULL;
+  stream.opaque = NULL;
+  ret = BZ2_bzDecompressInit (&stream, 0, 0);
+  if (ret != BZ_OK)
+    goto out;
+
+  log_text (DI_LOG_LEVEL_DEBUG, "Execute \"%s\" with bzip2 input", command);
+
+  dest = popen (command, "w");
+  if (!dest)
+  { ret = -1; goto out; }
+
+  do
+  {
+    size_t toread = len;
+    if (toread > sizeof in) { toread = sizeof in; }
+
+    stream.avail_in = fread(in, 1, toread, source);
+    stream.next_in = in;
+    len -= stream.avail_in;
+    if (ferror(source))
+    { ret = -1; goto out; }
+    if (stream.avail_in == 0)
+      goto out;
+
+    do
+    {
+      stream.avail_out = sizeof out;
+      stream.next_out = out;
+
+      ret = BZ2_bzDecompress (&stream);
+      if (ret != BZ_OK && ret != BZ_STREAM_END)
+        goto out;
+
+      size_t towrite = sizeof out - stream.avail_out;
+      if (fwrite (out, 1, towrite, dest) != towrite || ferror(dest))
+      { ret = -1; goto out; }
+    }
+    while (stream.avail_out == 0);
+  }
+  while (ret != BZ_STREAM_END);
+
+out:
+  BZ2_bzDecompressEnd (&stream);
+  if (fclose (dest))
+    ret = -1;
+  return ret != BZ_STREAM_END;
+}
+
+static int package_extract_self_gz (FILE *source, size_t len, const char *command)
+{
+  int ret = 0;
+  z_stream stream;
+  unsigned char in[1024*1024], out[1024*1024];
+  FILE *dest = NULL;
+
+  stream.zalloc = NULL;
+  stream.zfree = NULL;
+  stream.opaque = NULL;
+  stream.avail_in = 0;
+  stream.next_in = NULL;
+  ret = inflateInit2 (&stream, MAX_WBITS + 32);
+  if (ret != Z_OK)
+    goto out;
+
+  log_text (DI_LOG_LEVEL_DEBUG, "Execute \"%s\" with gzip input", command);
+
+  dest = popen (command, "w");
+  if (!dest)
+  { ret = -1; goto out; }
+
+  do
+  {
+    size_t toread = len - stream.total_in;
+    if (toread > sizeof in) { toread = sizeof in; }
+
+    stream.avail_in = fread(in, 1, toread, source);
+    stream.next_in = in;
+    if (ferror(source))
+    { ret = -1; goto out; }
+    if (stream.avail_in == 0)
+      goto out;
+
+    do
+    {
+      stream.avail_out = sizeof out;
+      stream.next_out = out;
+
+      ret = inflate(&stream, Z_NO_FLUSH);
+      if (ret == Z_NEED_DICT || ret == Z_DATA_ERROR || ret == Z_MEM_ERROR)
+        goto out;
+
+      size_t towrite = sizeof out - stream.avail_out;
+      if (fwrite (out, 1, towrite, dest) != towrite || ferror(dest))
+      { ret = -1; goto out; }
+    }
+    while (stream.avail_out == 0);
+  }
+  while (ret != Z_STREAM_END);
+
+out:
+  inflateEnd(&stream);
+  if (dest && fclose (dest))
+    ret = -1;
+  return ret != Z_STREAM_END;
+}
+
+static int package_extract_self_xz (FILE *source, size_t len, const char *command)
+{
+  int ret = 0;
+  lzma_stream stream = LZMA_STREAM_INIT;
+  unsigned char in[1024*1024], out[1024*1024];
+  FILE *dest = NULL;
+
+  ret = lzma_stream_decoder(&stream, 128*1024*1024, 0);
+  if (ret != LZMA_OK)
+    goto out;
+
+  log_text (DI_LOG_LEVEL_DEBUG, "Execute \"%s\" with xz input", command);
+
+  dest = popen (command, "w");
+  if (!dest)
+  { ret = -1; goto out; }
+
+  do
+  {
+    size_t toread = len;
+    if (toread > sizeof in) { toread = sizeof in; }
+
+    stream.avail_in = fread(in, 1, toread, source);
+    stream.next_in = in;
+    len -= stream.avail_in;
+    if (ferror(source))
+    { ret = -1; goto out; }
+    if (stream.avail_in == 0)
+      goto out;
+
+    do
+    {
+      stream.avail_out = sizeof out;
+      stream.next_out = out;
+
+      ret = lzma_code (&stream, LZMA_RUN);
+      if (ret != LZMA_OK && ret != LZMA_STREAM_END)
+        goto out;
+
+      size_t towrite = sizeof out - stream.avail_out;
+      if (fwrite (out, 1, towrite, dest) != towrite || ferror(dest))
+      { ret = -1; goto out; }
+    }
+    while (stream.avail_out == 0);
+  }
+  while (ret != LZMA_STREAM_END);
+
+out:
+  lzma_end (&stream);
+  if (fclose (dest))
+    ret = -1;
+  return ret != LZMA_STREAM_END;
+}
+
 static int package_extract_self (const char *file, const char *command)
 {
-  char buf[8192], *infobuf = NULL, versionbuf[40];
-  ssize_t memberlen, copied = 0;
-  FILE *ar = NULL, *pi = NULL;
+  char *infobuf = NULL, versionbuf[40];
+  ssize_t memberlen;
+  FILE *ar = NULL;
   char *cur;
   struct ar_hdr arh;
   int header_done = 0;
   int ret = -1;
 
-  ar = fopen (file, "r");
-  if (!ar)
-    goto error;
-  if (!fgets (versionbuf, sizeof (versionbuf), ar))
-    goto error;
-
-  if (!strcmp (versionbuf, ARMAG))
+  ar = fopen (file, "rb");
+  if (ar &&
+      fgets (versionbuf, sizeof (versionbuf), ar) &&
+      !strcmp (versionbuf, ARMAG))
   {
     while (1)
     {
       if (fread (&arh, 1, sizeof(arh), ar) != sizeof (arh))
-        goto error;
+        break;
       if (memcmp (arh.ar_fmag, ARFMAG, sizeof (arh.ar_fmag)))
-        goto error;
+        break;
       memberlen = package_extract_self_parse_header_length (arh.ar_size, sizeof (arh.ar_size));
       if (memberlen < 0)
-        goto error;
+        break;
 
       if (!header_done)
       {
         if (memcmp (arh.ar_name,"debian-binary   ",sizeof (arh.ar_name)) &&
             memcmp (arh.ar_name,"debian-binary/  ",sizeof (arh.ar_name)))
-          goto error;
+          break;
         infobuf = di_new (char, memberlen + 1);
         if (fread (infobuf, 1, memberlen + (memberlen & 1), ar) == (size_t) (memberlen + (memberlen & 1)))
         infobuf[memberlen]= 0;
         cur = strchr (infobuf, '\n');
         if (!cur)
-          goto error;
+          break;
         *cur = 0;
         cur = strchr (infobuf, '.');
         if (!cur)
-          goto error;
+          break;
         *cur = 0;
         if (strcmp (infobuf, "2"))
-          goto error;
+          break;
         *cur = '.';
         strncpy (versionbuf, infobuf, sizeof(versionbuf));
         versionbuf[sizeof (versionbuf) - 1]= 0;
         header_done = 1;
       }
+      else if (!memcmp (arh.ar_name,"data.tar.bz2    ",sizeof (arh.ar_name)) ||
+               !memcmp (arh.ar_name,"data.tar.bz2/   ",sizeof (arh.ar_name)))
+      {
+        ret = package_extract_self_bz2 (ar, memberlen, command);
+        break;
+      }
       else if (!memcmp (arh.ar_name,"data.tar.gz     ",sizeof (arh.ar_name)) ||
                !memcmp (arh.ar_name,"data.tar.gz/    ",sizeof (arh.ar_name)))
+      {
+        ret = package_extract_self_gz (ar, memberlen, command);
         break;
+      }
+      else if (!memcmp (arh.ar_name,"data.tar.xz     ",sizeof (arh.ar_name)) ||
+               !memcmp (arh.ar_name,"data.tar.xz/    ",sizeof (arh.ar_name)))
+      {
+        ret = package_extract_self_xz (ar, memberlen, command);
+        break;
+      }
       else
         fseek (ar, memberlen + (memberlen & 1), SEEK_CUR);
     }
   }
-  else
-    goto error;
-
-  log_text (DI_LOG_LEVEL_DEBUG, "Execute \"%s\"", command);
-
-  pi = popen (command, "w");
-  if (!pi)
-    goto error;
-
-  while (copied < memberlen)
-  {
-    size_t r, s;
-    r = memberlen - copied;
-    if (r > sizeof (buf))
-      r = sizeof (buf);
-    r = fread (buf, 1, r, ar);
-    if (!r)
-      goto error;
-    s = fwrite (buf, 1, r, pi);
-    if (r != s)
-      goto error;
-    copied += s;
-  }
 
-  ret = fclose (pi);
-  pi = NULL;
-
-  log_text (DI_LOG_LEVEL_DEBUG, "Return code: %d", ret);
-
-error:
   di_free (infobuf);
   if (ar)
     fclose (ar);
-  if (pi)
-    fclose (pi);
+
+  log_text (DI_LOG_LEVEL_DEBUG, "Return code: %d", ret);
 
   return ret;
 }
@@ -165,7 +321,7 @@
   char buf[PATH_MAX];
 
   build_target_deb (buf_file, PATH_MAX, package_get_local_filename (package));
-  snprintf (buf, PATH_MAX, "tar -xz -C %s -f -", target_root);
+  snprintf (buf, PATH_MAX, "tar -x -C %s -f -", target_root);
   return package_extract_self (buf_file, buf);
 }
 
diff -Nru cdebootstrap-0.5.7ubuntu2/src/suite_action.c cdebootstrap-0.5.8ubuntu1/src/suite_action.c
--- cdebootstrap-0.5.7ubuntu2/src/suite_action.c	2010-10-12 13:18:42.000000000 +0200
+++ cdebootstrap-0.5.8ubuntu1/src/suite_action.c	2011-07-25 23:58:23.000000000 +0200
@@ -18,8 +18,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  * $LastChangedBy: bastian $
- * $LastChangedDate: 2009-08-31 13:07:50 +0200 (Mo, 31 Aug 2009) $
- * $LastChangedRevision: 1706 $
+ * $LastChangedDate: 2011-07-25 23:58:23 +0200 (Mo, 25 Jul 2011) $
+ * $LastChangedRevision: 1731 $
  */
 
 #include <config.h>
@@ -76,10 +76,10 @@
   di_slist *list;
   int cleanup = 0;
 
-  if (data == ACTION_INSTALL_EXTRACT)
-    priority = di_package_priority_required;
-  else if (action->what)
+  if (action->what)
     priority = action_check_priority (action->what);
+  else if (data == ACTION_INSTALL_EXTRACT)
+    priority = di_package_priority_required;
   else
     priority = di_package_priority_extra;
   action_check_priority_list (priority, packages, allocator, install);