Archinstall

Latest version: v2.8.3

Safety actively analyzes 682457 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 12

2.4.0.rc2

:information_source: **Changes up until: 7f0ccbe87ed64dc25a2948579b332e1a7b6b0403**

Breaking Changes

* `archinstall.SysCommand*` now properly raises exceptions when exit codes are bad. This used to go by unnoticed in some cases, which caused silent errors. The flip-side to this is that it may now be overly aggressive and cause breakage at certain points. In which case the call itself should be wrapped around a catch block. As an example:
python
if (result := archinstall.SysCommand("ls --breaking-arguments")).exit_code != 0

Should now be:
python
try:
result = archinstall.SysCommand("ls --breaking-arguments")
except SysCallError as error:
if error.exit_code != 0:

This avoids the risk of calls silently passing errors.
* [archinstall/lib/models/network_configuration.py](https://github.com/archlinux/archinstall/compare/f6d133804b7fdfab5a00d95a1985c3e220935ac1..master#diff-c9aaaf680d2c34a39973759a911376f8dcec3c86da6a7b6d5d80cb78a0bfaea3) has been added to more strictly handle different data classes, instead of dictionaries. More models will be added and have been added, but will move under `models/` in a near future.
* `archinstall.Filesystem().load_layout()` now looks for the keyword `"wipe": True` and not `"format": True`. This is to avoid confusion as to what the menu alternatives does, for instance *"mark partition for wiping"* as well as avoid mixing up the format options like `"filesystem"` and other options during formatting.
* `archinstall.find_package()` now returns a [data class](https://docs.python.org/3/library/dataclasses.html) to make it easier to detect upstream changes during normal operation. If [pydantic](https://pydantic-docs.helpmanual.io/) ever becomes a built-in, we'll use that instead. *(This change affects `archinstall.find_packages()` as well)*
* `archinstall.lib.packages.py` has been split and moved into `/lib/packages/*.py` *(exposed the same way, so should not cause any issues)*
* `python -m archinstall` now includes a loader to look for archinstall in `./` for testing. This may or may not cause confusion or path issues that we haven't found yet. That also means that if you execute the modules with a folder called `./archinstall` that will have priority over any installed library via `pip` or `pacman` *(this is to prioritize testing)*
* `archinstall.generic_multi_select` and `archinstall.generic_select` now uses the new menu system. Return values should remain the same.
* *(Potentially breaking change)* `ConfigurationOutput` has been added in [archinstall/lib/configuration.py](https://github.com/archlinux/archinstall/compare/f6d133804b7fdfab5a00d95a1985c3e220935ac1..master#diff-79640b2e97d003480ce80b9cfce8ef09c2dc0338e1024d02cd5e314e57aec946) to deal with configuration aspects of archinstall. It's in charge of showing, storing and loading different configurations in one place. Previously this was done by guided, and then `__init__.py` for a brief moment.
* `archinstall.all_disks` have been renamed to `archinstall.all_blockdevices` *(an alias still exists, but is deprecated)*
* ~~`archinstall.all_disks`~~ `archinstall.all_blockdevices` no longer relies on `lsblk` for information, instead a combination of `/sys/class/block/*` and `blkid` is used.
* ~~`archinstall.all_disks`~~ `archinstall.all_blockdevices` now returns dataclasses for the objects, rather than dictionary/string objects. This will be a significant change for anyone dealing with block devices manually before.
* `archinstall.Installer().configure_nic` now takes a `NetworkConfiguration` data class structure. This will only be an issue if you've manually created installation steps and configured network manually, this will have no effect on the guided installer.
Note that `nic` in the `user_configuration.json` has changed to reflect the above change.
* [archinstall/lib/user_interaction.py](https://github.com/archlinux/archinstall/compare/8d15683752c0559c04680da6944a779ab4369f9d..master#diff-991834f970d8b0af702afcd0581ed8edc8fd87c0aec535af2d375e04b0518a43) has been split into multiple files as it outgrew it's simple purpose. It now lives in [archinstall/lib/user_interaction/__init__.py](https://github.com/archlinux/archinstall/compare/8d15683752c0559c04680da6944a779ab4369f9d..master#diff-99167479cdac68c1e3e51b525276358c4bcfc47a47ff733c7dc2e8bbf5e59ce3) and it's subdirectory, imports should work the same, but might cause some breakage here and there. Breakage should be considered a bug and we've probably just missed one import somewhere to expose the different calls. Please do report these.

New Features

* A completely new menu system *(still accessibility friendly)* using [simple-term-menu](https://github.com/IngoMeyer441/simple-term-menu) as the base *(bundled with this source to avoid external dependencies. A big thank you to Ingo Meyer and his employer at the time)*:
![screenshot](https://user-images.githubusercontent.com/861439/160357312-5bc564da-0a69-4e5a-9a55-f81dc02bc023.png)
A enormous thank you to wllacer and svartkanin who's put in more than 1200 lines of code to get this working nicely.
* Localization/Translation options for all archinstall output *(Currently `us`, `es` and `se` is available)*. To contribute please read the [translation contribution README](https://github.com/archlinux/archinstall/blob/f6d133804b7fdfab5a00d95a1985c3e220935ac1/archinstall/locales/README.md)
* Introduction of pytest test cases for a lot of the code
* `archinstall.package_search()` was added to streamline the package search into one place, and move the logic for parsing the results into `find_package()` instead.
* `archinstall.Installer().minimal_installation` now has two new flags, `testing=False` and `multilib=False`.
* `archinstall.Installer()` now has a new function `.enable_multilib_repository()` which enables multilib in the pacman conf.
* `archinstall.Installer()` now has a new function `.enable_testing_repositories()` which enables testing repos in the pacman conf.
* Created `archinstall.load_config()` and `archinstall.save_config()` functions for loading and saving configurations, instead of having it in guided. This should allow people to seamlessly load configurations and save it through the "archinstall" format. No need to create your own format and configurations unless you want to. Arguments are always initialized through `archinstall.storage['arguments']` but this should allow for processing configurations through `--conf` independent of guided.
* `archinstall.post_process_arguments()` has been added and will be execute after loading of configurations. This cleans up any arguments and converts it to proper archinstall structures.
* The `.uuid` property of `archinstall.Partition()` and `archinstall.BlockDevice()` now uses `blkid` instead of `lsblk`, which should improve reliability and stability when used together with `partprobe`.
* Improvements to the BTRFS handling has been made, namely allowing for more complex layouts. Among those things are also the option for `compression` and `nodatacow`.
* Partitions now has a *"bind name"* definition to deal with BTRFS *"virtual"* namespace. `archinstall.split_bind_name()` can split partition representations into traditional `/dev/x` and `/`.
* `archinstall.Partition().end_sectors` has been added to give the sector at which the partition ends, `.size` now uses `lsblk` to return the size.
* `archinstall.Partition().device_path` now returns `/dev/x` even if the partition has a logical namespace attached to it.
* `archinstall.Partition().bind_name` has been added to get the logical namespace for a partition
* `archinstall.Partition().partprobe` now only calls partprobe on the partition itself, rather than system wide.
* `archinstall.Partition().format()` now homogenize the name of the filesystem to format so that `vfat` and `fat32` are treated equally for instance.
* `archinstall.Partition().mount()` now handles BTRFS virtual namespaces by checking the `.bind_name` property and adds the corresponding mount options required.
* `archinstall.SysCommand*` now escapes `VT100` escape codes by default on the output when iterating over the result output.
* Multiple partitions now store a `key-file` for each partition, but not for multiple subvolumes using the same luks volume.
* `archinstall.Installer()` now keeps track of which packages have been installed.
* `archinstall.minimal_installation()` now enables periorid trim by default
* `archinstall.add_bootloader()` now sets `--removable` for GRUB on UEFI to try and eliminate some oddities where EFI wouldn't boot the GRUB setup.
* `archinstall.SysCommand*` now allows to override system locales. By default `en_US` locale will be set. But this could be useful for overriding locales and get output in another language. Keep in mind that output matching *(`if b'example' in SysCommand("ssh x")` would need to be localized from 'example' to for instance 'exempel' in swedish if you override `en_US`)*
* `archinstall.list_installed_locales()` has been added to list the available locales
* `archinstall.list_timezones()` has been added to show available time-zones using `timedatectl` as the source of truth
* `archinstall.update_keyring()` has been added as a specific call to make it clear what we're doing in guided. Guided will now attempt update the keyring if it's out of date. This function is deprecated upon release and will be removed once stability to `archlinux-keyring` can be guaranteed. *(Upstream is tracking this in a private issue https://gitlab.archlinux.org/archlinux/archlinux-keyring/-/issues/4)*
* Examples have been created for `--disk_layouts`, `--creds` and `--conf`. Since they are now split into separate files to comply with security concerns when sharing user configurations publicly. This makes supporting easier, and multiple machine setups easier as they can share common `--conf` but have different `--disk_layouts` for instance.
* `profiles/applications/pipewire.py` has been added as a application profile to properly configure pipewire
* Python based `qtile` has been added as a new Windows Manager (WM)
* `archinstall.group_search()` have been added to return information about a package group
* `archinstall.get_subvolumes_from_findmnt()` takes a `findmt` JSON struct and yields `BtrfsSubvolume` dataclasses for each result found.
* `archinstall.get_subvolume_info()` takes a path, and returns a `dict` containing all the information about the subvolume
* [archinstall/lib/disk/dmcryptdev.py](https://github.com/archlinux/archinstall/compare/f6d133804b7fdfab5a00d95a1985c3e220935ac1..master#diff-9c7a56657c464a44a53daf8699a5d6d431ec52de06c98913f205915c6f31610e) data class has been added to separate logic between block devices, loopdevices and `dmcrypt` devices specifically.
* `DMCryptDev().MapperDev` can be used to access the mapper device associated. `dm-0 -> /dev/mapper/luksloop` for instance.
* `DMCryptDev().mountpoint` can be used to see where the cryptdev is mounted
* `DMCryptDev().filesystem` returns the mapperdev's filesystem
* [archinstall/lib/disk/mapperdev.py](https://github.com/archlinux/archinstall/compare/f6d133804b7fdfab5a00d95a1985c3e220935ac1..master#diff-3806df57c5448d45c5baa85d5a714a16bf7448e2fdf9194e3395ca22c6c98b0b) data class has been added just like dmcryptdev to separate logic between devices further.
* `MapperDev().subvolumes` is one of the few/many helper functions which returns subvolumes on the specified `/dev/mapper/<dev>` device.
* `archinstall.blkid()` has been added to help with calling, parsing and returning data from `blkid`. Returns a `dict` with the information.
* `archinstall.get_loop_info()` returns `losetup` information in a `dict` structure
* `archinstall.enrich_blockdevice_information` can enrich `blkid` and other structures with information from `/sys/class/block/*`
* `archinstall.uevent()` is a parser for `/sys/class/block/{dev_name}/uevent` information
* `archinstall.get_blockdevice_uevent()` retrieves information for a given `/sys/class/block/{dev_name}/uevent` dev name.
* `archinstall.get_parent_of_partition()` returns a string path to the parent of a partition
* `archinstall.find_mountpoint()` returns a `dict` containing information returned from `findmnt` without additional parsing
* `archinstall.get_all_targets()` cleans up `findmnt` and returns only the mount point based on looking at targets
* `archinstall.Partition().mountpoint` has been added to make it easier to access where a partition is mounted.
* `archinstall.Partition().subvolumes` has been added and iterates all subvolumes under the specific partition
* `archinstall.TranslationError` is a new exception that might pop up
* `archinstall.Installer().add_bootloader()` now called separate functions for the three different supported boot loader. The code does the same more or less, just separated into functions for easier maintenance.
* `archinstall.Installer().add_systemd_bootloader()`
* `archinstall.Installer().add_grub_bootloader()`
* `archinstall.Installer().add_efistub_bootloader()`
* `archinstall.Installer().enable_sudo` now places configurations in `/etc/sudoers.d/*` instead of modifying `/etc/sudoers`.
* `archinstall.log()` now supports a few more new colors:
![screenshot](https://user-images.githubusercontent.com/861439/160356911-876c0fd8-a8e3-4359-99c2-d656474086e6.png)
* `archinstall.run_pacman()` has been added to deal with calling `pacman`.
In the future, this call will try to re-run failed pacman executions, but for now it simply adds some error handling for one attempt.

Plugin changes

* `on_user_created` has been added to perform post-creation actions on user profiles

Profile changes

* [profiles/sway.py](https://github.com/archlinux/archinstall/compare/f6d133804b7fdfab5a00d95a1985c3e220935ac1..master#diff-d3ba6343a4fb4822a252d9a13c6e858135e510a883a1f011064c74402fbacee7) now uses `foot` instead of `alacritty` as the default terminal

Minor changes and bug fixes

* `archinstall.define_arguments()` has been added to separate the logic of setting up `ArgumentParser` arguments.
* Fixed all arguments so that they support both `--x="something"` and `--x "something"`.
* Typing has been added throughout archinstall
* Added a lot of tweaks and bug fixes to how we handle partitions, which should eliminate a bunch of issues surrounding sorting of partitions as well as working with them through the `partition["device_instance"]`.
* `archinstall.Filesystem().partprobe` now only calls partprobe on the target filesystem, not system wide.
* `archinstall.Boot()` now properly exits cleanly when the temporary boot shuts down. Previously it only took into account the `shutdown now` call exit code, which could sometimes exit badly even tho the machine spun down properly. Now it checks both `shutdown now` and the containers process for an exit code.
* Guided has been updated to use the new menu system, as well as code made simpler by leaning on `archinstall` library calls for many things
* `only_hdd.py` has been added as an example, of how to only manage partitions and not installing.
* `kwrite` replaced `kate` in the KDE profile
* `sway` now checks if nvidia is being used, in which case it warns that it's not supported.
* `network-manager-applet` has been removed from `xfce4`
* The `xorg` profile now properly sets `amdgpu` modules in the mkinitcpio hooks
* The build-system has been changed/updated to not use flit for everything
* archinstall is now a [reproducible](https://reproducible.archlinux.org/api/v0/builds/241537/log) build
* Fixed some URL's in the README to work better across documentation platforms

2.3.3

Not secure
Bug Fixes

* Fixes 1031 which was introduced in v2.3.2 to combat 998
* `--help` not showing `--disk-layouts` and partially incorrect handling of the argument has been fixed.

2.3.3rc1

Bug Fixes

* Fixes 1031 which was introduced in v2.3.2 to combat 998

2.3.2

Not secure
Bug fixes:
========

* Fixed a critical issue where if manual partitioning was performed, and the harddrive(s) selected had multiple partitions - and a disk encryption password was given afterwards, all partitions would get encrypted regardless of usage (which would encrypt prior data on other partitions in play by the harddrive selection). Multi-disk setups where only one drive was selected was fine for instance, but selecting both to re-use `/boot` would cause issues. 998
* Fixed an issue where new partitions did not show up, because there was no GPT/MBR partition table on clean disks, this should fix 813

2.3.1

Not secure
Breaking Changes

There should be no breaking changes. But btrfs support is still in early shape so some layouts might still not be *"supported"*.
But do note that some errors that went silently by before, now raises exceptions. Such as `archinstall.Filesystem().partprobe()`.

Deprecated features

* `/home` will be changed for next release, and instead of being set to `MIN_SIZE_TO_ALLOW_HOME_PART` it will be a user question that users can opt-in rather than us pushing it as a best practice. It was after reports that this was a desired behavior that we introduced it. But it's caused more trouble than it's worth. So anyone who wants a separate `/home` in the future will be asked so. Or they can do `archinstall --dry-run` to generate a `/var/log/archinstall/user_disk_layouts.json` and modify it to add a `/home` volume.
For this version tho, we've increased the `/` volumes to `40 GiB` to make it a bit more spacious.

New features

* Default timeout in `systemd-boot` has changed from 5 to 15 seconds.
* BTRFS subvolume default layout has changed to something that hopefully works with snapper/timeshift *(not tested, but in theory should worK)*:

"": "/",
"home": "/home",
"log": "/var/log",
"pkg": "/var/cache/pacman/pkg",
".snapshots": "/.snapshots"

* `archinstall.Installer()` now keeps track of which packages have been installed with `archinstall.Installer().pacstrap()` in the variable `archinstall.Installer().installed_packages`.
* `archinstall.Installer().add_user()` now calls a new plugin hook called `plugin.on_user_created(self, user)`. This is used by the Application profile `pipewire` to enable user services `pipewire-pulse.service` and `pipewire-media-session.service` for new users.
* Application profile [pipewire](https://github.com/archlinux/archinstall/blob/fa59c96dd19eb4010c1f7d2b6989b00b1da9f373/profiles/applications/pipewire.py) has been added.
* [only_hd](https://github.com/archlinux/archinstall/blob/fa59c96dd19eb4010c1f7d2b6989b00b1da9f373/examples/only_hd.py) example was added, to be used in testing but also as an example of how to use archinstall to only perform disk operations.
* `archinstall.plugin` decorator has been added to support code to define plugins in-runtime. *(used by the pipewire application profile. It's a bit rudimentary at the moment, this will be changed in coming versions)*
* `mountpoint` will not be set, even for `/` or `/home` if using subvolumes. This is because subvolumes have precedence in this release as we've changed the default layout to support a `` entry.

Bug fixes

* btrfs subvolumes now get properly mounted recursively.
* `GRUB` got `--removable` added as a parameter to support UEFI.
* Users and Superuser questions should now properly be asked even if a root password was set. In the future, the menu system is re-worked (scheduled for `v2.4.0`), so this will work even better. But for now we only patched this behavior.
* `archinstall.Installer()` now calls `self.mkinitcpio('-P')` upon exit, so that any changes done during installation by packages, profiles or plugins now get generated as a last step, right after `genfstab`.
* `archinstall.Installer().mount_ordered_layout()` now deals with btrfs subvolumes in a more complex manner to support the new above default layout.
* `archinstall.Boot()` now properly shuts down after `shutdown` was sent to the temporary boot of the installation session.
* `save_user_configurations()` was added in the guided installer to properly save user configurations during `--dry-run`. Only partial configurations was saved before.
* `archinstall.Installer().add_bootloader()` now supports subvolumes properly.
* Swapped `lsblk` for `blkid` as `blkid` behaves more as we expect in junction with partprobe. It seams `lsblk` doesn't wait/understand/care about the kernel updating it's internal cache and will return *"results"* immediately. We haven't found a way around that, so we swapped to `blkid` which appears to be able to detect and wait for kernel changes before returning results *(the delay here is <0.1 seconds, but enough to cause issues such as 813 and 885
* Improved uuid comparison by making sure they're compared fairly by using `.lower()` on both the real UUID and the asked for UUID for proper comparison. Which addresses 885
* `archinstall.manage_btrfs_subvolumes` was introduced as a means to fixing the somewhat rudimentary btrfs support. This allows us to more properly support crazy btrfs subvolumes. See some *(not to be used in production)* examples here: 637, 787 & 838
* `archinstall.Filesystem().partuuid_to_index()` now has an incremental time delay for each time it does not find the requested `PARTUUID`. And it also uses `blkid` for the actual `PARTUUID` lookup.
* `archinstall.Filesystem().partprobe()` now only calls partprobe on itself, not the entire collection of blockdevices. It also raises an exception if it could not (such as on loop devices some times).
* `archinstall.Filesystem().add_partition()` now raises an exception if it could not add the partition instead of silently continuing. This was mainly caused by `.partprobe()` silently passing by, but `add_partition()` did not have an exception handling either so. That is addressed now. This should also fix 885
* `archinstall.get_mount_info()` will now properly set a `BlockDevice()` for each `Partition()` object, which should correspond to the partition path. For instance `/dev/sda1` will have a BD of `/dev/sda`. And `/dev/mapper/luksdev` will have `/dev/sda` as well if it resides there.
* `archinstall.partprobe()` *(the overall generally exposed function, not the same in `Filesystem()`)* got a five second sleep put to it to avoid issues where `partprobe()` would tell the kernel to update it's partition cache but immediately release and subsequent commands relying on the information wouldn't be able to find it.
* `archinstall.Partition().size` no longer reports back a size for loop-devices, mainly because `lsblk` can't reliably return the data and returns a high exit code instead.
* `archinstall.Partition().uuid` now uses `self._safe_uuid` instead which uses `blkid` for the same reasons as above. Also has an incremental timeout for each retry if it cannot return the `PARTUUID`.
* `archinstall.Partition().device_path` now supports btrfs subvolume partitions by splitting out the btrfs subvolume name before returning the device path.
* `archinstall.Partition().bind_name` returns the btrfs subvolume bind name, for instance `home`
* `archinstall.Partition().partprobe()` was introduced to call partprobe on the partition and only the partition. Also has a one second sleep on success to avoid subsequent calls to possibly have partial data for the same reasons as above.
* `archinstall.Partition().format()` now unifies partition names like `fat32 -> vfat` and `ntfs -> ntfs3`. This addresses 834
* `archinstall.Partition().mount()` now handles btrfs subvolumes seamlessly by setting `subvol=X` as mount options.
* `/var/log/archinstall/cmd_output.txt` has been added to be able to grab cmd output after the fact.
* `archinstall.Installer()` now sets `storage['installation_session']` to itself upon every initation.
* A internal `sed` call has changed from `s/x/y/` to `s%x%y%` to avoid issues with subvolume paths containing `/`
* The `postgresql` Application profile now uses `run_as` instead of `runas` *(spelling error caused the profile to break)*
* The `xorg` profile now properly sets `amdgpu` before the `radeon` modules when generating a new initramfs.

2.3.1rc1

Not secure
Breaking changes:

There should be no breaking changes in this patch release.

New features

* Added a `mkinitcpio -P` at the end of `Installer()`, which should catch any late installation changes to kernel modules and binaries etc.
* btrfs support has been improved, and more complex layouts should be supported. (See details in 787)
* A separate `/home` partition will now be created only if drives are above 60GB, and `/` has been increased to `40GB` to cope with desktop environments. A discussion has been started to remove `/home` or hide it behind a user-question, as it creates more issues than it's worth trying to set up a separate `/home` partition that fits everyone's needs and sizes.
* Added a `/var/log/archinstall/cmd_output.txt` for complete command history output.

Bug fixes

* Fixed one remaining issue tied to PARTUUID.
* Fixed a bug that could cause sorting partitions to fail if they did not have a mountpoint
* Fixed a bug where "what do you want to do with the selected drives?" would come up despite no hard drives being selected.
* Fixed a bug where creating a user option would be skipped if a root password was set
* Fixed `amdgpu` kernel parameters, made it so `amdgpu` is loaded before `radeon` *(none were previous loaded)*

Page 5 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.