Skip to content

Commit

Permalink
Merged master changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Torxed committed Jul 16, 2023
2 parents 8e519be + 21735c5 commit 3b7fedd
Show file tree
Hide file tree
Showing 90 changed files with 1,944 additions and 1,917 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/flake8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: pacman --noconfirm -Syu python python-pip
- run: python -m pip install --upgrade pip
- run: pip install flake8
- run: pip install --break-system-packages --upgrade pip
- run: pip install --break-system-packages flake8
- name: Lint with flake8
run: flake8
4 changes: 2 additions & 2 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: pacman --noconfirm -Syu python mypy python-pip
- run: python -m pip install --upgrade pip
- run: pip install fastapi pydantic
- run: pip install --break-system-packages --upgrade pip
- run: pip install --break-system-packages fastapi pydantic
- run: python --version
- run: mypy --version
# one day this will be enabled
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: pacman --noconfirm -Syu python python-pip qemu gcc
- run: python -m pip install --upgrade pip
- run: pip install pytest
- run: python -m pip install --break-system-packages --upgrade pip
- run: pip install --break-system-packages pytest
- name: Test with pytest
run: python -m pytest || exit 0
15 changes: 4 additions & 11 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,16 @@ jobs:
options: --privileged
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Prepare arch
run: |
pacman-key --init
pacman --noconfirm -Sy archlinux-keyring
pacman --noconfirm -Sy python-pyparted pkgconfig gcc
pacman --noconfirm -Sy python-pip python-pyparted python-simple-term-menu pkgconfig gcc
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade build twine wheel setuptools installer
pip uninstall archinstall -y
- name: Install package dependencies
run: |
pip install --upgrade simple-term-menu pyparted
python -m pip install --break-system-packages --upgrade pip
pip install --break-system-packages --upgrade build twine wheel setuptools installer
pip uninstall archinstall -y --break-system-packages
- name: Build archinstall
run: python -m build --wheel --no-isolation
- name: Install archinstall
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/translation-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
push:
paths:
- 'archinstall/locales/**'
pull_request:
paths:
- 'archinstall/locales/**'
name: translation file checks
jobs:
translation-check:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- uses: actions/checkout@v3
- run: pacman --noconfirm -Syu python python-pip
- run: pip install --break-system-packages --upgrade pip
- run: cd archinstall/locales
- run: bash locales_generator.sh
- run: git diff --name-only
- run: ls
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
default_stages: ['commit']
repos:
- repo: https://github.com/pycqa/autoflake
rev: v2.0.2
rev: v2.1.1
hooks:
- id: autoflake
args: [
Expand Down
13 changes: 11 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ 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 length](https://www.python.org/dev/peps/pep-0008/#maximum-line-length) a maximum line length is enforced via flake8 with 236 characters
* [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 is consistent within the same code block.
* Archinstall should always be saved with **Unix-formatted line endings** and no other platform-specific formats.
Expand All @@ -39,6 +38,16 @@ The exceptions to PEP8 are:
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 check such as `mypy` 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.
Expand Down
14 changes: 12 additions & 2 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,26 @@
# Contributor: demostanis worlds <demostanis@protonmail.com>

pkgname=archinstall
pkgver=2.5.6
pkgver=2.6.0
pkgrel=1
pkgdesc="Just another guided/automated Arch Linux installer with a twist"
arch=(any)
url="https://github.com/archlinux/archinstall"
license=(GPL3)
depends=(
'arch-install-scripts'
'btrfs-progs'
'coreutils'
'cryptsetup'
'e2fsprogs'
'kbd'
'pciutils'
'procps-ng'
'python'
'systemd'
'python-pyparted'
'python-simple-term-menu'
'systemd'
'util-linux'
)
makedepends=(
'python-setuptools'
Expand Down
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ The installer also doubles as a python library to install Arch Linux and manage

$ sudo pacman -S archinstall

Or simply `git clone` the repo as it has no external dependencies *(but there are optional ones)*.<br>
Or use `pip install --upgrade archinstall` to use as a library.
Alternative ways to install are `git clone` the repository or `pip install --upgrade archinstall`.

## Running the [guided](https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py) installer

Assuming you are on an Arch Linux live-ISO:
Assuming you are on an Arch Linux live-ISO or installed via `pip`:

# archinstall

## Running the [guided](https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py) installer using `git`

# cd archinstall-git
# cp archinstall/scripts/guided.py
# python guided.py

#### Advanced
Some additional options that are not needed by most users are hidden behind the `--advanced` flag.

Expand Down Expand Up @@ -201,13 +206,13 @@ If you want to test a commit, branch or bleeding edge release from the repositor
you can replace the version of archinstall with a new version and run that with the steps described below:

1. You need a working network connection
2. Install the build requirements with `pacman -Sy; pacman -S git python-pip`
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 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. Build the project and install it using `pip install`
6. Build the project and install it using `pip install --break-operating-system .`

After this, running archinstall with `python -m archinstall` will run against whatever branch you chose in step 5.

Expand All @@ -229,3 +234,8 @@ This will create a *20 GB* `testimage.img` and create a loop device which we can

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.


# Contributing

Please see [CONTRIBUTING.md](https://github.com/archlinux/archinstall/blob/master/CONTRIBUTING.md)
13 changes: 4 additions & 9 deletions archinstall/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@
from .lib import interactions
from . import default_profiles

from .lib.hardware import SysInfo, AVAILABLE_GFX_DRIVERS
from .lib.hardware import SysInfo, GfxDriver
from .lib.installer import Installer, accessibility_tools_in_use
from .lib.output import (
FormattedOutput, log, error,
check_log_permissions, debug, warn, info
)
from .lib.output import FormattedOutput, log, error, debug, warn, info
from .lib.storage import storage
from .lib.global_menu import GlobalMenu
from .lib.boot import Boot
Expand All @@ -33,7 +30,7 @@

from .lib.general import (
generate_password, locate_binary, clear_vt100_escape_codes,
JsonEncoder, JSON, UNSAFE_JSON, SysCommandWorker, SysCommand,
JSON, UNSAFE_JSON, SysCommandWorker, SysCommand,
run_custom_user_commands, json_stream_to_structure, secret
)

Expand All @@ -42,16 +39,14 @@
_: Any


__version__ = "2.5.6"
__version__ = "2.6.0rc1"
storage['__version__'] = __version__


# add the custome _ as a builtin, it can now be used anywhere in the
# project to mark strings as translatable with _('translate me')
DeferredTranslation.install()

check_log_permissions()

# Log various information about hardware before starting the installation. This might assist in troubleshooting
debug(f"Hardware model detected: {SysInfo.sys_vendor()} {SysInfo.product_name()}; UEFI mode: {SysInfo.has_uefi()}")
debug(f"Processor model detected: {SysInfo.cpu_model()}")
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/budgie.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def packages(self) -> List[str]:
"budgie",
"mate-terminal",
"nemo",
"papirus-icon-theme",
"papirus-icon-theme"
]

@property
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/lxqt.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def packages(self) -> List[str]:
"xdg-utils",
"ttf-freefont",
"leafpad",
"slock",
"slock"
]

@property
Expand Down
Loading

0 comments on commit 3b7fedd

Please sign in to comment.