From 51286f2a6509c708fa44066ada03116698c0dc05 Mon Sep 17 00:00:00 2001 From: Ruslan Kiyanchuk Date: Sat, 3 Apr 2021 14:44:45 -0700 Subject: Fix undefined variables in installer --- archinstall/lib/installer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index a4321893..663288e5 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -98,7 +98,7 @@ class Installer(): self.log('Some required steps were not successfully installed/configured before leaving the installer:', bg='black', fg='red', level=LOG_LEVELS.Warning) for step in missing_steps: self.log(f' - {step}', bg='black', fg='red', level=LOG_LEVELS.Warning) - self.log(f"Detailed error logs can be found at: {log_path}", level=LOG_LEVELS.Warning) + self.log(f"Detailed error logs can be found at: {storage['LOG_PATH']}", level=LOG_LEVELS.Warning) self.log(f"Submit this zip file as an issue to https://github.com/Torxed/archinstall/issues", level=LOG_LEVELS.Warning) self.sync_log_to_install_medium() return False @@ -149,7 +149,7 @@ class Installer(): fstab_fh.write(fstab) if not os.path.isfile(f'{self.mountpoint}/etc/fstab'): - raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n{o}') + raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n') return True -- cgit v1.2.3-54-g00ecf From 992ee851d4d57cdd11f490123f94c2c23f8c1e76 Mon Sep 17 00:00:00 2001 From: SecondThundeR Date: Sun, 4 Apr 2021 22:12:31 +0300 Subject: Add lowercase conversion for usernames --- archinstall/lib/user_interaction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 8cdbbe8c..e5cdb670 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -49,7 +49,7 @@ def print_large_list(options, padding=5, margin_bottom=0, separator=': '): def ask_for_superuser_account(prompt='Create a required super-user with sudo privileges: ', forced=False): while 1: - new_user = input(prompt).strip(' ') + new_user = input(prompt).strip(' ').lower() if not new_user and forced: # TODO: make this text more generic? @@ -67,7 +67,7 @@ def ask_for_additional_users(prompt='Any additional users to install (leave blan super_users = {} while 1: - new_user = input(prompt).strip(' ') + new_user = input(prompt).strip(' ').lower() if not new_user: break password = get_password(prompt=f'Password for user {new_user}: ') -- cgit v1.2.3-54-g00ecf From c284092a15038355893c3ae20a42e3eb01d8295c Mon Sep 17 00:00:00 2001 From: Pyfisch Date: Mon, 5 Apr 2021 14:09:22 +0200 Subject: Add .pyproject.toml file for PEP 517 compliance --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..9787c3bd --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" -- cgit v1.2.3-54-g00ecf From 7f691ce1c992c16551459162fbef593daad1e4c8 Mon Sep 17 00:00:00 2001 From: Pyfisch Date: Mon, 5 Apr 2021 15:30:18 +0200 Subject: Switch to setup.cfg Configure setup.cfg to find all Python packages. Add more metadata to package. --- VERSION | 1 - __init__.py | 3 --- archinstall/__init__.py | 4 +++- setup.cfg | 35 +++++++++++++++++++++++++++++++++++ setup.py | 29 ++--------------------------- 5 files changed, 40 insertions(+), 32 deletions(-) delete mode 100644 VERSION delete mode 100644 __init__.py create mode 100644 setup.cfg diff --git a/VERSION b/VERSION deleted file mode 100644 index abae0d9a..00000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.1.3 \ No newline at end of file diff --git a/__init__.py b/__init__.py deleted file mode 100644 index bd22d3f4..00000000 --- a/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# This __init__ file is just here to support the -# use of archinstall as a git submodule. -from .archinstall import * diff --git a/archinstall/__init__.py b/archinstall/__init__.py index d4452d38..c2773b64 100644 --- a/archinstall/__init__.py +++ b/archinstall/__init__.py @@ -14,6 +14,8 @@ from .lib.output import * from .lib.storage import * from .lib.hardware import * +__version__ = "2.1.3" + ## Basic version of arg.parse() supporting: ## --key=value ## --boolean @@ -27,4 +29,4 @@ for arg in sys.argv[1:]: key, val = arg[2:], True arguments[key] = val else: - positionals.append(arg) \ No newline at end of file + positionals.append(arg) diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..ccbddf8a --- /dev/null +++ b/setup.cfg @@ -0,0 +1,35 @@ +[metadata] +name = archinstall +version = attr: archinstall.__version__ +description = Arch Linux installer - guided, templates etc. +author = Anton Hvornum +author_email = anton@hvornum.se +long_description = file: README.md +long_description_content_type = text/markdown +license = GPL +license_files = + LICENSE +project_urls = + Source = https://github.com/archlinux/archinstall + Documentation = https://archinstall.readthedocs.io/ +classifers = + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + License :: OSI Approved :: GNU General Public License v3 (GPLv3) + Operating System :: POSIX :: Linux + +[options] +packages = find: +python_requires = >= 3.8 + +[options.packages.find] +include = + archinstall + archinstall.* + +[options.package_data] +archinstall = + examples/*.py + profiles/*.py + profiles/applications/*.py diff --git a/setup.py b/setup.py index 35d51025..a4f49f92 100644 --- a/setup.py +++ b/setup.py @@ -1,27 +1,2 @@ -import setuptools, glob, shutil - -with open("README.md", "r") as fh: - long_description = fh.read() - -with open('VERSION', 'r') as fh: - VERSION = fh.read() - -setuptools.setup( - name="archinstall", - version=VERSION, - author="Anton Hvornum", - author_email="anton@hvornum.se", - description="Arch Linux installer - guided, templates etc.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/archlinux/archinstall", - packages=setuptools.find_packages(), - classifiers=[ - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", - "Operating System :: POSIX :: Linux", - ], - python_requires='>=3.8', - setup_requires=['wheel'], - package_data={'archinstall': glob.glob('examples/*.py') + glob.glob('profiles/*.py') + glob.glob('profiles/applications/*.py')}, -) +import setuptools +setuptools.setup() -- cgit v1.2.3-54-g00ecf From ecf7a2a237a04882c93fd4d743b037f7af6bc253 Mon Sep 17 00:00:00 2001 From: Pyfisch Date: Mon, 5 Apr 2021 16:21:12 +0200 Subject: Add console_scripts archinstall entry point 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. --- archinstall/__init__.py | 29 +++++++++++++++++++++++++++++ archinstall/__main__.py | 30 +----------------------------- setup.cfg | 4 ++++ 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/archinstall/__init__.py b/archinstall/__init__.py index c2773b64..d98b6daa 100644 --- a/archinstall/__init__.py +++ b/archinstall/__init__.py @@ -30,3 +30,32 @@ for arg in sys.argv[1:]: arguments[key] = val else: positionals.append(arg) + + +# TODO: Learn the dark arts of argparse... +# (I summon thee dark spawn of cPython) + +def run_as_a_module(): + """ + Since we're running this as a 'python -m archinstall' module OR + a nuitka3 compiled version of the project. + This function and the file __main__ acts as a entry point. + """ + + # Add another path for finding profiles, so that list_profiles() in Script() can find guided.py, unattended.py etc. + storage['PROFILE_PATH'].append(os.path.abspath(f'{os.path.dirname(__file__)}/examples')) + + if len(sys.argv) == 1: + sys.argv.append('guided') + + try: + script = Script(sys.argv[1]) + except ProfileNotFound as err: + print(f"Couldn't find file: {err}") + sys.exit(1) + + os.chdir(os.path.abspath(os.path.dirname(__file__))) + + # Remove the example directory from the PROFILE_PATH, to avoid guided.py etc shows up in user input questions. + storage['PROFILE_PATH'].pop() + script.execute() diff --git a/archinstall/__main__.py b/archinstall/__main__.py index 63c2f715..86ed0108 100644 --- a/archinstall/__main__.py +++ b/archinstall/__main__.py @@ -2,33 +2,5 @@ import archinstall import sys import os -# TODO: Learn the dark arts of argparse... -# (I summon thee dark spawn of cPython) - -def run_as_a_module(): - """ - Since we're running this as a 'python -m archinstall' module OR - a nuitka3 compiled version of the project. - This function and the file __main__ acts as a entry point. - """ - - # Add another path for finding profiles, so that list_profiles() in Script() can find guided.py, unattended.py etc. - archinstall.storage['PROFILE_PATH'].append(os.path.abspath(f'{os.path.dirname(__file__)}/examples')) - - if len(sys.argv) == 1: - sys.argv.append('guided') - - try: - script = archinstall.Script(sys.argv[1]) - except archinstall.ProfileNotFound as err: - print(f"Couldn't find file: {err}") - sys.exit(1) - - os.chdir(os.path.abspath(os.path.dirname(__file__))) - - # Remove the example directory from the PROFILE_PATH, to avoid guided.py etc shows up in user input questions. - archinstall.storage['PROFILE_PATH'].pop() - script.execute() - if __name__ == '__main__': - run_as_a_module() + archinstall.run_as_a_module() diff --git a/setup.cfg b/setup.cfg index ccbddf8a..3190791e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,3 +33,7 @@ archinstall = examples/*.py profiles/*.py profiles/applications/*.py + +[options.entry_points] +console_scripts = + archinstall = archinstall:run_as_a_module -- cgit v1.2.3-54-g00ecf From baaa70381b0e4478e056bcbaa2e75e5a94450a18 Mon Sep 17 00:00:00 2001 From: Pyfisch Date: Mon, 5 Apr 2021 16:49:38 +0200 Subject: Remove outdated PKGBUILD files setup.cfg whitespace changes. --- PKGBUILD | 44 ----------------------------------- PKGBUILDs/archinstall-bin/PKGBUILD | 39 ------------------------------- PKGBUILDs/archinstall/PKGBUILD | 30 ------------------------ PKGBUILDs/python-archinstall/PKGBUILD | 40 ------------------------------- setup.cfg | 6 ++--- 5 files changed, 3 insertions(+), 156 deletions(-) delete mode 100644 PKGBUILD delete mode 100644 PKGBUILDs/archinstall-bin/PKGBUILD delete mode 100644 PKGBUILDs/archinstall/PKGBUILD delete mode 100644 PKGBUILDs/python-archinstall/PKGBUILD diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index 77e6b512..00000000 --- a/PKGBUILD +++ /dev/null @@ -1,44 +0,0 @@ -# Maintainer: Anton Hvornum -# Contributor: Giancarlo Razzolini -# Contributor: demostanis worlds - -pkgbase=archinstall-git -pkgname=('archinstall-git' 'python-archinstall-git') -pkgver=$(git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g') -pkgrel=1 -pkgdesc="Just another guided/automated Arch Linux installer with a twist" -arch=('any') -url="https://github.com/archlinux/archinstall" -license=('GPL') -depends=('python') -makedepends=('python-setuptools') - -build() { - cd "$startdir" - - python setup.py build -} - - -package_archinstall-git() { - depends=('python-archinstall-git') - conflicts=('archinstall') - cd "$startdir" - - mkdir -p "${pkgdir}/usr/bin" - - # Install a guided profile - cat - > "${pkgdir}/usr/bin/archinstall" <=3.8') -makedepends=('python>=3.8' 'nuitka') -optdepends=('pyttsx3: Adds text-to-speach support for log/screen output.') -sha256sums=('53c00f7e7ad245cd2cbbf041b5a735df2fc29454c24b1d369f678cc0610b7cea') - -build() { - cd "${pkgname}-${pkgver}" - - nuitka3 --standalone --show-progress archinstall - cp -r examples/ archinstall.dist/ -} - -package() { - echo "${srcdir}" - cd "${pkgname}-${pkgver}" - - mkdir -p "${pkgdir}/var/lib/archinstall/" - mkdir -p "${pkgdir}/usr/bin" - - mv archinstall.dist/* "${pkgdir}/var/lib/archinstall/" - - echo '#!/bin/bash' > "${pkgdir}/usr/bin/archinstall-bin" - echo '(cd /var/lib/archinstall && exec ./archinstall)' >> "${pkgdir}/usr/bin/archinstall-bin" - - chmod +x "${pkgdir}/var/lib/archinstall/archinstall" - chmod +x "${pkgdir}/usr/bin/archinstall-bin" -} diff --git a/PKGBUILDs/archinstall/PKGBUILD b/PKGBUILDs/archinstall/PKGBUILD deleted file mode 100644 index 7b1c4947..00000000 --- a/PKGBUILDs/archinstall/PKGBUILD +++ /dev/null @@ -1,30 +0,0 @@ -# Maintainer: Anton Hvornum -# Contributor: demostanis worlds - -pkgname="archinstall" -pkgver="2.1.3" -pkgdesc="Installs launcher scripts for archinstall" -pkgrel=1 -url="https://github.com/archlinux/archinstall" -license=('GPLv3') -provides=("${pkgname}") -arch=('x86_64') -source=("${pkgname}-v${pkgver}-x86_64.tar.gz::https://github.com/archlinux/archinstall/archive/v$pkgver.tar.gz") -depends=('python-archinstall') -sha256sums=('53c00f7e7ad245cd2cbbf041b5a735df2fc29454c24b1d369f678cc0610b7cea') - -package() { - mkdir -p "${pkgdir}/usr/bin" - - # Install a guided profile - cat - > "${pkgdir}/usr/bin/archinstall" < -# Contributor: demostanis worlds - -pkgname="python-archinstall" -pkgver="2.1.3" -pkgdesc="Installs ${pkgname} as a python library." -pkgrel=1 -url="https://github.com/archlinux/archinstall" -source=("${pkgname}-v${pkgver}-x86_64.tar.gz::https://github.com/archlinux/archinstall/archive/v$pkgver.tar.gz") -license=('GPLv3') -provides=("${pkgname}") -arch=('x86_64') -depends=('python>=3.8') -makedepends=('python-setuptools') -optdepends=('pyttsx3: Adds text-to-speech support for log/screen output.') -sha256sums=('53c00f7e7ad245cd2cbbf041b5a735df2fc29454c24b1d369f678cc0610b7cea') - -build() { - cd "archinstall-${pkgver}" - - python setup.py build - - # Build man pages - cd docs - make man -} - -package() { - cd "archinstall-${pkgver}" - - python setup.py install \ - --prefix=/usr \ - --root="${pkgdir}" \ - --optimize=1 - - install -Dm644 docs/_build/man/archinstall.1 "${pkgdir}"/usr/share/man/man1/archinstall.1 -} - -# vim:ft=sh - diff --git a/setup.cfg b/setup.cfg index 3190791e..e5d79ef3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,10 +14,10 @@ project_urls = Documentation = https://archinstall.readthedocs.io/ classifers = Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 - License :: OSI Approved :: GNU General Public License v3 (GPLv3) - Operating System :: POSIX :: Linux + License :: OSI Approved :: GNU General Public License v3 (GPLv3) + Operating System :: POSIX :: Linux [options] packages = find: -- cgit v1.2.3-54-g00ecf From 5de1154ce9708f770bacae5faa2ef3c3eea4c2e2 Mon Sep 17 00:00:00 2001 From: SecondThundeR Date: Mon, 5 Apr 2021 18:38:21 +0300 Subject: Replace lowercase conversion with correct checking --- archinstall/lib/user_interaction.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index e5cdb670..30008fad 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -1,4 +1,4 @@ -import getpass, pathlib, os, shutil +import getpass, pathlib, os, shutil, re from .exceptions import * from .profiles import Profile from .locale_helpers import search_keyboard_layout @@ -49,8 +49,15 @@ def print_large_list(options, padding=5, margin_bottom=0, separator=': '): def ask_for_superuser_account(prompt='Create a required super-user with sudo privileges: ', forced=False): while 1: - new_user = input(prompt).strip(' ').lower() - + new_user = input(prompt).strip(' ') + + if not re.match('[a-z_][a-z0-9_-]*[$]?', new_user) or len(new_user) > 32: + log( + "The username you entered is invalid. Try again", + level=LOG_LEVELS.Warning, + fg='red' + ) + continue if not new_user and forced: # TODO: make this text more generic? # It's only used to create the first sudo user when root is disabled in guided.py @@ -67,9 +74,16 @@ def ask_for_additional_users(prompt='Any additional users to install (leave blan super_users = {} while 1: - new_user = input(prompt).strip(' ').lower() + new_user = input(prompt).strip(' ') if not new_user: break + if not re.match('[a-z_][a-z0-9_-]*[$]?', new_user) or len(new_user) > 32: + log( + "The username you entered is invalid. Try again", + level=LOG_LEVELS.Warning, + fg='red' + ) + continue password = get_password(prompt=f'Password for user {new_user}: ') if input("Should this user be a sudo (super) user (y/N): ").strip(' ').lower() in ('y', 'yes'): -- cgit v1.2.3-54-g00ecf From 6587d9e10f600d8595c8d4ac7ddf319a19cb41de Mon Sep 17 00:00:00 2001 From: Pyfisch Date: Mon, 5 Apr 2021 17:58:58 +0200 Subject: Add primary PKGBUILD for testing the package --- PKGBUILD | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 00000000..42946c6a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,24 @@ +# Maintainer: Anton Hvornum +# Contributor: Giancarlo Razzolini +# Contributor: demostanis worlds + +pkgname=archinstall-git +pkgver=$(git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g') +pkgrel=1 +pkgdesc="Just another guided/automated Arch Linux installer with a twist" +arch=('any') +url="https://github.com/archlinux/archinstall" +license=('GPL') +depends=('python') +makedepends=('python-setuptools') +conflicts=('archinstall' 'archinstall-python' 'python-archinstall-git') + +build() { + cd "$startdir" + python setup.py build +} + +package() { + cd "$startdir" + python setup.py install --root="${pkgdir}" --optimize=1 --skip-build +} -- cgit v1.2.3-54-g00ecf From 3011811878b79c561fc8b01687af2ba4448a8931 Mon Sep 17 00:00:00 2001 From: Pyfisch Date: Mon, 5 Apr 2021 18:02:30 +0200 Subject: Indent using 8 spaces in PKGBUILD --- PKGBUILD | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 42946c6a..c951e70a 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -14,11 +14,11 @@ makedepends=('python-setuptools') conflicts=('archinstall' 'archinstall-python' 'python-archinstall-git') build() { - cd "$startdir" - python setup.py build + cd "$startdir" + python setup.py build } package() { - cd "$startdir" - python setup.py install --root="${pkgdir}" --optimize=1 --skip-build + cd "$startdir" + python setup.py install --root="${pkgdir}" --optimize=1 --skip-build } -- cgit v1.2.3-54-g00ecf From ed2187ee709e40e9da50cec9f0eaf45e77d6a8e9 Mon Sep 17 00:00:00 2001 From: SecondThundeR Date: Mon, 5 Apr 2021 19:22:48 +0300 Subject: Update regex rule and move check to a function --- archinstall/lib/user_interaction.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 30008fad..a337066e 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -18,6 +18,16 @@ def get_terminal_width(): def get_longest_option(options): return max([len(x) for x in options]) +def check_for_correct_username(username): + if re.match(r'^[a-z_][a-z0-9_-]*\$?$', username) and len(username) <= 32: + return True + log( + "The username you entered is invalid. Try again", + level=LOG_LEVELS.Warning, + fg='red' + ) + return False + def get_password(prompt="Enter a password: "): while (passwd := getpass.getpass(prompt)): passwd_verification = getpass.getpass(prompt='And one more time for verification: ') @@ -51,12 +61,7 @@ def ask_for_superuser_account(prompt='Create a required super-user with sudo pri while 1: new_user = input(prompt).strip(' ') - if not re.match('[a-z_][a-z0-9_-]*[$]?', new_user) or len(new_user) > 32: - log( - "The username you entered is invalid. Try again", - level=LOG_LEVELS.Warning, - fg='red' - ) + if not check_for_correct_username(new_user): continue if not new_user and forced: # TODO: make this text more generic? @@ -77,12 +82,7 @@ def ask_for_additional_users(prompt='Any additional users to install (leave blan new_user = input(prompt).strip(' ') if not new_user: break - if not re.match('[a-z_][a-z0-9_-]*[$]?', new_user) or len(new_user) > 32: - log( - "The username you entered is invalid. Try again", - level=LOG_LEVELS.Warning, - fg='red' - ) + if not check_for_correct_username(new_user): continue password = get_password(prompt=f'Password for user {new_user}: ') -- cgit v1.2.3-54-g00ecf From d5da80d770bd0867510791fccd955873c64cea37 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 5 Apr 2021 13:40:40 -0400 Subject: Fix #183 gnome-extras installs far too much bloat This keeps some of the most useful packages from the defaults. --- profiles/applications/gnome.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profiles/applications/gnome.py b/profiles/applications/gnome.py index 1f2a20a1..132b4591 100644 --- a/profiles/applications/gnome.py +++ b/profiles/applications/gnome.py @@ -1,4 +1,4 @@ import archinstall -installation.add_additional_packages("gnome gnome-extra gdm") # We'll create a gnome-minimal later, but for now, we'll avoid issues by giving more than we need. -# Note: gdm should be part of the gnome group, but adding it here for clarity \ No newline at end of file +installation.add_additional_packages("gnome gnome-tweaks gnome-todo evolution gdm") # We'll create a gnome-minimal later, but for now, we'll avoid issues by giving more than we need. +# Note: gdm should be part of the gnome group, but adding it here for clarity -- cgit v1.2.3-54-g00ecf From d28385bd052311a5cb2638fa71c03e5a61e7b1e1 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 5 Apr 2021 13:42:03 -0400 Subject: gnome-sound-recorder is probably also desirable --- profiles/applications/gnome.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/applications/gnome.py b/profiles/applications/gnome.py index 132b4591..06d5feca 100644 --- a/profiles/applications/gnome.py +++ b/profiles/applications/gnome.py @@ -1,4 +1,4 @@ import archinstall -installation.add_additional_packages("gnome gnome-tweaks gnome-todo evolution gdm") # We'll create a gnome-minimal later, but for now, we'll avoid issues by giving more than we need. +installation.add_additional_packages("gnome gnome-tweaks gnome-todo gnome-sound-recorder evolution gdm") # We'll create a gnome-minimal later, but for now, we'll avoid issues by giving more than we need. # Note: gdm should be part of the gnome group, but adding it here for clarity -- cgit v1.2.3-54-g00ecf From 688d0eb78e4f232673bf749fda85010c88375e10 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 5 Apr 2021 13:44:16 -0400 Subject: This comment should no longer apply. This is a fairly sane default for GNOME. --- profiles/applications/gnome.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/applications/gnome.py b/profiles/applications/gnome.py index 06d5feca..e9fd1d50 100644 --- a/profiles/applications/gnome.py +++ b/profiles/applications/gnome.py @@ -1,4 +1,4 @@ import archinstall -installation.add_additional_packages("gnome gnome-tweaks gnome-todo gnome-sound-recorder evolution gdm") # We'll create a gnome-minimal later, but for now, we'll avoid issues by giving more than we need. +installation.add_additional_packages("gnome gnome-tweaks gnome-todo gnome-sound-recorder evolution gdm") # Note: gdm should be part of the gnome group, but adding it here for clarity -- cgit v1.2.3-54-g00ecf From 1da9e52d52b1f88d5069392da29b8893377009e3 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Mon, 5 Apr 2021 22:06:25 +0200 Subject: Corrected for keymap before encrypt hook 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/lib/installer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 0fc9f969..d80f8aa6 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -306,14 +306,14 @@ class Installer(): mkinit.write('MODULES=(btrfs)\n') mkinit.write('BINARIES=(/usr/bin/btrfs)\n') mkinit.write('FILES=()\n') - mkinit.write('HOOKS=(base udev autodetect modconf block encrypt filesystems keymap keyboard fsck)\n') + mkinit.write('HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)\n') sys_command(f'/usr/bin/arch-chroot {self.mountpoint} mkinitcpio -p linux') elif self.partition.encrypted: with open(f'{self.mountpoint}/etc/mkinitcpio.conf', 'w') as mkinit: mkinit.write('MODULES=()\n') mkinit.write('BINARIES=()\n') mkinit.write('FILES=()\n') - mkinit.write('HOOKS=(base udev autodetect modconf block encrypt filesystems keymap keyboard fsck)\n') + mkinit.write('HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)\n') sys_command(f'/usr/bin/arch-chroot {self.mountpoint} mkinitcpio -p linux') self.helper_flags['base'] = True -- cgit v1.2.3-54-g00ecf From 924b369233e28c11c8bfec423fa25dc9d84e61de Mon Sep 17 00:00:00 2001 From: SecondThundeR Date: Mon, 5 Apr 2021 23:13:27 +0300 Subject: Fix incorrect behavior for empty sudo username --- archinstall/lib/user_interaction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index a337066e..44c0cb13 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -61,8 +61,6 @@ def ask_for_superuser_account(prompt='Create a required super-user with sudo pri while 1: new_user = input(prompt).strip(' ') - if not check_for_correct_username(new_user): - continue if not new_user and forced: # TODO: make this text more generic? # It's only used to create the first sudo user when root is disabled in guided.py @@ -70,6 +68,8 @@ def ask_for_superuser_account(prompt='Create a required super-user with sudo pri continue elif not new_user and not forced: raise UserError("No superuser was created.") + elif not check_for_correct_username(new_user): + continue password = get_password(prompt=f'Password for user {new_user}: ') return {new_user: {"!password" : password}} -- cgit v1.2.3-54-g00ecf From c2b8dcca251095318f47b35d2c1a4b994bfa8d5b Mon Sep 17 00:00:00 2001 From: Pyfisch Date: Mon, 5 Apr 2021 22:25:40 +0200 Subject: Fix PKGBUILD conflicts and add provides line --- PKGBUILD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PKGBUILD b/PKGBUILD index c951e70a..7a5da658 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -11,7 +11,8 @@ url="https://github.com/archlinux/archinstall" license=('GPL') depends=('python') makedepends=('python-setuptools') -conflicts=('archinstall' 'archinstall-python' 'python-archinstall-git') +provides=('python-archinstall') +conflicts=('archinstall' 'python-archinstall' 'python-archinstall-git') build() { cd "$startdir" -- cgit v1.2.3-54-g00ecf From aed763b7639ec38c86865bb0e738b8326af391af Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Tue, 6 Apr 2021 11:33:50 -0400 Subject: Remove evolution from default installation as suggested It was pointed out that users can install an email client if they want one. --- profiles/applications/gnome.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/applications/gnome.py b/profiles/applications/gnome.py index e9fd1d50..66656134 100644 --- a/profiles/applications/gnome.py +++ b/profiles/applications/gnome.py @@ -1,4 +1,4 @@ import archinstall -installation.add_additional_packages("gnome gnome-tweaks gnome-todo gnome-sound-recorder evolution gdm") +installation.add_additional_packages("gnome gnome-tweaks gnome-todo gnome-sound-recorder gdm") # Note: gdm should be part of the gnome group, but adding it here for clarity -- cgit v1.2.3-54-g00ecf From 3da4dc8e3015479e64603987ae229f75e2146548 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 6 Apr 2021 18:30:20 +0200 Subject: Update installer.py --- archinstall/lib/installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 663288e5..9681f1ea 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -149,7 +149,7 @@ class Installer(): fstab_fh.write(fstab) if not os.path.isfile(f'{self.mountpoint}/etc/fstab'): - raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n') + raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n{b"".join(fstab)}') return True -- cgit v1.2.3-54-g00ecf From 3e4c5bdb263bab31fe0e7c7b8ef9f4493a445172 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Tue, 6 Apr 2021 12:55:15 -0400 Subject: Remove chromium from default awesome install Promotes a consistent installation experience across DEs. --- profiles/awesome.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/profiles/awesome.py b/profiles/awesome.py index b914b175..a565ccb3 100644 --- a/profiles/awesome.py +++ b/profiles/awesome.py @@ -31,11 +31,10 @@ if __name__ == 'awesome': # Then setup and configure the desktop environment: awesome editor = "nano" filebrowser = "nemo gpicview-gtk3" - webbrowser = "chromium" # TODO: Ask the user to select one instead utils = "openssh sshfs htop scrot wget" - installation.add_additional_packages(f"{webbrowser} {utils} {filebrowser} {editor}") + installation.add_additional_packages(f"{utils} {filebrowser} {editor}") alacritty = archinstall.Application(installation, 'alacritty') alacritty.install() -- cgit v1.2.3-54-g00ecf From 6c3f46f6173cfb6dd2d895afc5e50aa1c9679988 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Tue, 6 Apr 2021 13:03:42 -0400 Subject: Add a message about specifying a web browser --- examples/guided.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/guided.py b/examples/guided.py index a92343f7..9df8a518 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -181,6 +181,7 @@ def ask_user_questions(): exit(1) # Additional packages (with some light weight error handling for invalid package names) + print("Packages not part of the desktop environment are not installed by default. If you desire a web browser, such as firefox or chromium, you may specify it in the following prompt.") if not archinstall.arguments.get('packages', None): archinstall.arguments['packages'] = [package for package in input('Write additional packages to install (space separated, leave blank to skip): ').split(' ') if len(package)] -- cgit v1.2.3-54-g00ecf From 2e7930857b05070118e5ff4c3aa99e0312f7febc Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 6 Apr 2021 19:05:52 +0200 Subject: Moved the print logic for browser warning --- examples/guided.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/guided.py b/examples/guided.py index 9df8a518..4205518d 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -181,8 +181,8 @@ def ask_user_questions(): exit(1) # Additional packages (with some light weight error handling for invalid package names) - print("Packages not part of the desktop environment are not installed by default. If you desire a web browser, such as firefox or chromium, you may specify it in the following prompt.") if not archinstall.arguments.get('packages', None): + print("Packages not part of the desktop environment are not installed by default. If you desire a web browser, such as firefox or chromium, you may specify it in the following prompt.") archinstall.arguments['packages'] = [package for package in input('Write additional packages to install (space separated, leave blank to skip): ').split(' ') if len(package)] # Verify packages that were given -- cgit v1.2.3-54-g00ecf From 5adc6e17850be70953a4b139154f5c47ea6e0721 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Tue, 6 Apr 2021 14:53:01 -0400 Subject: DOCS: How to test a commit from a live image --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index c60e714a..50cf66c4 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,12 @@ When doing so, attach any `install-session_*.log` to the issue ticket which can # Testing +## Using a Live ISO Image + +If you are testing a commit from the repository using the vanilla Arch Live ISO image, you can replace the version of archinstall with a new version and run that. To do this, you will first need to establish a network connection and run `pacman -Sy; pacman -S git python-pip`. Once you have pip installed, run `pip uninstall archinstall`. Then, clone the repo using `git clone https://github.com/archlinux/archinstall`, and cd into the archinstall directory. Alternatively, you can checkout a different branch or fork of the project. Build the project and install it using `python setup.py build; python setup.py install`. Then, run archinstall with `python -m 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.
This can be done by installing `pacman -S arch-install-scripts util-linux` locally and doing the following: -- cgit v1.2.3-54-g00ecf From e1420af18936728df6893583e47b764099be89ea Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Tue, 6 Apr 2021 16:19:34 -0400 Subject: This is probably more technically correct --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50cf66c4..3f651c9b 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ When doing so, attach any `install-session_*.log` to the issue ticket which can ## Using a Live ISO Image -If you are testing a commit from the repository using the vanilla Arch Live ISO image, you can replace the version of archinstall with a new version and run that. To do this, you will first need to establish a network connection and run `pacman -Sy; pacman -S git python-pip`. Once you have pip installed, run `pip uninstall archinstall`. Then, clone the repo using `git clone https://github.com/archlinux/archinstall`, and cd into the archinstall directory. Alternatively, you can checkout a different branch or fork of the project. Build the project and install it using `python setup.py build; python setup.py install`. Then, run archinstall with `python -m archinstall`. +If you are testing a commit from the repository using the vanilla Arch Live ISO image, you can replace the version of archinstall with a new version and run that. To do this, you will first need to establish a network connection and run `pacman -Sy; pacman -S git python-pip`. Once you have pip installed, run `pacman -R archinstall`. Then, clone the repo using `git clone https://github.com/archlinux/archinstall`, and cd into the archinstall directory. Alternatively, you can checkout a different branch or fork of the project. Build the project and install it using `python setup.py build; python setup.py install`. Then, run archinstall with `python -m archinstall`. ## Without a Live ISO Image -- cgit v1.2.3-54-g00ecf From 741df875da43e745d4c9a40a54eb1c21e65e34bb Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 6 Apr 2021 22:21:45 +0200 Subject: Made it into more of a "step by step" structure --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f651c9b..5b911a49 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,18 @@ When doing so, attach any `install-session_*.log` to the issue ticket which can ## Using a Live ISO Image -If you are testing a commit from the repository using the vanilla Arch Live ISO image, you can replace the version of archinstall with a new version and run that. To do this, you will first need to establish a network connection and run `pacman -Sy; pacman -S git python-pip`. Once you have pip installed, run `pacman -R archinstall`. Then, clone the repo using `git clone https://github.com/archlinux/archinstall`, and cd into the archinstall directory. Alternatively, you can checkout a different branch or fork of the project. Build the project and install it using `python setup.py build; python setup.py install`. Then, run archinstall with `python -m archinstall`. +If you want to test a commit, branch or bleeding edge release from the repository using the vanilla Arch Live ISO image, 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` + *(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 torxed-v2.2.0`* + 6. Build the project and install it using `python setup.py build` and `python setup.py install` + +After this, running archinstall with `python -m archinstall` will run against whatever branch you chose in step 5. ## Without a Live ISO Image -- cgit v1.2.3-54-g00ecf From 42d0d1af1ec0e37f149ce731ec131092ad401182 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 6 Apr 2021 22:23:15 +0200 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b911a49..ce5cd47d 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ If you want to test a commit, branch or bleeding edge release from the repositor 1. You need a working network connection 2. Install the build requirements with `pacman -Sy; pacman -S git python-pip` *(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` + 3. Uninstall the previous version of archinstall with `pacman -R 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 torxed-v2.2.0`* -- cgit v1.2.3-54-g00ecf From 49e21cd0439920a7982f4b11539cf2778b74032b Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Tue, 6 Apr 2021 16:25:57 -0400 Subject: After testing pacman -R, I noticed it didn't work right --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce5cd47d..5b911a49 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ If you want to test a commit, branch or bleeding edge release from the repositor 1. You need a working network connection 2. Install the build requirements with `pacman -Sy; pacman -S git python-pip` *(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 `pacman -R archinstall` + 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 torxed-v2.2.0`* -- cgit v1.2.3-54-g00ecf From 08b48a144b6140487639530097c4b0a3e64168b5 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Tue, 6 Apr 2021 16:32:09 -0400 Subject: python setup.py build is not needed if you call install --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b911a49..2f3881e1 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ If you want to test a commit, branch or bleeding edge release from the repositor 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 torxed-v2.2.0`* - 6. Build the project and install it using `python setup.py build` and `python setup.py install` + 6. Build the project and install it using `python setup.py install` After this, running archinstall with `python -m archinstall` will run against whatever branch you chose in step 5. -- cgit v1.2.3-54-g00ecf From 275e60e1ddb5da281aab394492c68bed8d5abdcb Mon Sep 17 00:00:00 2001 From: Insanemal Date: Wed, 7 Apr 2021 13:44:04 +1000 Subject: Fix newline issue on fstab writes Forced the newline char fstab writes as Python appears to be selecting the incorrect newlines --- archinstall/lib/installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 8673bbee..1d277bc6 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -147,7 +147,7 @@ class Installer(): self.log(f"Updating {self.mountpoint}/etc/fstab", level=LOG_LEVELS.Info) fstab = sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint}').trace_log - with open(f"{self.mountpoint}/etc/fstab", 'ab') as fstab_fh: + with open(f"{self.mountpoint}/etc/fstab", 'ab',newline='\n') as fstab_fh: fstab_fh.write(fstab) if not os.path.isfile(f'{self.mountpoint}/etc/fstab'): -- cgit v1.2.3-54-g00ecf From 7e75ff960b5536a6c20a69816151560dfbddeae5 Mon Sep 17 00:00:00 2001 From: Jatin <40650341+jatin-cbs@users.noreply.github.com> Date: Wed, 7 Apr 2021 19:18:34 +0530 Subject: Remove gnome-todo and gnome-sound-recorder from default installation 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. --- profiles/applications/gnome.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/applications/gnome.py b/profiles/applications/gnome.py index 66656134..e26290dc 100644 --- a/profiles/applications/gnome.py +++ b/profiles/applications/gnome.py @@ -1,4 +1,4 @@ import archinstall -installation.add_additional_packages("gnome gnome-tweaks gnome-todo gnome-sound-recorder gdm") +installation.add_additional_packages("gnome gnome-tweaks gdm") # Note: gdm should be part of the gnome group, but adding it here for clarity -- cgit v1.2.3-54-g00ecf From 183b1130b16bda340815a9d7804054449c16dbee Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 7 Apr 2021 21:55:00 +0200 Subject: Update pull_request_template.md --- docs/pull_request_template.md | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/docs/pull_request_template.md b/docs/pull_request_template.md index 6da175ae..d2f97314 100644 --- a/docs/pull_request_template.md +++ b/docs/pull_request_template.md @@ -1,31 +1,24 @@ -# Pull Request Template +🚨 PR Guidelines: -Make sure you've checked out the [contribution guideline](https://github.com/archlinux/archinstall/blob/master/CONTRIBUTING.md).
-Most of the guidelines are not enforced, but is heavily encouraged. +# New features -## Description +Merge new features in to `torxed-v2.2.0`. +This branch is designated for potential breaking changes, added complexity and new functionality. -Please include a summary of the change and which issue is fixed.
-It is also helpful to add links to online documentation or to the implementation of the code you are changing. +# Bug fixes -## Bugs and Issues +Merge against `master` for bug fixes and anything that improves stability and quality of life.
+This excludes: + * New functionality + * Added complexity + * Breaking changes -If this pull-request fixes an issue or a bug, please mention the issues with the approriate issue referece *(Example: #8)*. +# Describe your PR -## How Has This Been Tested? +If the changes has been discussed in an Issue, please tag it so we can backtrace from the Issue later on.
+If the PR is larger than ~20 lines, please describe it here unless described in an issue. -If possible, mention any tests you have made with the current code base included in the pull-requests.
-Any core-developer will also run tests, but this helps speed things up. Below is a template that can be used: +# Testing -As an example: - -**Test Configuration**: -* Hardware: VirtualBox 6.1 -* Specific steps: Ran installer with additional packages `nano` and `wget` - -## Checklist: - -- [ ] My code follows the style guidelines of this project -- [ ] I have performed a self-review of my own code to the best of my abilities -- [ ] I have commented my code, particularly in hard-to-understand areas -- [ ] I have made corresponding changes to the documentation where possible/if applicable +Any new feature or stability improvement should be tested if possible. +Please follow the test instructions at the bottom of the README. -- cgit v1.2.3-54-g00ecf From c90e0c3bf74156f626722f537c530307daeadf85 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 7 Apr 2021 21:55:23 +0200 Subject: Update pull_request_template.md --- docs/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pull_request_template.md b/docs/pull_request_template.md index d2f97314..a2b6ff88 100644 --- a/docs/pull_request_template.md +++ b/docs/pull_request_template.md @@ -2,7 +2,7 @@ # New features -Merge new features in to `torxed-v2.2.0`. +Merge new features in to `torxed-v2.2.0`.
This branch is designated for potential breaking changes, added complexity and new functionality. # Bug fixes -- cgit v1.2.3-54-g00ecf From 4975d3d4208a93253f57dab99bb73bed238ce23d Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 7 Apr 2021 21:57:04 +0200 Subject: Update pull_request_template.md --- docs/pull_request_template.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/pull_request_template.md b/docs/pull_request_template.md index a2b6ff88..ced6fdf1 100644 --- a/docs/pull_request_template.md +++ b/docs/pull_request_template.md @@ -1,11 +1,11 @@ 🚨 PR Guidelines: -# New features +# New features *(v2.2.0)* Merge new features in to `torxed-v2.2.0`.
This branch is designated for potential breaking changes, added complexity and new functionality. -# Bug fixes +# Bug fixes *(v2.1.4)* Merge against `master` for bug fixes and anything that improves stability and quality of life.
This excludes: @@ -13,6 +13,8 @@ This excludes: * Added complexity * Breaking changes +Any changes to `master` automatically gets pulled in to `torxed-v2.2.0` to avoid merge hell. + # Describe your PR If the changes has been discussed in an Issue, please tag it so we can backtrace from the Issue later on.
@@ -22,3 +24,5 @@ If the PR is larger than ~20 lines, please describe it here unless described in Any new feature or stability improvement should be tested if possible. Please follow the test instructions at the bottom of the README. + +*These PR guidelines will change after 2021-05-01, which is when `v2.1.4` gets released* -- cgit v1.2.3-54-g00ecf From eb5795b7db1d9583fa6a62a780b17f3fc0d9260a Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 7 Apr 2021 21:57:25 +0200 Subject: Update pull_request_template.md --- docs/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pull_request_template.md b/docs/pull_request_template.md index ced6fdf1..c2f694ce 100644 --- a/docs/pull_request_template.md +++ b/docs/pull_request_template.md @@ -25,4 +25,4 @@ If the PR is larger than ~20 lines, please describe it here unless described in Any new feature or stability improvement should be tested if possible. Please follow the test instructions at the bottom of the README. -*These PR guidelines will change after 2021-05-01, which is when `v2.1.4` gets released* +*These PR guidelines will change after 2021-05-01, which is when `v2.1.4` gets onto the new ISO* -- cgit v1.2.3-54-g00ecf From 09b4e5bbc04ffe65053ac65b22c46e196c318bcd Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Wed, 7 Apr 2021 19:41:25 -0400 Subject: Make the minimal installation example use the minimal profile instead of awesome wm --- examples/minimal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/minimal.py b/examples/minimal.py index 664bad0d..9124f5bd 100644 --- a/examples/minimal.py +++ b/examples/minimal.py @@ -24,7 +24,7 @@ with archinstall.Filesystem(harddrive, archinstall.GPT) as fs: installation.add_bootloader() installation.add_additional_packages(['nano', 'wget', 'git']) - installation.install_profile('awesome') + installation.install_profile('minimal') - installation.user_create('anton', 'test') - installation.user_set_pw('root', 'toor') \ No newline at end of file + installation.user_create('devel', 'devel') + installation.user_set_pw('root', 'toor') -- cgit v1.2.3-54-g00ecf From 8e722d07cf67e851ef16f3666fedd5042c117902 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Wed, 7 Apr 2021 20:28:30 -0400 Subject: Break web browser suggestion into second line to avoid wrapping --- examples/guided.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/guided.py b/examples/guided.py index 4205518d..ed838a29 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -182,7 +182,8 @@ def ask_user_questions(): # Additional packages (with some light weight error handling for invalid package names) if not archinstall.arguments.get('packages', None): - print("Packages not part of the desktop environment are not installed by default. If you desire a web browser, such as firefox or chromium, you may specify it in the following prompt.") + print("Packages not part of the desktop environment are not installed by default.") + print("If you desire a web browser, such as firefox or chromium, you may specify it in the following prompt.") archinstall.arguments['packages'] = [package for package in input('Write additional packages to install (space separated, leave blank to skip): ').split(' ') if len(package)] # Verify packages that were given -- cgit v1.2.3-54-g00ecf From e70aa5244bd07cdaa299df528f8ebd099b00bf64 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Thu, 8 Apr 2021 10:36:42 +0200 Subject: Corrected the new-line parameter --- archinstall/lib/installer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 1d277bc6..16d48183 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -147,11 +147,11 @@ class Installer(): self.log(f"Updating {self.mountpoint}/etc/fstab", level=LOG_LEVELS.Info) fstab = sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint}').trace_log - with open(f"{self.mountpoint}/etc/fstab", 'ab',newline='\n') as fstab_fh: + with open(f"{self.mountpoint}/etc/fstab", 'ab') as fstab_fh: fstab_fh.write(fstab) if not os.path.isfile(f'{self.mountpoint}/etc/fstab'): - raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n{b"".join(fstab)}') + raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n{fstab}') return True -- cgit v1.2.3-54-g00ecf