Commit Graph

32 Commits

Author SHA1 Message Date
Softer 79f5db5544 Update dev_vm.sh whitelist path after move under scripts/ 2026-04-26 18:33:13 +03:00
Softer 8153da36b8 Add developer VM script for faster testing iteration
Introduces dev_vm.sh, a QEMU launcher paired with a minimal archiso-built
dev ISO. The project source is shared read-only into the guest over 9p,
so host edits appear live inside the VM without rebuilding the ISO on
every change. The guest auto-mounts the share at /root/archinstall-dev
and aliases `archinstall` to `python -m archinstall` from that path.

The runtime package list is derived at build time from pyproject.toml
so the script stays in sync with upstream dependencies automatically.
OVMF paths are probed across Arch, Debian/Ubuntu, and Fedora layouts,
and an Arch-based host is verified via /etc/os-release before pacman.

.gitignore: whitelist dev_vm.sh under the existing **/**.sh blanket and
ignore the .dev-iso/ and .dev-configs/ artifact folders.
2026-04-24 12:40:52 +03:00
correctmost ef3369b1c5
Add node_modules to .gitignore and Pylint's ignore list (#4089)
This makes it easier to use Pyright locally.
2026-01-07 11:54:54 +11:00
Daniel Girtler 245b84194a
Remove duplicate loading of archinstall (#3200) 2025-02-25 20:31:38 +11:00
Daniel Girtler 88b91ae201
Integrate new curses menu (#2663)
* 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>
2024-11-15 08:23:22 +01:00
Anton Hvornum 98518e444a
Use `/mirrors/status/json/` instead of `/mirrorlist/` to get mirror lists (#2599)
* 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.
2024-08-02 15:24:44 +02:00
Anton Hvornum 195eb0ba6d
Fixing issue with `python -m build --wheel` generating "_Warning: Package 'archinstall.default_profiles' is absent from the `packages` configuration" (#2499)
* 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'
2024-05-13 15:17:05 +02:00
Daniel Girtler 00b0ae7ba4
PyParted and a large rewrite of the underlying partitioning (#1604)
* Invert mypy files

* Add optional pre-commit hooks

* New profile structure

* Serialize profiles

* Use profile instead of classmethod

* Custom profile setup

* Separator between back

* Support profile import via url

* Move profiles module

* Refactor files

* Remove symlink

* Add user to docker group

* Update schema description

* Handle list services

* mypy fixes

* mypy fixes

* Rename profilesv2 to profiles

* flake8

* mypy again

* Support selecting DM

* Fix mypy

* Cleanup

* Update greeter setting

* Update schema

* Revert toml changes

* Poc external dependencies

* Dependency support

* New encryption menu

* flake8

* Mypy and flake8

* Unify lsblk command

* Update bootloader configuration

* Git hooks

* Fix import

* Pyparted

* Remove custom font setting

* flake8

* Remove default preview

* Manual partitioning menu

* Update structure

* Disk configuration

* Update filesystem

* luks2 encryption

* Everything works until installation

* Btrfsutil

* Btrfs handling

* Update btrfs

* Save encryption config

* Fix pipewire issue

* Update mypy version

* Update all pre-commit

* Update package versions

* Revert audio/pipewire

* Merge master PRs

* Add master changes

* Merge master changes

* Small renaming

* Pull master changes

* Reset disk enc after disk config change

* Generate locals

* Update naming

* Fix imports

* Fix broken sync

* Fix pre selection on table menu

* Profile menu

* Update profile

* Fix post_install

* Added python-pyparted to PKGBUILD, this requires [testing] to be enabled in order to run makepkg. Package still works via python -m build etc.

* Swaped around some setuptools logic in pyproject

Since we define `package-data` and `packages` there should be no need for:
```
[tool.setuptools.packages.find]
where = ["archinstall", "archinstall.*"]
```

* Removed pyproject collisions. Duplicate definitions.

* Made sure pyproject.toml includes languages

* Add example and update README

* Fix pyproject issues

* Generate locale

* Refactor imports

* Simplify imports

* Add profile description and package examples

* Align code

* Fix mypy

* Simplify imports

* Fix saving config

* Fix wrong luks merge

* Refactor installation

* Fix cdrom device loading

* Fix wrongly merged code

* Fix imports and greeter

* Don't terminate on partprobe error

* Use specific path on partprobe from luks

* Update archinstall/lib/disk/device_model.py

Co-authored-by: codefiles <11915375+codefiles@users.noreply.github.com>

* Update archinstall/lib/disk/device_model.py

Co-authored-by: codefiles <11915375+codefiles@users.noreply.github.com>

* Update github workflow to test archinstall installation

* Update sway merge

* Generate locales

* Update workflow

---------

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>
Co-authored-by: codefiles <11915375+codefiles@users.noreply.github.com>
2023-04-19 12:55:42 +02:00
Anton Hvornum eec45643e9
Updating Partition() information after mount and unmount. (#1508)
* 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
2022-10-12 14:17:14 +02:00
Anton Hvornum 8d15683752
Made archinstall build reproducable when generating docs 2022-03-28 09:24:17 +02:00
Erick G. Islas-Osuna feffa69042
Spanish translation file (#941)
* wip: add base.po for spanish

* feat: spanish translation

* fix: ignore backup files

* Resolve merge conflicts for spanish translation PR

* new translations

Co-authored-by: Anton Hvornum <anton@hvornum.se>
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
2022-02-08 21:06:45 +01:00
Daniel 20e23dcecd
Add locale script (#945)
* Add locales script

* Add gitignore exception

Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
2022-02-06 15:17:43 +01:00
Daniel 9fb8d3164c
Update nationalization (#944)
* Update nationalization

* Update translations

* Finish german translation

* Fix errors #943

* Add remaining translations

* Fix alignment in menu

* Update README

* Update translations:

* Fix flake8

* Update tz function

Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
2022-02-06 11:30:26 +01:00
Anton Hvornum 1aa738691e
Fixing the 'device_instance' being None in some partition places (#902)
* 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>
2022-01-25 16:09:34 +01:00
remLse c6b499cf47
Update documentation (#803)
* Add guide for building docs locally

* Update documentation

- Fix typos
- Fix some formatting
- Fix broken links
- Improve readability of json profile specification
2021-12-18 19:01:40 +01:00
Daniel 908c7b8cc0
Add simple menu for better UX (#660)
* 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>
2021-12-02 21:17:51 +01:00
Anton Hvornum 49e6cbdc54
Reworking SysCommand & Moving to localectl for locale related activities
* 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>
2021-05-19 16:45:13 +02:00
Dylan Taylor 8eebc8ade3 Add some ignores so I don't accidentally commit files 2021-05-15 12:17:46 -04:00
Anton Hvornum 04804e6edc Corrected error handling for log creation. 2021-04-28 14:28:21 +02:00
Anton Hvornum 4db40c06eb Removed guided.py that was copied in to the root and added to gitignore. 2021-04-21 13:15:42 +02:00
Aggam Rahamim f6fdc11927 fixing - letting user choose kernel 2021-04-16 13:54:22 +03:00
Aggam Rahamim 459f161cf0 added option to choose kernel 2021-04-16 12:01:20 +03:00
Anton Hvornum 7358dc5a03 Added some basic/crude graphics checks in hardware.py 2021-01-25 10:42:02 +01:00
Anton Hvornum ec638351e8
Version bump. All future releases will now be PGP-signed. 2021-01-20 00:40:08 +01:00
Anton Hvornum 07d70a0a91 Added a simple INI handler, and a helper function under Installer().configure_nic() to help with nic configuration. Supports a crude DHCP configuration and a minimal static IP handler. 2020-11-11 19:11:22 +00:00
Anton Hvornum c6e61df5c4 Apparently empty source definitions aren't allowed. 2020-10-01 11:31:06 +02:00
Anton Hvornum 2e0295d501 Added a build script for my own sanity 2020-07-10 08:46:00 +00:00
Anton Hvornum fc4790b33c Added symlinks instead of copying when building. Also mofied the __file__ path in __main__.py as it was pointing a bit off for some reason 2020-07-08 13:22:05 +00:00
Anton Hvornum f8c337c3ae Adding some more gitignores 2020-07-06 22:29:46 +02:00
Anton Hvornum 0399df8c25 Working partition and encryption+mount phase. Now to the installer and re-work that. 2020-06-30 21:22:28 +00:00
Anton Hvornum 5ae18b80fd Starting to rework the entire codebase to be context friendly. Annotations is next after one successful install. 2020-06-29 08:55:25 +00:00
Anton Hvornum d299b188fa Adde a gitignore 2019-11-17 13:16:23 +00:00