Fix broken links
v2 cover Fix broken links
Configure the linkcheck builder and replace broken links by archive links.
---
Changes in v2:
- Add an environment variable to include frequent links as part of the linkcheck build.
- Replace broken links with links from https://web.archive.org/
- Remove patch 3 -> 8 from v2, already applied.
- Link to v1: https://patch.msgid.link/[email protected]
---
Antonin Godard (3):
conf.py: add linkcheck builder exclusions for frequent links migration-guides/migration-3.4.rst: replace rlbl broken link
migration-guides: replace broken link with archive links
documentation/README | 14 ++++++++++++++ documentation/conf.py | 17 +++++++++++++++++ documentation/migration-guides/migration-3.4.rst | 2 +- documentation/migration-guides/migration-5.3.rst | 2 +- documentation/migration-guides/release-notes-4.3.rst | 2 +- documentation/migration-guides/release-notes-5.0.rst | 2 +- documentation/migration-guides/release-notes-5.3.rst | 3 ++- 7 files changed, 37 insertions(+), 5 deletions(-)
---
base-commit: 358519ca6406a89fee42c45dcaf63a37a374f33c
change-id: 20260710-linkcheck-7141a2ac36cf
PATCH v2 1/3 conf.py: add linkcheck builder exclusions for frequent links
The linkcheck builder can be used to scout for broken links. By looking at the output of:
grep -E -r --no-filename -o 'href="http.://[^/"]+' | sort | uniq -c | sort -nr
from the HTML output directory, exclude links that are too frequent.
Remove docs.yoctoproject.org links are those should already be validated when building the documentation, and add a LINKCHECK_NOT_NICE env variable that can be set to check for those links anyway.
--- documentation/README | 14 ++++++++++++++ documentation/conf.py | 17 +++++++++++++++++ 2 files changed, 31 insertions(+)
documentation/README +14 -0
@@ -163,6 +163,20 @@ or directories: $ make sphinx-lint SPHINXLINTDOCS="<file1> <file2>" $ make sphinx-lint SPHINXLINTDOCS=<dir> +Checking for broken links in the Yocto Project documentation +============================================================ + +To scout for broken links, the "linkcheck" builder from Sphinx can be used with +the following command: + + $ make linkcheck + +The builder is already configured in conf.py to exclude the links that are too +frequent in the documentation. You can enable linkcheck for these links by +setting the LINKCHECK_NOT_NICE environment variable to "1": + + $ LINKCHECK_NOT_NICE=1 make linkcheck + Sphinx theme and CSS customization ==================================
documentation/conf.py +17 -0
@@ -143,6 +143,23 @@ suppress_warnings = ['epub.unknown_project_files'] # sphinx-copybutton configuration copybutton_prompt_text = "$ " +# Don't check self-references to yocto-docs since they are already +# checked when building. +linkcheck_ignore = [r'https?://docs\.yoctoproject\.org.*'] + +# When using the linkcheck builder, ignore the following links which are too +# frequent in the docs, unless the LINKCHECK_NOT_NICE environment variable is set +# to 1. +if os.environ.get('LINKCHECK_NOT_NICE') != "1": + linkcheck_ignore.extend([ + r'https?://nvd\.nist\.gov.*', + r'https?://git\.yoctoproject\.org.*', + r'https?://git\.openembedded\.org.*', + r'https?://downloads\.yoctoproject\.org.*', + r'https?://mirrors\.kernel\.org.*', + r'https?://mirrors\.edge\.kernel\.org.*', + ]) + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for
Signature · 1 line
2.55.0
PATCH v2 2/3 migration-guides/migration-3.4.rst: replace rlbl broken link
In reply to Antonin GodardI could not find an archive link for prelink-2 but I did manage to find an archive of the first one, so link to the existing one only. The new link does not match the original one but this is where you are suppose to be redirected when opening the archived original one.
--- documentation/migration-guides/migration-3.4.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
documentation/migration-guides/migration-3.4.rst +1 -1
@@ -132,7 +132,7 @@ Prelinking disabled by default ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Recent tests have shown that prelinking works only when PIE is not -enabled (see `here <https://rlbl.me/prelink-1>`__ and `here <https://rlbl.me/prelink-2>`__), +enabled (see `here <https://web.archive.org/web/20211129050029/https://embed.endfa.net/yocto-cross-prelink-1/>`__), and as PIE is both a desirable security feature, and the only configuration provided and tested by the Yocto Project, there is simply no sense in continuing to enable prelink.
Signature · 1 line
2.55.0
PATCH v2 3/3 migration-guides: replace broken link with archive links
In reply to Antonin GodardReplace broken link with working archives found on
https://web.archive.org/.
--- documentation/migration-guides/migration-5.3.rst | 2 +- documentation/migration-guides/release-notes-4.3.rst | 2 +- documentation/migration-guides/release-notes-5.0.rst | 2 +- documentation/migration-guides/release-notes-5.3.rst | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-)
documentation/migration-guides/migration-5.3.rst +1 -1
@@ -247,7 +247,7 @@ The following variables have been removed: built during the build. This was partly broken and hard to maintain. - ``GPE_MIRROR``: this variable used to contain the - "http://gpe.linuxtogo.org/download/source" URL, but was not used by any + "https://web.archive.org/web/20160319203545/http://gpe.linuxtogo.org/download/source/" URL, but was not used by any recipe in OE-Core. Removed recipes
documentation/migration-guides/release-notes-4.3.rst +1 -1
@@ -73,7 +73,7 @@ New Features / Enhancements in 4.3 for the latest long-term release (6.1). - The list of fixed kernel CVEs is updated regularly using data from - `linuxkernelcves.com <https://linuxkernelcves.com>`__. + `linuxkernelcves.com <https://web.archive.org/web/20240420122324/https://www.linuxkernelcves.com/>`__. - A ``showconfig`` task was added to the :ref:`ref-classes-cml1` class, to easily examine the final generated ``.config`` file.
documentation/migration-guides/release-notes-5.0.rst +1 -1
@@ -166,7 +166,7 @@ New Features / Enhancements in 5.0 ``meta/lib/patchtest/tests``) and make a number of improvements to enable it to validate patches submitted on the mailing list again. Additionally, make it work with the original upstream version of - `Patchwork <http://jk.ozlabs.org/projects/patchwork/>`__. + `Patchwork <https://web.archive.org/web/20250823174533/http://jk.ozlabs.org/projects/patchwork/>`__. - Add an optional ``unimplemented-ptest`` QA warning to detect upstream packages with tests, that do not use ptest.
documentation/migration-guides/release-notes-5.3.rst +2 -1
@@ -253,7 +253,8 @@ New Features / Enhancements in |yocto-ver| the :term:`Poky` distro. - ``linux/generate-cve-exclusions``: use data from CVEProject instead of - the archived https://linuxkernelcves.com. + the archived https://linuxkernelcves.com (see + https://web.archive.org/web/20240420122324/https://www.linuxkernelcves.com/). - ``kernel-yocto``: allow annotated options to be modified. For example if the following kernel configuration is set::
Signature · 1 line
2.55.0
Antonin Godard
AppliedApplied, thanks!
[1/3] conf.py: add linkcheck builder exclusions for frequent links
commit: c7911771f24ffd7c54fa62ca18e0f877928855b2
[2/3] migration-guides/migration-3.4.rst: replace rlbl broken link
commit: 7c9e541c555fd43af3b4963c15500f6329738834
[3/3] migration-guides: replace broken link with archive links
commit: 3288e85934868917f10d66a9130bbdfa5e0ff763