From 00b47aef47bef0aacfb5431c6d58eafe58a27915 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Mon, 23 Jan 2023 09:20:00 -0700 Subject: [PATCH] Revert "sys_patch_helpers.py: Work around Read only error" This reverts commit 92f85feda5b4261cf72ba616dcf1736c91d342f1. --- CHANGELOG.md | 2 -- resources/sys_patch/sys_patch_helpers.py | 11 ++--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a0d7d7c7..3da00d8a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,8 +45,6 @@ - Kernelspace: [RSRHelper.kext](https://github.com/khronokernel/RSRHelper) (cbe1be9) - Add APFS Trim Configuration - Settings -> Misc Settings -> APFS Trim -- Work-around KDKs failing to install due to Read-only error - - `[errno 30] read-only file system: KernelDebugPkg.kit` - Increment Binaries: - OpenCorePkg 0.8.8 - release - PatcherSupportPkg 0.8.2 - release diff --git a/resources/sys_patch/sys_patch_helpers.py b/resources/sys_patch/sys_patch_helpers.py index add6395c0..5cad6ec63 100644 --- a/resources/sys_patch/sys_patch_helpers.py +++ b/resources/sys_patch/sys_patch_helpers.py @@ -83,15 +83,8 @@ class sys_patch_helpers: print(f"- Installing downloaded KDK (this may take a while)") with tempfile.TemporaryDirectory() as mount_point: utilities.process_status(subprocess.run(["hdiutil", "attach", self.constants.kdk_download_path, "-mountpoint", mount_point, "-nobrowse"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) - # Due to a permissions bug in macOS, sometimes the OS will fail on a Read-only file system error - # We don't actually need to write inside the KDK DMG, however macOS will do whatever it wants - # Thus move the KDK to another location, and run the installer from there - kdk_dst_path = Path(f"{self.constants.payload_path}/KernelDebugKit.pkg") - if kdk_dst_path.exists(): - utilities.process_status(utilities.elevated(["rm", kdk_dst_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) - utilities.process_status(subprocess.run(["cp", f"{mount_point}/KernelDebugKit.pkg", self.constants.payload_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) - utilities.process_status(utilities.elevated(["installer", "-pkg", kdk_dst_path, "-target", "/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) - utilities.process_status(utilities.elevated(["rm", kdk_dst_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) + # Install the KDK + utilities.process_status(utilities.elevated(["installer", "-pkg", f"{mount_point}/KernelDebugKit.pkg", "-target", "/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) subprocess.run(["hdiutil", "detach", mount_point], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) # Do not really care if this fails print("- Successfully installed KDK")