summaryrefslogtreecommitdiffstats
path: root/bin/check-new-issues
diff options
context:
space:
mode:
authorRaphael Geissert <geissert@debian.org>2009-12-26 20:50:38 +0000
committerRaphael Geissert <geissert@debian.org>2009-12-26 20:50:38 +0000
commitdff37edae4b67e7ec793277f0e0497175c185575 (patch)
tree220db67332ec1efa36b2ccf4f09d993f544a91e9 /bin/check-new-issues
parenta5c61cdc45963601296f00d597dd55ba2b5d7aae (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-xbin/check-new-issues34
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;

© 2014-2024 Faster IT GmbH | imprint | privacy policy