/[secure-testing]/sarge-checks/checklist
ViewVC logotype

Contents of /sarge-checks/checklist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 311 - (hide annotations) (download)
Sat Jan 22 04:38:11 2005 UTC (8 years, 4 months ago) by joeyh
File size: 2317 byte(s)
mark unfixed bugs in bold
1 joeyh 2 #!/usr/bin/perl
2     # Must run on a machine with madison.
3 joeyh 256 use URI::Escape;
4 joeyh 2
5 joeyh 230 my $html=0;
6     if ($ARGV[0] eq 'html') {
7     shift;
8     $html=1;
9     }
10    
11 joeyh 31 if (! @ARGV) {
12 joeyh 230 die "usage: $0 [html] list\n";
13 joeyh 2 }
14    
15 joeyh 230
16 joeyh 307 my %data;
17 joeyh 309 my $unprop = my $unfixed = my $todos = 0;
18 joeyh 307
19     sub record {
20     my ($package, $condition, $item)=@_;
21    
22 joeyh 231 if ($html) {
23 joeyh 307 $condition=~s{bug #(\d+)}{<a href="http://bugs.debian.org/$1">bug #$1</a>}g;
24 joeyh 311 $condition=~s{unfixed}{<b>unfixed</b>}g;
25 joeyh 307 $item=~s#((?:CAN|CVE)-\d+-\d+)#<a href="http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=$1">$1</a>#g;
26 joeyh 231 }
27 joeyh 307
28     push @{$data{$package}{$condition}}, $item;
29 joeyh 230 }
30    
31 joeyh 31 foreach my $list (@ARGV) {
32     if (-d $list) {
33     $list="$list/list";
34 joeyh 2 }
35 joeyh 31
36     open (IN, $list) || die "open $list: $!";
37     while (<IN>) {
38     chomp;
39     if (/^\[/) {
40 joeyh 242 ($id)=m/((?:DSA|CAN|CVE)-[^\s]+) /;
41 joeyh 2 }
42 joeyh 242 elsif (/^((?:DSA|CAN|CVE)-[^\s]+)/) {
43     $id=$1;
44 joeyh 31 }
45     elsif (/^\s+[!-]\s+(.*?)\s+(.*)$/) {
46     my $package=$1;
47     my $version=$2;
48 joeyh 241
49     my $maddy=`madison -s testing '$package'`;
50 joeyh 307 if (! length $maddy) {
51     next;
52     }
53 joeyh 241
54 joeyh 31 if ($version=~/unfixed/) {
55 joeyh 307 record($package, $version, $id);
56 joeyh 257 $unfixed++;
57 joeyh 2 }
58 joeyh 241 else {
59 joeyh 31 my @fields = split(/\s*\|\s*/, $maddy);
60 joeyh 230 my $havver=$fields[1];
61     my $cmp=system("dpkg --compare-versions '$havver' '>=' '$version'");
62 joeyh 31 if ($cmp != 0) {
63 joeyh 230 if ($html) {
64 joeyh 256 $havver='<a href="http://bjorn.haxx.se/debian/testing.pl?package='.uri_escape($package).'">'.$havver.'</a>';
65 joeyh 230 }
66 joeyh 307 record($package, "$version needed, have $havver", $id);
67 joeyh 257 $unprop++;
68 joeyh 31 }
69     }
70 joeyh 2 }
71 joeyh 309 elsif (/\s+TODO/) {
72     $todos++;
73     }
74 joeyh 2 }
75     }
76 joeyh 230
77 joeyh 307
78 joeyh 230 if ($html) {
79 joeyh 307 print "<html><title>testing security issues</title>\n";
80     print "<ul>\n";
81     }
82    
83     foreach my $package (sort keys %data) {
84     foreach my $condition (sort keys %{$data{$package}}) {
85     print "<li>" if $html;
86     print "$package $condition for ";
87     my $items=0;
88     foreach my $item (sort @{$data{$package}{$condition}}) {
89     print ", " if $items > 0;
90     print $item;
91     $items++;
92     }
93     print "\n";
94     }
95     }
96    
97     if ($html) {
98 joeyh 230 print "</ul>\n";
99 joeyh 233 print "<hr>\n";
100 joeyh 307 print "Total holes unfixed: $unfixed<br>\n";
101     print "Total holes fixed in unstable but not testing: $unprop<br>\n";
102 joeyh 309 print "Number of TODO lines in <a href=\"http://svn.debian.org/wsvn/secure-testing/sarge-checks/?rev=0&sc=0\">records</a>: $todos<br>\n";
103 joeyh 244 print "Last update: ".`date`."<br>\n";
104     print "</html>\n";
105 joeyh 230 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5