From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7B5603858C60 for ; Thu, 10 Nov 2022 12:01:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7B5603858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668081690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UJov5KSUwdyEBfeiNJFEusyl/8CPMJwn1xpx5zTaBMI=; b=Ow24iKBkpcZuztHXzOP9sphD4LX+G1Jsw2UZ4vFA6KGsBYu7Df2Ir2IoZZbPy8hCo9rAZX kOcykVUfeT2kCXRIsQrULC3rnmrVfXXNuoKs6JhauxDj93cLP7FNNXGr2QXDk7Oa1BxN+F GVcRM9dYn9bUUQEPzZpejtI98RojI70= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-582-pRvSrRZYPtCsyH3STN74jg-1; Thu, 10 Nov 2022 07:01:29 -0500 X-MC-Unique: pRvSrRZYPtCsyH3STN74jg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B33003C11048; Thu, 10 Nov 2022 12:01:28 +0000 (UTC) Received: from localhost (unknown [10.33.36.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6FDF92027061; Thu, 10 Nov 2022 12:01:28 +0000 (UTC) Date: Thu, 10 Nov 2022 12:01:27 +0000 From: Jonathan Wakely To: gcc-patches@gcc.gnu.org, marxin@gcc.gnu.org, Gerald Pfeifer Subject: Re: [wwwdocs] Add httpd redirects for texinfo trunk docs and for each release series Message-ID: References: <20221109154139.4561-1-jwakely@redhat.com> MIME-Version: 1.0 In-Reply-To: <20221109154139.4561-1-jwakely@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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