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

Contents of /data/checklist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 241 - (hide annotations) (download)
Wed Jan 5 10:55:48 2005 UTC (8 years, 4 months ago) by joeyh
Original Path: sarge-checks/checklist
File size: 1690 byte(s)
filter out packages that are not in testing
1 joeyh 2 #!/usr/bin/perl
2     # Must run on a machine with madison.
3    
4 joeyh 230 my $html=0;
5     if ($ARGV[0] eq 'html') {
6     shift;
7     $html=1;
8     }
9    
10 joeyh 31 if (! @ARGV) {
11 joeyh 230 die "usage: $0 [html] list\n";
12 joeyh 2 }
13    
14 joeyh 230 if ($html) {
15     print "<title>testing security issues</title>\n";
16     print "<ul>\n";
17     }
18    
19 joeyh 231 sub formatout {
20     my $out=shift;
21     if ($html) {
22     $out=~s#((?:CAN|CVE)-\d+-\d+)#<a href="http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=$1">$1</a>#g;
23     $out=~s{bug #(\d+)}{<a href="http://bugs.debian.org/$1">bug #$1</a>}g;
24     }
25     return $out;
26 joeyh 230 }
27    
28 joeyh 239 my $unprop = my $unfixed = 0;
29    
30 joeyh 31 foreach my $list (@ARGV) {
31     if (-d $list) {
32     $list="$list/list";
33 joeyh 2 }
34 joeyh 31
35     open (IN, $list) || die "open $list: $!";
36     while (<IN>) {
37     chomp;
38     if (/^\[/) {
39 joeyh 58 ($id)=m/((?:DSA|CAN|CVE)-.*?) /;
40 joeyh 2 }
41 joeyh 58 elsif (/^(DSA|CAN|CVE)-/) {
42 joeyh 31 $id=$_;
43     }
44     elsif (/^\s+[!-]\s+(.*?)\s+(.*)$/) {
45     my $package=$1;
46     my $version=$2;
47 joeyh 241
48     my $maddy=`madison -s testing '$package'`;
49     next unless length $maddy; # skip if not in testing
50    
51 joeyh 31 if ($version=~/unfixed/) {
52 joeyh 231 print "<li>" if $html;
53     print formatout("$package $version for $id\n");
54 joeyh 239 $unprop++;
55 joeyh 2 }
56 joeyh 241 else {
57 joeyh 31 my @fields = split(/\s*\|\s*/, $maddy);
58 joeyh 230 my $havver=$fields[1];
59     my $cmp=system("dpkg --compare-versions '$havver' '>=' '$version'");
60 joeyh 31 if ($cmp != 0) {
61 joeyh 230 if ($html) {
62     print "<li>";
63 joeyh 231 $havver='<a href="http://bjorn.haxx.se/debian/testing.pl?package='.$package.'">'.$havver.'</a>';
64 joeyh 230 }
65 joeyh 231 print formatout("$package $version needed, have $havver for $id\n");
66 joeyh 239 $unfixed++;
67 joeyh 31 }
68     }
69 joeyh 2 }
70     }
71     }
72 joeyh 230
73     if ($html) {
74     print "</ul>\n";
75 joeyh 233 print "<hr>\n";
76 joeyh 239 print "Total unfixed: $unfixed\n";
77     print "Total fixed in unstable but not testing: $unprop\n";
78 joeyh 233 print "Last update: ".`date`;
79 joeyh 230 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5