Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
2Shirt 2021-12-14 15:34:27 -07:00
commit 7dc64fb73b
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
14 changed files with 80 additions and 2 deletions

View file

@ -120,6 +120,7 @@ TEMP_COLORS = {
90: 'RED',
100: 'ORANGE_RED',
}
TESTSTATION_FILE = '/run/archiso/bootmnt/teststation.name'
# THRESHOLDS: Rates used to determine HDD/SSD pass/fail
THRESH_HDD_MIN = 50 * 1024**2
THRESH_HDD_AVG_HIGH = 75 * 1024**2

View file

@ -523,6 +523,10 @@ def build_menu(cli_mode=False, quick_mode=False):
# Only select quick option(s)
menu.options[name]['Selected'] = name in MENU_OPTIONS_QUICK
# Skip CPU tests for TestStations
if os.path.exists(cfg.hw.TESTSTATION_FILE):
menu.options['CPU & Cooling']['Selected'] = False
# Add CLI actions if necessary
if cli_mode or 'DISPLAY' not in os.environ:
menu.add_action('Reboot')

View file

@ -56,6 +56,7 @@ Options:
-U --update Don't format device, just update
'''
LOG = logging.getLogger(__name__)
EXTRA_IMAGES_LIST = '/mnt/UFD/arch/extra_images.list'
MIB = 1024 ** 2
ISO_LABEL = f'{KIT_NAME_SHORT}_LINUX'
UFD_LABEL = f'{KIT_NAME_SHORT}_UFD'
@ -82,6 +83,7 @@ def build_ufd():
log.enable_debug_mode()
if args['--update'] and args['EXTRA_IMAGES']:
std.print_warning('Extra images are ignored when updating')
args['EXTRA_IMAGES'] = []
log.update_log_path(dest_name='build-ufd', timestamp=True)
try_print = std.TryAndPrint()
try_print.add_error('FileNotFoundError')
@ -141,6 +143,14 @@ def build_ufd():
read_write=True,
)
# Load extra images if updating
if args['--update'] and os.path.exists(EXTRA_IMAGES_LIST):
with open(EXTRA_IMAGES_LIST, 'r', encoding='utf-8') as _f:
extra_images = [
io.get_path_obj(image.strip(), resolve=False)
for image in _f.readlines()
]
# Remove Arch folder
if args['--update']:
try_print.run(
@ -176,6 +186,11 @@ def build_ufd():
image_path=image_path,
)
# Save extra image list
if extra_images:
with open(EXTRA_IMAGES_LIST, 'w', encoding='utf-8') as _f:
_f.write('\n'.join([image.name for image in extra_images]))
# Update boot entries
std.print_standard(' ')
std.print_info('Boot Setup')
@ -546,8 +561,12 @@ def update_boot_entries(ufd_dev, images=None):
]
run_program(cmd, check=False)
# Bail early
# Check if we're working with extra images
if not images and os.path.exists(EXTRA_IMAGES_LIST):
with open(EXTRA_IMAGES_LIST, 'r', encoding='utf-8') as _f:
images = [image.strip() for image in _f.readlines()]
if not images:
# No extra images detected
return
# Get PARTUUID values

View file

@ -1044,7 +1044,7 @@ def install_mbam():
def run_adwcleaner():
"""Run AdwCleaner."""
settings_path = get_tool_path('AdwCleaner', 'AdwCleaner')
settings_path = get_tool_path('AdwCleaner', 'AdwCleaner', check=False)
settings_path = settings_path.with_name('settings')
out_path = get_path_obj(f'{SYSTEMDRIVE}/AdwCleaner/settings')
out_path.parent.mkdir(exist_ok=True)

11
setup/linux/README.md Normal file
View file

@ -0,0 +1,11 @@
# WizardKit: Linux #
Files used to create the Linux build(s).
## Profiles ##
profile_base is used for both full and minimal Linux builds.
profile_gui is only used for full Linux builds.
NOTE: The Minimal Linux build is currently deprecated and may be removed from a future release.

View file

@ -0,0 +1,15 @@
# WizardKit: Linux/packages #
Package lists.
## aur ##
This list is used to build a local custom repo for packages in the Arch User Repository.
## base & gui ##
These lists are installed inside the Linux build(s).
## dependencies ##
This list is installed to the host system used to create the Linux build(s). These are either required by the creation scripts or are build dependencies.

View file

@ -1,6 +1,7 @@
aic94xx-firmware
hfsprogs
iwgtk
memtest86-efi
mprime
openbox-patched
pipes.sh

View file

@ -44,9 +44,11 @@ mariadb-clients
mdadm
mediainfo
memtest86+
memtest86-efi
mkinitcpio
mkinitcpio-archiso
mprime
mtools
nano
ncdu
openssh

View file

@ -15,5 +15,6 @@ file_permissions=(
["/etc/shadow"]="0:0:0400"
["/etc/gshadow"]="0:0:0400"
["/etc/skel/.ssh"]="0:0:0700"
["/etc/skel/.ssh/authorized_keys"]="0:0:0600"
["/etc/skel/.ssh/id_rsa"]="0:0:0600"
)

11
setup/macos/README.md Normal file
View file

@ -0,0 +1,11 @@
# WizardKit: macOS #
Files used to create the macOS build(s).
## install-deps ##
This is used to install dependencies to the host macOS environment needed to build the macOS images.
## live-macos-startup ##
This script is used to configure the live environment at runtime.

3
setup/pe/README.md Normal file
View file

@ -0,0 +1,3 @@
# WizardKit: WinPE #
_Under construction_

7
setup/windows/README.md Normal file
View file

@ -0,0 +1,7 @@
# WizardKit: Windows #
Files used to create the Windows build.
## build.ps1 ##
This PowerShell script is used to download the minimal framework for the Windows build. Once that's done it launches `build_kit_windows.py` in the new environment to finish the setup.

0
setup/windows/bin/AdwCleaner/settings Executable file → Normal file
View file

View file

@ -0,0 +1,3 @@
# WizardKit: Windows/bin #
Settings for tools in bin/ to include in the build.