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

Two more corrupt .debs found from 2.2_rev0 images



After checking all the CD images for all the architectures, I found
two more corrupt files. The sparc images I tested were 
2.2_rev0_CDa versions, the old 2.2_rev0 images were not tested. 
Testing included _only_ .deb files

Here's what I found.

binary-powerpc-1_NONUS.iso
==========================
dists/potato/main/binary-powerpc/otherosfs/smbfs_2.0.7-3.deb
   2e2c1d222b3cdb9db70ebf09634994c2, correct is
   92725d3d06262927fee42029c308f84e

binary-powerpc-3.iso
====================
dists/potato/main/binary-all/doc/gimp-manual_1.0.0-4.deb
   5824b918062f3ad9d9a2b08c97b78634, correct is
   f01a6b0eb32c8dc38cc5f52067eb2ae9


Here is the perl script I used.

#!/usr/bin/perl

if ($ARGV[0] eq "-v") {
  $verbose = 1;
  shift @ARGV;
}

if ($#ARGV < 0) {
  print STDERR "usage: $0 [-v] md5sums [md5sums ...]\n";
  print STDERR "Calculates MD5 checksums for .deb files in current and every subdirectory.\n";
  print STDERR " These checksums are compared against checksums in md5sums files.\n";
  print STDERR " md5sums files are typically md5sums files from debian/indices/ ";
  print STDERR " and debian-non-US/indices-non-US/\n";
  print STDERR "\n";
  print STDERR " -v    List also files that were not found from md5sums files,\n";
  print STDERR "       and MD5 checksum failures with non .deb files.\n";
  exit 1;
}

# Typical usage goes like this:
#  1. Make directories called images, sums and loop
#  2. Put the CD ISO images in the images directory
#  3. Put the MD5 checksum files debian/indices/md5sums and
#     debian-non-US/indices-non-US/md5sums into sums directory
#  4. for each $image in images/* do
#  5.     sudo mount -o loop $image loop
#  6.     cd loop
#  7.     check-md5.pl ../sums/*
#  8.        Hope that there's no output
#  9.     cd ..
# 10.     sudo umount loop

while ($sumfile = shift @ARGV) {
  open MD5SUMS, "< $sumfile" or die "$sumfile: $!\n";
  while (<MD5SUMS>) {
    s|dists/sid|dists/potato|;         # CD images do not have sid. They have potato
    ($md5, $file) = (/^(\S+)\s+(\S+)$/);
    $sums{$file} = $md5;
  }
}

open FILES, "find . -type f |" or die "find failed: $!";
while (<FILES>) {
  s|./||;
  next if (/TRANS.TBL$/);
  $line =  `md5sum $_`;
  ($md5, $file) = ($line =~ /^(\S+)\s+(\S+)$/);

  $correct_md5 = $sums{$file};
  if ($verbose and not defined $correct_md5) {
    print "$file not listed in md5sums files\n";
  }
  elsif ($md5 != $correct_md5) {
    next if not $verbose and not ($file =~ /\.deb$/);
    print "$file $md5, correct is $correct_md5\n";
  }
}



// Heikki
-- 
Heikki Vatiainen                  * hessu@cs.tut.fi
Tampere University of Technology  * Tampere, Finland




Reply to: