Mercurial > illumos > illumos-gate
changeset 10988:9d2e6b32f3a9
6896058 transition to xwiki broke Tonic build (nightly -O, mkreadme_osol)
author | Mike Kupfer <Mike.Kupfer@Sun.COM> |
---|---|
date | Fri, 06 Nov 2009 12:06:40 -0800 |
parents | 87270074111b |
children | 47a08e52035f |
files | usr/src/tools/opensolaris/README.opensolaris.tmpl usr/src/tools/scripts/mkreadme_osol.pl |
diffstat | 2 files changed, 53 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/tools/opensolaris/README.opensolaris.tmpl Fri Nov 06 15:00:02 2009 -0500 +++ b/usr/src/tools/opensolaris/README.opensolaris.tmpl Fri Nov 06 12:06:40 2009 -0800 @@ -1,7 +1,5 @@ OpenSolaris Buildable Source -#ident "%Z%%M% %I% %E% SMI" - Note: if this is your first OpenSolaris installation, please see the currently known issues section below to see the minimum build of Solaris Express - Community Release required to build and install @@ -24,7 +22,7 @@ archives-20050612/i386/). You should review Section A (changes since the last delivery) and Section B (known issues) before following the BFU instructions in the Developer's Reference -(http://www.opensolaris.org/os/community/onnv/devref_toc/). +(http://hub.opensolaris.org/bin/view/Community+Group+on/devref_toc). If you want to build from source, you will need the source, compiler, ON tools, and "extras" tools. The encumbered binaries tarball contains @@ -36,9 +34,10 @@ binaries. Currently, to obtain source, you can either download the -on-src-DATE.tar.bz2 tarball if you are downloading a build-synchronised -delivery. Or, you can checkout from the Mercurial repository at -(please see instructions at: http://opensolaris.org/os/project/onnv/) +on-src-DATE.tar.bz2 tarball if you are downloading a +build-synchronised delivery. Or, you can checkout from the Mercurial +repository; please see instructions at: +http://hub.opensolaris.org/bin/view/Project+onnv/WebHome The buildable source contains the source for our high key-strength crypto, known as the Encryption Kit (SUNWcry, SUNWcryr, SUNWcryptoint). @@ -60,12 +59,12 @@ These were some of the major known issues at the time of this delivery. The most recent list is available on the OpenSolaris.org website in the Nevada community at: -http://opensolaris.org/os/community/onnv/known_issues/ +http://hub.opensolaris.org/bin/view/Community+Group+on/known_issues -<!-- #include http://opensolaris.org/os/community/onnv/known_issues --> +<!-- #include http://hub.opensolaris.org/bin/view/Community+Group+on/known_issues --> Installing from Source ---------------------- -<!-- #include http://opensolaris.org/os/community/onnv/install_quickstart --> +<!-- #include http://hub.opensolaris.org/bin/view/Community+Group+on/install_quickstart -->
--- a/usr/src/tools/scripts/mkreadme_osol.pl Fri Nov 06 15:00:02 2009 -0500 +++ b/usr/src/tools/scripts/mkreadme_osol.pl Fri Nov 06 12:06:40 2009 -0800 @@ -21,11 +21,9 @@ # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # # Generate README.opensolaris from a template for inclusion in a @@ -47,8 +45,8 @@ # # Markers in the web pages that we download. # -my $begin_data = qr/<!-- begin_data --><pre>/; -my $end_data = qr/<\/pre><!-- end_data -->/; +my $begin_data = qr/\[begin README tag - do not delete\]/; +my $end_data = qr/\[end README tag - do not delete\]/; my $readme_fn = shift || die "missing README filepath\n"; open(README_OUT, ">$readme_fn") || die "couldn't open $readme_fn\n"; @@ -67,24 +65,64 @@ $ENV{"http_proxy"} = $ENV{"HTTP_PROXY"}; } +# +# Make a pass through the input file and download any web pages that +# are included by reference. +# foreach (@lines) { chomp; if (/^<!-- #include (.+) -->$/) { my $url = $1; print "Getting $url\n"; + # Download the page into $content{$url}. $content{$url} = `/usr/sfw/bin/wget -q -O - -T $timeout -t $tries $url`; if (! $content{$url}) { die "$url: invalid or empty URI.\n"; } + # + # Clean up the downloaded contents: remove carriage + # returns, strip out content that is outside the + # delimiter tags, convert HTML-encoded characters back + # into plain text. + # $content{$url} =~ s/\r//g; my @c = split /\n/, $content{$url}; - while ((my $l = shift @c) !~ /$begin_data/) {}; - while ((pop @c) !~ /$end_data/) {}; + my $l; + # Work forwards to find start. + while (defined ($l = shift @c)) { + if ($l =~ /$begin_data/) { + last; + } + } + if (! defined $l) { + print "Warning: content start delimiter not found\n"; + } else { + # Work backwards to find end. + while (defined ($l = pop @c)) { + if ($l =~ /$end_data/) { + last; + } + } + if (! defined $l) { + print "Warning: content end delimiter ", + "not found\n"; + } + } $content{$url} = join "\n", @c; + $content{$url} =~ s/&/&/g; + $content{$url} =~ s/</</g; + $content{$url} =~ s/</</g; + $content{$url} =~ s/>/>/g; + $content{$url} =~ s/>/>/g; } } +# +# Make a second pass through the input file. Pass most text on +# verbatim; replace #include directives with the content that was +# downloaded by the previous pass. +# foreach (@lines) { if (/^<!-- #include (.+) -->$/ && exists($content{$1})) { print README_OUT $content{$1};