The log directory is called logs-470-4.
+Output logfiles for all three tools are saved in the logroot directory.
+In the last example above, the following files are created
+* 470-4-output_xenreleaselogs.txt
+* 470-4-output_xsamatch.html (or 470-4-output_xsamatch.txt)
+* 470-4-output_webpage.html
+
+You can override the output file by specifying
+--option <local filename (without path)>
Developers and Users
--------------------
list-patches and copy to file into xsa-lists with an appropriate name (e.g.
xsa-210-222 or xsa-213-225)
-*STEP 4:* run the tool in dumb mode, which checks name signatures only.
+*STEP 4:* run the tool
+
+ ./match-xsa --version 4 --major 8 --since 1 --xsa xsa-213-225
- ./match-xsa --version 4 --major 8 --since 1 --getlogs --html
- --xsa ../xsa-lists/xsa-213-225
- > ../xen-release-logs/481-stable-xsamatch.html
+And check for the output log in ../xen-release-logs/481-stable-xsamatch.html,
+or in an alternative lication, if you changed the logroot.
The above command line will create a report that shows which XSA patches have
-matching commit messages to those in the XSA list file. You will have to
-manually check whether all relevant patches have been applied. Typically
-where there are no matches, the XSA does not apply (e.g. the XSA may apply to
-Linux or older Xen releases only): you will have to go and double check the
-XSA, which can be easily accessed from within the
-
-*STEP 5:* run the tool in smart mode, which checks against real patches
-rather then commit message titles. Note that this check is more fragile and
-can throw up errors in the following situations:
-* A wrong patch has been applied
-* The committer has made changes to the patch when committing (this may be a
- real issue)
-* A bug in the match-xsa tool (none currently known)
-
- ./match-xsa --version 4 --major 8 --since 1 --html --smart
- --xsa ../xsa-lists/xsa-213-225
- > ../xen-release-logs/481-stable-xsamatch-smart.html
-
-Note that you can omit the --getlogs option, as you have the logs already.
-
-Also note that the tool will fetch XSA patches from xenbits.xenproject.org/
-xsa and store these in a ../xsaweb directory. The tool uses git show to fetch
-commits from tree and will compare these against patches.
-
-If at this stage, there no unexplained discrepancies between XSAs as
-published on xenbits.xenproject.org/xsa, you are done. If there are you can
-do the following...
-
-*STEP 6:* run the tool in smart and debug mode
-
- ./match-xsa --version 4 --major 8 --since 1 --html --smart --debug
- --xsa ../xsa-lists/xsa-213-225
- > ../xen-release-logs/481-stable-xsamatch-smartd.html
-
-In this mode, git diffs, patches and logs are saved in a debug directory in
-the log directory and are accessible from the generated html (via a DEBUG
+matching commit messages to those in the XSA list file. Once there is a match,
+the tool will get the patch from xsa.git or from xenbits.xenproject.org/
+xsa and store these in the logdir/tmp/xsaweb directory..
+
+Git diffs, patches and logs are saved in a debug directory in the log
+directory and are accessible from the generated html (via a DEBUG
link). You can look at these to investigate issues. Let's say a xen patch has
been matched by commit message, the following files will be generated:
Similar files will be available for qemu traditional (qemut*) and qemu
upstream (qemuu*).
+You have additional options, which are typically only useful in rare situations
+* --not-debug does not create debug files
+* --not-html will create a markup file instead as output
+* --not-smar, will only compare file signatures
Security Team Members
---------------------
'UNTIL' => "stable",
'LOGROOT' => "../xen-release-logs",
'XSALISTDIR' => "../xsa-lists",
-# LATER: Remove these
- 'GETLOGS' => 0,
- 'SMART' => 0,
- 'DEBUG' => 0,
- 'HTML' => 0,
+ 'SMART' => 1,
+ 'DEBUG' => 1,
+ 'HTML' => 1,
+ 'NOTSMART' => 0,
+ 'NOTDEBUG' => 0,
+ 'NOTHTML' => 0,
);
my %optionspec = (
'xsalist=s' => \$o{'XSALIST'}, # DOCUMENT: Was xsa and $XSALIST
'xsalistdir=s' => \$o{'XSALISTDIR'},
-# LATER: Remove these / default
-# Applicable to: match-xsa
- 'smart' => \$o{'SMART'},
- 'debug' => \$o{'DEBUG'},
- 'html' => \$o{'HTML'},
-
-# LATER: Remove these
- 'getlogs' => \$o{'GETLOGS'},
+ 'not-smart' => \$o{'NOTSMART'},
+ 'not-debug' => \$o{'NOTDEBUG'},
+ 'not-html' => \$o{'NOTHTML'},
-# Make these available to match-xsa
-# Applicable to: match-xsa, make-webpage
+# Applicable to: make-webpage
'xsastart=s' => \$o{'XSASTART'},
'xsaend=s' => \$o{'XSAEND'},
);
Config::Simple->import_from('config/config', \%o);
# Get Options
- GetOptions(%optionspec) or die "Usage: $0".$usage;
+ GetOptions(%optionspec) or die "Usage: $0\n".$usage;
# Error checking
if ($o{'VERSION'} eq "none" ) {
- die "Usage: $0".$usage."\n".
+ die "Usage: $0\n".$usage."\n".
" --version not specified\n";
}
if ($o{'MAJOR'} eq "none" ) {
- die "Usage: $0".$usage."\n".
+ die "Usage: $0\n".$usage."\n".
" --major not specified\n";
}
" [--since|--minor-since <minor version start>]\n".
" [--until|--minor-until <minor version end>]\n".
" [--outputfile filename (relative to logdir)]\n".
-# " [--smart] [--debug] [--html]\n".
-# " [--getlogs]\n".
+ " [--logroot directory]\n".
+ " [--not-smart] [--not-debug] [--not-html]\n".
" [--xsadir xsadir (default=LOGDIR/tmp/xsaweb; files fetched from".
" http://xenbits.xenproject.org/xsa/)]\n".
- " [--logroot directory]\n".
" [--xsalistdir directory]\n".
" --xsalist xsalistfile\n";
- my %opt = handleoptions("output_xsamatch.html", $u);
+ my %opt = handleoptions("output_xsamatch", $u);
# Error checking
if (! defined $o{'XSALIST'}) {
- die "Usage: $0".$u."\n".
+ die "Usage: $0\n".$u."\n".
" --xsalist not specified\n";
}
# Check whether files/directories exist
if (!-d $opt{'XSALISTDIR'}) {
- die "Usage: $0".$u."\n".
+ die "Usage: $0\n".$u."\n".
" directory ".$opt{'XSALISTDIR'}." does not exist.\n";
}
if (!-f $opt{'XSALISTFILE'}) {
- die "Usage: $0".$u."\n".
+ die "Usage: $0\n".$u."\n".
" file ".$opt{'XSALISTFILE'}." does not exist.\n";
}
+ # OVERRIDE 'SMART', 'DEBUG' & 'HTML' if specified
+ if ( $opt{'NOTSMART'} ) {
+ $opt{'SMART'} = 0;
+ }
+ if ( $opt{'NOTDEBUG'} ) {
+ $opt{'DEBUG'} = 0;
+ }
+ if ( $opt{'NOTHTML'} ) {
+ $opt{'HTML'} = 0;
+ $opt{'OUTPUTFILE'} .= ".txt";
+ } else {
+ $opt{'OUTPUTFILE'} .= ".html";
+ }
+
return %opt;
}
" [--since|--minor-since <minor version start>]\n".
" [--until|--minor-until <minor version end>]\n".
" [--outputfile filename (relative to logdir)]\n".
- " [--logroot directory\n";
+ " [--logroot directory]\n";
my %opt = handleoptions("output_xenreleaselogs.txt", $u);
" [--since|--minor-since <minor version start>]\n".
" [--until|--minor-until <minor version end>]\n".
" [--outputfile filename (relative to logdir)]\n".
-# " [--nocheckout]\n".
+ " [--logroot directory]\n".
" --xsastart <number of 1st xsa>\n".
- " --xsasend <number of last xsa>\n".
- " [--logroot directory]\n";
+ " --xsasend <number of last xsa>\n";
my %opt = handleoptions("output_webpage.html", $u);
# Error checking
if (! defined $opt{'XSASTART'}) {
- die "Usage: $0".$u."\n".
+ die "Usage: $0\n".$u."\n".
" --xsastart not specified\n";
}
# Error checking
if (! defined $opt{'XSAEND'}) {
- die "Usage: $0".$u."\n".
+ die "Usage: $0\n".$u."\n".
" --xsasend not specified\n";
}
my %opt = options_makewebpage();
# Copy Variables from Options
-my $GETLOGS = $opt{'GETLOGS'};
my $VERSION = $opt{'VERSION'};
my $MAJOR = $opt{'MAJOR'};
my $SINCE = $opt{'SINCE'};
# Output
my $OUTPUTFILE = $opt{'OUTPUTFILE'};
+# Always get/update logs
+my $rl .= "./xen-release-logs --logroot $LOGROOT --version $VERSION --major $MAJOR";
+if ($SINCE ne "none") {
+ $rl .= " --since $SINCE";
+}
+if ($UNTIL ne "stable") {
+ $rl .= " --since $UNTIL";
+}
+system($rl);
+
# Input
my $xen_log = "$LOGDIR/xen_$SHORT-pretty.log";
my $qemuu_log = "$LOGDIR/qemuu_$SHORT-pretty.log";
# WRITE REPORT
write_file($OUTPUTFILE, $s);
+
+1;
my %opt = options_matchxsa();
# Copy Variables from Options
-my $GETLOGS = $opt{'GETLOGS'};
my $SMART = $opt{'SMART'};
my $DEBUG = $opt{'DEBUG'};
my $HTML = $opt{'HTML'};
my $xsa = $XSADIR;
+# Always get/update logs
+my $rl .= "./xen-release-logs --logroot $LOGROOT --version $VERSION --major $MAJOR";
+if ($SINCE ne "none") {
+ $rl .= " --since $SINCE";
+}
+if ($UNTIL ne "stable") {
+ $rl .= " --since $UNTIL";
+}
+system($rl);
+
+# Output
+my $OUTPUTFILE = $opt{'OUTPUTFILE'};
+# Redirect Output to file
+print "Redirecting output to '$OUTPUTFILE'\n";
+open(OUTPUT, '>', $OUTPUTFILE) or die "Could not open file '$OUTPUTFILE' $!";
+STDOUT->fdopen( \*OUTPUT, 'w' ) or die $!;
+
# Get the xsa list file
my @XSA;
my $XSAs;
}
}
+
+1;
+
system("$git$Q%s$Q > ../$L.log");
system("$git$Q%H$Q > ../$L-hash.log");
}
+
+1;