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

Contents of /data/checklist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 233 - (show annotations) (download)
Wed Jan 5 03:43:45 2005 UTC (8 years, 4 months ago) by joeyh
Original Path: sarge-checks/checklist
File size: 1491 byte(s)
add datestamp to html output
1 #!/usr/bin/perl
2 # Must run on a machine with madison.
3
4 my $html=0;
5 if ($ARGV[0] eq 'html') {
6 shift;
7 $html=1;
8 }
9
10 if (! @ARGV) {
11 die "usage: $0 [html] list\n";
12 }
13
14 if ($html) {
15 print "<title>testing security issues</title>\n";
16 print "<ul>\n";
17 }
18
19 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 }
27
28 foreach my $list (@ARGV) {
29 if (-d $list) {
30 $list="$list/list";
31 }
32
33 open (IN, $list) || die "open $list: $!";
34 while (<IN>) {
35 chomp;
36 if (/^\[/) {
37 ($id)=m/((?:DSA|CAN|CVE)-.*?) /;
38 }
39 elsif (/^(DSA|CAN|CVE)-/) {
40 $id=$_;
41 }
42 elsif (/^\s+[!-]\s+(.*?)\s+(.*)$/) {
43 my $package=$1;
44 my $version=$2;
45 if ($version=~/unfixed/) {
46 print "<li>" if $html;
47 print formatout("$package $version for $id\n");
48 next;
49 }
50 my $maddy=`madison -s testing '$package'`;
51 if (length $maddy) {
52 my @fields = split(/\s*\|\s*/, $maddy);
53 my $havver=$fields[1];
54 my $cmp=system("dpkg --compare-versions '$havver' '>=' '$version'");
55 if ($cmp != 0) {
56 if ($html) {
57 print "<li>";
58 $havver='<a href="http://bjorn.haxx.se/debian/testing.pl?package='.$package.'">'.$havver.'</a>';
59 }
60 print formatout("$package $version needed, have $havver for $id\n");
61 }
62 }
63 }
64 }
65 }
66
67 if ($html) {
68 print "</ul>\n";
69 print "<hr>\n";
70 print "Last update: ".`date`;
71 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5