* Skip custom mirror config when keyring sync fails
Check the exit state of archlinux-keyring-wkd-sync.service after
waiting for it to finish. If it failed, skip set_mirrors() and
continue installation with default mirrors instead of crashing
with "GPGME error: No data" during pacman -Syy.
* Reinit keyring automatically when pacman sync fails with GPGME error
Instead of skipping mirror configuration when wkd-sync fails, catch
the GPGME error at the point where it actually occurs - during
pacman -Syy. If the sync fails with a keyring-related error, reinit
the keyring with pacman-key --init/--populate and retry the sync.
* Simplify pacman sync() and guard gpg-agent kill on running state
Collapse the duplicated self.ask() blocks in sync() into a single call
via a msg variable, and drop the redundant default_cmd='pacman' (it is
already the default). In _reinit_keyring(), check that gpg-agent is
actually running (pgrep -x) before killing it, instead of catching the
killall error and assuming it was not running.
* Add users to seat group when seatd is selected
When a desktop profile uses seatd for seat access, the user must be
in the seat group for the compositor to access input devices. Without
this, sway/hyprland/niri/labwc fail to start after installation.
* Move seat access provisioning into DesktopProfile.provision()
The four Wayland profiles (Hyprland, Sway, niri, labwc) each duplicated a
provision() override calling provision_seat_access(). Move that into the
base DesktopProfile.provision() loop, which already iterates the selected
profiles, and read CustomSetting.SeatAccess from each. The None check now
lives at the call site (walrus), so provision_seat_access() takes a plain
str. This removes the per-profile overrides and their TYPE_CHECKING imports.
* Use top-level imports in seat access utils
The Installer and User imports were under a TYPE_CHECKING guard, but
they cause no circular import (bspwm.py already imports both at top
level). Move them to module scope per review feedback.
* Color-code install preview: red for errors, yellow for warnings, green for ready
Add preview_markup opt-in field to MenuItem with automatic Rich markup
escaping for all existing previews. Show missing configs and bootloader
errors in red, network warning in yellow, "Ready to install" in green.
Move network warning from confirmation dialog to install preview so it
is visible earlier.
* Fix Rich markup parsing error on JSON preview strings
Text.from_markup() replaces Label(markup=True) to avoid MarkupError
on strings containing ["
* Replace raw Rich markup with PreviewResult dataclass for typed preview levels
* Add missing translatable strings to base.pot
* Move get_install_warnings() from ConfigurationOutput to GlobalMenu
The method is only used by GlobalMenu._prev_install_invalid_config(),
so it belongs there rather than on the serialization class.
* Move level-to-style mapping into MsgLevelType.style() method
Replace the module-level _LEVEL_STYLE dict in components.py with a
style() method on the MsgLevelType enum, following the project
convention of encapsulating type-bound logic on the type itself.
* Change PreviewResult to hold a list of message-level pairs
PreviewResult.messages is now list[tuple[str, MsgLevelType]], allowing
a single result to carry multiple sections with different levels.
The preview_action signature drops list[PreviewResult] since the
dataclass itself handles multiple sections. Existing str-returning
previews still work and will be converted in follow-up PRs.
* Make MsgLevelType.style() return a typed MsgLevelStyle enum
Replace the bare style strings returned by style() with a MsgLevelStyle
StrEnum so the values are type-checked. Being a StrEnum, the members stay
plain strings and pass straight into Text.append(style=...), so no call
sites change.
* Fix WiFi network selection in TUI prompt
TableSelectionScreen returns the selected network in Result._item,
but the check on line 136 only tested Result._data (always None
for single-select). This caused every selection to fall through
to the "No wifi networks found" error path.
Fixes#4564
* Fix empty wifi scan crash and simplify network selection
Move wifi scanning out of the TableSelectionScreen callback to avoid
MenuItemGroup([]) ValueError when no networks are found. The empty
result is now handled before the selection screen, and the Selection
branch is simplified to a direct get_value() call.
Luks2.unlock() ran 'cryptsetup open' with no error handling, so a failure raised a bare CalledProcessError. Python renders that exception with only the exit status and discards the captured output, so cryptsetup's stderr (merged into stdout by run()) never reached the install log.
encrypt() already wraps its cryptsetup call and raises a DiskError that includes the captured output. Mirror that for unlock() so a failure reports the actual cryptsetup message instead of an opaque traceback.
Reported in #4327, where the underlying 'device-mapper: crypt: unknown table type' error was hidden from the log for this reason.
* fix: restrict EFI partition permissions with fmask/dmask=0077
Mount the ESP with fmask=0077 and dmask=0077 to prevent world-readable
files like /efi/loader/random-seed.
Closes#4241
* fix(efi): collapse fmask/dmask dedup to dict.fromkeys one-liner
Per @Torxed's review feedback. Same semantics as the previous loop
(dedupe by exact-string match) but shorter. dict.fromkeys preserves
insertion order, where set() would not.
* fix(efi): drop defensive list wrap per review
The list() copy on line 378 was load-bearing only if options were
mutated downstream, but the EFI branch reassigns options via
dict.fromkeys() (line 381) and the non-EFI branch passes through
to mount() without mutating. Drop the copy.
* Fix broken localization: tr(f-string) never matches translation catalog
tr(f'Invalid configuration: {error}') evaluates the f-string before
tr() runs, so xgettext extracts the literal placeholder as the msgid
while runtime passes the formatted string - the two never match.
Switch to tr('...{}').format(...) and update msgid in base.pot.
* Add CI validation for translations and pot_tools dev utility
Add translation-check workflow with two jobs:
- validate-po: msgfmt --check on changed .po files, .mo sync warning,
tr(f-string) anti-pattern grep on changed .py files
- validate-pot: verify all tr() strings exist in base.pot when .py
files change
Workflow only triggers on .py/.po/.pot file changes.
Add scripts/pot_tools.py developer utility (stats, list, add_missing)
for managing base.pot.
* Fix code style: use tabs and reformat xgettext arguments
Align check_pot_freshness.py and pot_tools.py with project
indentation (tabs) and ruff format requirements.
Sorry :-)
* Replace custom PO parser with msgcmp, drop pot_tools.py
Address review feedback: use standard gettext msgcmp instead of
hand-rolled parser for base.pot freshness check. Remove pot_tools.py
that duplicated locales_generator.sh functionality.
* Move translation checks into locales_generator.sh, simplify CI workflow
Use msgcmp instead of diff for base.pot validation to avoid failing on
legacy stale entries - the same cascading breakage that killed the
original workflow (disabled 2023, removed in #4483).
* Fix broken .po files: duplicate msgid in Hindi, missing format args in Finnish
* Add iwd standalone option to network configuration
Adds NicType.IWD as a third option alongside NM and NM_IWD: install
iwd, write /etc/iwd/main.conf with EnableNetworkConfiguration=true and
NameResolvingService=systemd, enable iwd.service + systemd-resolved.service.
iwd handles DHCP itself and resolved picks up its DNS via the symlink, so
no NetworkManager pulled in.
Also fills in parse_arg cases for NM_IWD and IWD so config files
round-trip both nic types.
Assisted-By: Flint
* wire up resolv stub and networkd service
* exclude virtual devices, dont harcode iface name instead match 'ether'
similar pattern to .network files shipped in /etc/systemd/network
* use dedent and rename menu option
I think it was a mistake to have made the previous changes to KDE Apps. In retrospect, it seemed like a good idea since the Budgie developer had done it that way in Fedora, which is the distro the developer uses as a reference for Budgie. When you start using it, you realize there's no bridge between the desktop and the KDE Apps, and things like Dolphin recognizes icons and themes, requiring some rather annoying manual configurations. Then, if you want to change them again, you have to change those configurations again. Files don't open by default with the apps either; you have to configure them for that to work.
At first, I thought the Budgie packager for Arch had forgotten some stray dependency, but with some free time, I tested it with Fedora 44, and to my surprise, it has exactly the same problems, which is completely unacceptable for a final stable release. I suppose he'll make the necessary changes in the near future, but right now, it's a disaster.
* Add --share-log flag to upload install.log to paste.rs
* Apply ruff-format to share_log.py
* Rework share-log per review: subcommand, TUI confirmation, truncate large logs
* Replace curl/SysCommand with urllib.request, remove defensive try/except
Per review: use stdlib urllib instead of shelling out to curl,
drop unnecessary try/except around TUI confirmation,
remove tempfile (content is passed directly as bytes).
* Fix TUI imports after ui module was pulled one level up (#4515)
* Decouple share_install_log from TUI module
* Add unit tests for share_install_log function
* Update docs to use share-log subcommand syntax
* Fix truncated package metadata in additional packages preview (#3580)
* Simplify package info fix: use rstrip and CSS wrap instead of env var plumbing
* Apply preview text wrap conditionally via wrap_preview parameter
* Add missing wrap-preview CSS to OptionListScreen and pass parameter through SelectMenu
* Keep standalone initramfs for grub-btrfs when UKI is enabled
Fixes#4505
* Move keep_initramfs logic into add_bootloader()
The grub-btrfs snapshot detection was in guided.py, forcing custom
script authors to replicate it. Since Installer already holds
disk_config, the check belongs inside add_bootloader().
The cutefish package was never in the official Arch repos (AUR only)
and the upstream project is abandoned. Installing this profile would
always fail with a pacman "not found" error.
* Fix sway+nvidia confirmation dialog (#4481)
Two bugs in the Sway+Nvidia driver confirmation:
1. The boolean was inverted - confirming "yes, I'm okay with issues"
reverted the driver to the previous choice instead of keeping it.
2. The warning triggered for any Nvidia driver, including the
open-source nouveau driver which is officially supported by Sway.
Add GfxDriver.is_nvidia_proprietary() and is_nvidia_nouveau() methods
so the warning fires only for nvidia-open-dkms (proprietary userspace).
* Address review feedback (#4485)
- Drop is_nvidia_nouveau() helper. It is not called anywhere yet; can
be re-added when a consumer lands.
- Collapse the Sway+Nvidia confirmation result handling into a single
expression now that allow_skip=False guarantees a boolean answer.
* Make network configuration mandatory with explicit "No network" option
* Add network configuration recommendation hint and disable sorting
* Warn when network selection was skipped instead of making it mandatory
Replace the mandatory network_config menu requirement with a yellow
warning on the final confirmation screen, shown only when the user
skipped the network menu entirely. Explicitly picking "No network
configuration" is treated as a conscious choice and does not trigger
the warning.
- Drop mandatory=True from the network_config global menu item
- Rename NicType.NONE menu label from "No network" to
"No network configuration" (an installed system still has an NIC;
only the install-time configuration is absent)
- Add ConfigurationOutput.get_install_warnings() and render them in
confirm_config when show_install_warnings=True
- guided.py and minimal.py enable the warning on the confirm screen
- Reuse the existing "No network configuration" msgid in .pot; add the
warning string; update Ukrainian translations accordingly
* Drop NicType.NONE from this PR
The NONE option introduced earlier in this branch is being removed per
review feedback (#4408). Whether to add explicit "None" options across
multiple menus (greeter, gfx driver, network, bootloader) is now being
discussed in #4464 and should land as a separate change there.
This PR keeps only the warning-on-confirm behaviour: when the user
skipped the network menu entirely (network_config is None), a yellow
warning is shown on the final confirmation screen.
First Edit :
- "effort" is singular so use has not have
Second Edit :
- we use "an" before vowel sounds (an old )
Third Edit :
- use Sometimes because sometimes means occasionally and Some times means some period or era
Fourth Edit :
- Plural of ISO is ISOs not ISO's
* Show install summary when configuration is valid
Previously the Install menu preview was empty when everything was valid,
leaving the user with no "ready" signal. Now show "Ready to install"
plus a two-column summary of the current configuration.
- New _install_summary() composes an aligned key/value table with rows
for disks+FS+LUKS, bootloader, kernel, profile, greeter, package
count, network, locale and timezone. Column width adapts to the
longest translated label so translations keep the alignment.
- Rows whose underlying config is not set are skipped rather than
rendered as empty.
- base.pot / uk base.po: add new msgids for summary labels.
* Move install summary into ConfigurationOutput
The summary helper that renders the install preview's two-column
configuration overview lived in GlobalMenu. Move it to
ConfigurationOutput.as_summary() so it sits alongside the JSON
output methods that share the same role. The preview now syncs
menu state to ArchConfig and delegates rendering.
The workflow has been fully commented out since #2119 (2023-09-28) when
translation handling was reworked. Because the file has no `on:` triggers,
GitHub Actions creates a failed workflow run for every push, polluting
the Actions tab without affecting PR check-runs.
* Add console font selection to Locales menu
Add a 4th menu item "Console font" to the Locales configuration,
allowing users to select a console font for the target system.
The selected font is written to /etc/vconsole.conf.
If a terminus font (ter-*) is selected, the terminus-font package
is automatically installed on the target system.
* Switch list_console_fonts to pathlib and add @lru_cache
Address svartkanin's review on #4469. Replace os.listdir +
chained removesuffix with Path.glob('*.gz') + split('.')[0],
and cache the result via lru_cache - the kbd consolefonts
directory is static at runtime so re-scanning on every menu
reopen was wasted I/O.
* Fix argv injection in _create_user and gpasswd loop
Use argv list with run() instead of f-string interpolation into
SysCommand, add debug logging on failure.
* Extract _chroot_argv helper and harden user/file ops
Address svartkanin's review on #4473: factor the
['arch-chroot', '-S', str(self.target), ...] boilerplate into a
private Installer._chroot_argv() helper, and migrate the seven
existing argv-form call sites to it (useradd, gpasswd, chpasswd,
chsh, chown, snapper-create-config, grub-install).
Two related hardening tweaks while in the area:
- Raise gpasswd failure log from debug() to warn(). The group-add
loop has no return-False feedback channel for the caller, so a
silent debug() means a half-configured user looks like a
successful install.
- Add `--` end-of-options separator for useradd and chown so a
username or path starting with `-` cannot smuggle flags. The TUI
validates usernames, but parse_arguments() in models/users.py
does not, so config.json is the residual hole; this closes it
for these two sites at zero cost.
* Extend validate_bootloader_layout with UEFI-dependent checks
Add is_uefi parameter and three new validations: Systemd-boot, Efistub
and rEFInd require UEFI; Efistub additionally requires a FAT boot
partition. Move the rEFInd UEFI-only check out of GlobalMenu so
guided.py and Installer silent-install paths get the same coverage.
* Encapsulate UEFI-only flag in Bootloader enum
Replace module-level _UEFI_ONLY_BOOTLOADERS tuple with an
is_uefi_only() method on the Bootloader enum, mirroring the
existing has_uki_support() / has_removable_support() pattern.
* Drop is_uefi parameter from validate_bootloader_layout
The UEFI flag is a constant system fact for the run, so the
validator retrieves it via SysInfo.has_uefi() directly instead
of having every caller pass it in. Updates all three call sites
in global_menu.py, installer.py and guided.py, and removes the
now-unused SysInfo import from guided.py.
All three qemu-system-x86_64 examples in README pointed both -drive
if=pflash entries at the same file (/usr/share/ovmf/x64/OVMF.4m.fd).
OVMF needs CODE for the first pflash and VARS for the second; as
written, EFI NVRAM is not initialized correctly.
The path /usr/share/ovmf/x64/ is also stale - the ovmf package has
been replaced by edk2-ovmf, which installs under /usr/share/edk2/x64/.
Fix both in the three examples (testimage loop section, base Boot ISO
block, espeakup variant).
Only the truthiness of the time values was being evaluated. This
also reduces the usage of time.time(), which makes the codebase
more resilient against clock drift issues.
* Fix Limine install with ESP mounted outside /boot
Place limine.conf next to the EFI binary on the ESP so it is found
regardless of ESP mountpoint, and block unbootable layouts (non-UKI
Limine with ESP not at /boot and no separate /boot partition) in
GlobalMenu validation, guided.main() and _add_limine_bootloader().
Fixes#4333
* Extract bootloader layout validation into lib/bootloader/utils
* Consolidate Limine layout validation in bootloader utils
Move the boot-partition FAT check from GlobalMenu into
validate_bootloader_layout so all three call sites (GlobalMenu,
guided.py, Installer._add_limine_bootloader) share one function.
Return a BootloaderValidationFailure dataclass (kind + description)
instead of str | None, so callers can match on the failure kind and
the description is built where partition context is in scope.
* Encapsulate FAT filesystem detection in FilesystemType.is_fat()
The methods don't need access to the class, so they don't need to
be classmethods. This change reduces the number of 'bad return'
warnings seen when running Pyright, Pyrefly, and ty.
* Set console font automatically when selecting language
Add console_font field to languages.json and Language dataclass.
When a language is activated, setfont is called automatically,
falling back to default8x16 on error or for languages without
a custom font. Also activate translation when loading language
from config file.
* Support FONT environment variable for console font override
When FONT env var is set, use it as the console font instead of the language-specific font mapping from languages.json. The font is applied at startup and preserved across language switches.
On exit (success or failure), restore the console font to default8x16.
* CI checks fix
* Try to restore original console font with setfont -O
* Fix for pylint
* Restore console font before Textual exits application mode
Move font set/restore into Textual lifecycle to prevent color
artifacts from 256/512 glyph transitions. Apply FONT env var
and language font in on_mount, restore in _on_exit_app.
Skip font change when loading language from config (set_font=False)
to defer it until TUI starts.
* Fall back to language font mapping when FONT env var is invalid
Add _using_env_font flag to skip mapping only when FONT was
successfully applied. Show info message after TUI exits if FONT
could not be set.
* Use tempfile for console font backup files
* Fix linter errors: use mkstemp, close fds, add @override
* Fix ruff formatting
* Move font state from module singleton into TranslationHandler
* Refactor font handling per review feedback
* Make font methods members of TranslationHandler, skip on non-ISO
* ci: trigger tests
* Move running_from_iso import to module level
No circular dep, simpler than per-method local imports.
* Add explicit ISO guard to restore_console_font
Matches the existing guards in _set_font and save_console_font.
Behaviour was already safe implicitly via _font_backup=None, but
the explicit check makes intent obvious at the call site.
* Skip apply_console_font off-ISO
* Use list form for setfont SysCommand calls
* locale: ran generate_locale before making change
* locale: first 1000 confirmed everything is fine
* locale(hi): fixed rest of the fuzzy and empty strings
* locale(hi): ran locale generator
* Add Fonts application with multi-select for emoji and CJK packages
* Rename to Additional fonts and add package descriptions
* Add noto-fonts to font package selection
* Move font descriptions into FontPackage enum method
* ci: trigger tests
* Add ttf-liberation and ttf-dejavu to font selection
* Add Pacman settings submenu with Color and ParallelDownloads
Replace the standalone Parallel Downloads menu item with a Pacman
submenu containing ParallelDownloads (default 5) and Color (default on).
Settings are applied to both live and target system pacman.conf.
Hidden behind --advanced flag.
Backward compatible with old configs using "parallel_downloads" key.
* Skip _apply_to_live when user exits Pacman menu without changes
* Use TypedDict for PacmanConfiguration serialization
* Show Pacman menu by default, keep ParallelDownloads behind --advanced
* Add translation support for TUI help groups and binding descriptions
Help group names shown via F1 (General, Navigation, Selection, Search) and key binding descriptions in the Textual footer (Down, Up, Cancel, Confirm, etc.) were hardcoded in English and never went through the translation system.
* ruff_format_check and mypy fixes
* Refactor _translate_bindings to accept BindingsMap instead of Any
Add TApp.translate_bindings() to avoid exporting private functions
across modules.
* Revert deprecated curses help.py change
* Move TApp import to module level in global_menu
* Change translate_bindings from staticmethod to member method
The directives were added because a PR branch accidentally lagged
behind master and did not contain the mypy python_version bump from
commit 0175949ca.
This fixes commit d70e03fa3.
* Update German translations in base.po
Updated German translations for various prompts and messages in the base.po file.
* Apply suggestions from code review
Co-authored-by: Luca Zeuch <l-zeuch@email.de>
* Removed the # fuzzy´s from the already translated sentences.
---------
Co-authored-by: Luca Zeuch <l-zeuch@email.de>
* Add WaylandProfile to avoid installing xorg packages for Wayland compositors
* Refactor: use composition (is_wayland) instead of WaylandProfile inheritance
* Fix X11 profiles to inherit xorg packages from XorgProfile
* Style: use consistent multi-line super().__init__ for Wayland profiles
* Refactor: replace is_wayland with DisplayServerType enum
Add DisplayServerType enum (Xorg/Wayland) to Profile. All profiles
now inherit Profile directly with an explicit display_server param.
desktop.py installs xorg-server and xorg-xinit for Xorg profiles.
XorgProfile remains for standalone Xorg selection.
* Remove unnecessary super().packages from desktop profiles
* Update mypy to 1.20.0
This commit also removes a cast that is no longer needed after
https://github.com/python/mypy/pull/20602
* Ignore os.system deprecation warnings from mypy to fix CI
* Improve Hindi translations (base.po)
* Improve all Fuzzy and more hindi translations
* Update base.po
* Update base.po
* Update Hindi translations in base.po
* Update translation for Network Manager iwd backend
* Create base.po
* Update base.po
* Update base.po
* Update languages.json
* Update base.po
* Complete Nepali translation and generated .mo file
* Update languages.json
* Update languages.json
* Update Nepali translations with system and user strings
* Add translations for Partitioning, Bootloader, and Network
* Add disk and configuration translations
* Reach 500+ lines: User management, NTP, and BTRFS subvolumes
* Reached 700+ strings: Desktop profiles, BTRFS setup, and final installation prompts
* Fix syntax error in base.po and update translations
* Improve Hindi translations (base.po)
* Improve all Fuzzy and more hindi translations
* Update base.po
* Update base.po
* Update Hindi translations in base.po
* Update translation for Network Manager iwd backend
* Create base.po
* Update base.po
* Update base.po
* Update languages.json
* Update base.po
* Complete Nepali translation and generated .mo file
* Update languages.json
* Update languages.json
* Update Nepali translations with system and user strings
* Add translations for Partitioning, Bootloader, and Network
* Add disk and configuration translations
* Reach 500+ lines: User management, NTP, and BTRFS subvolumes
* Reached 700+ strings: Desktop profiles, BTRFS setup, and final installation prompts
* Improve Hindi translations (base.po)
* Improve all Fuzzy and more hindi translations
* Update base.po
* Update base.po
* Update Hindi translations in base.po
* Update translation for Network Manager iwd backend
* Create base.po
* Update base.po
* Update base.po
* Update languages.json
* Update base.po
* Complete Nepali translation and generated .mo file
* Update languages.json
* Update languages.json
* Update Nepali translations with system and user strings
* Add translations for Partitioning, Bootloader, and Network
* Add disk and configuration translations
* Reach 500+ lines: User management, NTP, and BTRFS subvolumes
* Improve Hindi translations (base.po)
* Improve all Fuzzy and more hindi translations
* Update base.po
* Update base.po
* Update Hindi translations in base.po
* Update translation for Network Manager iwd backend
* Create base.po
* Update base.po
* Update base.po
* Update languages.json
* Update base.po
* Complete Nepali translation and generated .mo file
* Update languages.json
* Update languages.json
* Update Nepali translations with system and user strings
* Add translations for Partitioning, Bootloader, and Network
* Improve Hindi translations (base.po)
* Improve all Fuzzy and more hindi translations
* Update base.po
* Update base.po
* Update Hindi translations in base.po
* Update translation for Network Manager iwd backend
* Create base.po
* Update base.po
* Update base.po
* Update languages.json
* Update base.po
* Complete Nepali translation and generated .mo file
* Update languages.json
* Update languages.json
* Update Nepali translations with system and user strings
* Improve Hindi translations (base.po)
* Improve all Fuzzy and more hindi translations
* Update base.po
* Update base.po
* Update Hindi translations in base.po
* Update translation for Network Manager iwd backend
* Improve Hindi translations in base.po
This PR improves and fixes Hindi translations in base.po.
It also corrects previously incorrect fuzzy translations.
No functional code changes.
* Update base.po
* removed fuzzy from the things i fixed in translation
* Bootloader changes:
-> GRUB: Support for UKI
- Disable 10_linux or breaks at kernel updates
- Create 09_custom entry
-> rEFInd:
- Remove fallback entry similar to other bootloaders
- With UKI still one dead entry can be hidden with DEL key
-> All bootloaders:
- Default to UKI on if supported, if using no UKI and /efi
Causes systemd boot to not load, because it needs a XTLDRBOOT part
Safer default for modern setups and simpler sec boot compat
* Add new models
* Modify based on grub-2.14-rc1 -> No need to use chainload
Thanks to codefiles for the heads-up
* Simplify has_uki_support
* Tab
* checks
This avoids to pull in sddm-kcm (to respect user's choice of login manager)
And to not pull in discover and related tools that should also be up to the user.
* Update base.po
Update Swedish for January 2026 iso
* Update Swedish translations before release today
Updated Swedish translations for various messages in base.po.
* Add support for rEFInd boot manager
* Fix ruff formatting complaints
* Added support for different mountpoints for /efi and /boot
Also fixed issue where if /boot is located in a BTRFS root partition, the initrd path wasn't including the subvol name.
* Fix ruff formatting complaints
* Replace SysCommand with self.arch_chroot call
* Fix ruff formatting complaints
---------
Co-authored-by: Diogo Bispo <gpg.jta36@slmail.me>
* fix(profiles): install power-profiles-daemon by default in the desktop
profile
* fix: only install power-profiles-daemon if a battery is detected
* chore: clean up has_battery method
* fix: make power management daemon a configurable application
* fix: make linter happy after merge
* fix: fix merge issues
* fix: give has_battery a return type to make linter happy
* chore: add locale msgids for power management related strings
* fix: changes requested in review
* fix: cache has_battery result
* fix: changes requested in review
* fix: just return none directly
* fix: add selected power management daemon to applications menu preview
* Modify archinstall language display to be handled like other sections.
This fixes a bug where language names that were too long would break curses menu.
* Revert types change
* Add configuration for swap algorithm. Backward compatible implementation
* Fix interaction to default to Yes and show (default)
* Fix mypy error
* Any -> str, str
* feedback Enums
* test file
* line length warning
* Renames
* Fix default values in TUI menu for display
* Address feedback
* More feedback, really appreciate it.
* Adapt to use same | None = None pattern
* Pytests
* Add missing import for Zram
* Lvm hotfix attempt
* Use --force and --yes flags
* Changed mirror behavior and more lvm testing
* Handle properly LvmOnLuks to only export in one fo the scenarios
* Idek
* Remove dead block
* Use -f flag and wipefs to remove any existing headers avoid "has signatures"
* oops
* Revert mirror change
Since in the next NVIDIA update, the kernel choice will have an impact on profiles.
The order this way makes it more logical: Bootloader => Kernel => Hw drivers
* add explicit _fetched_remote bool
* Attempt 2
* Adds about 15 seconds time-out to fetch_data_from_url with 3 retries (4, 5, 6)
Then fallsback to fully local list
* Feedbacks: 20 -> 30
Do not return early
Add debug
Remove new flag
60 second timeout for reflector
* Clean up install logs by hiding mirror scores behind --verbose
* feedback
* feedback2
* Refactor for less duplicate code and more conscise logic
Group NM types and handle configurations appropriatly
- For IWD -> Copy from ISO + Disable standalone and configure back-end
- For standard -> Install wpa_supplicant
- For both install applet only when Desktop profile
Added comments for clearer logic
* Rem comments
* Rem copy to ISO
* the one commit to rule them all
* Use the total available RAM / 2 for swap size dynamically.
* ws
* - Systems with 8 GB RAM or less will get 4096 MB zram
- Systems with more than 8 GB RAM will get half their RAM as zram
* Add debug print
* Revise Portuguese translations in base.po
Updated translations for various messages in Portuguese.
* Update Brazilian Portuguese translations in base.po
Updated translations and metadata in the Brazilian Portuguese locale file.
* Update Last-Translator in Brazilian Portuguese locale
* Change def size from 20 -> 32
Rest is still calculated from available - root.
* Use the existing process_root_partition_size():
For LVM just like regular disk best-effort.
This is only for single disk layouts.
* chore: cosmic is stable now, don't hide it behind --advanced flag
* fix: remove --advanced check in GreeterType
* chore: remove unused import to make linter happy
* feat(applications): add CUPS installation support
* fix: use translation for print service preview_action
* fix: incorrect action for print service menu item
* chore: refactor naming, printer -> print service
* fix: commit untracked file
* chore: fix formatting to make linter happy
* On horrible hardware this makes it so that the "Graphics drivers" section loads directly.
By initializing it with launch instead of on the fly.
* Init after logs
* This cache the property of graphics drivers properly.
Instead of trying to hack early init.
* Add host-to-target (H2T) installation mode detection
- Add running_from_host() function to detect if running from installed system vs ISO
- Function checks for /run/archiso existence (ISO mode) vs host mode
- Add clear logging of installation mode on startup
- Skip keyboard layout changes when running from host system
- Fix Pyright type error in jsonify() by using Any instead of object
- Update README to mention installation from existing system
This enables archinstall to be run from an existing Arch installation
to perform host-to-target installs on other disks/partitions.
* match existing style
* rem debug
* info -> debug
* Add Kurdish language
This pull request introduces full Kurdish language integration into archinstall, allowing Kurdish speaking users to navigate and use the installer entirely in their native language.
* Fix translation for timezone selection prompt
* Menu now filters and sorts using priority, improving UX.
* Refactor: improve logic, removed redundancy
* Refactor: improve logic, removed redundancy
* Improved logic when getting view items in menuItems
* Improved logic when getting view items in menuItems
As mentioned by @svartkanin on #3950, given we now have a way for the user to
explicitly specify if they want to install to the removable location, having a
fallback like this seems undesirable.
On top of that, as mentioned by @correctmost on the same PR, the code that said
PR introduced was bugged and would always raise an exception anyways.
Commit c095eb56d8 was supposed to introduce logic
such that if the `grub-install` command failed with a `--removable` flag, then
another attempt would be made with such flag removed.
This was broken because the `--removable` flag was kept in both cases (likely a
copy-paste mistake). This has been an issue since, in all future iterations of
the code.
What this commit does is fix this logic, but also invert the cases tested:
first test without `--removable`, then add it should that case fail, as this is
the most sensible thing to do.
- Allows for white space in between groups, aligning better with displayed example.
- Removed unneeded | symbol, which was checking as literal rather than working as "or %"
* Do not create BLS and Limine entries for fallback initramfs
Fallback initramfs seem to no longer be built by default.
* Remove initramfs variant logic altogether
* Add dialog to install EFI bootloader to removable location
This is just for GRUB and Limine for now.
* Move bootloader removable and UKI selections to bootloader submenu
* Update ask_for_bootloader_removable() prompt for ease of translation
* Fix issue where removable and UKI options were always enabled at first
* Minor cosmetic fixes to bootloader removable code
* Add has_removable_support to Bootloader
* Validate UKI and removable options in installer
* Use has_removable_support() where appropriate
* Fix potential AttributeError when bootloader_config is None
* Set default value for bootloader configuration menu item
* Update documentation after EFI removable/Limine changes
* Update limine.conf and non-removable location paths (as per Wiki)
* Do not create fallback boot menu entries when using UKIs on Limine
* Remove useless ask_* wrappers in bootloader_menu
* Improve bootloader menu previews
* Make bootloader menu __init__.py empty
* pr1
* pr2
* pr3
* pr3-2
* pr3-3
* pr3-4
* pr4
* Revert hardware.py to original state on snapshots branch
* readme
* Revert installer.py to original state on readme branch
* match base branch
* Revert genfstab and pacstrap command changes
* readme tweaks2
* Added the new -S flag for arch-chroot which does: Run in systemd mode.
* Fixed some formatting issues, and removed unused *args and **kwargs for run_command()
* Formatting issue
* Formatting issue
* Allow installation via TUI when 'No Bootloader' is selected as bootloader (--skip-boot)
* Update global_menu.py
Fixed ruff formatting issue
---------
Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
* Do not install Btrfs module and binary in mkinitcpio
This is what btrfs hook already does.
Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
* Remove unused properties from FilesystemType
They were only needed for Btrfs
Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
---------
Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
This is not necessary as kms hook for mkinitcpio already takes care
of adding amdgpu and radeon modules.
Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
* Fix German translations for consistency and clarity
Corrected capitalization and punctuation in German translations.
* Update German translations for disk configuration messages
sounds better
* Update German translations for clarity and consistency
* Update German translations in base.po
* Update German translation for object selection message
much more understandable
* Update German translations in base.po
friendlier
* Refine German translations in base.po
SORRY for the many changes. I only want the best.
* Update German translation for Btrfs subvolumes
* Update German translation for btrfs subvolume message
correct translation o)
* Update base.po (Swedish)
Update Swedish Translation
* Update base.po (Swedish)
Updated Swedish translation
Uppdaterad svensk översättning
* Bumping version to: 3.0.11 (archlinux#3835)
Bumping version to: 3.0.11 (archlinux#3835)
* Get rid of all warnings that poedit displayed
Bring translations closer to the English original, also removing some extraneous information. Get rid of all warnings poedit displayed. Correct translation that didn't match at all.
* Fix locales_generator.sh detection
xgettext was not recognizing tr() invocations. Following https://stackoverflow.com/a/11901925 fixed the issue
* Add more German translations
Improve consistency with some translations. Add translations for messages that were just detected in the previous commit. Add translations for Graphics Drivers
* Add more translations
Look for untranslated strings in the source files and add make them recognized by gettext
* Improve conistency of German translations and correct typos
* formatting
* Remove translations from enum members
* More translation tweaks
* gracefully return "undefined" if DMI is not in sysfs
fixes#3770, in theory
* None works too and is consistent with other behaviour
* None doesn't *just* work
* Adding the option to skip boot loader
* Fixed a variable complaint
* Fixed ruff and mypy
* Fixed mypy
* Fixed mypy
* Fixed import recursion
* Fixed ruff
* Fixed circular imports
* Fixed ruff
* Hiding the menu option for bootloader when --skip-boot is given. Still setting it default to None to avoid it sneaking into the config file or being set behind the scenes causing if statements to trigger.
* Created an Enum None type for Bootloader called NO_BOOTLOADER
* Fixed ruff
* Spelling error
* Hiding NO_BOOTLOADER if --skip-boot is omitted
* Fixed TUI error when bootloader was missing
* Fixed mypy complaints
* Fixed ruff complaint
* Made the Bootloader option visible during --skip-boot and set the default value to NO_BOOTLOADER when --skip-boot is present
* Added User Interface to change iteration time for LUKS encryption
* removing unneessary try catch and imports
* used the same constant in luks.py file
* fixed issue with error firing in default value
* fixed ruf preview warnings
* preview even if its default value. (iter_time)
* check encryption type is not non before showing iter_time
* using _real_input with input_vp instead of _current_text
* proper check for enc_type
* added Interation time to outer menu preview
* removed (ms) from title. so that we don't need to translate "Iteration time" and "iteration time (ms)".
* a comment slipped in. this was not supposed to be in this pull
* fixed comparison str with EncryptionType
* Added temporary hold on bootctl's --variables=BOOL usage, as it's not in systemd main yet
* Fixed ruff format check
* Fixed mypy type check issue
* Spelling error
* Fixed flake8 complaint
* still updating
* Updated urdu translation
Because it is very hard to display urdu fonts in consol. I changed urdu
writing to latin script which is also known as "Roman Urdu". For more
information check out https://en.wikipedia.org/wiki/Roman_Urdu.
* Updated errors and translation
As it is mentioned in #3463 the errors has been rectified and more
translation is added.
* Added --skip-wkd to skip waiting for the arch linux keyring wkd sync
* Package spelling error
* Forgot to add argument to Arguments()
* Added missing --skip-wkd arg to arg tester
* Corrected help text for --skip-wkd
* Updated urdu translation
Because it is very hard to display urdu fonts in consol. I changed urdu
writing to latin script which is also known as "Roman Urdu". For more
information check out https://en.wikipedia.org/wiki/Roman_Urdu.
* More translation
Some messages were not translated.
I couldn't start the application launcher with mod+d after a fresh installation using archinstall, where I selected sway as a desktop.
The reason is that the default application launcher for sway changed (see ab9b164e52 and b44015578a).
The fix is simply to install this new application launcher wmenu instead of dmenu.
The annotation prevents intermittent crashes when running mypy
with a clean cache:
./archinstall/tui/curses_menu.py:723: error: INTERNAL ERROR
RuntimeError: Partial type "<partial list[?]>" cannot be checked with "issubtype()"
* Swapping to python-uv for building archinstall
* Tweaked UV parameters to not use a venv
* Tweaking uv to not resolve/install any dependencies during installation.
* Added remaining dependencies to the build runner
* Swapped to uv for publishing, using pypi 'trusted publisher' instead of token access
* Installing uv and dependencies for publishing
* Swapped to uv in the building of the test ISO
* Split out unicode_ljust and unicode_rjust to break import cycle
Previously, there was an import cycle between tui.menu_item and
lib.output.
* Move unicode.py from lib/ to lib/utils/
* gave descriptions to profiles
* added some more profiles
* removed the descriptions for all of them and fixed the class name
* made some fixes
* removed the reference to seat
* forgot a comma
* forgot this seat reference
* rewrote river.py
* forgot to include river
* removed lightdm and added upercase X
* added some more fixes
* forgot to add labwc as a dep
Fixes a few issues related to the installation of Nvidia drivers.
1. No longer install the redudant nvidia-open package as it's provided
by the nvidia-open-dkms package.
2. Install vulkan-nouveau when selecting the open-source nouveau driver.
3. Install the libva-nvidia-driver package for hardware accelerated
video decoding.
* Edit text menu
* Fix alignment
* Scroll functionality
* Fix flake8
* Migrate locales menu
* Fix language translation
* Fix interrupt
* Fix flake8
* Edit mode preset
* Convert print to tui prints
* Fix mypy
* Fix cycling through long menu
* Fix profile view
* Fix scrolling
* Fix scrolling
* Fix mypy
* Fix swiss script
* Display asterisk for passwords
* Corrected a variable usage in the local mirror parsing
* Made sure that curses menu selection on mirrors use url object from mirror.url instead of the class instance
* Fixed mypy type on mirror list
---------
Co-authored-by: Torxed <torxed@archlinux.org>
I did not add the 'dev_path' key to each one of the partitions, as this may not be required in the 'default_layout' section, but it was required in my configuration when I chose 'manual_partitioning'.
* Update base.po
Found a typo when installing Arch Linux to a couple of new NVMEs from Seagate/WD from Inet/Webhallen yesterday and today, found a typo fixed a typo, added some more Swedish while i was at it
* Update base.po
Update and complete Swedish Translation
Found a typo when installing Arch Linux to a couple of new NVMEs from Seagate/WD from Inet/Webhallen yesterday and today, found a typo fixed a typo, added some more Swedish while i was at it
* Added a advanced=True flag to Profile() class, to be able to hide certain profiles behind --advanced
* Removed debugging sleep
* Made sure cosmic-greeter was hidden behind --advanced, and cleaned up --advanced checks on Profile()
* storage['arguments'] is not defined during code-init, falling back to sys.argv for cosmic-greeter check
* Update Spanish translation for 'greeter'
* Moved the os.execve call below the debug logging statement in SysCommandWorker
* Fix call to removed function in DesktopProfile class
* Refactor: Move precondition check for '=' to the beginning of the loop
This commit moves the check for the '=' element to the start of the while loop in the `parse_unspecified_argument_list` function. This change improves code readability and ensures that the precondition is evaluated before processing other elements, enhancing the overall flow of the argument parsing logic.
* Refactor: Remove redundant 'else' statement in argument parsing logic
This commit simplifies the control flow in the `parse_unspecified_argument_list` function by removing a redundant 'else' block. The logic is streamlined to improve readability and maintainability while preserving the original functionality. The removal of unnecessary nesting helps clarify the conditions under which elements are processed.
* Refactor: Remove redundant 'else' statement in argument parsing logic
This commit simplifies the control flow in the `parse_unspecified_argument_list` function by removing a redundant 'else' block. The logic is streamlined to improve readability and maintainability while preserving the original functionality. The removal of unnecessary nesting helps clarify the conditions under which elements are processed.
* Replace conditional validation with filtering
This commit modifies the `parse_unspecified_argument_list` function to filter out unwanted elements from the `unknowns` list instead of using a conditional check with an `if` statement. This change improves code readability and efficiency by utilizing list comprehension to create a new list that excludes elements equal to "=".
* Using JSON endpoint instead of ASCII endpoint for mirror listing, as the JSON endpoint is cached and easier to parse
* Added a TODO to handle unknown regional mirrors (which lacks info in the backend)
* Filtered out 'bad' mirrors. Also added a sorting mechanism that uses the mirrors 'score' rather than just the URL name. This will emulate the reflector.service/rankmirrors behavior and thus reducing the need to re-rank the mirrors.
* Added the ability to sort mirrors via latency or download speed using sorted(mirror_list, key=lambda mirror: (mirror.score, mirror.speed)) - but I have not implemented the sorting via the menu yet, and I have not integrated the new MirrorStatus model into the handling of URL's. I still need to figure out where the {region: [url, url]} is being used, so that i can convert to {region: [mirror.url, mirror.url]} logic.
* Converting MirrorStatus model to {mirror: [url, url]}
* Added debug information for /var/log/archinstall/install.log
* Fixing flake8
* Fixed issue where 'dead' mirrors have no score, and thus can't be round():ed
* Forgot to return model validation data after validation
* Improving debug/info output
* Reverting change in #2350 - Writing over instead of appending to mirrorlist
* Mirror URL's reported by the JSON endpoint does not contain the repo format, only the base location for the mirror. So we have to adjust for this.
* pydantic did not honor 'private' variables in 'before' model validator, had to change to 'after' instead.
* Sorted out mypy typing matching the new MirrorStatus model
* Added pydantic as a dependency, it's time!
* Updated workflow to include pydantic
* Added return values from model @property decorators.
* Update Spanish translation for 'greeter'
* Moved the os.execve call below the debug logging statement in SysCommandWorker
* Fix call to removed function in DesktopProfile class
I fixing misspells, typos, and make the text more readable.
I have reworded it in several places to make it easier to understand, and to make it more similar to the Hungarian text of other more common Linux installers.
Ready to use.
This commit adjusts the hooks in mkinitcpio.conf to follow the changes
in the upstream mkinitcpio repository.
It also add the consolefont hook if udev is used instead of systemd.
Addresses upstream commits:
[mkinitcpio.conf: add kms to the default HOOKS array](b99eb1c0d5)
[mkinitcpio.conf: adjust the placement of the modconf hook for consistency](0b052b1461)
Additionally, it replaces the missing `consolefont` hook if the
`keyboard` hook is used instead of the `sd-vconsole` hook.
For more details, see the Arch Wiki:
[dm-crypt/System configuration - 1.1 mkinitcpio](https://wiki.archlinux.org/title/Dm-crypt/System_configuration#mkinitcpio)
One of the tools needed by archinstall is mkfs.fatXX and this wasn't automatically installed.
Co-authored-by: Raven <github.onereddime@rubicon.aleeas.com>
* Fixing issue of: _Warning: Package 'archinstall.default_profiles' is absent from the 'packages' configuration. x50+
* Corrected the package name from 'where' to 'archinstall'
* Undoing change to 'package-data'
* schema.json: Remove dead misspelled i3-gasp profile
* schema.json: Rename KDE Plasma profile to the correct "Plasma" shorthand
* Rename to KDE Plasma in user facing parts and keep the old "Kde" profile for now
* Add back an accidental deleted character
* Backwards compat v2
After testing the text in the new version of Archinstaller.
I fixing misspells, typos, and make the text more readable.
I have reworded it in several places to make it easier to understand, and to make it more similar to the English text of other more common Linux installers.
Ready to use.
As of mkinitcpio v38, microcode is handled by a hook
and inserted into the initrd. Therefore, we don't have to
add microcode entries to bootloaders anymore.
* Add Japanese translation
* Update Japanese translation
* Update Japanese translation
* Update Japanese translation
* Update Japanese translation
* Update Japanese translation
* Update Japanese translation
* Update Japanese translation
we were missing 2 dependencies, pyparted and systemd-python(optional), that would lead pip installations to fail sometimes.
I added them and attributed systemd_python to a new optional dependency group called log since it only seems to be used for system logging:
64c91cdbcb/archinstall/lib/output.py (L133)
* Adding permanent redirect for readthedocs
* Have to remove pyparted because readthedocs can't build it
* Removed pyparted from pyproject.toml as readthedocs read that one too afterall.
* Moved to arch container
* Swapped branch for testing
* Removed publish if condition for now
* I think I got it this time, publish_branch has to be separate in order for the runner to create it and have access to pushing things?
* Missing 'git' depndency, to work with git heh
* Testing github pages
* Adding libparted-dev to the ubuntu machine (I'd like to move away from ubuntu, but the runner recommended it)
* Debugging
* changed to master branch
* The new build system requires a requirements.txt
* .txt is in .gitignore, had to force it in
* Missing requirements. I don't like this odd side loading of requirements.. but need to get docs built quickly.
* Started a re-write of the docs, using CSV for tables and re-organizing parameter definitions
* Added final config options in --config, some have external references which needs to be populated
* Forgot to escape a comma
* Clarified a note
* Added disk configuration and disk encryption docs
* Changed way of installing using source and python
* Added a 'list script' that lists available scripts. This could be converted to a argparse later. But this does the trick for now. And it's added to ease documentation and listing of available options.
* Added a 'Known issues' section, as well as renamed the issues tab
* Finished up the known issues section
* Added a section regarding --plugin
* Added plugin description, tweaked disk_config to the latest changes from #2221
* Added custom-commands docs, and improved some creds and known issue links
* Add `get_unique_path_for_device` to `DeviceHandler`
* Fix Limine bootloader deployment
* Fail if UKI is enabled with Limine
* Support more configuration options with Limine
* Fix linter errors
* Fix boot partition fs_type check for Limine
* Remove `select_language()` duplicate of `select_kb_layout()`
* Added a deprecation warning on select_language()
* Moved select_language() back into it's original location, just to keep the PR diff minimal
* Removed import for now, to please flake8
---------
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* Add user information for error
* Show output if newer version available
* Update
* Update
* flake8
---------
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
* Renamed hyperland to hyprland, fixed seatd via post_installation and installed waybar
* Removed the launching of seatd on the installation process
* Starting to add nvidia support, and automatic configuring of hyprland
* Starting to add auto configuration of hyprland... But this will need maintenance
* Added hyprpaper auto config
Gonna make waybar auto config next
* Waybar auto config is starting...
I can't test rn I'm on vacation and my connection is quite bad (68 days for arch iso)
* Added wlogout support (and swaylock)
* Fixed file managers printing
* Starting to add a shell config... Definitely don't push this
* Reverted custom-shell config (create a separate PR)
* Removed systemd-logind, as that was just for testing the selector
* Added polkit as an option for the seat. As it's a dependency of the hyprland package
* Flake8 fix
* The name change wasn't propegated to the menu
* Added newline at the end of general_conf.py to not alter it
* Removed newline at the end of general_conf.py to not alter it
* Renamed the Hyprland class
---------
Co-authored-by: Anton Hvornum <anton@hvornum.se>
Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
replaced `--break-operating-system` with the correct flag
`--break-system-packages` and also added the flag as required for
`pip uninstall --break-system-packages`
* French language translation update
Hello,
Here is the update of the translation for the French language.
Regards,
Roxfr
* Add files via upload
Hello,
Here is the new translation for the French language:
- Update of the translation via the latest .pot file,
- Improved translation.
Regards,
Roxfr
* feat(locales/es): Add some missing spanish translations
* feat(locales/es): Run `locales_generator.sh` script to update the `base.mo` file
Follow the `archinstall/locales/README.md` instructions to add / update languages.
* feat(locales/es): Add some new missing translations
* feat(locales/es): Run `locales_generator.sh` script to update the `base.mo` file
Before this patch, menus in Korean language would not be aligned:
```
Archinstall 언어 Korean (71%)
> Mirrors
Locales Defined
Disk configuration
부트로더 Systemd-boot
스왑 True
```
After apply this patch, menus in Korean language are aligned:
```
Archinstall 언어 Korean (71%)
> Mirrors
Locales Defined
Disk configuration
부트로더 Systemd-boot
스왑 True
```
* Turning on output for mkinitcpio, otherwise the prompt stand still for a while after enabling fstrim.
* Added error message for when mkinitcpio errors out (but also say we're continuing)
* Pleasing mypy
* Added back xinit for awesome, since it can be used without a greeter, as well as other useful tools we've had in previous releases
* Fixing xinitrc for awesome profile
* Attempting to grab xorg packages when installing the desktop profile
* Spelling error on xorg-server
* Fixed sway value error on seat selection
Even though the translation files exist, we still can't find Simplified or
Traditional Chinese translations from the language menu, this patch fixes that.
* Disabled /boot check for now
* Making '/boot' more dynamic
* str() on boot_partition didn't work
* _pacstrap -> pacman.strap()
* Added 'finding' the EFI partition logic
* f-string qotations
* Locked down so get_boot_partition() looks for /boot and get_efi_partition() looks for /boot/efi - essentially hardcoding it for now, as there's no easy way to distinguish between the EFI partition or BOOT partition if they are both FAT32 for some reason.
* Added some debugging output
* Fixed some mypy complaints
* Fixed PosixPath() vs str comparison
* Changed FAT32 comparitor, should be FilesystemType.Fat32 now
* Fixed PosixPath() vs str comparison
* Re-ordered _add_systemd_bootloader() argument order, to match the other functions. This will cause the function to break on scripts that call this explicitly.
* is_boot() now returns True if any type of valid boot flags are set, not just the 'Boot' flag. This allows us to check for XBOOTLDR flag as well.
* Converted static INT to _ped.PARTITION_<flag> definition. This matches the way pyparted checks for flags on partitions.
* /boot/efi -> /boot/EFI (while the recommendation from bootctl is to mount it to /efi, I want to test it with custom paths first)
* Removed _ped from mypy checks
* flake8 fix
* Added ESP flag to partitions
* Added more docs in the docstring
* Renamed *efi_partition to *xbootldr_partition within this PR changes
* Naming collision, PartitionType -> PartitionGUIDs to avoid overwriting existing PartitionType
* Check for XBOOTLDR instead of fixed EFI mountpoint in get_xbootldr_partition()
* Mixed up XBOOTLDR and EFI partitions a bit, brought back get_efi_partition() which now filters out XBOOTLDR partitions and only returns a partition when there is a boot partition found by get_boot_partition()
* Fixed symbiosis between get_boot() and get_efi() so that they don't report the same potential partition
* Removed debugging code
* Improved comments surrounding why /loader/ rather than /loader/ - this may change
* global_menu: wrap invalid config error message with the translation shim
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* validate_bootloader: add a caller note
XXX: The caller is responsible for wrapping the string with the translation
shim if necessary.
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
---------
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* installer: add Limine bootloader
Limine is a modern, advanced, portable, multiprotocol bootloader.
[Limine GitHub](https://github.com/limine-bootloader/limine)
[Limine Arch Wiki](https://wiki.archlinux.org/title/Limine)
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* limine: add UEFI support
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* global_menu: check filesystem and bootloader compatibility
Before on install, only missing configurations were checked. This commit
introduces bootloader validatity checks on install which verify if the
selected filesystem is compatiable with the selected bootloader (for
example, it is not possible to boot limine from BTRFS).
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* misc: fix the return value of `_validate_bootloader`
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* global_menu: make `mypy` happy
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* misc: make `flake8` happy
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* limine: upgrade to v5
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* limine: install packman hooks
Create the BIOS and UEFI pacman hooks so limine gets auto deployed on
update.
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* installer::limine: fix broken root UUID
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* docs: add a note saying its in beta
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* install_limine: use `safe_fs_type`
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
---------
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
* Bump Python in workflow
* Attempting fix to build runner failing
* Appended --break-system-packages since the new changes was introduced in Arch
---------
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* Adding python-simple-term-menu to the dependency list
* Added dependencies to all binaries we call, such as 'ps' and 'mkfs' etc
* Sorted the depends list - just for peace of mind
* Bumped version in prep for release of rc1, also updated README a bit
* Removed older python versions from classifiers
* fix: refactor clear_vt100_escape_codes
* fix: check for structure being a dict after handling potential parsing errors
* refactor: use short circuit logic than if-elif-else chains
* fix: use or for nullish moutpoint attribute
* fix: better error handling for JSON from urls and paths
* chore: json_stream_to_structure documentation
* refactor: dry up relative and chroot path for custom command scripts
* refactor: use write_text for pathlib.Path object
* refactor: use sets to find intersection instead of filter and list
* refactor: replace loop with dictionary comprehension in preparing luks partition
* refactor: use walrus operator to check if luks_handler exists
* refactor: use read_text and splitlines for potential Path object
* fix: use keepends in splitlines for compatibility
* fix: use keepends in splitlines for compatibility
* feat: set pacman_conf Path as an attribute of installer
* fix: empty string is a part of any string, avoid tuples
* refactor: use iterator patterns to uncomment multilib and testing blocks
* fix: don't json.loads an already loaded structure
* fix: use fstab_path uniformly in genfstab
* fix: remove unused variable matched
* refactor: create separate class to modify pacman.conf in a single pass
* fix: remove unused attribute pacman_conf from installer
* fix: remove unused attribute pacman_conf from installer
* feat: add persist method for pacman.conf, rewrite only when needed
* fix: use path.write_text for locale.conf
* use `or` operator for nullish new_conf
* refactor: Installer.target is always a pathlib.Path object, do not check for string type
* fix: use Optional[str] in function type definition instead of sumtype of str and None
* fix: mypy type annotation
* fix: make flake8 happy
* chore: move pacman config and repo into pacman module
* refactor: use Pacman object instead of Installer's pacstrap method
* fix: break after first sync
* fix: keep old build script for now
* use nullish operator for base_packages and disk_encryption of Installer
* feat: use shutil.which instead of rolling our own implementation
* fix: check for binary only if list is not empty
* fix: import Enum and fix mypy errors
* refactor: use nullish operator for default values
* refactor: linear search for key in Installer._trace_log only once
* fix: use logs instead of the entirety of self._trace_log when searching for key
* refactor: do not copy slice of bytes for search
* refactor: use rfind only once to iterate over logs, do not raise ValueError in clear_vt100_escape_codes since TYPE_CHECKING will take care of it.
* refactor: try decoding trace log before falling back to strigification
* refactor: use an empty dict as default for callbacks in SysCommand.__init__
* refactor: use nullish or operator for slice start and end when not specified
* refactor: use nullish or operator for SysCommand session
* refactor: use pre-existing decode method in __repr__ for SysCommand
* fix: overindentation
* fix: use shallow copy of callbacks to prevent mutating the key-value relationships of the argument dict
* refactor: use truthy value of self.session is not None for json encoding SysCommand
* refactor: directly assign to SysCommand.session in create_session since it short circuits to True if already present
* refactor: use dict.items() instead of manually retrieving the value using the key
* refactor: user_config_to_json method sounds pretty self explanatory
* refactor: store path validity as boolean for return
* refactor: use pathlib.Path.write_text to write configs to destinations
* fix: cannot use assignment expressions with expression
* fix: use config_output.save for saving both config and creds
* refactor: switch dictionary keys and values for options to avoid redundancy
* refactor: use itertools.takewhile to collect locale.gen entries until the empty line
* refactor: use iterative approach for nvidia driver fix
* refactor: install packages if not nvidia
* refactor: return early if no profile is selected
* refactor: use strip to remove commented lines
* fix: install additional packages only when we have a driver
* fix: path with one command is matched as relative to '.'
* fix: remove translation for debug log
---------
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* fix: check for helper functions for unsafe encode before falling back to safe encoding
* feat: merge _encode and _unsafe_encode into simple serialization function to avoid immediate json.loads after json.dumps
* fix: use function instead of a serializing class without trying to serialize keys that are unhashable or unsupported
* feat: lazily evaluate serialized value based on key validity
* feat: use dictionary comprehension and predefined compatible types
* fix: handle enum types immediately after dicts
* fix: return stringified object as a default
* doc: update function docstring for serialize_to_dict
* fix: rename serialize_to_dict to jsonify as it serializes to other primitive types as well
* Added a service-started wait timer for keyring.timer, and then we check the service state for keyring.service. This is because the .service can be 'dead' right from the start without the timer ever have started. This ensures that we wait for the timer to kick in before we monitor for the .service execution
* Removed pacman-init.service wait timer, as we can rely on keyring.timer instead: https://github.com/archlinux/archinstall/issues/1846#issuecomment-1586872920
The phrase "X necessary to configure Y in Z" is at best ambiguous and
could mean that Y and Z are required by X, while the intended message is
the reverse. The phrase "necessary for configuring" makes the
relationship clearer.
* create et locale and added 56 translations
* add more et translations(55-67)
* add et translations
* add translated_lang
* update readme language list
* Fixed merge conflicts
---------
Co-authored-by: Hegert Taresalu <htaresalu@gmail.com>
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* align with newly merged master
* retry save config
* fix mypy error with str type - this menu with allows return a string
* Removed unused import
---------
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* updated save menu for configuration files
* add log message to TUI to let user know we may run for a second finding save directories
* remove testing line
* remove unnecessary non-relative import
* fix bug when skipping save location
* make save configuration translatable
* fix linting errors
* handle skip and reset options correctly
* fix flake8 linting error
---------
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* Removing legacy build and dist files
* Bumped requirement for setuptools to deal with dynamic license inclusion
* Added dynamic versioning and licensing to pyproject.toml
* Clarified the license according to the LICENSE file, GPL-3.0-only
* Fixing some values that trigger issues in PKGBUILD
* license dynamic
* Updated PKGBUILD to contain a pkgver() as well as update hashsums and added systemd as depends
* Save encryption configuration
* Fix deserialization problem
* Added .part_uuid to MapperDev
---------
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton@hvornum.se>
Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
* Check if line begins with 'warning' before adding it to package info,
fix#1673
* Implement @Torxed suggestion from #1674
* Replaced 4 spaces with 1 tab
---------
Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* If we encounter a FileNotFoundError, the cmd_history.txt file or parent directory does not exist. This leads to vague errors upstream of cmd executable file not existing if this is the case. Probably this is a valid situation and we should just pass on the error.
* Attempting a retry-attempt on the broken part of lsblk
* Improved logging
* Adding a retry to Partition._call_lsblk()
* Added error checks if lsblk returns nothing, also handles empty Partition().info instance.
* Added missing check of disk encryption is None or not.
* Added tweak to catching output from lsblk.stderr
* Added missing check of disk encryption is None or not.
* Fixed a logic test for empty lsblk info
* Fixed instances of None being interated
* Added some errro handling for weird block devices
* Fixed flake8
* Added /etc/vconsole.conf generation in Installer.mkinitcpio() as it's a dependency for it to generate properly without errors. Otherwise we'll get ==> ERRROR: file not found: '/etc/vconsole.conf'
* Prep for tagging RC1 of 2.5.3
* Corrected helpers.py get_blockdevice_info() to deal with empty lsblk results
* Remove HSM from global menu
* Update
* Update
* Removed sys import
Unused import
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
* Updating Partition() information after mount and unmount.
* Cleaned up raw_parted() to gracefully output relevant partition error information.
* Adding timestmap to cmd_history.txt as it's impossible to debug properly otherwise
* Adding more verbose debugging information
* Reinstating the lsblk retry code for PARTUUID and UUID on Partition()'s information
* Added error handling for JSON parsing
* Exclude liveusb from disk selection
* Exclude arch iso from being an option
* Update
* Update
* Update
* Mypy
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
* Add el translation: 50%
* Add el translation: 50%
* Add el translation: 100%
* Add el translation: add .mo file
* Add el translation: fixes
* Add el translation: include Greek in README
* Moving a partprobe() call to better allow for cache updates
* Trying to improve Partition()._fetch_information()
* Removed a sleep() for debugging purposes
* Tweaked a sleep
* Adding a more elaborate fix
* Added recovery function to selecting language too
* Tweaked return value of display_language() to return the Language() object.
* Changed permissions on the logs stored in /var/log/archinstall. Also cleaned up one of the saves to have the same syntax as the others
* Tweaked secondary encryption password detection logic, as it wouldn't take it from the main arguments[] otherwise.
* Changed permission on cmd_output.txt
* Changed permission on cmd_history.txt
* A temporary fix for #1200, in the long run we need something like what was mentioned in the issue comments: https://github.com/archlinux/archinstall/issues/1200#issuecomment-1212754806
* Enabled the use of modifier detection and getting it in right
* Mistaken a split
* Adding less strict decoding of output log, this in order to handle the more correct locale generation introduced in this PR.
* Cleaned up argument loading slighly. Also flipped some --silent logic to avoid double negatives. --plugin and --conf {'plugin': ...} should now both work.
* Tweaked xorg profile to use list instead of strings. Because strings causes some issues through add_additional_packages() as it ends up as [(xorg, xorg-xinit), nano] instead of a flat list of packages or string.
* Tweaked xorg profile to use list instead of strings. Because strings causes some issues through add_additional_packages() as it ends up as [(xorg, xorg-xinit), nano] instead of a flat list of packages or string.
* Adding menu
* Working on parallel downloads
* error updates
* updates
* update
* Few more updates
* bug fixes
* More bug fixes
* Minor bug fixes
* Few changes
* Minor changes
* Cleaned up add_number_of_parrallel_downloads() and hid it behind --advanced
* Forgot one import
* Fixed flake8
* Bug fixes
* I'm trying...
* trying again
* trying even more
* Bug fixes
* Fixed known issues
* Code improvements
* Few fixes
* Minor changes
* Minor changes
* Trying to fix flake8
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* Converted a path to pathlib.Path
* Using Partition.mountpoints instead of Partition.mountpoint
* Update mapperdev.py
* Added .mountpoints to MapperDev
* Spelling error
* Adding menu
* Working on parallel downloads
* error updates
* updates
* update
* Few more updates
* bug fixes
* More bug fixes
* Minor bug fixes
* Few changes
* Minor changes
* Cleaned up add_number_of_parrallel_downloads() and hid it behind --advanced
* Forgot one import
* Fixed flake8
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* fix `valid_parted_position()`
* make lines shorter
* change `pos` to `pos.lower()`
* revert changing `if not len(pos):` to `if not pos:`
* `b` can not have decimal places
* add `.lower()`
* Enhacements to list_manager:
method filter_option. To filter options based on selected entry
attrib. last_choice. Which is the last action executed before exiting the loop
* last_choice is now a calculated attribute, therefore readonly
* Added last_choice to selection_menu
* bug at selection_menu handling. Translations can be a problem
Currently the helper remove the first character of each line, this can
lead to cases, where important characters are removed. For example if
the locale is already set up. (hash is already removed) in that case the
helper would remove the first character of the locale and lead to a
broken attempt to set the locale later on. This change should avoid that
and only remove the hash.
Co-authored-by: Fabian Bornschein <2440175-fabiscafe@users.noreply.gitlab.com>
* Added more offline functionality, such as skipping package search
* Disabled list_mirrors() from going online if --offline is given. Defaults to /etc/pacman.d/mirrorlist instead.
* Forgot import of pathlib
* Made list_mirrors() open /etc/pacman.d/mirrorlist in byte mode to better emulate the result of urllib response reading.
* Forgot variable declaration
* Made list_mirrors include activated server definitions
* Adding debug information
* Adding debug information
* Adding debug information
* Removed a 'already-a-subvolume' check as it requires more information.
* Adding debug information
* Adding debug information
* Made sure Partition().subvolumes() only attempts to retrieve btrfs subvolume information if fstype==btrfs.
* Removed debug information
* If BlockDevice.partitions is zero, we set a new partition label to ensure new drives are setup correctly
* Added a sleep after mklabel.
* Removed redundant log message.
* Tweaked log message from print() to log().
* Trying PARTUUID in reusage of partitions.
* Debugging.
# Fixes
* Optimized partition lookups
* Fixed re-use of partition UUID's
* `BlockDevice().get_partition()` now supports looking up both `PARTUUID` and `UUID` for a partition under itself
* Partitions listed in `--disk-layout` that doesn't have a PARTUUID/UUID should no longer cause an exception, but instead logs a warning and they will simply be ignored
* `Filesystem().add_partition()` now handles `DiskError` raised by `partition.part_uuid`
* Fixed issue on normal partitions where the device was not properly frozen in `lambda` calls, meaning two or more mount-points shared the same `device_instance`.
* Lowered global `DISK_RETRY_ATTEMPTS` to 5, as the timeouts are linear *(`range(DISK_RETRY_ATTEMPTS) * DISK_TIMEOUTS`)*
* Restructuring btrfs.py into lib/btrfs/*.py
* Reworking how BTRFS subvolumes get represented, and worked with. Subvolumes are now their own entity which can be used to access it's information, parents or mount location.
* Added BtrfsSubvolume.partition and other stuff.
* Reworking the way luks2().unlock and .format() returns device instances. They should now return BTRFSSubvolume where appropriate.
* Fixed a missing import
* Fixed an issue where mkfs.btrfs wouldn't trigger due to busy disk.
* Fixing subvol mounting without creating a fake instance.
* Added creation of mountpint for btrfs subvolume
* Fixed root detection
* Re-worked mounting into a queue system using frozen mounting calls using lambda
* Removed old mount_subvolume() function
* Removed get_subvolumes_from_findmnt()
* Fixed Partition().subvolumes iteration
* Adding .root to BtrfsSubvolume
* Fixed issue in SysCommandWorker where log output would break and crash execution due to cmd being a string vs list
* Changed return-value from MapperDev.mountpoint to pathlib.Path
* Better translation for Turkish in the meaning of following source text, grammer (tense), vocabulary and meaning. Also left some linux/partitioning terminologies in English with translation given in paranthesis so power-users who decides to use setup in Turkish can also easily understand.
* A few edits on some details and an important change on msgid "" "\n" "\n" "Select a graphics driver or leave blank to install all open-source drivers".
* Better translation for Turkish by both @wiseweb-works and @AlperShal.
Co-authored-by: Alper Şal <34231577+AlperSal@users.noreply.github.com>
This profile currently installs a nemo - file manager, gpicview - image viewer, and maim - screenshot taker. all of these items do not typically come with awesome and aren't awesome specific and should be installed by the user. (also not required for the system to work). Especially since these are not even the most popular tools for each use.
* Added a HSM menu entry, but also a safety check to make sure a FIDO device is connected
* flake8 complaints
* Adding FIDO lookup using cryptenroll listing
* Added systemd-cryptenroll --fido2-device=list
* Removed old _select_hsm call
* Fixed flake8 complaints
* Added support for locking and unlocking with a HSM
* Removed hardcoded paths in favor of PR merge
* Removed hardcoded paths in favor of PR merge
* Fixed mypy complaint
* Flake8 issue
* Added sd-encrypt for HSM and revert back to encrypt when HSM is not used (stability reason)
* Added /etc/vconsole.conf and tweaked fido2_enroll() to use the proper paths
* Spelling error
* Using UUID instead of PARTUUID when using HSM. I can't figure out how to get sd-encrypt to use PARTUUID instead. Added a Partition().part_uuid function. Actually renamed .uuid to .part_uuid and created a .uuid instead.
* Adding missing package libfido2 and removed tpm2-device=auto as it overrides everything and forces password prompt to be used over FIDO2, no matter the order of the options.
* Added some notes to clarify some choices.
* Had to move libfido2 package install to later in the chain, as there's not even a base during mounting :P
* Reworking select_encrypted_partitions() to use the new Menu system, and allow granularity.
* Listing partitions and enabling a index selection. Also when selecting 'delete all partitions' wipe=True will get set on the blockdevice now. Otherwise the new partitions won't be able to be created without deleting them first.
* flake8 fix
* Removed old select_encrypted_partitions()
* Fix lengthy translations in Main Menu
* rename 'Additional repositories' to 'Optional repositories'
* rename 'Drives' to 'Drive(s)'
* rename 'Choose keyboard layout' to 'Select keyboard layout'
* Add network-manager-applet to NetworkManager profile
* Converted _configuration.is_desktop_profile() into profile.is_desktop_profile
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* Adds nvidia-open package as an option.
Apologies for making the installation even more confusing for Nvidia users. This adds an option for the new open-source kernel module for Turing or later cards, https://github.com/NVIDIA/open-gpu-kernel-modules. nvidia-open is currently in the testing repository.
* Change description
* Clarify that the other open option is noveau
* Added a check to see if the package we include exists in testing or not, and if it does, we allow that repo and warn about it.
* Forgot to put level= on log output
* Adding __future__ to the top again
* Expose package functions from archinstall.lib.packages to avoid explicit imports.
* Trying to get menu to show additional changes
* Trying a flexible option of setting the menu listings
* Trying a flexible option of setting the menu listings
* Revert "Trying a flexible option of setting the menu listings"
This reverts commit 330080697d.
* Revert "Trying a flexible option of setting the menu listings"
This reverts commit 701b105b1d.
* Revert "Trying to get menu to show additional changes"
This reverts commit b038987561.
* Revert "Expose package functions from archinstall.lib.packages to avoid explicit imports."
This reverts commit 9244c0b190.
* Revert "Adding __future__ to the top again"
This reverts commit 1679f00f2e.
* Revert "Forgot to put level= on log output"
This reverts commit 6561894388.
* Revert "Added a check to see if the package we include exists in testing or not, and if it does, we allow that repo and warn about it."
This reverts commit 652308ee40.
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* Fix 1091
* Update
* flake8
* Only display btrfs options if there is a filesystem
* Fix 1118
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
* Optimized a bunch of partprobe calls. Namely fixed sleep calls, added optional path to the general archinstall.partprobe() call. And fixed some error handling in a few places which should tell us where #1083 might be going wrong.
* Fixed some flake8 complaints
* Fixed sleep having a min() of 0.1 or given value.
* Fixed sleep having a correct range variable.
* Fixed sleep logic to use max() instead of min() as it will never use the higer sleep values otheride
* Added error handling to Partition().partprobe() as it would cause certain issues with USB disks. Also made Partition()._safe_uuid more safe by eliminating exceptions being raised.
* Optimized a bunch of partprobe calls. Namely fixed sleep calls, added optional path to the general archinstall.partprobe() call. And fixed some error handling in a few places which should tell us where #1083 might be going wrong.
* Fixed some flake8 complaints
* Fixed sleep having a min() of 0.1 or given value.
* Fixed sleep having a correct range variable.
* Fixed sleep logic to use max() instead of min() as it will never use the higer sleep values otheride
* Added a try-rerun-except block to grub-install first with --removable and then without if it fails. I have a sneaky suspicion that it's due to USB drives being the destination medium, but I cannot confirm yet. I've also added peak_output=True and --debug to GRUB so we can catch the issues in the future.
* Fixed flake8 complaint
* Adding compression as an option
* Ignore 'misaligned' ending parenthathese
* Moved the 'mark compressed' logic into the sub block within manual disk operations.
* Fixed flake8 complaints
* Muting a complextion warning on manage_new_and_existing_partitions(). It is too complex, but not something that we'll bother with for v2.4.0. As this whole function could be replaced with a new and improved menu system split into tasks rather than one huge if/else.
* Deflate the user interactions file
* Fix flake8
* GlobalMenu split from selection_menu.py
* Upgrades to ListManager:
Can now show an empty list if there is no null action.
More information to the user at the header
* Put only_hd.py and swiss.py to use new config printing mechanism
Solved a couple of bugs at
ListManager adding a str and a DeferredTranslation
ManageUser was missing an self argument in _check ...
* Create list and menus to manage subvolumes in btrfs partitions
Needed to modify manage_new_and_existing_partitions
Added a new parameter filter to select_partition, to allow filtering there
* Update internationalization strings
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* A problem with default values treatment at superusers (and users) on the main menu
* Solving issues when changing the selection of nic, ask_to_configure_network failed in several places.
Solved, temporarily with the creation of __getitem__ and get methods at NetworkManager
* Accept old style definitions for nic
* flake8 complains
* log string corrected (issue 1039)
* Correct exit when no disk is selected and we don't wish to continue
* Permit multiple default actions as a list
* Define headers for list at ListManager and Menu
* small corrections for default values
* Make subvolume info work.
The real marker that signifies that a mounted subvolume exist is the bracket notation nor the at sign
* Addresses issue #985: Add sudoers.d file instead of appending to sudoers
* Fixed comment
* Added string safety check for illegal chars before attempting to create a file.
* Fixing commentaries
* More fixes to the sudoers.d modification: adds an includedir to sudoers if sudoers.d did not exist previously, waits for python to close and release the new rule file before attempting to set its permissions to 440.
* Regex fix and better code formatting.
* Preview size is now an argument for GeneralMenu
Parameter missing in call to save_config
* Update selection_menu.py
Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
* Fix user/superuser config
* Fix flake8
* Remove timezone check since we have a default value now
* Remove unused
* add new widget ListManager
* flake8 complains
* Null_action appears now in the main list (to simplify additions to the list)
Formatted data are now at the from to the actions submenu
* Manage users thru a ListManagers
* Define a default action in the menu, potentially independent of a null_action
Both default and null actions don't have to be part of the element's action list
Some cleanup
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* Add new save config menu option
* Update
* Fixed issue with merging
* Fixed merge issue (I think)
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
* add new widget ListManager
* flake8 complains
* Null_action appears now in the main list (to simplify additions to the list)
Formatted data are now at the from to the actions submenu
* Define a default action in the menu, potentially independent of a null_action
Both default and null actions don't have to be part of the element's action list
Some cleanup
* Fix user/superuser config
* Fix flake8
* Remove timezone check since we have a default value now
* Remove unused
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
* Add password strength check
* Delete time.sleep and log, use the select class instead
* Ignore W503 in flake8
* Solve some problems of the password strength check algorithm
Part of the code was written by @phisch. This code tries to measure the strength of the user's password and suggests that the password is weak.
* rename function
* Restore the flake8 configuration file to its previous state
* Correct definition of btrfs standard layout
* Solve issue #936
* make ask_for_a_timezone as synonym to ask_timezone
* Some refining in GeneralMenu
secret is now a general function
* Revert "Some refining in GeneralMenu"
This reverts commit e6e131cb19.
* Activate load of preset values in GeneralMenu
Changed all select_functions definitions to the need of passing the preset value
Corrected problems at ask_to_configure_network, and management of preset values added
* minor glitches in menu processing, plus flake8 complains
* Changes to ask_to_configure_network following @svartkanin code
* select_language adapted to preset value.
changes to the infraestructure to solve bugs
* functions adapted for preset values
* select_mirror_regions
* select_locale_lang
* select_locale_enc
* ask_for_swap
* Updated to preset values
* ask_for_bootloader
Won't use it
* set_root_password()
* Updated to preset values
* ask_for_audio_selection
* select_kernel
* ask_for_a_timezone
* Updated to use preset values
* select_ntp
* ask_ntp
* ask_for_swap
flake8 complains
* Adapted to preset values
* ask_additional_packages_to_install (from svartkanin)
* ask_to_configure_network (adapted from svartkanin version)
* Updated to preset values
* ask_hostname
* select_additional_repositories
* bug in nic conversion
_select_harddrives adapted to preset_menu
* Check if pacman is available
* Update pacman call
* Added a graceful wait to `run_pacman`
* Fix flake8
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
* Add multilib flag to enable this repository and enable multi-lib testing if testing flag is also passed
* Fix comments
* Attempt to force pacman to use the config file from the host
* Make sure the pacman configuration is copied to target
* flake8
* Call enable on additional-repositories
* Add method to select additional repositories
* Add menu option for additional repos
* This is a bit cleaner than having it all on one line
* Add import
* Use [] as default instead of None
* Use empty array for default option here
* Try this to ensure a valid array is returned on skipping
* Add additional-repositories to schema
* Missed changing this comment earlier
* Add multilib flag to enable this repository and enable multi-lib testing if testing flag is also passed
* Fix comments
* Attempt to force pacman to use the config file from the host
* Make sure the pacman configuration is copied to target
* flake8
* Leverage same build system used by PyPi in the ArchInstall ISO
* 3.6.0 is not in the archinstall repos yet. Use 3.5.1 so ISOs don't need networking to build.
* Convert workflow from flit to twine for publishing
* This could be split into two different tasks
* Change build-system toml block to setuptools
* Switch to standardized project block
* Some corrections
* Add build module
* Remove symlinks
* Move example and profiles folders to archinstall
* Create symlinks outside of the archinstall folder
* Add new workflow to build archinstall but not publish for regular commits
* Add build artifacts
* Rename, so it's just archinstall.zip
* Replace symlinks with copies
* Also replace symlinks with copies in python-build.yml
* Revert "Create symlinks outside of the archinstall folder"
This reverts commit d76cf18eaa.
* Revert "Move example and profiles folders to archinstall"
This reverts commit c41c1c9102.
* Revert "Remove symlinks"
This reverts commit fd959e3230.
* Switch up how I'm replacing symlinks with copies
* Explore using flit as the build backend still
* Drop tools.flit.metadata block
* tool.flit.scripts is incompatible with project block
* Remove symlink copy workaround
* This seems to cause an error, until I figure it out, license is specified in classifiers.
* Make authors a list of dicts
* URL correction
* Use more of the new style metadata for flit
* This is redundant; build downloads these in a venv
* project.scripts replaces tool.flit.scripts
* whitespace
* Try explicitly adding symlinks as includes
* Minor whitespacce tweaks
* Add newer build packages to ISO
* Update comment on python-build.yml
* Testing modifying setup.py to see if it fixes development ISOs
* Update setup.py
* Try this workaround
* This is ugly and I hate it, but it seems to work.
* Drop extra '
* Add a boolean to install testing repos, default to false
* More work on adding structure
* Add logic to enable testing repos.
* Corrections
* Make flake8 happy about regex escapes
* Flake8 doesn't like whitespace around equals
* Fix trailing whitespace character
* Fix errors on selection of additional packages
* Fix flake8
* Added the new /groups/search/json/?name=x endpoint merged today
* Fixed flake8 complaint
* Forgot to do json.loads() on the HTTP request result
* Update package selection
* Fix flake8
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* Correct definition of btrfs standard layout
* Solve issue #936
* make ask_for_a_timezone as synonym to ask_timezone
* Some refining in GeneralMenu
secret is now a general function
* Revert "Some refining in GeneralMenu"
This reverts commit e6e131cb19.
* New version of the FlexibleMenu
* Added new functionality to Selector
* Created a GeneralMenu class
* GlobalMenu is made a child of GeneralMenu
* Some refining in GeneralMenu
secret is now a general function
* log is invoked in GeneralMenu directly
* Materialize again _setup_selection_menu_options. Gives more room to play
* Callbacks converted as methods
Synch() (data area and menu) decoupled from enable()
and made general before any run
* Only_hd gets a new implementation of the menu
flake8 corrections
* New version of the FlexibleMenu
* Added new functionality to Selector
* Created a GeneralMenu class
* GlobalMenu is made a child of GeneralMenu
* changes from the rebase left dangling
* Adapt to PR #874
* Adapted to nationalization framework (PR 893).
String still NOT adapted
* flake8 complains
* Use of archinstall.output_config instead of local copy at swiss.py
* Problems with the last merge
* git complains
* Menu admits now preset values and cursor positioning
* Now GeneralMenu moves to the next entry after each selection
* flake8 complains
* Control of limits for cursor position at GeneralMenu
* Make auto cursor positioning optional at GeneralMenu.
True for GlobalMenu
* Code cleanup after rebase, and flake8 complains
* Renamed all_disks() to all_blockdevices() as it's technically a bit more correct. As it would return partitions as well. And it now distinguishes between BlockDevice() and Partition() when returning values. Also lsblk has been replaced with blkid and glob.glob() on /sys/class/block/
* Added handling of loop devices
* Added device information enrichment
* Removed old code
* Updated the usage of blockdevice.info['type'] to 'DEVTYPE' as per returned by blkid instead of lsblk
* Created a MapperDev() and DMCryptDev() 'disk' classes. This should help differentiate between BlockDevice(), Partition() and crypt-specific devices. Due to some new helper functions (mentioned later) BlockDevice().device_or_backfile has been simplified thanks to the information being pre-existing instead of having to call losetup. BlockDevice().mountpoint has been added as a dummy function. archinstall.enrich_blockdevice_information() has been added to enrich information extracted from blkid. archinstall.uevent() has been created to parse blkdid data when in -o export format, also eats up /sys/class/x/y/uevent data which is of the same format. all_blockdevices() now returns mapper devices found under /dev/mapper/ and properly returns the different types, not just BlockDevice() for everything. archinstall.get_parent_of_partition() has been added, which can translate /dev/sda1 to /dev/sda via strings by using /sys/class/block/ - note here tho that it has to be a blockdevice. Other parents won't return properly. archinstall.find_mountpoint() was created to be able to find mountpoints for a device, rather than the other way around which get_mount_info() handles. find_mountpoint() will convert /dev/sda1 -> /boot for instance, whereas get_mount_info('/boot') will convert /boot -> /dev/sda1. archinstall.get_partitions_in_use() will now properly traverse the entire structure, not just one level deep. This called for the creation of get_all_targets() which will take a dictionary structure and look for 'target': '/path' and return all '/path' values, recursively without being trapped in get_partitions_in_use() which has recursive targets. get_partitions_in_use() now returns a dictionary instead of a list, as it also returns the mountpoint and associated device. It will also prioritize MapperDev over DMCryptDev (as MapperDev is a child of DMCryptDev and can be resolved, other way around is 'trickier').
* Reverted Installer().partitions to return only the partitions. It's a slight speed defecit by not returning the mountpoints directly as {mntpoint: partition}, because the partition.mountpoint is a bit slow. But it avoids breaking legacy code :)
* Fixed a few imports, and added MapperDev.filesystem
* Fixed so that Installer().detect_encryption() uses the new separated logic of MapperDev/DMCryptDev/Partition
* Fixing a translation issue on hostname
* Added DMCryptDev.filesystem
* Added back archinstall.all_disks() for legacy reasons.
* Added a deprecation warning to archinstall.all_disks()
* Added a enrichment check for dm-crypt specific devices, which in turn sets DMCRYPT_NAME on the device information, making it easier to detect and target DMCryptDev when needed. This should avoid issues with loopdevices being detected as DMCryptDev. Also some minor tweaks to variable names on unencrypted setups
* Made debug output hidden without --verbose. Also added get_subvolume_info() which takes a path and returns any 'btrfs subvol show' information on the path
* Partition().subvolumes has been added. Which generates an iterator over potential subvolumes based on mountpoint. Partition().mount_information is now a list of mount-destinations, as one partition should be allowed to be mounted to several places (more commonly used in btrfs subvolumes). BtrfsSubvolume() has been added as a 'device type', which should make it more easy to recognize a BtrfsSubvolume object right out of the gate. Only found from Partition().subvolumes currently.
* Parameter fix for --verbose in log()
* Made sure loopdev devices have a PATH key as well, to make dealing with them as blockdevice as seamless as possible.
* Added backup information grabbing on uninitated devices
* Tweaked backup option if losetup cannot find the blockdev
* looks like losetup doesn't exit with a bad code even when it should. Raising ourselves when information is empty.
* Fixed structure returned from get_blockdevice_uevent()
* Made sure that fallback to blkid and loopdev info returns a PTTYPE (Partition Table Type) that is None, since we can't locate it yet (empty drive). But it's not False either, which is what logic after is looking for
* Deprecated split_bind_name() and added more debugging
* get_partitions_in_use() now only iterates over Partition() objects. And properly checks all mountpoints, not only the first.
* Flipped SysCallError to show the last 500 bytes if data rather than the first, to catch the actual errors.
* Removed anonymous parameters to all_blockdevices()
* Added .mount_information to MapperDev
* Added typing annotations
* Partition().mountpoint is now a @property that will live-report the current mountpoint.
* Removed the need for setting Partition().mountpoint = X when calling .mount() and .unmount(), as it's live-reported instead.
* Added .subvolumes to MapperDev()
* Added debug information
* Muting F841 in helpers.py
* Tweaked debug information in get_mount_info()
* Minimized log output by moving Partition().mountpoint to DEBUG, as partitions are allowed to not be mounted
* Simplified Installer().add_bootloader() to act as a router to the new split function, one for each bootloader type. This since flake8 complained about complexity and I agree that it became to wild.
* Correct definition of btrfs standard layout
* Solve issue #936
* make ask_for_a_timezone as synonym to ask_timezone
* first batch of changes due to the last merges
selector.text is a call to selector.menu_text
A number of Generalmenu methods reappeared in their old version at Global
* disk encryption password menu option restored
* Correct definition of btrfs standard layout
* New version of the FlexibleMenu
* Added new functionality to Selector
* Created a GeneralMenu class
* GlobalMenu is made a child of GeneralMenu
* Some refining in GeneralMenu
secret is now a general function
* log is invoked in GeneralMenu directly
* Correction at GeneralMenu
* Materialize again _setup_selection_menu_options. Gives more room to play
* Callbacks converted as methods
Synch() (data area and menu) decoupled from enable()
and made general before any run
* script swiss added to the patch set
* Only_hd gets a new implementation of the menu
flake8 corrections
* swiss.py description added
* New version of the FlexibleMenu
* Added new functionality to Selector
* Created a GeneralMenu class
* GlobalMenu is made a child of GeneralMenu
* changes from the rebase left dangling
* Modify order of execution between exec_menu and post_processing.
Added selector_name as parameter for exec_menu
* minor corrections to the scripts
* Adapt to PR #874
* Solve issue #936
* make ask_for_a_timezone as synonym to ask_timezone
* Adapted to nationalization framework (PR 893).
String still NOT adapted
* flake8 complains
* Use of archinstall.output_config instead of local copy at swiss.py
* Problems with the last merge
* more flake8 complains. caused by reverted changes re. ask*timezone
* git complains
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* Created a standard function to show/save the config parameters
* flake8 complains
* Correct definition of btrfs standard layout
* Solve issue #936
* Moved output_configs to lib/configuration.py
* Nationalization
* Add _ as builtins to flake8
* Removing conflict hash tag
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* disk layout: allow to omit partition "start" option to start from previous partition end
* mixed tabs/spaces fixes
* Update filesystem.py
Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
* The initializations done at the start of guided.py are now at archinstall/__init__.py
The scripts have been changed accordingly
* Correct definition of btrfs standard layout
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* flexibilize the definition of execution locale for OS commands executed via the SysCommand* interface.
Defined a storage argument which holds the default
Added functions to
unset the program own locales
reset to the program default locales
set a specific locale
A decorator to execute functions in the host locale environment
* rename decorator local_environ to host_locale_environ
created a simmetric decorator c_locale_environ, to make a routine work with the C locale whatever is set
* Correct definition of btrfs standard layout
* Added error handling
* Fixed issue where archinstall.Boot() would raise an exception in vain
* Added debugging for SysCommandWorker()
* Added some debugging
* Tweaking debug a bit
* Tweaking debug
* Adding more debug
* Adding more debug
* Removed some debugging
* Adding more debug
* Adding more debug
* Adding more debug
* Adding more debug
* Adding more debug
* Adding more debug
* Adding more debug
* Adding more debug
* Adding more debug
* Adding more debug
* Adding more debug
* Removed soem debugging
* Removed soem debugging
* Testing a revert
* Adding back the reverted change, adding lofile
* Redirecting stdout to /dev/null for testing (to avoid interrupting the fork)
* Reverted debug changes
* Testing os.system()
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* Migrate old input to new menu
* Fix imports
* Remove imports
* Update
* Fixed import by changing 'import archinstall', to 'from ..menu import Menu' and use Menu() directly
* Converted archinstall.<thing> to from ..where import <thing>. This enables us to use archinstall as a module, a git repository in testing and other things without having to install archinstall as an actual module.
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton@hvornum.se>
* Fixed SysCommandWorker() so that it removes ANSII VT100 escape codes. I also moved package.py into it's own folder, as that's something I want to expand on a lot, so package related stuff should go in there. I created a installed_package() function which gets information about the locally installed package. I changed so that find_packages() and find_package() returns a data-model instead for the package information. This should unify and make sure we detect issues down the line.
* Working on structuring .version constructor that works with BaseModel
* Added version contructors to VersionDef(). Also added __eq__ and __lt__ to LocalPackage() and PackageSearchResult().
* removed debug and added a TODO
* Removed whitespace
* Removed mirror-database function from myrepo
* Added a new return value from add_partition. Also added an exception to make sure `add_partition` can't continue silently
* Added a log of debugging to add_partition
* Removed a blank line (flake8)
* Misconfigured variable
* Added some more debugging information to partprobe
* FIX: disk layout: partprobe should be called and checked only for target device (#896)
* disk layout: partprobe should be called and checked only for target device
* disk layout: partprobe: removed unnecessary bash subprocess
* Properly defined BlockDevice() on Partition() creation. Also made sure mount-checks got some rrro handling and non-block devices should no longer attempt to return a size
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
Co-authored-by: Victor Gavro <vgavro@gmail.com>
* Make text for getting filesystems more grammatically correct
Use 'Retry attempt {count} of 10.' instead of Waiting for the {count} time". It's more grammatically correct since we're not doing '1st', '2nd', etc.
* Maybe mention waiting still
* Solves issue #873 (error by key sys-language
Now disk_layouts file contents are loaded before calling the menu
* Solves issue #873 (error by key sys-language. Solution in previous commit was still too restrictive
* Install.__init__ parameter kernel as a list everywhere.
I've dropped the string check, as it shouldn't happen again, and it's good that it fails, when it happens
* Global Menu now loads in the arguments dict all options enabled with default value and no manually selected (issue #868)
* Created a save_user_configurations
This should avoid accidental placement of individual json outputs in a way that some doesn't get saved before installation continues etc.
* Was looking for disk_layouts in the wrong place.
* changed numerous other references to disk_layouts looking in the wrong place.
* recreate generic_select and generic_multi_select functions
* flake8 complains
* Addressed some review issues
-> Options checks propagated to Menu(()
-> Options parameter inmutable at Menu()
-> Some text adapted
-> Sort will be handled by Menu()
-> Better handling of default value
* Solved the two problems found:
lack of list(dict.[keys/values] and impact in copy()
sideffects of renaming menu parameter options into p_options
* Now the problem of the copy was with a generator
* Add a log message whenever an "strange" object type is sent into Menu
* Validation of types has been streamlined.
Default values are now accesible to generic_select without restriction
When using archinstall on an existing Arch Linux installation, (e.g. for
migrating the current system on a new drive), no exception is raised if
mkfs.vfat is missing in the base install (no dosfstools package currently
installed).
* Global menu
* Fix flake8
* Refactor code
* Add documentation
* Fix flake8
* Add support for user flow mentioned in #799
* Move import
* Fix flake8 (again)
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
* Btrfs with encrypted partitions.
We have changed installer.mount_ordered_layout into a series of loops
* open the encrypted devices
* manage btrfs subvolumes
* mount whatever
* create kyefiles for encrypted volumes
We have simplified the btrfs subvolume manager
We merged the locale branch as it is needed here
* We allow only the creation of keyfiles if the partition does not contain the root mount point.
Also, adapt examples/only_hd to the new __init__.py
Also, assorted flake8 warnings
* Cleanup code
* Naming schema for encrypted volumes
revert global locale association (provisional)
* We introduce the option of defining mount options in the partition dictionary.
It has forced us to define two new entries in this dictionary:
* format_options (formerly options) for mkfs options and
* mount_options for mount -o ones.
The different meaning of compress between partition and subvolumes is treated
* Function lib/disk/btrfs.py mount_subvolume marked as deprecated
Code cleanup.
* format_options now filesystem.options
* format_options now filesystem.format_options
mount_options nof filesystem.mount_options
* flake8 uncovered a slip in the code
* Added type annotations for 1/5 of the files.
There's bound to be some issues with type miss-match, will sort that out later.
* Added type hints for 4/5 of the code
* Added type hints for 4.7/5 of the code
* Added type hints for 5/5 of the code base
* Split the linters into individual files
This should help with more clearly show which runner is breaking since they don't share a single common name any longer. Also moved mypy settings into pyproject.toml
* Fixed some of the last flake8 issues
* Missing parameter
* Fixed invalid lookahead types
* __future__ had to be at the top
* Fixed last flake8 issues
* Updated documentation
Mostly I've moved things around, cleaned up some dead paths and added more clarity.
* Cleaned up !superusers section
* Mentioning of accessibility
* Ask for NTP even if timezone is unset
* Ask for NTP before retrieving mirror list
* Activate NTP in the installer as soon as asked
* Removed excessive import
SysCommand is exposed through archinstall
* Removed f-string
Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
* Adding a Pipewire application profile
This to better manage the pipewire setup process and minimize guided a bit. This also adds the concept of @archinstall.plugin decorators to add a plugin in run-time. Which pipewire uses to detect user creation and enable the pipewire-pulse service for new users.
* Forgot to run .install() on pipewire Application()
* Backwards compatible variable insertion for installation session
* An update to PR 715, making the handling of the *--mount-point* parameter less error prone.
I added a synomym (accepting the name both with underscore and dash) and ignoring when no value specified
I added it explicitly to the list to accept both the --parm value and --parm=value syntax
DOES NOT check the contents of the parameter
* Explicitly set all the know parameters
* Define explictly all parameters.
Make all non explicitly defined parameters behave as standard parameters, with on exception, names are not changed
Some cleanup of the code
In guided.py the reference to the dry_run parameter is updated to the standard naming convention for parameters
* Linter with flake8. corrections
* Linter with flake8. corrections (II)
* Linter with flake8. corrections (and III)
* Added --disk_layout argument. Was missing
I moved its loading from guided.py to __init__.py as it happens to the other json related arguments
* Better handling of errors during processing of the --disk_layouts parameter.
I define a routine to read an store a JSON file or stream. Tested on disk_layout
* Expand the former commit to all JSON file arguments
* Moved the function we created to read json files/streams to general.py. Add some comments
* flake8. A reference now unneded
* The merge process for the dry-run argument was causing the issue, not solving it
The del is just a cleanup for version upgrade without consequence (I hope)
* flake8 warning
* Correcting the last correction . Worked for old config files, but only for them
* New parameter parsing algorithm. More flexible and accepts multiple arguments (optionallY)
plus some documentation effort
* flake8 warning. For once is significant ( != None to not None)
* better handling the skip partitioning option. plus sending some warnings to the user
* device configuration options taken out from ask_user_questions.
Forced by flake8
* Revert "device configuration options taken out from ask_user_questions."
This reverts commit 1b3cffb3df.
* Adapted to new selection ui
* Cleanup of obsolete code
* Changed colour of skip messages from red to yellow
* Flake8 comments
* All the changes needed to make btrfs subvolumes work. It boils down to two points;
the handling of the addressing of subvolumes re. physical partitions, and the small changes at the bootloader level
* We added a new script only_hd for testing purposes. It only handles hadrd drive management
* restoring an escape hatch during subvolume processing
* hipercommented manage_btrfs_subvolumes
* Ready to be able to select and process options in subvolume mounting
* Separte nodatacow processing
* Solving a flake8 complain
* Use of bind names @ get_filesystem_type
* compress mount option bypass
* Preparations for encryption handling
* Compatibility to master version re. encrypted btrfs volumes
* Now we can create subvolumes and mountpoints inside an encrypted btrfs partition
* changes for entries file generation with systemd-bootctl
* flake8 corrections plus some comments
Co-authored-by: Anton Hvornum <anton@hvornum.se>
Based on discussion in #777 it seems like this forces NetworkManager which is not desired. We need a way to detect network manager being selected and install this only in that case.
* Update partition.py
* Added sleep after partprobe
Added sleep after partprobe. Without this tools such as lsblk may be unable to retrieve certain properties of devices (such as partuuid).
* Add simple menu for better UX
* Add remove external dependency
* Fix harddisk return value on skip
* Table output for partitioning process
* Switch partitioning to simple menu
* fixup! Switch partitioning to simple menu
* Ignoring complexity and binary operator issues
Only in simple_menu.py
* Added license text to the MIT licensed file
* Added in versioning information
* Fixed some imports and removed the last generic_select() from user_interaction. Also fixed a revert/merged fork of ask_for_main_filesystem_format()
* Update color scheme to match Arch style better
* Use cyan as default cursor color
* Leave simple menu the same
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
Since we can create them, but as draft or locally through tagging. It's best to safe bet this to only published releases. Worst case manual submission has to be done.
* Added support for storing disk encryption keyfiles and add them to a keyslot.
* Added a luks2().add_key() function in order to inject a keyfile into a keyslot on a encrypted volume.
* Simplified 'missing encryption password' logic in Filesystem(). Added a call to luks2().add_key() after the root-password is set on the volume, to add the keyfile in slot 2
* Adding in password handling in luks2().add_key(). It's required to enter a previous passphrase to unlock the volume and add a new keyslot. Also simplified the handling of partition in Installer().mount_ordered_layout()
* Adding in encryption on all partitions except /boot when encryption is opted in
* Removed setting size on Partition() as it's a read only value. No idea how Partition().size = size hasn't caused an issue before. Removed size=X argument to Partition()
* Added a uniqueness to the loopdevice name. This should ensure that multiple encrypted volumes can be opened at the same time, except for Partition().detect_inner_filesystem() operations which can only happen one at a time since they share namespace. This should never be an issue since archinstall is single threaded and no concurrent operations can/should happen.
* Added partprobe() as part of disk/helpers.py, added a /dev/ -> UUID mapper function called convert_device_to_uuid(path). Added a luks2().crypttab() function that sets up a /etc/crypttab entry.
* Moved the responsability for telling archinstall to generate a keyfile from Filesystem() to user_interaction.py. This should in the future be a user-input based value, and not something the Filesystem() automatically dictates.
* Added a retry mechanism to luks2().encrypt() to avoid having to re-start the installation when a device simply wasn't up yet.
* Swapping UUID= lookup from loopdev to physdev.
* Moved convert_size_to_gb() into disk/helpers.py, Added a Partition().size property meta function. Using the .size value to check if /boot is too small which will raise an exception. The only drawback is that it's done post-formatting. This in order to catch scenarios where formatting isn't used.
* Changed /boot warning from 0.15GB to 0.25GB
* Changed the wording in the warning when /boot is too small.
* For fun, allow NTFS as a root filesystem type
Add ability to format a filesystem as NTFS
Try to force filesystem type
Fix FAT mounting
* Split out mount fs type method
* Handle rootfstype on non-GRUB bootloaders
* Add -Q to mkfs.ntfs command line for quick formatting
* I believe this will fix GRUB with NTFS root
* Remove the fsck hook if NTFS is used as the root partition
* Looks like the string is ntfs3 not ntfs so this logic wasn't running
* Simplified size definition in dict. Also changed from MiB to MB and GiB to GB on places where they were used, as BlockDevice().size now returns GB by default, so no math operations needed
* Appended the /boot offset to /root when specifying /home start.
* Added multiple `partprobe` calls and added a `.partprobe()` function on partitions, filesystem and blockdevice.
* Adding retry attempts to all UUID related operations tied to the boot process
* Tweaked logging for mounting and disk related operations
* Removed potential SysCall exception disruptor causing exceptions to go by unnoticed
* Increased the start position from 1MiB to 5MiB of /boot partition
* Optimized the GRUB installation & config code
* Improved Partition().uuid to never return None. Instead it will raise an exception if it can't get a PARTUUID within X retries with Y delay per attempt.
* Increased sleep timer for partition uuid retrieval, because even with a 3 second sleep it wasn't long enough even on fast devices.
* Make GRUB install to /dev/sda instead of /dev/sda1.
* Added 10 retries for retreiving PARTUUID with a one second sleep. Instead of increasing the sleep simply add more retries until we find a good balance on slower disks.
* Adding partprobe at strategic places.
* Swapped `for partition in blockdevice` to `for uuid, partition in blockdevice.partitions.items()` instead as `__iter__` for debugging purposes.
* `get_mount_info()` now causes a exception rather than returning nothing if there is nothing to be shown. This to avoid issues where in places this is crucial information and it went by unnoticeable. Using exception handlers where it doesn't matter if there's any information or not.
Created a new JSON serializer called `UNSAFE_JSON` that will serialize everything, including sensitive information. And `JSON` which is the default up to this point now safely ignores any sensitive information in dictionaries marked with `!`, for instance `{"!password" : "mypassword"}` will be omitted from any output.
It seems the system does not syncronus update its internal information after a partitioning.
Two places are affected. Directly on filesystem.add_partition (the uuid of the new partition isn't available after the parted command)
and blockdevice.get_partition, where the list of partitions for the iterator might not be available in the query.
The patch places both sections under controlled loops, giving the system the chance to update the information.
Should be more controlled via application parameters
* Clear storage variable if shutdown was successful
* Adding shutdown monitoring and debug output.
* It seams systemd-run gets a connection reset from running 'shutdown now', but in a good way - so it doesn't raise any exceptions. Or at least that's what it looks like.
+ BTRFS support
+ Refactoring of `disk.py` into `lib/disk/*.py`
+ `get_mount_info()` was reworked to support traverse backwards until mountpoint information is found (reverse-recursiveness)
+ `suggest_single_disk_layout()` was added/fixed to support BTRFS options
+ - `suggest_multi_disk_layout()` does not yet support BTRFS subvolumes in suggestive mode
+ `Installer()` now calls `create_subvolume()` and `mount_subvolume()` during loading of file structure on `mount_ordered_layout()`
File: lib/user_interaction.py
When function manage_new_and_existing_partitions() is used, and
'Suggest partition layout' is selected, the installer crashes.
REASON
Bug was introduced in commit 9e67ce3, when partition layout was
changed to use device.path as keys (instead of device).
It seems all necessary changes were made for this, except this one.
File: lib/disk.py
When installing on a loopback device (a.k.a loop device), function
Filesystem.partuuid_to_index() crashes with a JSON parsing error.
REASON
1) For loop devices, the property BlockDevice.device returns the
actual image file (back-file) of the loop device instead of the
/dev/X device.
2) Function Filesystem.partuuid_to_index() executes `lsblk --json`
against BlockDevice.device .
3) `lsblk` fails and prints the error "not a block device" to stderr.
This causes the output to not be valid JSON.
4) Code crashes when JSON parser tries to parse the output.
SOLUTION
- Make sure property BlockDevice.device only returns a valid block
device.
- Create new function BlockDevice.device_or_backfile that mimics
the present behaviour of BlockDevice.device.
- Use BlockDevice.device_or_backfile in function
BlockDevice.__repr__().
SOLUTION REASONING
I can only see one reason behind BlockDevice.device returning
the back-file of a loop device, and that is to show the back-file
to the user (instead of /dev/X) when printing the string
representation of a BlockDevice.
All other parts of the code can use the /dev/X file just fine.
And IMO it makes more sense that a property named `device` only
returns devices, and not normal files.
File: lib/user_interaction.py
When function manage_new_and_existing_partitions() is used, and
no partitions are configured, and 'Set desired filesystem for a
partition' is selected, the installer crashes.
File: lib/user_interaction.py
When function manage_new_and_existing_partitions() is used, and
'Suggest partition layout' is selected, the partition info is not
correctly stored in the config.
Instead of: {"partitions": [{...}, {...}]}
You get: {"partitions": {"partitions": [{...}, {...}], "wipe":True}}
Bug affects normal interactive usage (example/guided.py).
The timezone configured in the installer is not the timezone that
ends up in the new installed system. Instead, the timezone
used in the host system (from where the installer is run) is the
one that finally ends up being used.
Reason: systemd-nspawn by default copies the host timezone into
the target. And systemd-nspawn is run when keyboard-layout is
changed (which is done after changing the timezone).
Solution: Add option `--timezone=off` to systemd-nspawn, which
hinders affecting the timezone in the target.
I'm making sure that the JSON structure of the user config can get a say in how the subvolumes should be used later on. As well as splitting up where the logic should be to make it easier to maintain.
This should address #585, as I don't see any nvidia-dkms other than when linux-zen and linux-lts is chosen, I chose to put the -headers logic in the same section. If this is needed for vanilla `linux` kernel as well, then move the logic one line up.
`add_bootloader` no longer needs to have a harddrive given as a argument. It will (and should) auto-detect what's mounted in the `self.target` (aka mountpoint) of the installation.
I tweaked the optimized return of check_output. Worth mentioning that `check_output()` will raise an exception `subprocess.CalledProcessError: Command 'lscpu | grep AMD' returned non-zero exit status 1.`.
The old behavior of SysCommand was that exit codes raised an exception, which needed to be handled by each individual caller. We now utilize `.exit_code` instead to manually detect faulty commands and raise exceptions where needed.
As of deepin-session-shell 5.4.42-2 (which is in the deepin group), lightdm is added as a dependency because of lightdm-deepin-greeter. A configuration (usr/share/lightdm/lightdm.conf.d/60-deepin.conf) in startdde (also in the deepin group) should override default lightdm configuration to use lightdm-deepin-greeter instead of the gtk greeter. Thus these two packages could be removed from the profile now.
This effectively reverts #441
Rewrite some function
if condition is True then return true else return false, transform in return condition directly
Also I don't understand why we need a try/except at line 151 and why we not write return condition ??
* Set the resolved profile path to the actual desktop environment
* split Nvidia driver list into proprietary and open-source
* Updated select_driver to use archinstall.arguments for driver selection
* Adding default value that works with later .get()
* audio will now be prompted irrespective of profile
* Implement is_desktop_profile helper function
* Make ask_for_audio_selection use generic_select
* Fix default value for audio selection
* Leverage list of supported desktops to perform is_desktop_profile check
* is_desktop_profile was missing a default return value
* Store return value for audio server
Since pacman and some other commands these days write multiple lines and goes back and fourth, it's not reliable to say the "peaked" line is a single line. And if it's not, it will make the output look like garbage.
So instead, we'll write any output - as is - and let the command deal with fancy printing.
This fix introduces changes so that development can be done (and tested) on other platforms than Linux. This is a convenience fix and shouldn't break anything (simply a few Linux-specific imports that have moved into the functions where they are used).
This commit also introduces sorting based on a list of priorities (where the default will be last if not matched).
* added support for ingesting config
* fixed condition to check key in dictionary
* Removed redundant code, profile and desktop keys are now optional
* Added base-config.json and support for pulling credentials from .env
* added base config file and env file for users credentials
* added silent install switch
* added python-dotenv as a dependency
* Updated Readme to include argparse changes as well as config ingestion
* Updated Readme to include argparse changes as well as config ingestion
* fixed typo in pyproject.toml
* Replaced the magic __builtin__ global variable. This should fix mypy complaints while still retaining the same functionality, kinda. It's less automatic but it's also less of dark magic, which makes sense for anyone but me.
* Fixes string index error.
* Quotation error.
* fixed initializing --script argument
* added python-dotenv as a dependency
* Installation can't be silent if config is not passed
* fixed silent install help
* fixed condition for ask_user_questions
* reverted to creating profile object properly
* Cleaned up and incorporated suggestions
* added Profile import
* added condition if Profile is null
* fixed condition
* updated parsing vars from argparse
* removed loading users from .env
* Reworking SysCommand & Moving to localectl for locale related activities (#4)
* Moving to `localectl` rather than local file manipulation *(both for listing locales and setting them)*.
* Swapped `loadkeys` for localectl.
* Renamed `main` to `maim` in awesome profile.
* Created `archinstall.Boot(<installation>)` which spawns a `systemd-nspawn` container against the installation target.
* Exposing systemd.py's internals to archinstall global scope.
* Re-worked `SysCommand` completely, it's now a wrapper for `SysCommandWorker` which supports interacting with the process in a different way. `SysCommand` should behave just like the old one, for backwards compatibility reasons. This fixes#68 and #69.
* `SysCommand()` now has a `.decode()` function that defaults to `UTF-8`.
* Adding back peak_output=True to pacstrap.
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
Co-authored-by: Dylan Taylor <dylan@dylanmtaylor.com>
Co-authored-by: Anton Hvornum <anton@hvornum.se>
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
* fixed indent
* removed redundant import
* removed duplicate import
* removed duplicate import
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
Co-authored-by: Anton Hvornum <anton@hvornum.se>
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
* Moving to `localectl` rather than local file manipulation *(both for listing locales and setting them)*.
* Swapped `loadkeys` for localectl.
* Renamed `main` to `maim` in awesome profile.
* Created `archinstall.Boot(<installation>)` which spawns a `systemd-nspawn` container against the installation target.
* Exposing systemd.py's internals to archinstall global scope.
* Re-worked `SysCommand` completely, it's now a wrapper for `SysCommandWorker` which supports interacting with the process in a different way. `SysCommand` should behave just like the old one, for backwards compatibility reasons. This fixes#68 and #69.
* `SysCommand()` now has a `.decode()` function that defaults to `UTF-8`.
* Adding back peak_output=True to pacstrap.
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
Co-authored-by: Dylan Taylor <dylan@dylanmtaylor.com>
This change reverts a previous change that disabled sorting by default in the multi select function, which would be better disabled manually for pre-sorted lists than manually enabling for unsorted lists.
Also, comments of the line check have been slightly changed
- Reverted some changes for default options in multi select
- Added check for dict and convert from dict to list
- Replaced spaces with tabs for certain comment line
Changes:
- Moved some functions for options below checks for the correctness of passed options
- Removed unnecessary `continue` from `except ...`, since the loop will return to the beginning anyway
- Added stripping of `selected_option` straight on input
- Changed check `len() == 0` to `not ...`
- Returned changing string to number on check
===
- Removed '!' as they look weird inside such ` * ... * ` log style (Change for generic_multi_select)
Changes:
- Add useful checks from `generic_select`
- Sorting is now disabled by default (As many lists are already sorted)
- Some checks have been changed (This includes unnecessary checks with `len()`, etc.)
- Removed x, y from `print_large_list` as they aren't used in code
- Added check for string to strip it without getting `AttributeError`
- Switched to RequirementError handling as in `generic_select`
- Added a log when the default option is selected with unselected options by the user
- Added break when adding default option to empty list (See comments for more info)
- Added support for selecting option by name
* Added a postgres application profile. Also introducing runas to the arch_chroot of the installation, to run commands as emulated users. This is highly WIP at the moment.
* Fixing top-level-listing of profiles. As well as testing some postgres installation steps.
* Removed dupe functions.
* Added safety check in case a comment mentions the top level profile thing.
* Patching namespace corruption.
* Avoiding runtime collision due to installation not being initiated yet.
* Allow for parameterization of filesystem in guided.
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
* Cleaning up packages. installer now relies on __packages__ definition. Which will work with external libs to more easily gather packages used by installer and profiles.
* Added back the logic for the log message, where we inform if we're adding the boot loader to root or boot.
* Added __package__ definition to profiles and the installer. These packages can be used as an indication from outside libraries of what could *possibly* be installed. For instance an offline-tool could source these, it would source more than it needed to, but it would give a quick rundown of what might be needed.
* Removed import of __base__packages__ as it's now just __packages__ after a lot of stream-lining.
* Explosion misspelling.
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
* Added a mini curses class. It can do some simple tricks to iterate over menu options and indicate which ones are chosen using generic_multi_select().
* Include the default parameter if set.
* Modified 'select_kernel()' to use the new multi-select.
* Sneaky character got in.
* removed some debugging
* removed some debugging
* Spelling error
* Adding error handling and loop support.
* Enforce that 'default' is always selected if no other option is selected.
* Fixed backspace issues and ghosting.
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
* Moving away from custom log levels, to something that's well defined.
* Added backward compability to log() as well.
* Added an option to force log messages out on screen even if the level is below the log level threashold.
* Added force log messages when wrong notation is used.
* Added some more length to the deprecated message
* Swapped all log levels to use logging.<level> instead.
Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
- Unified view of warning (red) and info (yellow) logs
- Fixed some PEP8 related issues, like removing redundant f-strings and replacing double quotes to single ones
- Removed warning logging level for simple logs
- Removed other background color settings for logs to fully close https://github.com/archlinux/archinstall/pull/171
I prefer to easily spot an endless loop by not having external variables attached to the loop condition.
Since we never updated `exists` it's a dummy variable that I expect to be updated some where in order to break it.
When that's not the case, it's more clear that it's an endless loop if there's no conditions attached to the loop definition.
Here are list of changes:
- Added IP/subnet validation using Python's `ipaddress` module
- Added workaround for network configuration modes where user can enter DHCP or IP without brackets.
- Returned local printing options for some functions to keep `The above list...`
- Moved booleans for `generic_select` below options and text parameters
- Imported some functions from `archinstall` to reduce the`archinstall.` part of the lines.
- Reduced variable name length for simplicity
- Fixed some typos
Here are list of changes:
> From now on, `generic_select` will be called "Select function", for clarity
- Slightly updated select function
- Removed options output for some functions, where it's better to do with select function
- Added sorting for all lists passed to select function
- Replaced `dict.values()` with `dict` as options parameter
- Simplified input checking for all functions that use the select function
- Added temporary *(for now)* workaround for passing `?` and `help` inputs
- Merged fix for `partition.format()`
Here are list of changes:
- Removed `sort` parameter, since every function has a sorted list in most cases
- Added two new parameters to disable local output of options items and allow empty input from the user by returning None
- Added a while loop, where it returns each time a RequirementError is raised
- Added log info for each input error to help figure out what the problem is
- Changed the check of the stripped input length to compare with 0, since the length cannot be less than 0
- Changed `isdigit` to `isnumeric`, which returns False if given digit is negative
- Slightly changed a check for an out of range error
- Removed displaying the list of available options when input is incorrect, in order to prevent the screen from overflowing
- Added log info if options list is empty
- Added log info if options are not dictionary or list
- Added dictionary values conversion to accept only list and dictionaries as option
- Added sorting dictionary values by default
This caused languages such as `be-latin1` to be hidden both in Search and direct input.
Because as an example that layout belongs to `azerty` and not `qwerty`.
Out of bounds check in generic_selection is using >= on list. Lists are zero based. If you put in a value that equals the number of items in the list you get an out of bounds error.
Removed the equals part of the test as last item in list/dictionary items is len(list)-1 not len(list)
gnome todo and gnome sound recorder should not be in default installation, honoring the Arch Linux philosophy. These packages are not even pre installed on other major linux distributions.
Also think that we should patch mkinitcpio, not replace it.
Especially in the btrfs case where we simply just want to add `btrfs` to the `MODULES` section.
archinstall should be callable from the command-line.
Previously this was achieved with a shell script,
however Python packages contain a built in way to to
this via the entry points mechanism.
gnome todo and gnome sound recorder should not be in default installation, honoring the Arch Linux philosophy. These packages are not even pre installed on other major linux distributions.
Implement PipeWire sound server as an option, merging so we can work on this more. No this will not make it into the release as-is, it's just a working branch and this will change :)
Also think that we should patch mkinitcpio, not replace it.
Especially in the btrfs case where we simply just want to add `btrfs` to the `MODULES` section.
* Clarify that 'awesome' is a window manager, and not a network-related
entity.
* Add a link to Profile documentation.
* Remove a trailing whitespace.
Signed-off-by: Leonid Bloch <lb.workbox@gmail.com>
archinstall should be callable from the command-line.
Previously this was achieved with a shell script,
however Python packages contain a built in way to to
this via the entry points mechanism.
Ensure that all arguments are properly quoted.
Improve readability by using long-form arguments only.
Use identical arguments for both cryptsetup calls,
to prevent them from accidentally diverging in future commits.
Fixes a simple spelling error when the user is asked to select a filesystem.
"Select which filesystem your main partition should use (by number **of** name)" should be **or**.
If empty hard drives are being set up for the first time, then `.has_content()`'s `mount` call will fail with `wrong fstype` since there's no filesystem yet. First step in this case is to check for that scenario, then check for content.
I updated the build instructions, mainly because they were old. But also because archiso has changed quite a bit since I wrote it. And I appended a script that will make running a bit easier *(not a perfect script, but does the job)*.
# This workflow will upload a Python Package when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name:Upload archinstall to PyPi
on:
release:
types:[published ]
jobs:
deploy:
runs-on:ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for Trusted Publishing
- echo "echo \"This is an unofficial ISO for development and testing of archinstall. No support will be provided.\"" >> /tmp/archlive/airootfs/root/.zprofile
- echo "echo \"This ISO was built from Git SHA $CI_COMMIT_SHA\"" >> /tmp/archlive/airootfs/root/.zprofile
- echo "echo \"Type archinstall to launch the installer.\"" >> /tmp/archlive/airootfs/root/.zprofile
Any contributions through pull requests are welcome as this project aims to be a community based project to ease some Arch Linux installation steps.<br>
Bear in mind that the future of this repo might be transferred to the official [GitLab repo under Arch Linux](http://gitlab.archlinux.org/archlinux/) *(if they so choose to adopt the project)*.
Therefore guidelines and style changes to the code might come into affect as well as guidelines surrounding bug reporting and discussions.
Any contributions through pull requests are welcome as this project aims to be a community based project to ease some Arch Linux installation steps.
Bear in mind that in the future this repo might be transferred to the official [GitLab repo under Arch Linux](http://gitlab.archlinux.org/archlinux/) *(if GitLab becomes open to the general public)*.
Therefore, guidelines and style changes to the code might come into effect as well as guidelines surrounding bug reporting and discussions.
## Branches
`master` is currently the default branch, and that's where all future feature work is being done, this means that `master` is a living entity and will most likely never be in a fully stable state.
For stable releases, please see the tagged commits.
Patch releases will be done against their own branches, branched from stable tagged releases and will be named according to the version it will become on release.
*(Patches to `v2.1.4` will be done on branch `v2.1.5` for instance)*.
## Discussions
Currently, questions, bugs and suggestions should be reported through [GitHub issue tracker](https://github.com/Torxed/archinstall/issues).<br>
For less formal discussions there are also a [archinstall Discord server](https://discord.gg/cqXU88y).
Currently, questions, bugs and suggestions should be reported through [GitHub issue tracker](https://github.com/archlinux/archinstall/issues).<br>
For less formal discussions there is also an [archinstall Discord server](https://discord.gg/aDeMffrxNg).
## Coding convention
Archinstall's goal is to follow [PEP8](https://www.python.org/dev/peps/pep-0008/) as best as it can with some minor exceptions.<br>
ArchInstall's goal is to follow [PEP8](https://www.python.org/dev/peps/pep-0008/) as best as it can with some minor exceptions.<br>
The exceptions to PEP8 are:
* Archinstall uses [tabs instead of spaces](https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces) simply to make it easier for non-IDE developers to navigate the code *(Tab display-width should be equal to 4 spaces)*. Exception to the rule are comments that need fine-tuned indentation for documentation purposes.
* [Line length](https://www.python.org/dev/peps/pep-0008/#maximum-line-length) should aim for no more than 100 characters, but not strictly enforced.
* [Line breaks before/after binary operator](https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator) is not enforced, as long as the style of line breaks are consistent within the same code block.
* Archinstall should always be saved with **Unix-formatted line endings** and no other platform-specific formats.
* [Blank lines](https://www.python.org/dev/peps/pep-0008/#blank-lines) before/after imports and functions are not followed and discouraged. One space is commonly used in archinstall.
* Multiple [Imports](https://www.python.org/dev/peps/pep-0008/#imports) on the same line is allowed, but more than five imports should be avoided on any given line. This simply saves up some space at the top of the file *(for non-IDE developers)* and will not be enforced.
* [String quotes](https://www.python.org/dev/peps/pep-0008/#string-quotes) follow PEP8, the exception being when creating formatted strings, double-quoted strings are *preferred* but not required on the outer edges *(Example: `f"Welcome {name}"` rather than `f'Welcome {name}'`)*.
* Archinstall uses [tabs instead of spaces](https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces) simply to make it
easier for non-IDE developers to navigate the code *(Tab display-width should be equal to 4 spaces)*. Exception to the
rule are comments that need fine-tuned indentation for documentation purposes.
* [Line length](https://www.python.org/dev/peps/pep-0008/#maximum-line-length) a maximum line length is enforced via flake8 with 160 characters
* Archinstall should always be saved with **Unix-formatted line endings** and no other platform-specific formats.
* [String quotes](https://www.python.org/dev/peps/pep-0008/#string-quotes) follow PEP8, the exception being when
creating formatted strings, double-quoted strings are *preferred* but not required on the outer edges *(
Example: `f"Welcome {name}"` rather than `f'Welcome {name}'`)*.
Most of these style guidelines have been put into place after the fact *(in an attempt to clean up the code)*.<br>
There might therefore be older code which does not follow the coding convention and the code is subject to change.
## Git hooks
`archinstall` ships pre-commit hooks that make it easier to run checks such as `mypy`, `ruff check`, and `flake8` locally.
The checks are listed in `.pre-commit-config.yaml` and can be installed via
```
pre-commit install
```
This will install the pre-commit hook and run it every time a `git commit` is executed.
## Documentation
If you'd like to contribute to the documentation, refer to [this guide](docs/README.md) on how to build the documentation locally.
## Submitting Changes
Archinstall uses Github's pull-request workflow and all contributions in terms of code should be done through pull requests.<br>
Archinstall uses GitHub's pull-request workflow and all contributions in terms of code should be done through pull requests.<br>
Anyone interested in archinstall may review your code. One of the core developers will merge your pull request when they think it is ready.
For every pull request, we aim to promptly either merge it or say why it is not yet ready; if you go a few days without a reply, please feel free to ping the thread by adding a new comment.
Anyone interested in archinstall may review your code. One of the core developers will merge your pull request when they
think it is ready. For every pull request, we aim to promptly either merge it or say why it is not yet ready; if you go
a few days without a reply, please feel free to ping the thread by adding a new comment.
To get your pull request merged sooner, you should explain why you are making the change. For example, you can point to a code sample that is outdated in terms of Arch Linux command lines.
It is also helpful to add links to online documentation or to the implementation of the code you are changing.
To get your pull request merged sooner, you should explain why you are making the change. For example, you can point to
a code sample that is outdated in terms of Arch Linux command lines. It is also helpful to add links to online
documentation or to the implementation of the code you are changing.
Also, do not squash your commits after you have submitted a pull request, as this erases context during review. We will squash commits when the pull request is merged.
Also, do not squash your commits after you have submitted a pull request, as this erases context during review. We will
squash commits when the pull request is merged.
At present the current contributors are (alphabetically):
Maintainer:
* Anton Hvornum ([@Torxed](https://github.com/Torxed))
* Anton Hvornum ([@Torxed](https://github.com/Torxed))
[](https://github.com/archlinux/archinstall/actions/workflows/flake8.yaml)
Just another guided/automated [Arch Linux](https://wiki.archlinux.org/index.php/Arch_Linux) installer with a twist.
The installer also doubles as a python library to install Arch Linux and manage services, packages and other things inside the installed system *(Usually from a live medium)*.
* archinstall [discord](https://discord.gg/cqXU88y) server
The installer also doubles as a python library to install Arch Linux and manage services, packages, and other things inside the installed system *(Usually from a live medium or from an existing installation)*.
* archinstall [discord](https://discord.gg/aDeMffrxNg) server
> In the ISO you are root by default. Use sudo if running from an existing system.
$ sudo pacman -S archinstall
```shell
pacman-key --init
pacman -Sy archinstall
archinstall
```
Or simply `git clone` the repo as it has no external dependencies *(but there are optional ones)*.<br>
Or run the pre-compiled binary attached in every release as `archinstall-v[ver].tar.gz`.
Alternative ways to install are `git clone` the repository (and is better since you get the latest code regardless of [build date](https://archlinux.org/packages/?sort=&q=archinstall)) or `pip install --upgrade archinstall`.
## Running the [guided](examples/guided.py) installer
## Upgrade `archinstall` on live Arch ISO image
Assuming you are on a Arch Linux live-ISO and booted into EFI mode.
Upgrading archinstall on the ISO needs to be done via a full system upgrade using
```shell
pacman -Syu
```
When booting from a live USB, the space on the ramdisk is limited and may not be sufficient to allow running a re-installation or upgrade of the installer.
In case one runs into this issue, any of the following can be used
* Resize the root partition https://wiki.archlinux.org/title/Archiso#Adjusting_the_size_of_the_root_file_system
* Specify the boot parameter copytoram=y (https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio-archiso/-/blob/master/docs/README.bootparams#L26) which will copy the root filesystem to tmpfs
## Running the [guided](https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py) installer
Assuming you are on an Arch Linux live-ISO or installed via `pip`, `archinstall` will use the `guided` script by default
```shell
archinstall
```
similar goes for running the [guided](https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py) installer using `git
To run alternative scripts using the `--script` parameter
```
archinstall --script <name>
```
#### Advanced
Some additional options that most users do not need are hidden behind the `--advanced` flag and all options/args can be consulted through `-h` or `--help`.
## Running from a declarative configuration file or URL
`archinstall` can be run with a JSON configuration file. There are 2 different configuration files to consider,
the `user_configuration.json` contains all general installation configuration, whereas the `user_credentials.json`
contains the sensitive user configuration such as user password, root password, and encryption password.
An example of the user configuration file can be found here
By default, all user account credentials are hashed with `yescrypt` and only the hash is stored in the saved `user_credentials.json` file.
This is not possible for disk encryption password which needs to be stored in plaintext to be able to apply it.
However, when selecting to save configuration files, `archinstall` will prompt for the option to encrypt the `user_credentials.json` file content.
A prompt will require to enter a encryption password to encrypt the file. When providing an encrypted `user_configuration.json` as a argument with `--creds <user_credentials.json>`
there are multiple ways to provide the decryption key:
* Provide the decryption key via the command line argument `--creds-decryption-key <password>`
* Store the encryption key in the environment variable `ARCHINSTALL_CREDS_DECRYPTION_KEY` which will be read automatically
* If none of the above is provided a prompt will be shown to enter the decryption key manually
# Help or Issues
If you come across any issues, kindly submit your issue here on GitHub or post your query in the
[discord](https://discord.gg/aDeMffrxNg) help channel.
When submitting an issue, please:
* Provide the stacktrace of the output if applicable
* Attach the `/var/log/archinstall/install.log` to the issue ticket. This helps us help you!
* To upload the log from the ISO image and get a shareable URL, run<br>
```shell
archinstall share-log
```
# Available Languages
Archinstall is available in different languages which have been contributed and are maintained by the community.
The language can be switched inside the installer (first menu entry). Bear in mind that not all languages provide
full translations as we rely on contributors to do the translations. Each language has an indicator that shows
how much has been translated.
Any contributions to the translations are more than welcome,
to get started please follow [the guide](https://github.com/archlinux/archinstall/blob/master/archinstall/locales/README.md)
## Fonts
The ISO does not ship with all fonts needed for different languages.
Fonts that use a different character set than Latin will not be displayed correctly. If those languages
want to be selected then a proper font has to be set manually in the console.
All available console fonts can be found in `/usr/share/kbd/consolefonts` and set with `setfont LatGrkCyr-8x16`.
# python -m archinstall guided
# Scripting your own installation
You could just copy [guided.py](examples/guided.py) as a starting point.
## Scripting interactive installation
But assuming you're building your own ISO and want to create an automated install process, or you want to install virtual machines on to local disk images.<br>
This is probably what you'll need, a [minimal example](examples/minimal.py) of how to install using archinstall as a Python library.
For an example of a fully scripted, interactive installation please refer to the example
* Prompt the user to select a disk and disk-password
* Proceed to wipe the selected disk with a `GPT` partition table.
* Sets up a default 100% used disk with encryption.
* Installs a basic instance of Arch Linux *(base base-devel linux linux-firmware btrfs-progs efibootmgr)*
* Installs and configures a bootloader to partition 0.
* Install additional packages *(nano, wget, git)*
* Installs a network-profile called [workstation](https://github.com/Torxed/archinstall/blob/master/profiles/workstation.json) *(more on network profiles in the docs)*
The profiles' definitions and the packages they will install can be directly viewed in the menu, or
> **Creating your own ISO with this script on it:** Follow [ArchISO](https://wiki.archlinux.org/index.php/archiso)'s guide on how to create your own ISO or use a pre-built [guided ISO](https://hvornum.se/archiso/) to skip the python installation step, or to create auto-installing ISO templates. Further down are examples and cheat sheets on how to create different live ISO's.
# Help
Submit an issue on Github, or submit a post in the discord help channel.<br>
When doing so, attach any `install-session_*.log` to the issue ticket which can be found under `~/.cache/archinstall/`.
# Testing
## Using a Live ISO Image
If you want to test a commit, branch, or bleeding edge release from the repository using the standard Arch Linux Live ISO image,
replace the archinstall version with a newer one and execute the subsequent steps defined below.
1. You need a working network connection
2. Install the build requirements with `pacman -Sy; pacman -S git python-pip gcc pkgconf`
*(note that this may or may not work depending on your RAM and current state of the squashfs maximum filesystem free space)*
3. Uninstall the previous version of archinstall with `pip uninstall --break-system-packages archinstall`
4. Now clone the latest repository with `git clone https://github.com/archlinux/archinstall`
5. Enter the repository with `cd archinstall`
*At this stage, you can choose to check out a feature branch for instance with `git checkout v2.3.1-rc1`*
6. To run the source code, there are 2 different options:
- Run a specific branch version from source directly using `python -m archinstall`, in most cases this will work just fine, the
rare case it will not work is if the source has introduced any new dependencies that are not installed yet
- Installing the branch version with `pip install --break-system-packages .` and `archinstall`
## Without a Live ISO Image
To test this without a live ISO, the simplest approach is to use a local image and create a loop device.<br>
This can be done by installing `pacman -S arch-install-scripts util-linux` locally and doing the following:
This will create a *5GB*`testimage.img` and create a loop device which we can use to format and install to.<br>
`archinstall` is installed and executed in [guided mode](#docs-todo). Once the installation is complete,<br>
~~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 gives you a general idea of what we're going for here)*
This will create a *20 GB* `testimage.img` and create a loop device which we can use to format and install to.<br>
`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.~~<br>
*(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)*
You can also run a pre-built ISO with pip and python
There's also a [Building and Testing](https://github.com/archlinux/archinstall/wiki/Building-and-Testing) guide.<br>
It will go through everything from packaging, building and running *(with qemu)* the installer against a dev branch.
`archinstall` will not offer or bundle AUR helpers or AUR packages due to a current consensus. This is not any individual developers decision. The reasons and discussions for this stance on the topic can be found on our mailing list thread: [(optional) AUR helper in archinstall](https://lists.archlinux.org/archives/list/arch-dev-public@lists.archlinux.org/thread/VYOULH2GOJLFM2BXOFLWH3D754YXFPSL/).
## Keyring out-of-date
For a description of the problem see https://archinstall.archlinux.page/help/known_issues.html#keyring-is-out-of-date-2213 and discussion in issue https://github.com/archlinux/archinstall/issues/2213.
For a quick fix the below command will install the latest keyrings
```pacman -Sy archlinux-keyring```
## How to dual boot with Windows
To install Arch Linux alongside an existing Windows installation using `archinstall`, follow these steps:
1. Ensure some unallocated space is available for the Linux installation after the Windows installation.
7. Determine the start and end sectors for the new partition location (values can be suffixed with various units).
8. Assign the mountpoint `/` to the new partition.
9. Assign the `Boot/ESP` partition the mountpoint `/boot` from the partitioning menu.
10. Confirm your settings and exit to the main menu by choosing `Confirm and exit`.
11. Modify any additional settings for your installation as necessary.
12. Start the installation upon completion of setup.
# Mission Statement
Archinstall promises to ship a [guided installer](https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py) that follows
the [Arch Linux Principles](https://wiki.archlinux.org/index.php/Arch_Linux#Principles) as well as a library to manage services, packages, and other Arch Linux aspects.
The guided installer ensures a user-friendly experience, offering optional selections throughout the process. Emphasizing its flexible nature, these options are never obligatory.
In addition, the decision to use the guided installer remains entirely with the user, reflecting the Linux philosophy of providing full freedom and flexibility.
---
Archinstall primarily functions as a flexible library for managing services, packages, and other elements within an Arch Linux system.
This core library is the backbone for the guided installer that Archinstall provides. It is also designed to be used by those who wish to script their own custom installations.
Therefore, Archinstall will try its best to not introduce any breaking changes except for major releases which may break backward compatibility after notifying about such changes.
# Contributing
Please see [CONTRIBUTING.md](https://github.com/archlinux/archinstall/blob/master/CONTRIBUTING.md)