From 00f9b18f43f0c3103281fe4c149a9029c7e61ef3 Mon Sep 17 00:00:00 2001 From: ayan Date: Fri, 18 Sep 2026 19:05:58 +0500 Subject: [PATCH] docs: fix sphinx build errors, broken links, and typos --- README.md | 4 ++-- docs/archinstall/Installer.rst | 2 +- docs/archinstall/plugins.rst | 4 ++-- docs/cli_parameters/config/disk_config.rst | 8 ++++---- docs/conf.py | 2 ++ docs/examples/python.rst | 6 +++--- docs/help/known_issues.rst | 2 +- docs/index.rst | 8 ++++++++ docs/installing/guided.rst | 4 +--- docs/installing/python.rst | 4 ++-- 10 files changed, 26 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index eb9749ea79..c8e42c4aa0 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ All available console fonts can be found in `/usr/share/kbd/consolefonts` and se ## Scripting interactive installation For an example of a fully scripted, interactive installation please refer to the example -[interactive_installation.py](https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py) +[interactive_installation.py](https://github.com/archlinux/archinstall/blob/master/examples/interactive_installation.py) > **To create your own ISO with this script in it:** Follow [ArchISO](https://wiki.archlinux.org/index.php/archiso)'s guide on creating your own ISO. @@ -182,7 +182,7 @@ This can be done by installing `pacman -S arch-install-scripts util-linux` local # qemu-system-x86_64 -enable-kvm -machine q35,accel=kvm -device intel-iommu -cpu host -m 4096 -boot order=d -drive file=./testimage.img,format=raw -drive if=pflash,format=raw,readonly,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd -drive if=pflash,format=raw,readonly,file=/usr/share/edk2/x64/OVMF_VARS.4m.fd This will create a *20 GB* `testimage.img` and create a loop device which we can use to format and install to.
-`archinstall` is installed and executed in [guided mode](#docs-todo). Once the installation is complete, ~~you can use qemu/kvm to boot the test media.~~
+`archinstall` is installed and executed in [guided mode](https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py). Once the installation is complete, ~~you can use qemu/kvm to boot the test media.~~
*(You'd actually need to do some EFI magic in order to point the EFI vars to the partition 0 in the test medium, so this won't work entirely out of the box, but that gives you a general idea of what we're going for here)* There's also a [Building and Testing](https://github.com/archlinux/archinstall/wiki/Building-and-Testing) guide.
diff --git a/docs/archinstall/Installer.rst b/docs/archinstall/Installer.rst index d1bbaa7c61..7211b83e09 100644 --- a/docs/archinstall/Installer.rst +++ b/docs/archinstall/Installer.rst @@ -8,4 +8,4 @@ You can look at this class as the installation you have or will perform. Anything related to **inside** the installation, will be found in this class. -.. autofunction:: archinstall.Installer +.. autoclass:: archinstall.lib.installer.Installer diff --git a/docs/archinstall/plugins.rst b/docs/archinstall/plugins.rst index 1022ab6f6b..bec418e845 100644 --- a/docs/archinstall/plugins.rst +++ b/docs/archinstall/plugins.rst @@ -13,7 +13,7 @@ The second method is via Python's built in `plugin discovery`_ using `entry poin ---------------------- The parameter has the benefit of being stored in the ``--conf`` state, meaning when re-running an installation — the plugin will automatically be loaded. -It's limitation is that it requires an initial path to be known and written and be cumbersome. +Its limitation is that it requires an initial path to be known and written and be cumbersome. Plugin Discovery ---------------- @@ -25,7 +25,7 @@ This mainly targets those who build their own ISO's and package specific setups What's supported? ----------------- -Currently the documentation for this is scarse. Until that is resolved, the best way to find supported features is to search the source code for `plugin.on_ `_ as this will give a clear indication of which calls are made to plugins. +Currently the documentation for this is scarce. Until that is resolved, the best way to find supported features is to search the source code for `plugin.on_ `_ as this will give a clear indication of which calls are made to plugins. How does it work? ----------------- diff --git a/docs/cli_parameters/config/disk_config.rst b/docs/cli_parameters/config/disk_config.rst index 1f4997774a..f7b9bf09bf 100644 --- a/docs/cli_parameters/config/disk_config.rst +++ b/docs/cli_parameters/config/disk_config.rst @@ -187,19 +187,19 @@ This example contains both subvolumes and compression. "btrfs": [ { "mountpoint": "/", - "name": "@", + "name": "@" }, { "mountpoint": "/home", - "name": "@home", + "name": "@home" }, { "mountpoint": "/var/log", - "name": "@log", + "name": "@log" }, { "mountpoint": "/var/cache/pacman/pkg", - "name": "@pkg", + "name": "@pkg" } ], "dev_path": null, diff --git a/docs/conf.py b/docs/conf.py index b85b5165ec..223615772a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,6 +54,8 @@ def setup(app) -> None: # type: ignore[no-untyped-def] 'sphinx_rtd_theme', ] +autodoc_mock_imports = ['parted'] + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/examples/python.rst b/docs/examples/python.rst index 1243aca5d6..e81736b598 100644 --- a/docs/examples/python.rst +++ b/docs/examples/python.rst @@ -24,12 +24,12 @@ Creating a script ----------------- Lets create a `test_installer` - installer as an example. This is assuming that the folder `./archinstall` is a git-clone of the main repo. -We begin by creating "`scripts`_:code:`/test_installer.py`". The placement here is important later. +We begin by creating :code:`scripts/test_installer.py`. The placement here is important later. This script can now already be called using :code:`python -m archinstall --script test_installer` after a successful installation of the library itself. But the script won't do much. So we'll do something simple like list all the hard drives as an example. -To do this, we'll begin by importing :code:`archinstall` in our "`scripts`_:code:`/test_installer.py`" and call a function within ``archinstall``. +To do this, we'll begin by importing :code:`archinstall` in our :code:`scripts/test_installer.py` and call a function within ``archinstall``. .. code-block:: python @@ -39,7 +39,7 @@ To do this, we'll begin by importing :code:`archinstall` in our "`scripts`_:code pprint(device_handler.devices) Now, go ahead and reference the :ref:`installing.python.manual` installation method. -After running ``python -m archinstall test_installer`` it should print something that looks like: +After running ``python -m archinstall --script test_installer`` it should print something that looks like: .. code-block:: text diff --git a/docs/help/known_issues.rst b/docs/help/known_issues.rst index 9094589488..064f08bd4f 100644 --- a/docs/help/known_issues.rst +++ b/docs/help/known_issues.rst @@ -20,7 +20,7 @@ Restarting ``systemd-timesyncd.service`` might work but most often you need to c If you know your time is correct on the machine, you can run ``archinstall --skip-ntp`` to ignore time sync. Waiting for Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete. `#2679`_ ------------------------------- +-------------------------------------------------------------------------------------- The ``archlinux-keyring-wkd-sync.service`` or ``archlinux-keyring-wkd-sync.timer`` can hang "indefinitely" sometimes. This is usually due to an inability to reach the key servers, or a slow connection towards key servers. diff --git a/docs/index.rst b/docs/index.rst index 9759524bac..726cd84769 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -18,6 +18,14 @@ Some of the features of Archinstall are: installing/guided +.. toctree:: + :maxdepth: 1 + :caption: Configuration + + cli_parameters/config/disk_config + cli_parameters/config/disk_encryption + cli_parameters/config/custom_commands + .. toctree:: :maxdepth: 3 :caption: Getting help diff --git a/docs/installing/guided.rst b/docs/installing/guided.rst index 562d2b2980..905b8f88fb 100644 --- a/docs/installing/guided.rst +++ b/docs/installing/guided.rst @@ -39,7 +39,7 @@ There are two configuration files, both are optional. This parameter takes a local :code:`.json` file as argument and contains the overall configuration and menu answers for the guided installer. ``--config-url`` ------------- +---------------- This parameter takes a remote :code:`.json` file as argument and contains the overall configuration and menu answers for the guided installer. @@ -296,7 +296,5 @@ Below is an example of how to set the root password and below that are descripti ``users`` is optional only if ``root_enc_password`` was set. ``users`` will be enforced otherwise and the minimum amount of users with sudo privileges required will be set to 1. -.. note:: - .. _scripts: https://github.com/archlinux/archinstall/tree/master/archinstall/scripts .. _Guided Installer: https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py diff --git a/docs/installing/python.rst b/docs/installing/python.rst index 6c4bb67c57..170b88ea05 100644 --- a/docs/installing/python.rst +++ b/docs/installing/python.rst @@ -3,7 +3,7 @@ Python library ============== -Archinstall ships on `PyPi `_ as `archinstall `_. +Archinstall ships on `PyPi `_ as `archinstall `_. But the library can be installed manually as well. .. warning:: @@ -50,7 +50,7 @@ You can either move the folder into your project and simply do import archinstall -Or you can PyPa's `build `_ and `installer `_ to install it into pythons module path. +Or you can use PyPA's `build `_ and `installer `_ to install it into pythons module path. .. code-block:: console