/[secure-testing]/bin/checklist
ViewVC logotype

Contents of /bin/checklist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Thu Oct 28 21:39:00 2004 UTC (8 years, 7 months ago) by joeyh
Original Path: sarge-checks/checklist.pl
File MIME type: text/plain
File size: 828 byte(s)
support CVEs, multiple lists, and being passed directories
1 #!/usr/bin/perl
2 # Must run on a machine with madison.
3
4 if (! @ARGV) {
5 die "usage: $0 list\n";
6 }
7
8 foreach my $list (@ARGV) {
9 if (-d $list) {
10 $list="$list/list";
11 }
12
13 open (IN, $list) || die "open $list: $!";
14 while (<IN>) {
15 chomp;
16 if (/^\[/) {
17 ($id)=m/(DSA-.*?) /;
18 }
19 elsif (/^(CAN|CVE)-/) {
20 $id=$_;
21 }
22 elsif (/^\s+[!-]\s+(.*?)\s+(.*)$/) {
23 my $package=$1;
24 my $version=$2;
25 if ($version=~/unfixed/) {
26 print "$package $version for $id\n";
27 next;
28 }
29 my $maddy=`madison -s testing '$package'`;
30 if (length $maddy) {
31 my @fields = split(/\s*\|\s*/, $maddy);
32 my $cmp=system("dpkg --compare-versions '$fields[1]' '>=' '$version'");
33 if ($cmp != 0) {
34 print "$package $version needed, have $fields[1] for $id\n";
35 }
36 }
37 }
38 elsif (/HELP/) {
39 print $_." ($id)\n";
40 }
41 }
42 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5