Re: [DOCS] sphinx: use new Sphinx links
On Sat, 12 Nov 2022, Gerald Pfeifer wrote: > I am not aware of who added this, and why, nor actually even why, yet it > seems if we can get the same in place for /install we'll be good again, so > I'll ask overseers@. https://gcc.gnu.org/install/ is up and running fine now/again. > Next step: redirects from the old /install docs to the new ones. Gerald
Re: [DOCS] sphinx: use new Sphinx links
On Thu, 10 Nov 2022, Martin Liška wrote: > See that the problematic for some reason uses "content-security-policy: > default-src 'self' http: https:". Yep. On Thu, 10 Nov 2022, Tobias Burnus wrote: > content-security-policy: default-src 'self' http: https: > > There must be some server configuration that add this - but it does not > seem to be in the .ht* files in the wwwdocs git repo. And yep. I dug into this yesterday and found the following: In /etc/httpd/conf.d/sourceware-vhost-gcc.conf we have Header unset Content-Security-Policy I am not aware of who added this, and why, nor actually even why, yet it seems if we can get the same in place for /install we'll be good again, so I'll ask overseers@. Next step: redirects from the old /install docs to the new ones. Gerald
Re: [DOCS] sphinx: use new Sphinx links
Hi, On 10.11.22 11:03, Gerald Pfeifer wrote: On Thu, 10 Nov 2022, Martin Liška wrote: https://gcc.gnu.org/install/ is back with a new face. But it's not working properly due to some Content Security Policy: Hmm, it worked in my testing before and I just tried again: Firefox 106.0.1 (64-bit) Did you open the console (F12)? If I do, I see the errors: Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”). That's for line 18, which is '
Re: [DOCS] sphinx: use new Sphinx links
On 11/10/22 11:03, Gerald Pfeifer wrote: On Thu, 10 Nov 2022, Martin Liška wrote: https://gcc.gnu.org/install/ is back with a new face. But it's not working properly due to some Content Security Policy: Hmm, it worked in my testing before and I just tried again: Firefox 106.0.1 (64-bit) and now also Chrome 106.0.5249.119 and w3m. Which browser are you using? Any particular add-ons or special security settings? Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self' http: https:". Either the 'unsafe-inline' keyword, a hash ('sha256-wAI2VKPX8IUBbq55XacEljWEKQc4Xc1nmwVsAjAplNU='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback. That looks like it's related to some Javascript fun? Does sphinx pull in something? O, it does. A lot. I'm not using any Javascript blocker, though, so not sure why I am not seeing any such warnings? Searching for "+sphinx" and this message did not result in anything. (It feels a bit curious how the position in the web server's file system or a symlink could trigger something like that?) Looking at the source code of index.html I am wondering about versus all the .js inclusions later on. And https://validator.w3.org/nu/?doc=https%3A%2F%2Fgcc.gnu.org%2Finstall%2F and https://validator.w3.org/nu/?doc=https%3A%2F%2Fgcc.gnu.org%2Fonlinedocs%2Finstall%2F appear equally (un)happy. Gerald Well, I can also reproduce it on my mobile phone. Anyway, the difference is: $ curl https://gcc.gnu.org/install/index.html -v &> bad.txt $ curl https://gcc.gnu.org/onlinedocs/install/index.html -v &> good.txt $ diff -u good.txt bad.txt --- good.txt2022-11-10 11:33:45.293631904 +0100 +++ bad.txt 2022-11-10 11:33:37.813669264 +0100 @@ -32,31 +32,32 @@ * subjectAltName: host "gcc.gnu.org" matched cert's "gcc.gnu.org" * issuer: C=US; O=Let's Encrypt; CN=R3 * SSL certificate verify ok. 0 00 00 0 0 0 --:--:-- --:--:-- --:--:-- 0* Using HTTP2, server supports multiplexing +* Using HTTP2, server supports multiplexing * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 } [5 bytes data] * h2h3 [:method: GET] -* h2h3 [:path: /onlinedocs/install/index.html] +* h2h3 [:path: /install/index.html] * h2h3 [:scheme: https] * h2h3 [:authority: gcc.gnu.org] * h2h3 [user-agent: curl/7.86.0] * h2h3 [accept: */*] * Using Stream ID: 1 (easy handle 0x555bf890) } [5 bytes data] -> GET /onlinedocs/install/index.html HTTP/2 +> GET /install/index.html HTTP/2 > Host: gcc.gnu.org > user-agent: curl/7.86.0 > accept: */* > { [5 bytes data] < HTTP/2 200 -< date: Thu, 10 Nov 2022 10:33:45 GMT +< date: Thu, 10 Nov 2022 10:33:37 GMT < server: Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k mod_qos/11.70 mod_wsgi/4.6.4 Python/3.6 mod_perl/2.0.12 Perl/v5.26.3 < last-modified: Wed, 09 Nov 2022 18:51:10 GMT < etag: "8232-5ed0e23e07250" < accept-ranges: bytes < content-length: 0 < vary: Accept-Encoding +< content-security-policy: default-src 'self' http: https: < strict-transport-security: max-age=16070400 < content-type: text/html; charset=utf-8 < @@ -485,7 +486,7 @@ 100 0 100 00 0 61514 0 --:--:-- --:--:-- --:--:-- 61494 100 0 100 00 0 62652 0 --:--:-- --:--:-- --:--:-- 62768 * Connection #0 to host gcc.gnu.org left intact v> === See that the problematic for some reason uses "content-security-policy: default-src 'self' http: https:". And it uses 'Using HTTP2, server supports multiplexing' Martin
Re: [DOCS] sphinx: use new Sphinx links
On Thu, 10 Nov 2022, Martin Liška wrote: >> https://gcc.gnu.org/install/ is back with a new face. > But it's not working properly due to some Content Security Policy: Hmm, it worked in my testing before and I just tried again: Firefox 106.0.1 (64-bit) and now also Chrome 106.0.5249.119 and w3m. Which browser are you using? Any particular add-ons or special security settings? > Refused to apply inline style because it violates the following Content > Security Policy directive: "default-src 'self' http: https:". Either the > 'unsafe-inline' keyword, a hash > ('sha256-wAI2VKPX8IUBbq55XacEljWEKQc4Xc1nmwVsAjAplNU='), or a nonce > ('nonce-...') is required to enable inline execution. Note also that > 'style-src' was not explicitly set, so 'default-src' is used as a fallback. That looks like it's related to some Javascript fun? Does sphinx pull in something? O, it does. A lot. I'm not using any Javascript blocker, though, so not sure why I am not seeing any such warnings? Searching for "+sphinx" and this message did not result in anything. (It feels a bit curious how the position in the web server's file system or a symlink could trigger something like that?) Looking at the source code of index.html I am wondering about versus all the .js inclusions later on. And https://validator.w3.org/nu/?doc=https%3A%2F%2Fgcc.gnu.org%2Finstall%2F and https://validator.w3.org/nu/?doc=https%3A%2F%2Fgcc.gnu.org%2Fonlinedocs%2Finstall%2F appear equally (un)happy. Gerald
Re: [DOCS] sphinx: use new Sphinx links
On 11/10/22 10:35, Gerald Pfeifer wrote: On Thu, 10 Nov 2022, Martin Liška wrote: What do you think of keeping the latest under this shorter and simpler URL (too), though? Works for me. : I believe a symlink (in the file system) on gcc.gnu.org could pull that off. Yep, please do so. Done. https://gcc.gnu.org/install/ is back with a new face. But it's not working properly due to some Content Security Policy: Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self' http: https:". Either the 'unsafe-inline' keyword, a hash ('sha256-wAI2VKPX8IUBbq55XacEljWEKQc4Xc1nmwVsAjAplNU='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback. gcc.gnu.org/:42 Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self' http: https:". Either the 'unsafe-inline' keyword, a hash ('sha256-ySvT2PEZeueHGC1y2crNuNTfphBynFPP7i+U21fEgX0='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback. gcc.gnu.org/:47 Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self' http: https:". Either the 'unsafe-inline' keyword, a hash ('sha256-biLFinpqYMtWHmXfkA1BPeCY0/fNt46SAZ+BBk5YUog='), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback. gcc.gnu.org/:202 Refused to load the image 'data:image/svg+xml;charset=utf-8,http://www.w3.org/2000/svg"; viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">' because it violates the following Content Security Policy directive: "default-src 'self' http: https:". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback. Can you please take a look at it? Will you be reverting the link adjustments back from /onlinedocs/install/ to plain /install/ ? Yes, I can do that. Note how in style.mthml we have some special provisions for install/. Over the last years I have reduced those to a large extent. There is still a little bit post-processing going on right now including setting our CSS and our favicon. Well, the entire content of gcc.gnu.org/onlinedocs/install/ is *one* of our documentations and there should not be anything special about it. Does it make sense? Yes, things have evolved historically and there was a time we needed/wanted to treat /install especially, for example to retain the same (white) background color across. By now, if we are to make changes, we probably should rather make them across all of /onlinedocs - favicon and our CSS being two such changes. Not a critical priority, though, I guess. Gerald
Re: [DOCS] sphinx: use new Sphinx links
On Thu, 10 Nov 2022, Martin Liška wrote: >> What do you think of keeping the latest under this shorter and simpler >> URL (too), though? > Works for me. : >> I believe a symlink (in the file system) on gcc.gnu.org could pull that >> off. > Yep, please do so. Done. https://gcc.gnu.org/install/ is back with a new face. Will you be reverting the link adjustments back from /onlinedocs/install/ to plain /install/ ? >> Note how in style.mthml we have some special provisions for install/. >> >> Over the last years I have reduced those to a large extent. There is still >> a little bit post-processing going on right now including setting our CSS >> and our favicon. > Well, the entire content of gcc.gnu.org/onlinedocs/install/ is *one* of > our documentations and there should not be anything special about it. > Does it make sense? Yes, things have evolved historically and there was a time we needed/wanted to treat /install especially, for example to retain the same (white) background color across. By now, if we are to make changes, we probably should rather make them across all of /onlinedocs - favicon and our CSS being two such changes. Not a critical priority, though, I guess. Gerald
Re: [DOCS] sphinx: use new Sphinx links
On 11/10/22 09:28, Gerald Pfeifer wrote: Hi Martin, On Wed, 9 Nov 2022, Martin Liška wrote: Gerald I would like to ask you for further server actions related to the Sphinx documentation: sure, happy to help! 1) https://gcc.gnu.org/install/ - for the future we will use https://gcc.gnu.org/onlinedocs/install/ That's a (fair) bit longer and more complex URL. I understand the point about cross referencing older GCC releases and see benefits with that. What do you think of keeping the latest under this shorter and simpler URL (too), though? Hello. Works for me. I believe a symlink (in the file system) on gcc.gnu.org could pull that off. Yep, please do so. So please remove content of /www/gcc/htdocs-preformatted/install That'll make some things simpler. Note how in style.mthml we have some special provisions for install/. Over the last years I have reduced those to a large extent. There is still a little bit post-processing going on right now including setting our CSS and our favicon. Should we see how to move those over to the new setup, or would you drop that? Well, the entire content of gcc.gnu.org/onlinedocs/install/ is *one* of our documentations and there should not be anything special about it. Does it make sense? Cheers, Martin Gerald
Re: [DOCS] sphinx: use new Sphinx links
Hi Martin, On Wed, 9 Nov 2022, Martin Liška wrote: > Gerald I would like to ask you for further server actions related > to the Sphinx documentation: sure, happy to help! > 1) https://gcc.gnu.org/install/ - for the future we will use > https://gcc.gnu.org/onlinedocs/install/ That's a (fair) bit longer and more complex URL. I understand the point about cross referencing older GCC releases and see benefits with that. What do you think of keeping the latest under this shorter and simpler URL (too), though? I believe a symlink (in the file system) on gcc.gnu.org could pull that off. > So please remove content of /www/gcc/htdocs-preformatted/install That'll make some things simpler. Note how in style.mthml we have some special provisions for install/. Over the last years I have reduced those to a large extent. There is still a little bit post-processing going on right now including setting our CSS and our favicon. Should we see how to move those over to the new setup, or would you drop that? Gerald
Re: [DOCS] sphinx: use new Sphinx links
On Wed, 9 Nov 2022, Martin Liška wrote: > Gerald, can you please propagate changes I made to: > htdocs/style.mhtml file? Done. All pages live on gcc.gnu.org should be udpated now. (I'm at a conference and have been offline during daytime this week so far. If you want to run further changes, Friday and Monday should work fine.) Gerald
Re: [DOCS] sphinx: use new Sphinx links
On 11/9/22 12:22, Martin Liška wrote: > Gerald, can you please propagate changes I made to: > htdocs/style.mhtml file? Gerald I would like to ask you for further server actions related to the Sphinx documentation: 1) https://gcc.gnu.org/install/ - for the future we will use https://gcc.gnu.org/onlinedocs/install/ That's a way we can cross reference an older GCC release (e.g. https://gcc.gnu.org/onlinedocs/gcc-12.2.0/nstall/) So please remove content of /www/gcc/htdocs-preformatted/install 2) permanently redirect all '/install/', '/install/...*.html' to: https://gcc.gnu.org/onlinedocs/install/ Thank you, Martin
Re: [DOCS] sphinx: use new Sphinx links
Gerald, can you please propagate changes I made to: htdocs/style.mhtml file? Thanks, Martin On 11/9/22 12:13, Martin Liška wrote: > Pushed. > > --- > htdocs/about.html | 2 +- > htdocs/bugs/index.html | 4 ++-- > htdocs/faq.html| 6 +++--- > htdocs/news.html | 4 ++-- > htdocs/projects/beginner.html | 8 > htdocs/projects/documentation.html | 2 +- > htdocs/projects/gomp/index.html| 12 ++-- > htdocs/releases.html | 2 +- > htdocs/simtest-howto.html | 2 +- > htdocs/style.mhtml | 8 > htdocs/testing/index.html | 6 +++--- > 11 files changed, 28 insertions(+), 28 deletions(-) > > diff --git a/htdocs/about.html b/htdocs/about.html > index 7278cae6..92e88ad0 100644 > --- a/htdocs/about.html > +++ b/htdocs/about.html > @@ -17,7 +17,7 @@ > The web effort was originally led by Jeff Law. For the last two > decades or so Gerald Pfeifer has been leading the effort, but there are > many > -https://gcc.gnu.org/onlinedocs/gcc/Contributors.html";>contributors > + href="https://gcc.gnu.org/onlinedocs/gcc/contributors-to-gcc.html";>contributors > . > > The web pages are under git control. > diff --git a/htdocs/bugs/index.html b/htdocs/bugs/index.html > index aaef8915..9b53512b 100644 > --- a/htdocs/bugs/index.html > +++ b/htdocs/bugs/index.html > @@ -673,7 +673,7 @@ errors or malfunctioning programs. > It should not be necessary to recompile if you have changed > to a bug-fix release of the same version of the compiler; bug-fix > releases are careful to avoid ABI changes. See also the > -https://gcc.gnu.org/onlinedocs/gcc/Compatibility.html";>compatibility > + href="https://gcc.gnu.org/onlinedocs/gcc/binary-compatibility.html";>compatibility > section of the GCC manual. > > Standard conformance > @@ -689,7 +689,7 @@ However, some non-conforming constructs are allowed when > the command-line > option -fpermissive is used. > > The manual contains a section on > - href="https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Misunderstandings.html";> > + href="https://gcc.gnu.org/onlinedocs/gcc/known-causes-of-trouble-with-gcc/common-misunderstandings-with-gnu-c.html";> > Common Misunderstandings with GNU C++. > > > diff --git a/htdocs/faq.html b/htdocs/faq.html > index b09e3920..0556b737 100644 > --- a/htdocs/faq.html > +++ b/htdocs/faq.html > @@ -97,7 +97,7 @@ disadvantages. > The host/target specific installation notes for GCC include information > about known problems with installing or using GCC on particular platforms. > These are included in the sources for a release in INSTALL/specific.html, > -and the https://gcc.gnu.org/install/specific.html";>latest > version > +and the href="https://gcc.gnu.org/onlinedocs/install//host-target-specific-installation-notes-for-gcc.html";>latest > version > is always available at the GCC web site. > Reports of successful builds > for several versions of GCC are also available at the web site. > @@ -210,7 +210,7 @@ may have to take one of the following actions to arrange > that GCC uses > the GNU versions of those programs. > > To ensure that GCC finds the GNU assembler (the GNU linker), which > -are required by https://gcc.gnu.org/install/specific.html";>some > +are required by href="https://gcc.gnu.org/onlinedocs/install/host-target-specific-installation-notes-for-gcc.html";>some > configurations, > you should configure these with the same --prefix option as you used > for GCC. Then build & install GNU as (GNU ld) and proceed with > @@ -427,7 +427,7 @@ those generated files are out of date and try to > regenerate them. > transparently without requiring installation of any additional tools. > > If you modified some sources or when building from SVN you may also > -need https://gcc.gnu.org/install/prerequisites.html#TOC1";>some > +need href="https://gcc.gnu.org/onlinedocs/install/install/prerequisites.html#tools-packages-necessary-for-modifying-gcc";>some > additional tools. > > > diff --git a/htdocs/news.html b/htdocs/news.html > index e1384852..2b35dabc 100644 > --- a/htdocs/news.html > +++ b/htdocs/news.html > @@ -1020,7 +1020,7 @@ code now, and other ports will follow. > > Ben Elliston of Wasabi Systems, Inc. has converted the existing ARM > processor pipeline description to the new -href="https://gcc.gnu.org/onlinedocs/gccint/Processor-pipeline-description.html";>DFA > +href="https://gcc.gnu.org/onlinedocs/3.4.0/gccint/Processor-pipeline-description.html";>DFA > pipeline description model. > It will be part of the GCC 3.4.0 release. > > @@ -1075,7 +1075,7 @@ fix release only. > > Geoffrey Keating of Apple Computer, Inc., with support from Red Hat, > Inc., has contributed a > - href="https://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html#Precompiled%20Headers";> > + href="https://gcc.gnu.org/onlinedocs/3.4.0/gcc/Precompiled-Headers.html#Precompiled%20Head