head 1.42; access; symbols; locks; strict; comment @# @; 1.42 date 2006.02.19.12.09.59; author rse; state Exp; branches; next 1.41; commitid mYWSriKo90J8Obmr; 1.41 date 2005.02.24.10.58.27; author rse; state Exp; branches; next 1.40; 1.40 date 2004.10.29.14.20.10; author rse; state Exp; branches; next 1.39; 1.39 date 2004.08.05.07.08.32; author thl; state Exp; branches; next 1.38; 1.38 date 2004.05.19.19.36.55; author rse; state Exp; branches; next 1.37; 1.37 date 2004.04.05.13.37.30; author thl; state Exp; branches; next 1.36; 1.36 date 2004.01.08.15.29.40; author rse; state Exp; branches; next 1.35; 1.35 date 2003.12.17.11.58.48; author rse; state Exp; branches; next 1.34; 1.34 date 2003.12.04.15.21.13; author thl; state Exp; branches; next 1.33; 1.33 date 2003.11.28.11.21.06; author thl; state Exp; branches; next 1.32; 1.32 date 2003.11.25.13.38.00; author thl; state Exp; branches; next 1.31; 1.31 date 2003.11.11.20.08.06; author rse; state Exp; branches; next 1.30; 1.30 date 2003.10.28.14.46.56; author thl; state Exp; branches; next 1.29; 1.29 date 2003.10.19.07.16.29; author thl; state Exp; branches; next 1.28; 1.28 date 2003.09.30.13.34.26; author openpkg; state Exp; branches; next 1.27; 1.27 date 2003.09.24.11.28.49; author rse; state Exp; branches; next 1.26; 1.26 date 2003.09.19.08.10.34; author rse; state Exp; branches; next 1.25; 1.25 date 2003.09.17.08.29.01; author rse; state Exp; branches; next 1.24; 1.24 date 2003.09.16.10.18.54; author rse; state Exp; branches; next 1.23; 1.23 date 2003.09.15.11.49.29; author rse; state Exp; branches; next 1.22; 1.22 date 2003.08.06.15.52.44; author rse; state Exp; branches; next 1.21; 1.21 date 2003.08.06.15.26.43; author thl; state Exp; branches; next 1.20; 1.20 date 2003.08.06.13.37.34; author rse; state Exp; branches; next 1.19; 1.19 date 2003.07.10.14.53.26; author rse; state Exp; branches; next 1.18; 1.18 date 2003.07.07.14.26.31; author rse; state Exp; branches; next 1.17; 1.17 date 2003.06.11.11.04.01; author rse; state Exp; branches; next 1.16; 1.16 date 2003.06.03.13.44.01; author rse; state Exp; branches; next 1.15; 1.15 date 2003.05.16.09.38.50; author rse; state Exp; branches; next 1.14; 1.14 date 2003.04.07.15.38.40; author rse; state Exp; branches; next 1.13; 1.13 date 2003.03.30.12.10.39; author rse; state Exp; branches; next 1.12; 1.12 date 2003.03.30.11.34.22; author rse; state Exp; branches; next 1.11; 1.11 date 2003.03.20.20.23.28; author rse; state Exp; branches; next 1.10; 1.10 date 2003.03.20.20.17.53; author rse; state Exp; branches; next 1.9; 1.9 date 2003.03.20.16.32.12; author rse; state Exp; branches; next 1.8; 1.8 date 2003.03.19.14.53.07; author rse; state Exp; branches; next 1.7; 1.7 date 2003.03.18.15.54.31; author rse; state Exp; branches; next 1.6; 1.6 date 2003.03.18.15.44.45; author rse; state Exp; branches; next 1.5; 1.5 date 2003.03.18.15.26.15; author rse; state Exp; branches; next 1.4; 1.4 date 2003.03.18.10.18.04; author rse; state Exp; branches; next 1.3; 1.3 date 2003.02.18.15.57.01; author rse; state Exp; branches; next 1.2; 1.2 date 2003.01.23.14.29.33; author rse; state Exp; branches; next 1.1; 1.1 date 2003.01.23.11.32.43; author rse; state Exp; branches; next ; desc @@ 1.42 log @support HTTPS URLs @ text @## ## page.pl -- generate corresponding .html version for each .txt ## use strict; use IO::File; my @@SA = glob("OpenPKG-SA-*.txt"); my $this_year = "2004"; my $sidebar = 'Security Advisories:
';
foreach my $sa (reverse sort @@SA) {
my ($base, $name, $year) = ($sa =~ m|^(OpenPKG-SA-((\d+)\..+))\.txt$|);
next if ($name =~ m|^0000|);
if ($this_year ne $year) {
$sidebar .= "
\n";
$this_year = $year;
}
$sidebar .= "$name
";
}
foreach my $sa (reverse sort @@SA) {
$sa =~ s|\.txt$||s;
print "$sa";
my $io = new IO::File "<$sa.txt" or die;
my $txt = '';
$txt .= $_ while (<$io>);
$io->close;
my $L = {};
my $x = $txt;
$x =~ s%^\s*\[(\d+)\]\s+((?:https?|ftp|hkp)://\S+)%$L->{$1} = $2, ''%mge;
$txt =~ s/&/&/sg;
$txt =~ s/</sg;
$txt =~ s/>/>/sg;
$txt =~ s/((?:https?|ftp|hkp):\/\/[^\s]+[^\s\.\)\&])/$1<\/a>/sg;
$txt =~ s/([\s;]+)([a-zA-Z0-9_.-]+\@@[^\s\)\&]+?)([\s&]+)/$1$2<\/a>$3/sg;
$txt =~ s/(OpenPKG Security Advisory)/$1<\/b>/sg;
$txt =~ s/^((\s*[A-Z][a-zA-Z]+)+:)/$1<\/b>/mg;
$txt =~ s/(\[(\d+)\])(?!\s+(?:https?|ftp|hkp):\/\/)/"{$2} || print STDERR "WARNING: reference [$2] not defined\n")."\">".$1."<\/a>"/sge;
my $head = '';
$io = new IO::File "
Please review. History of this document can be found in CVS\n";
$hint .= "
Please review! History of this document can be found in CVS\n";
$hint .= "\n" . $txt . "
\n" .
$foot;
$io = new IO::File ">$sa.html" || die;
$io->print($out);
$io->close;
}
@
1.41
log
@flush pending changes
@
text
@d34 1
a34 1
$x =~ s%^\s*\[(\d+)\]\s+((?:http|ftp|hkp)://\S+)%$L->{$1} = $2, ''%mge;
d38 1
a38 1
$txt =~ s/((?:http|ftp|hkp):\/\/[^\s]+[^\s\.\)\&])/$1<\/a>/sg;
d42 1
a42 1
$txt =~ s/(\[(\d+)\])(?!\s+(?:http|ftp|hkp):\/\/)/"{$2} || print STDERR "WARNING: reference [$2] not defined\n")."\">".$1."<\/a>"/sge;
@
1.40
log
@warn if a reference is not defined (as it is still the case for the forthcoming MySQL SA
@
text
@d23 1
a23 1
foreach my $sa (@@SA) {
@
1.39
log
@for properly signed SAs, add link to their history, too
@
text
@d42 1
a42 1
$txt =~ s/(\[(\d+)\])(?!\s+(?:http|ftp|hkp):\/\/)/"{$2}."\">".$1."<\/a>"/sge;
@
1.38
log
@remove Perl warnings
@
text
@d75 1
@
1.37
log
@avoid files being incorrectly identified as signed; put note on invalid signatures
@
text
@d7 1
a7 1
use IO;
@
1.36
log
@always render all available SAs, but tag unreleased/unsigned ones with DRAFT header
@
text
@d26 1
a26 1
print "$sa\n";
d58 18
a75 2
if ($txt !~ m|^-----BEGIN PGP SIGNED MESSAGE-----|) {
$hint = "