Package: cdebootstrap Version: 0.4.3 Tags: patch When I run
cdebootstrap --variant=buildd --debug sid . http://ftp.us.debian.org/debian it fails with the following error messages: > D: Execute "apt-get install --yes -o APT::Get::AllowUnauthenticated=true > linux-libc-dev libc6-dev cpp-4.2 cpp binutils libgomp1 gcc-4.2 gcc g++-4.2 > libstdc++6-4.2-dev g++ make libgdbm3 perl perl-modules cpio patch dpkg-dev > build-essential fakeroot" in chroot > O: Reading package lists... > O: > O: Building dependency tree... > O: > O: The following extra packages will be installed: > O: bzip2 perl-doc > O: Suggested packages: > O: binutils-doc cpp-doc gcc-4.2-locales debian-keyring g++-multilib > O: g++-4.2-multilib gcc-4.2-doc libstdc++6-4.2-dbg gcc-multilib manpages-dev > O: autoconf automake1.9 libtool flex bison gdb gcc-doc gcc-4.2-multilib > O: libmudflap0-4.2-dev libgcc1-dbg libgomp1-dbg libmudflap0-4.2-dbg > glibc-doc > O: libstdc++6-4.2-doc make-doc ed diff-doc libterm-readline-gnu-perl > O: libterm-readline-perl-perl man-browser groff > O: The following NEW packages will be installed: > O: binutils build-essential bzip2 cpio cpp cpp-4.2 dpkg-dev fakeroot g++ > O: g++-4.2 gcc gcc-4.2 libc6-dev libgdbm3 libgomp1 libstdc++6-4.2-dev > O: linux-libc-dev make patch perl perl-doc perl-modules > O: 0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded. > O: Need to get 28.1MB of archives. > O: After unpacking 87.1MB of additional disk space will be used. > O: WARNING: The following packages cannot be authenticated! > O: cpio libgdbm3 patch perl-modules perl binutils linux-libc-dev libc6-dev > O: cpp-4.2 cpp libgomp1 gcc-4.2 gcc libstdc++6-4.2-dev g++-4.2 g++ make > O: dpkg-dev build-essential bzip2 fakeroot perl-doc > O: Authentication warning overridden. > O: Err bootstrap: ./main bzip2 1.0.3-7 > O: > O: Err bootstrap: ./main perl-doc 5.8.8-11.1 > O: > O: Failed to fetch bootstrap:/pool/main/c/cpio/cpio_2.9-4_i386.deb Hash Sum > mismatch > O: Failed to fetch bootstrap:/pool/main/g/gdbm/libgdbm3_1.8.3-3_i386.deb > Hash Sum mismatch > O: Failed to fetch bootstrap:/pool/main/p/patch/patch_2.5.9-4_i386.deb Hash > Sum mismatch > O: Failed to fetch > bootstrap:/pool/main/p/perl/perl-modules_5.8.8-11.1_all.deb Hash Sum mismatch > O: Failed to fetch bootstrap:/pool/main/p/perl/perl_5.8.8-11.1_i386.deb Hash > Sum mismatch > O: Failed to fetch bootstrap:/pool/main/b/binutils/binutils_2.18-1_i386.deb > Hash Sum mismatch > O: Failed to fetch > bootstrap:/pool/main/l/linux-2.6/linux-libc-dev_2.6.22-5_i386.deb Hash Sum > mismatch > O: Failed to fetch bootstrap:/pool/main/g/glibc/libc6-dev_2.6.1-6_i386.deb > Hash Sum mismatch > O: Failed to fetch bootstrap:/pool/main/g/gcc-4.2/cpp-4.2_4.2.2-3_i386.deb > Hash Sum mismatch > O: Failed to fetch bootstrap:/pool/main/g/gcc-defaults/cpp_4.2.1-6_i386.deb > Hash Sum mismatch > O: Failed to fetch bootstrap:/pool/main/g/gcc-4.2/libgomp1_4.2.2-3_i386.deb > Hash Sum mismatch > O: Failed to fetch bootstrap:/pool/main/g/gcc-4.2/gcc-4.2_4.2.2-3_i386.deb > Hash Sum mismatch > O: Failed to fetch bootstrap:/pool/main/g/gcc-defaults/gcc_4.2.1-6_i386.deb > Hash Sum mismatch > O: Failed to fetch > bootstrap:/pool/main/g/gcc-4.2/libstdc++6-4.2-dev_4.2.2-3_i386.deb Hash Sum > mismatch > O: Failed to fetch bootstrap:/pool/main/g/gcc-4.2/g++-4.2_4.2.2-3_i386.deb > Hash Sum mismatch > O: Failed to fetch bootstrap:/pool/main/g/gcc-defaults/g++_4.2.1-6_i386.deb > Hash Sum mismatch > O: Failed to fetch bootstrap:/pool/main/m/make-dfsg/make_3.81-3_i386.deb > Hash Sum mismatch > O: Failed to fetch bootstrap:/pool/main/d/dpkg/dpkg-dev_1.14.7_all.deb Hash > Sum mismatch > O: Failed to fetch > bootstrap:/pool/main/b/build-essential/build-essential_11.3_i386.deb Hash > Sum mismatch > O: Failed to fetch bootstrap:/pool/main/b/bzip2/bzip2_1.0.3-7_i386.deb > O: Failed to fetch bootstrap:/pool/main/f/fakeroot/fakeroot_1.8.2_i386.deb > Hash Sum mismatch > O: Failed to fetch bootstrap:/pool/main/p/perl/perl-doc_5.8.8-11.1_all.deb > O: E: Unable to fetch some archives, maybe run apt-get update or try with > --fix-missing? > D: Return code: 25600 > E: Couldn't install system due to errors! The first two errors > O: Err bootstrap: ./main bzip2 1.0.3-7 > O: > O: Err bootstrap: ./main perl-doc 5.8.8-11.1 occur because apt-get tries to install these packages even though cdebootstrap hasn't downloaded them. apt-get tries to download them because they're recommended by dpkg-dev and perl, respectively. cdebootstrap doesn't download them because they're not depended on. The attached patch fixes this problem by passing -o APT::Install-Recommends=false to apt-get. The rest of the problems occur because the bootstrap method doesn't output headers containing the MD5, SHA1, and SHA256 message digests. The attached patch fixes these problems by making it output these headers. -- Matt
diff -ru cdebootstrap-0.4.3~/helper/cdebootstrap-helper-apt/usr/lib/apt/methods/bootstrap cdebootstrap-0.4.3/helper/cdebootstrap-helper-apt/usr/lib/apt/methods/bootstrap --- cdebootstrap-0.4.3~/helper/cdebootstrap-helper-apt/usr/lib/apt/methods/bootstrap 2007-10-26 10:53:01.000000000 -0700 +++ cdebootstrap-0.4.3/helper/cdebootstrap-helper-apt/usr/lib/apt/methods/bootstrap 2007-10-26 10:57:36.000000000 -0700 @@ -17,6 +17,16 @@ "); +sub sum +{ + my ($type, $file) = @_; + + open (SUM, "${type}sum $file|") || die "can't run ${type}sum"; + my ($sum) = split /\s+/, <SUM>; + close SUM; + return $sum; +} + sub check_file { my ($uri, $file) = @_; @@ -24,10 +34,18 @@ if (my @stat = stat $realfile) { + my $md5sum = sum ("md5", $realfile); + my $sha1sum = sum ("sha1", $realfile); + my $sha256sum = sum ("sha256", $realfile); + $stdout->print ("201 URI Done URI: $uri Filename: $realfile Size: $stat[7] +MD5-Hash: $md5sum +MD5Sum-Hash: $md5sum +SHA1-Hash: $sha1sum +SHA256-Hash: $sha256sum "); return 1; diff -ru cdebootstrap-0.4.3~/src/install.c cdebootstrap-0.4.3/src/install.c --- cdebootstrap-0.4.3~/src/install.c 2007-10-26 10:53:01.000000000 -0700 +++ cdebootstrap-0.4.3/src/install.c 2007-10-26 10:53:50.000000000 -0700 @@ -185,7 +185,7 @@ di_slist_node *node; int count = 0; - strcpy (buf, "apt-get install --yes -o APT::Get::AllowUnauthenticated=true"); + strcpy (buf, "apt-get install --yes -o APT::Get::AllowUnauthenticated=true -o APT::Install-Recommends=false"); len = strlen (buf); for (node = install->head; node; node = node->next)