From: Lars Kurth Date: Fri, 7 Jul 2017 14:26:33 +0000 (+0100) Subject: Added make-webpage tool to generate pages for https://xenproject.org/downloads/xen... X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4d41b332370626d071dca22f96825d94b55424a9;p=people%2Flarsk%2Fxen-release-scripts.git Added make-webpage tool to generate pages for https://xenproject.org/downloads/xen-archives --- diff --git a/README b/README index 3e68704..e15d4b9 100644 --- a/README +++ b/README @@ -130,4 +130,24 @@ TODO ISSUES ------ -* *smart*: currently falls over and produces a non-match if the per-file diffs from *git show* and in the *.patch* file are listed in a different order. This seems to happen rarely, but does happen. \ No newline at end of file +* *smart*: currently falls over and produces a non-match if the per-file diffs from *git show* and in the *.patch* file are listed in a different order. This seems to happen rarely, but does happen. + + + +make-webpage +============ + +For 4.6.6 (tagged): + + ./make-webpage --version 4 --major 6 --since 5 --until 6 --xsastart 210 --xsaend 225 + +Or as the other tools: + + ./make-webpage --version 4 --major 6 --since 5 --until 6 --xsastart 210 --xsaend 225 --getlogs --logroot dir + +Creates a file called *webpage.html* in the relevant log directory: +* The XSA table needs to be edited to match *match-xsa* + +TODO +---- +* Make generation of XSA table fully automatic \ No newline at end of file diff --git a/make-webpage b/make-webpage new file mode 100755 index 0000000..9fbf370 --- /dev/null +++ b/make-webpage @@ -0,0 +1,120 @@ +#!/usr/bin/perl +# Usage +# $0 --version 4 --major 7 --since 0 --until 1 [--getlogs] [--logroot dir] --xsastart start --xsaend end +# Logs will be put into the log directory under "webpage.html" + +use strict; +use warnings; +use 5.010; +use Getopt::Long qw(GetOptions); +use Cwd; +use File::Slurp; +use Text::Diff; +use File::Spec; + +my $GETLOGS=0; +my $VERSION; +my $MAJOR; +my $SINCE="none"; +my $UNTIL="stable"; +my $XSASTART; +my $XSAEND; +my $LOGROOT = File::Spec->canonpath(cwd()."/../xen-release-logs" ); + +GetOptions( + 'getlogs' => \$GETLOGS, + 'version=s' => \$VERSION, + 'major=s' => \$MAJOR, + 'since=s' => \$SINCE, + 'until=s' => \$UNTIL, + 'xsastart=s' => \$XSASTART, + 'xsaend=s' => \$XSAEND, + 'logroot=s' => \$LOGROOT, +) or +die "Usage: $0 --version 4 --major 7 --since 0 --until 1 [--getlogs] [--logroot dir] --xsastart start --xsaend end\n"; + +if ($GETLOGS) { + system("./xen-release-logs --version $VERSION --major $MAJOR --since $SINCE --until $UNTIL --logroot $LOGROOT"); +} + +# Calculate log file names +my $short="$VERSION$MAJOR$SINCE-$UNTIL"; + +# Directories +# Output +my $dir=$LOGROOT; +my $output="$dir/logs-$short/webpage.html"; + +# Input +my $xen_log="$dir/logs-$short/xen_$short-pretty.log"; +my $qemuu_log="$dir/logs-$short/qemuu_$short-pretty.log"; +my $qemut_log="$dir/logs-$short/qemut_$short-pretty.log"; + +my $s; +my $releaseshort=$VERSION.".".$MAJOR; +my $release=$VERSION.".".$MAJOR.".".$UNTIL; + +# CREATE REPORT +$s .= '

We are pleased to announce the release of Xen '.$release.'. This is available immediately from its git '; +$s .= 'repository 

'."\n"; +$s .= '

'; +$s .= 'https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=refs/heads/stable-'.$releaseshort.' '; +$s .= '(tag RELEASE-'.$release.') or from this download page

'."\n"; +$s .= '

This release contains the following bug-fixes and improvements in the Xen Project hypervisor:

'."\n"; +$s .= ''."\n"; +$s .= '

In addition, this release also contains the following fixes to '; +$s .= 'qemu-traditional:

'."\n"; +$s .= ''."\n"; + +$s .= '

This release also contains changes to qemu-upstream, '; +$s .= 'whose changelogs we do not list here as it contains many changes that are not directly releated to the Xen Project '; +$s .= 'Hypervisor and thus this release. However, you can check '; +$s .= ''; +$s .= 'https://xenbits.xenproject.org/gitweb/?p=qemu-xen.git;a=shortlog '; +$s .= '(between tags qemu-xen-'.$releaseshort.'.'.$SINCE.' and qemu-xen-'.$releaseshort.'.'.$UNTIL.').

'."\n"; + +$s .= '

This release, which includes source code for qemu-traditional and qemu-upstream, contains the following security '; +$s .= 'fixes. 

'."\n"; + +# XSA TABLE +$s .= ''."\n"; +$s .= ''."\n"; +$s .= ''."\n"; +$s .= ''."\n"; +$s .= ''."\n"; +$s .= ''."\n"; +$s .= ''."\n"; +$s .= ''."\n"; + +# INSERT table elements +my $i; +for($i=$XSASTART; $i<=$XSAEND; $i++) { + $s .= ''."\n"; + $s .= ''."\n"; + $s .= ''."\n"; + $s .= ''."\n"; + $s .= ''."\n"; + $s .= ''."\n"; + $s .= ''."\n"; +} + +$s .= ''."\n"; +$s .= '
XSAXenqemu-traditionalqemu-upstream 
XSA-'.$i.'TODO: Applied|N/A|...TODO: Applied|N/A|...TODO: Applied|N/A|...
'."\n"; + +$s .= '


See https://xenbits.xenproject.org/xsa/ '; +$s .= 'for details related to Xen Project security advisories.

'."\n"; + +$s .= '

We recommend all users of the '.$releaseshort.' stable series to update to this latest point release.

'."\n"; + +# WRITE REPORT +write_file($output, $s); \ No newline at end of file