diff options
author | Raphael Geissert <geissert@debian.org> | 2009-12-26 20:50:38 +0000 |
---|---|---|
committer | Raphael Geissert <geissert@debian.org> | 2009-12-26 20:50:38 +0000 |
commit | 66273441a88ec49ca459b660b80aa730461b497f (patch) | |
tree | 45c2eb15445ccbdbc0895e510535aaa7fb8a0ffe /bin/check-new-issues | |
parent | e9539765138ef8573a6c213dd8947add54685047 (diff) |
Look for ITPs and RFPs in check-new-issues
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@13662 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/check-new-issues')
-rwxr-xr-x | bin/check-new-issues | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/bin/check-new-issues b/bin/check-new-issues index 2e875477fa..f452e51e55 100755 --- a/bin/check-new-issues +++ b/bin/check-new-issues @@ -20,6 +20,7 @@ downloads allitems.txt from cve.mitre.org and shows full decription for each * blank line to skip to next issue * .fname to do "apt-file search name" * .cname to do "apt-cache search name" + * .wname to look up name in wnpp * .mpackage to search data/embedded-code-copies for "package" * v or e to launch an editor with the current item * q to save and quit @@ -51,7 +52,6 @@ EOF # - go back to previous issue / undo # - handle entries with several TODO lines # - handle claimed-by -# - look for ITPs? my $basedir; @@ -79,6 +79,8 @@ my $datafile="$basedir/data/CVE/list"; my $allitemsfile="gunzip -c $basedir/../allitems.txt.gz|"; my $allitemsurl="http://cve.mitre.org/data/downloads/allitems.txt.gz"; my $removedfile="$basedir/data/packages/removed-packages"; +my $wnppurl="http://qa.debian.org/data/bts/wnpp_rm"; +my $wnppfile="../wnpp_rm"; my $issue_regexp= $opts{i} || 'CVE-20(?:0[3-9]|1[0-9])'; my $todo_regexp= $opts{t} || ( $opts{T} ? '^\s+TODO: check' : '^\s+TODO: check$' ); @@ -88,6 +90,7 @@ $auto_display_limit = $opts{a} if defined $opts{a}; my $editor=$ENV{EDITOR} || $ENV{VISUAL} || "vi"; system "cd $basedir/.. ; wget -N $allitemsurl"; +system "cd $basedir/.. ; wget -N $wnppurl"; print "Reading data...\n"; @@ -105,6 +108,14 @@ foreach my $cve (@{$CVEs}) { $data->{$1}->{CVE}=\$cve; } +my %wnpp; +open(WNPP, $wnppfile) or die "could not open $wnppfile"; +while (<WNPP>) { + next unless (m/^([\w.-]+): ((?:ITP|RFP) .+)$/); + $wnpp{lc $1} = $2; +} +close(WNPP); + # packages that should be ignored by -u/-U my @ignore_missing_bug_list = qw/linux-2.6 linux-2.6.24 kfreebsd-source kfreebsd-5 kfreebsd-6 kfreebsd-7 @@ -211,6 +222,14 @@ TODO: foreach my $todo (reverse sort @todos) { print "===\n"; next READ; } + elsif ($r=~ /^\.w(.*)$/ ) { + my $s = $1; + $s =~ s/^\s*(.*?)\s*$/$1/; + print "=== wnpp lookup for '$s':\n"; + search_wnpp($s); + print "===\n"; + next READ; + } elsif ($r=~ /^\.m(.*)$/ ) { my $s = $1; $s =~ s/^\s+//; @@ -331,6 +350,7 @@ sub auto_search { foreach my $p (split /\s+/, $prog) { search_embed($p); + search_wnpp(qr<^\Q$p\E$>); } } if ( $file =~ /^(?:index|default|login|search|admin)\.(?:php3?|asp|cgi|pl)$/i ) { @@ -428,6 +448,18 @@ sub search_embed { return $found; } +sub search_wnpp { + my $s = shift; + $s = lc $s; + my $found = 0; + foreach my $e (keys %wnpp) { + next unless ($e =~ m/$s/); + print "$e: $wnpp{$e}\n"; + $found = 1; + } + return $found; +} + sub read_removed_packages_file { my $file = shift; |