public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [wwwdocs] Add httpd redirects for texinfo trunk docs and for each release series
@ 2022-11-09 15:41 Jonathan Wakely
  2022-11-10 12:01 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Wakely @ 2022-11-09 15:41 UTC (permalink / raw)
  To: gcc-patches; +Cc: marxin, Gerald Pfeifer

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).

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
-- 
2.38.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [wwwdocs] Add httpd redirects for texinfo trunk docs and for each release series
  2022-11-09 15:41 [wwwdocs] Add httpd redirects for texinfo trunk docs and for each release series Jonathan Wakely
@ 2022-11-10 12:01 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2022-11-10 12:01 UTC (permalink / raw)
  To: gcc-patches, marxin, Gerald Pfeifer

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-10 12:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09 15:41 [wwwdocs] Add httpd redirects for texinfo trunk docs and for each release series Jonathan Wakely
2022-11-10 12:01 ` Jonathan Wakely

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).