From 8cc222771faf3d48a1472c9ec78504bc3090f4c6 Mon Sep 17 00:00:00 2001 From: Otto Urpelainen Date: Thu, 7 Oct 2021 08:42:52 +0300 Subject: [PATCH] Add link checker script Add a link checker script and instructions on how to run it. First run found some problems, fix those as well: * Escape some url templates from link creation with a '\' prefix, the templates need to be turned into valid urls by inserting a package name. * For some reason, the link checker cannot follow https://crates.io/crates/bodhi-cli. This tool is also packaged in the official Fedora repositories, and it is customary to refer to such tools simply by tool name, so replacing the link with that instead of excluding that link for the check. * https://bodhi.fedoraproject.org/updates/new requires authentication. It is not wrong to link there, but since the Bodhi web app main page also has a "New Update" button, replacing the link there, so even unauthenticated readers get a good experience. * Fix link to nonexistent page at src.fedoraproject.org with a link to site root, which is suitable in the context. --- README.md | 11 +++++++++++ check-links.sh | 3 +++ .../New_Package_Process_for_New_Contributors.adoc | 2 +- modules/ROOT/pages/Package_Orphaning_Process.adoc | 2 +- modules/ROOT/pages/Package_Update_Guide.adoc | 7 ++++--- modules/ROOT/pages/Upstream_Release_Monitoring.adoc | 2 +- 6 files changed, 21 insertions(+), 6 deletions(-) create mode 100755 check-links.sh diff --git a/README.md b/README.md index d97538c..1aaae40 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,17 @@ $ ./build.sh && ./preview.sh The result will be available at http://localhost:8080 +#### Checking links + +To check for broken links, +first install linkchecker: `sudo dnf install linkchecker`. +Ensure that `./preview.sh` is running, +then in another terminal window run: + +``` +./check-links.sh +``` + #### Installing Podman on Fedora Fedora Workstation doesn't come with Podman preinstalled by default diff --git a/check-links.sh b/check-links.sh new file mode 100755 index 0000000..8042e38 --- /dev/null +++ b/check-links.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +linkchecker http://localhost:8080 --complete --check-extern diff --git a/modules/ROOT/pages/New_Package_Process_for_New_Contributors.adoc b/modules/ROOT/pages/New_Package_Process_for_New_Contributors.adoc index 227f1a8..ed6bd3b 100644 --- a/modules/ROOT/pages/New_Package_Process_for_New_Contributors.adoc +++ b/modules/ROOT/pages/New_Package_Process_for_New_Contributors.adoc @@ -219,7 +219,7 @@ Could not push: Command '['git', 'push']' returned non-zero exit status 128 .... Then you don't have the necessary rights to modify that package branch. -View https://src.fedoraproject.org/rpms/PACKAGE_NAME to request those rights. +View `\https://src.fedoraproject.org/rpms/PACKAGE_NAME` to request those rights. For more information on using the Fedora package maintenance system, see the xref:Package_Maintenance_Guide.adoc[Package maintenance guide]. diff --git a/modules/ROOT/pages/Package_Orphaning_Process.adoc b/modules/ROOT/pages/Package_Orphaning_Process.adoc index 2e62ff6..9a3f5cb 100644 --- a/modules/ROOT/pages/Package_Orphaning_Process.adoc +++ b/modules/ROOT/pages/Package_Orphaning_Process.adoc @@ -16,7 +16,7 @@ the package should be given to the `orphan` user. The current list of maintainers can be found in the _Users & Groups_ tab of the setting for the package repo. The URL will look something like this: -`https://src.fedoraproject.org/rpms/PACKAGE_NAME/settings.` +`\https://src.fedoraproject.org/rpms/PACKAGE_NAME/settings.` . After the first step is finished, go again to the settings tab for your package's Pagure repository. diff --git a/modules/ROOT/pages/Package_Update_Guide.adoc b/modules/ROOT/pages/Package_Update_Guide.adoc index c8d84e7..4058681 100644 --- a/modules/ROOT/pages/Package_Update_Guide.adoc +++ b/modules/ROOT/pages/Package_Update_Guide.adoc @@ -201,7 +201,7 @@ The update workflow for releases of this type is: . Submit an update for the package with `fedpkg update`, the https://bodhi.fedoraproject.org/[Bodhi web interface], -or the https://crates.io/crates/bodhi-cli[Bodhi CLI tool]. +or the `bodhi-cli` tool. This causes the package to be sent to the https://docs.fedoraproject.org/en-US/quick-docs/repositories/#the-updates-testing-repository[updates-testing] repository. @@ -322,8 +322,9 @@ and include the updated `bar` in your update along with the updated `libfoo`. The `fedpkg` tool does not handle multi-package updates. -You can add multiple packages to an update using the https://bodhi.fedoraproject.org/updates/new[Bodhi web application], -or the command line tool. +You can create an update with multiple packages +with the https://bodhi.fedoraproject.org[Bodhi web application], +or with the `bodhi` command line tool. You can pass as many package names as you like to `bodhi updates new` command to create a new multi-package update, or use `bodhi updates edit` to edit an existing update. diff --git a/modules/ROOT/pages/Upstream_Release_Monitoring.adoc b/modules/ROOT/pages/Upstream_Release_Monitoring.adoc index 55867a6..741ba21 100644 --- a/modules/ROOT/pages/Upstream_Release_Monitoring.adoc +++ b/modules/ROOT/pages/Upstream_Release_Monitoring.adoc @@ -8,7 +8,7 @@ Get bug reports for a project's releases in Fedora's Bugzilla with three steps: . Add the project to https://release-monitoring.org[Anitya]. . Map the project to a Fedora package in Anitya. -. Tweak the monitoring setting for your packages at https://src.fedoraproject.org/rpms/[Fedora Package Sources]. +. Tweak the monitoring setting for your packages at https://src.fedoraproject.org[Fedora Package Sources]. [#bugzilla_bugs_by_the_new_hotness] == Bugzilla bugs by the-new-hotness