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

Contents of /sarge-checks/checklist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 241 - (show annotations) (download)
Wed Jan 5 10:55:48 2005 UTC (8 years, 5 months ago) by joeyh
File size: 1690 byte(s)
filter out packages that are not in testing
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 my $unprop = my $unfixed = 0;
29
30 foreach my $list (@ARGV) {
31 if (-d $list) {
32 $list="$list/list";
33 }
34
35 open (IN, $list) || die "open $list: $!";
36 while (<IN>) {
37 chomp;
38 if (/^\[/) {
39 ($id)=m/((?:DSA|CAN|CVE)-.*?) /;
40 }
41 elsif (/^(DSA|CAN|CVE)-/) {
42 $id=$_;
43 }
44 elsif (/^\s+[!-]\s+(.*?)\s+(.*)$/) {
45 my $package=$1;
46 my $version=$2;
47
48 my $maddy=`madison -s testing '$package'`;
49 next unless length $maddy; # skip if not in testing
50
51 if ($version=~/unfixed/) {
52 print "<li>" if $html;
53 print formatout("$package $version for $id\n");
54 $unprop++;
55 }
56 else {
57 my @fields = split(/\s*\|\s*/, $maddy);
58 my $havver=$fields[1];
59 my $cmp=system("dpkg --compare-versions '$havver' '>=' '$version'");
60 if ($cmp != 0) {
61 if ($html) {
62 print "<li>";
63 $havver='<a href="http://bjorn.haxx.se/debian/testing.pl?package='.$package.'">'.$havver.'</a>';
64 }
65 print formatout("$package $version needed, have $havver for $id\n");
66 $unfixed++;
67 }
68 }
69 }
70 }
71 }
72
73 if ($html) {
74 print "</ul>\n";
75 print "<hr>\n";
76 print "Total unfixed: $unfixed\n";
77 print "Total fixed in unstable but not testing: $unprop\n";
78 print "Last update: ".`date`;
79 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5