From 0fb62f4bcd468c0f691ebd20744d0b3d4f845fff Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 13 Dec 2021 21:13:33 -0700 Subject: [PATCH 1/7] Add missing memtest86-efi package --- setup/linux/packages/aur | 1 + setup/linux/packages/base | 1 + 2 files changed, 2 insertions(+) diff --git a/setup/linux/packages/aur b/setup/linux/packages/aur index 4fa93864..2db544e9 100644 --- a/setup/linux/packages/aur +++ b/setup/linux/packages/aur @@ -1,6 +1,7 @@ aic94xx-firmware hfsprogs iwgtk +memtest86-efi mprime openbox-patched pipes.sh diff --git a/setup/linux/packages/base b/setup/linux/packages/base index f312ceb1..a9942037 100644 --- a/setup/linux/packages/base +++ b/setup/linux/packages/base @@ -43,6 +43,7 @@ man-pages mdadm mediainfo memtest86+ +memtest86-efi mkinitcpio mkinitcpio-archiso mprime From 3f678e1920d4071c82c712e0cad3b715dbcf7ecb Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 13 Dec 2021 21:13:50 -0700 Subject: [PATCH 2/7] Set correct permissions for authorized_keys --- setup/linux/profile_base/profiledef.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/linux/profile_base/profiledef.sh b/setup/linux/profile_base/profiledef.sh index 3f177eb4..557ca943 100644 --- a/setup/linux/profile_base/profiledef.sh +++ b/setup/linux/profile_base/profiledef.sh @@ -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" ) From dc52eba172997f2111c2d7a42338397ad87daa3c Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 13 Dec 2021 21:16:53 -0700 Subject: [PATCH 3/7] Add missing mtools package --- setup/linux/packages/base | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/linux/packages/base b/setup/linux/packages/base index a9942037..e5010556 100644 --- a/setup/linux/packages/base +++ b/setup/linux/packages/base @@ -47,6 +47,7 @@ memtest86-efi mkinitcpio mkinitcpio-archiso mprime +mtools nano ncdu openssh From 8075dfe45ce45cd83cfe47b5247827effcb2d468 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 13 Dec 2021 22:07:05 -0700 Subject: [PATCH 4/7] Fix run_adwcleaner() --- scripts/wk/repairs/win.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wk/repairs/win.py b/scripts/wk/repairs/win.py index 34011d58..975824e5 100644 --- a/scripts/wk/repairs/win.py +++ b/scripts/wk/repairs/win.py @@ -931,7 +931,7 @@ def delete_registry_null_keys(): 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) From a19714d735efdc838682e12613e47307dbb0d143 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 14 Dec 2021 14:08:22 -0700 Subject: [PATCH 5/7] Skip CPU tests by default for TestStations Addresses #179 --- scripts/wk/cfg/hw.py | 1 + scripts/wk/hw/diags.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/scripts/wk/cfg/hw.py b/scripts/wk/cfg/hw.py index 673d45f4..ed040437 100644 --- a/scripts/wk/cfg/hw.py +++ b/scripts/wk/cfg/hw.py @@ -119,6 +119,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 diff --git a/scripts/wk/hw/diags.py b/scripts/wk/hw/diags.py index e5991b3f..f380239e 100644 --- a/scripts/wk/hw/diags.py +++ b/scripts/wk/hw/diags.py @@ -482,6 +482,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') From 32d7cd44ffe8c681f884136c15b0a9d4b895d8a3 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 14 Dec 2021 15:08:01 -0700 Subject: [PATCH 6/7] Save extra image list to UFD to support --update Addresses #176 --- scripts/wk/kit/ufd.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/scripts/wk/kit/ufd.py b/scripts/wk/kit/ufd.py index a29bfcd6..49ec21e5 100644 --- a/scripts/wk/kit/ufd.py +++ b/scripts/wk/kit/ufd.py @@ -52,6 +52,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' @@ -78,6 +79,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') @@ -137,6 +139,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( @@ -172,6 +182,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') @@ -539,8 +554,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 From ef5c61caa93070302c86810bf8bccf7168e1725f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 14 Dec 2021 15:30:32 -0700 Subject: [PATCH 7/7] Add more README.md files Addresses #177 --- setup/linux/README.md | 11 +++++++++++ setup/linux/packages/README.md | 15 +++++++++++++++ setup/macos/README.md | 11 +++++++++++ setup/pe/README.md | 3 +++ setup/windows/README.md | 7 +++++++ setup/windows/bin/AdwCleaner/settings | Bin setup/windows/bin/README.md | 3 +++ 7 files changed, 50 insertions(+) create mode 100644 setup/linux/README.md create mode 100644 setup/linux/packages/README.md create mode 100644 setup/macos/README.md create mode 100644 setup/pe/README.md create mode 100644 setup/windows/README.md mode change 100755 => 100644 setup/windows/bin/AdwCleaner/settings create mode 100644 setup/windows/bin/README.md diff --git a/setup/linux/README.md b/setup/linux/README.md new file mode 100644 index 00000000..76615b5d --- /dev/null +++ b/setup/linux/README.md @@ -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. diff --git a/setup/linux/packages/README.md b/setup/linux/packages/README.md new file mode 100644 index 00000000..4ef3f41e --- /dev/null +++ b/setup/linux/packages/README.md @@ -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. diff --git a/setup/macos/README.md b/setup/macos/README.md new file mode 100644 index 00000000..9f9222f2 --- /dev/null +++ b/setup/macos/README.md @@ -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. diff --git a/setup/pe/README.md b/setup/pe/README.md new file mode 100644 index 00000000..2b3ab464 --- /dev/null +++ b/setup/pe/README.md @@ -0,0 +1,3 @@ +# WizardKit: WinPE # + +_Under construction_ diff --git a/setup/windows/README.md b/setup/windows/README.md new file mode 100644 index 00000000..341b0a04 --- /dev/null +++ b/setup/windows/README.md @@ -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. diff --git a/setup/windows/bin/AdwCleaner/settings b/setup/windows/bin/AdwCleaner/settings old mode 100755 new mode 100644 diff --git a/setup/windows/bin/README.md b/setup/windows/bin/README.md new file mode 100644 index 00000000..32f34d48 --- /dev/null +++ b/setup/windows/bin/README.md @@ -0,0 +1,3 @@ +# WizardKit: Windows/bin # + +Settings for tools in bin/ to include in the build.