From d38b772456117a6eae57d29ad4dd68b279d27630 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Mon, 31 Jul 2023 14:48:37 +0200 Subject: [PATCH 01/12] Started a re-write of the docs, using CSV for tables and re-organizing parameter definitions --- docs/archinstall/Application.rst | 10 - docs/archinstall/Profile.rst | 16 -- docs/archinstall/general.rst | 117 ----------- docs/examples/binary.rst | 23 --- docs/index.rst | 32 +-- docs/installing/binary.rst | 52 ----- docs/installing/config_options.csv | 14 ++ docs/installing/guided.rst | 308 ++++++++++++++++++----------- 8 files changed, 208 insertions(+), 364 deletions(-) delete mode 100644 docs/archinstall/Application.rst delete mode 100644 docs/archinstall/Profile.rst delete mode 100644 docs/archinstall/general.rst delete mode 100644 docs/examples/binary.rst delete mode 100644 docs/installing/binary.rst create mode 100644 docs/installing/config_options.csv diff --git a/docs/archinstall/Application.rst b/docs/archinstall/Application.rst deleted file mode 100644 index c6eb0d4db2..0000000000 --- a/docs/archinstall/Application.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. _archinstall.Application: - -archinstall.Application -======================= - -This class enables access to pre-programmed application configurations. -This is not to be confused with :ref:`archinstall.Profile` which is for pre-programmed profiles for a wider set of installation sets. - - -.. autofunction:: archinstall.Application diff --git a/docs/archinstall/Profile.rst b/docs/archinstall/Profile.rst deleted file mode 100644 index a4c1f3bbde..0000000000 --- a/docs/archinstall/Profile.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. _archinstall.Profile: - -archinstall.Profile -=================== - -This class enables access to pre-programmed profiles. -This is not to be confused with :ref:`archinstall.Application` which is for pre-programmed application profiles. - -Profiles in general is a set or group of installation steps. -Where as applications are a specific set of instructions for a very specific application. - -An example would be the *(currently fictional)* profile called `database`. -The profile `database` might contain the application profile `postgresql`. -And that's the difference between :ref:`archinstall.Profile` and :ref:`archinstall.Application`. - -.. autofunction:: archinstall.Profile diff --git a/docs/archinstall/general.rst b/docs/archinstall/general.rst deleted file mode 100644 index 970d40f251..0000000000 --- a/docs/archinstall/general.rst +++ /dev/null @@ -1,117 +0,0 @@ -.. _archinstall.helpers: - -.. warning:: - All these helper functions are mostly, if not all, related to outside-installation-instructions. Meaning the calls will affect your current running system - and not touch your installed system. - -Profile related helpers -======================= - -.. autofunction:: archinstall.list_profiles - -Packages -======== - -.. autofunction:: archinstall.find_package - -.. autofunction:: archinstall.find_packages - -Locale related -============== - -.. autofunction:: archinstall.list_keyboard_languages - -.. autofunction:: archinstall.search_keyboard_layout - -.. autofunction:: archinstall.set_keyboard_language - -.. - autofunction:: archinstall.Installer.set_keyboard_layout - -Services -======== - -.. autofunction:: archinstall.service_state - -Mirrors -======= - -.. autofunction:: archinstall.filter_mirrors_by_region - -.. autofunction:: archinstall.add_custom_mirrors - -.. autofunction:: archinstall.insert_mirrors - -.. autofunction:: archinstall.use_mirrors - -.. autofunction:: archinstall.re_rank_mirrors - -.. autofunction:: archinstall.list_mirrors - -Disk related -============ - -.. autofunction:: archinstall.BlockDevice - -.. autofunction:: archinstall.Partition - -.. autofunction:: archinstall.Filesystem - -.. autofunction:: archinstall.device_state - -.. autofunction:: archinstall.all_blockdevices - -Luks (Disk encryption) -====================== - -.. autofunction:: archinstall.luks2 - -Networking -========== - -.. autofunction:: archinstall.get_hw_addr - -.. autofunction:: archinstall.list_interfaces - -.. autofunction:: archinstall.check_mirror_reachable - -.. autofunction:: archinstall.update_keyring - -.. autofunction:: archinstall.enrich_iface_types - -.. autofunction:: archinstall.get_interface_from_mac - -.. autofunction:: archinstall.wireless_scan - -.. autofunction:: archinstall.get_wireless_networks - -General -======= - -.. autofunction:: archinstall.log - -.. autofunction:: archinstall.locate_binary - -.. autofunction:: archinstall.SysCommand - -.. autofunction:: archinstall.SysCommandWorker - -Exceptions -========== - -.. autofunction:: archinstall.RequirementError - -.. autofunction:: archinstall.DiskError - -.. autofunction:: archinstall.ProfileError - -.. autofunction:: archinstall.SysCallError - -.. autofunction:: archinstall.ProfileNotFound - -.. autofunction:: archinstall.HardwareIncompatibilityError - -.. autofunction:: archinstall.PermissionError - -.. autofunction:: archinstall.UserError - -.. autofunction:: archinstall.ServiceException diff --git a/docs/examples/binary.rst b/docs/examples/binary.rst deleted file mode 100644 index 51dbd1dd39..0000000000 --- a/docs/examples/binary.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. _examples.binary: - -Binary executable -================= - -.. warning:: The binary option is limited and stiff. It's hard to modify or create your own installer-scripts this way unless you compile the source manually. If your usecase needs custom scripts, either use the pypi setup method or you'll need to adjust the PKGBUILD prior to building the arch package. - -The binary executable is a standalone compiled version of the library. -It's compiled using `nuitka `_ with the flag `--standalone`. - -Executing the binary --------------------- - -As an example we'll use the `guided `_ installer. -To run the `guided` installed, all you have to do *(after installing or compiling the binary)*, is run: - - -.. code-block:: console - - ./archinstall guided - -As mentioned, the binary is a bit rudimentary and only supports executing whatever is found directly under `./archinstall/examples`. -Anything else won't be found. This is subject to change in the future to make it a bit more flexible. diff --git a/docs/index.rst b/docs/index.rst index a76a58d642..c119507bd6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,8 +8,6 @@ archinstall Documentation Some of the features of Archinstall are: -* **No external dependencies or installation requirements.** Runs without any external requirements or installation processes. - * **Context friendly.** The library always executes calls in sequential order to ensure installation-steps don't overlap or execute in the wrong order. It also supports *(and uses)* context wrappers to ensure cleanup and final tasks such as ``mkinitcpio`` are called when needed. * **Full transparency** Logs and insights can be found at ``/var/log/archinstall`` both in the live ISO and the installed system. @@ -17,8 +15,8 @@ Some of the features of Archinstall are: * **Accessibility friendly** Archinstall works with ``espeakup`` and other accessibility tools thanks to the use of a TUI. .. toctree:: - :maxdepth: 3 - :caption: Running the installer + :maxdepth: 1 + :caption: Running Archinstall installing/guided @@ -36,34 +34,8 @@ Some of the features of Archinstall are: installing/python examples/python -.. toctree:: - :maxdepth: 3 - :caption: Archinstall as a binary - - installing/binary - examples/binary -.. - examples/scripting - -.. - .. toctree:: - :maxdepth: 3 - :caption: Programming Guide - -.. - programming_guide/requirements - programming_guide/basic_concept - .. toctree:: :maxdepth: 3 :caption: API Reference archinstall/Installer - archinstall/Profile - archinstall/Application - -.. toctree:: - :maxdepth: 3 - :caption: API Helper functions - - archinstall/general diff --git a/docs/installing/binary.rst b/docs/installing/binary.rst deleted file mode 100644 index eeb9d79d39..0000000000 --- a/docs/installing/binary.rst +++ /dev/null @@ -1,52 +0,0 @@ -.. _installing.binary: - -Binary executable -================= - -Archinstall can be compiled into a standalone executable. -For Arch Linux based systems, there's a package for this called `archinstall `_. - -.. warning:: - This is not required if you're running archinstall on a pre-built ISO. The installation is only required if you're creating your own scripted installations. - -Using pacman ------------- - -Archinstall is on the `official repositories `_. - -.. code-block:: console - - sudo pacman -S archinstall - -Using PKGBUILD --------------- - -The `source `_ contains a binary `PKGBUILD `_ which can be either copied straight off the website or cloned using :code:`git clone https://github.com/Torxed/archinstall`. - -Once you've obtained the `PKGBUILD`, building it is pretty straight forward. - -.. code-block:: console - - makepkg -s - -Which should produce an `archinstall-X.x.z-1.pkg.tar.zst` which can be installed using: - -.. code-block:: console - - sudo pacman -U archinstall-X.x.z-1.pkg.tar.zst - -.. note:: - - For a complete guide on the build process, please consult the `PKGBUILD on ArchWiki `_. - -Manual compilation ------------------- - -You can compile the source manually without using a custom mirror or the `PKGBUILD` that is shipped. -Simply clone or download the source, and while standing in the cloned folder `./archinstall`, execute: - -.. code-block:: console - - nuitka3 --standalone --show-progress archinstall - -This requires the `nuitka `_ package as well as `python3` to be installed locally. diff --git a/docs/installing/config_options.csv b/docs/installing/config_options.csv new file mode 100644 index 0000000000..ed313cbbaa --- /dev/null +++ b/docs/installing/config_options.csv @@ -0,0 +1,14 @@ +Key,Value(s),Description,Required +additional-repositories,[ `multilib `_!, `testing `_ ],Enables one or more of the testing and multilib repositories before proceeding with installation,No +archinstall-language,`lang `_,Sets the TUI language used *(make sure to use the ``lang`` value not the ``abbr``)*,No +audio_config,`pipewire `_!, `pulseaudio `_,Audioserver to be installed,No +bootloader,`Systemd-boot `_!, `grub `_,Bootloader to be installed *(grub being mandatory on BIOS machines)*,Yes +debug,``true``|``false``,Enables debug output,No +disk_config,*`read more under Disk Configuration <#>`_*,Contains the desired disk setup to be used during installation,No +disk_encryption,*`read more about under Disk Encryption <#>`_*,Parameters for disk encryption applied ontop of ``disk_config``,No +hostname,``str``,A string definining your machines hostname on the network *(defaults to ``archinstall``)*,No +kernels,[`linux `_!, `linux-hardened `_!, `linux-lts `_!, `linux-rt `_!, `linux-rt-lts `_!, `linux-zen `_],Defines which kernels should be installed and setup in the boot loader options,Yes +custom-commands,[ !, !, ...],Custom commands that will be run post-install chrooted inside the installed system,No +locale_config,{kb_layout: `lang `_!, sys_enc: `Character encoding `_!, sys_lang: `locale `_},Defines the keyboard key map!, system encoding and system locale,No +mirror_config,{custom_mirrors: [ https://... ]!, mirror_regions: { "Worldwide": [ "https://geo.mirror.pkgbuild.com/$repo/os/$arch" ] } },Sets various mirrors *(defaults to ISO's ``/etc/pacman.d/mirrors`` if not defined)*,No +network_config,*`see options under Network Configuration`*,Sets which type of *(if any)* network configuration should be used,No diff --git a/docs/installing/guided.rst b/docs/installing/guided.rst index c5e7f1ed65..c6b3d4d1e0 100644 --- a/docs/installing/guided.rst +++ b/docs/installing/guided.rst @@ -3,20 +3,16 @@ Guided installation =================== -| This is the default script the Arch Linux `Archinstall package `_. -| It will guide you through a very basic installation of Arch Linux. +Archinstall ships with a pre-programmed `Guided Installer `_ guiding you through the mandatory steps as well as some optional configurations that can be done. .. note:: - There are other scripts and they can be invoked by executing `archinstall