public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: gcc-patches@gcc.gnu.org, marxin@gcc.gnu.org,
	Gerald Pfeifer <gerald@pfeifer.com>
Subject: Re: [wwwdocs] Add httpd redirects for texinfo trunk docs and for each release series
Date: Thu, 10 Nov 2022 12:01:27 +0000	[thread overview]
Message-ID: <Y2zoF5QzMd3fvlE4@redhat.com> (raw)
In-Reply-To: <20221109154139.4561-1-jwakely@redhat.com>

On 09/11/22 15:41 +0000, Jonathan Wakely wrote:
>I've tested that the redirects work on my own httpd server, and have
>verified that no new sphinx-generated docs match these patterns, and no
>old texinfo docs fail to match them (except for cases like index.html
>where a new file exists with the same name anyway so we don't need a
>redirect).

This has now been reported as PR web/107610. As I said there:

I've (temporarily) installed the redirects in a .htaccess on my own
site so you can test them.

Just replace "gcc.gnu.org" with "kayari.org" to check that it
redirects to a valid page of the gcc-12.2.0 docs:

https://kayari.org/onlinedocs/gccint/Test-Directives.html#Test-Directives
https://kayari.org/onlinedocs/gcc/Function-Attributes.html

This can be used to confirm that the regexes are working as intended.



>For example, on gcc.gnu.org:
>
>cd htdocs/onlinedocs/gcc-12.2.0
>
># All "missing" URLs are matched by these patterns:
>
>for i in {gcc,cpp}/*.html ; do test -f ../$i || echo $i ; done | grep -E -v '^(gcc|cpp)/([[:upper:]].*|_00(5f|40).*|aarch64-feature-modifiers|c99-like-fast-enumeration-syntax|compatibility_005f.*|dashMF|eBPF-Options|fdollars-in-identifiers|lto-dump-Intro|(m68k|msp430|picoChip|x86|zSeries).*|trigraphs).*\.html$'
>
>for i in gccint/*.html ; do test -f ../$i || echo $i ; done | grep -E -v '^gccint/([[:upper:]].*|(arm|define|input|poly|stack|window)_005f.*|compat-Testing|(epi|pro)logue-instruction-pattern|gcc-Directory|gcov-Testing|loop-iv|profopt-Testing|real-RTL-SSA-insns|shift-patterns|wi-arith.*)\.html$'
>
>for i in cppinternals/*.html ; do test -f ../$i || echo $i ; done | grep -E -v '^cppinternals/([[:upper:]].*)\.html$'
>
>
># No still-valid URLs are matched:
>
>for i in {gcc,cpp}/*.html ; do test -f ../$i && echo $i ; done | grep -E '^(gcc|cpp)/([[:upper:]].*|_00(5f|40).*|aarch64-feature-modifiers|c99-like-fast-enumeration-syntax|compatibility_005f.*|dashMF|eBPF-Options|fdollars-in-identifiers|lto-dump-Intro|(m68k|msp430|picoChip|x86|zSeries).*|trigraphs).*\.html$'
>
>for i in gccint/*.html ; do test -f ../$i && echo $i ; done | grep -E '^gccint/([[:upper:]].*|(arm|define|input|poly|stack|window)_005f.*|compat-Testing|(epi|pro)logue-instruction-pattern|gcc-Directory|gcov-Testing|loop-iv|profopt-Testing|real-RTL-SSA-insns|shift-patterns|wi-arith.*)\.html$'
>
>for i in  cppinternals/*.html ; do test -f ../$i && echo $i ; done | grep -E '^cppinternals/([[:upper:]].*)\.html$'
>
>
>I haven't added redirects for other sub-dirs such as gccgo, gfortran,
>libgomp etc. so if somebody cares about those, they should deal with
>them.
>
>OK for wwwdocs?
>
>-- >8 --
>
>Add redirects from /onlinedocs/gcc-X to the latest gcc-X.Y.0 release
>(which will need to be updated when a release is made).
>
>Also add redirects from URLs for old trunk docs such as
>https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html
>to the gcc-12 equivalent of that page.
>---
> htdocs/.htaccess | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
>diff --git a/htdocs/.htaccess b/htdocs/.htaccess
>index 18997d63..bf7124ea 100644
>--- a/htdocs/.htaccess
>+++ b/htdocs/.htaccess
>@@ -79,3 +79,17 @@ Redirect           /onlinedocs/libc		https://www.gnu.org/software/libc/manual/ht
> Redirect           /onlinedocs/standards	https://www.gnu.org/prep/standards/html_node/
>
> Redirect           /onlinedocs/ref		https://gcc.gnu.org/onlinedocs/gcc-4.3.2/
>+
>+Redirect           /onlinedocs/gcc-5/           https://gcc.gnu.org/onlinedocs/gcc-5.5.0/
>+Redirect           /onlinedocs/gcc-6/           https://gcc.gnu.org/onlinedocs/gcc-6.5.0/
>+Redirect           /onlinedocs/gcc-7/           https://gcc.gnu.org/onlinedocs/gcc-7.5.0/
>+Redirect           /onlinedocs/gcc-8/           https://gcc.gnu.org/onlinedocs/gcc-8.5.0/
>+Redirect           /onlinedocs/gcc-9/           https://gcc.gnu.org/onlinedocs/gcc-9.5.0/
>+Redirect           /onlinedocs/gcc-10/          https://gcc.gnu.org/onlinedocs/gcc-10.4.0/
>+Redirect           /onlinedocs/gcc-11/          https://gcc.gnu.org/onlinedocs/gcc-11.3.0/
>+Redirect           /onlinedocs/gcc-12/          https://gcc.gnu.org/onlinedocs/gcc-12.2.0/
>+
>+# Redirect URLs for old texinfo trunk docs to gcc-12
>+RedirectMatch permanent /onlinedocs/(gcc|cpp)/([[:upper:]].*|_00(5f|40).*|aarch64-feature-modifiers|c99-like-fast-enumeration-syntax|compatibility_005f.*|dashMF|eBPF-Options|fdollars-in-identifiers|lto-dump-Intro|(m68k|msp430|picoChip|x86|zSeries).*|trigraphs).*\.html$ https://gcc.gnu.org/onlinedocs/gcc-12/$1/$2.html
>+RedirectMatch permanent /onlinedocs/gccint/([[:upper:]].*|(arm|define|input|poly|stack|window)_005f.*|compat-Testing|(epi|pro)logue-instruction-pattern|gcc-Directory|gcov-Testing|loop-iv|profopt-Testing|real-RTL-SSA-insns|shift-patterns|wi-arith.*)\.html$ https://gcc.gnu.org/onlinedocs/gcc-12/gccint/$1.html
>+RedirectMatch permanent /onlinedocs/cppinternals/([[:upper:]].*)\.html$ https://gcc.gnu.org/onlinedocs/gcc-12/gccint/$1.html


      reply	other threads:[~2022-11-10 12:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 15:41 Jonathan Wakely
2022-11-10 12:01 ` Jonathan Wakely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y2zoF5QzMd3fvlE4@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    --cc=marxin@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).