From 30342b4e1ba5f32e04a54cce604de686e0f1f246 Mon Sep 17 00:00:00 2001 From: Guofang Date: Thu, 22 Oct 2026 21:43:53 +0800 Subject: [PATCH] Make the staged ISO copy writable on macOS macOS's openrsync ignores --chmod, so the staged directories kept the read-only permissions of the UDF mount and wimlib-imagex split failed with Permission denied. Run chmod -R u+rwX on the staging directory on Darwin. Co-Authored-By: Claude Sonnet 5.5 --- build-windows-install-disk.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-windows-install-disk.sh b/build-windows-install-disk.sh index 78f1e2e..77ca331 100755 --- a/build-windows-install-disk.sh +++ b/build-windows-install-disk.sh @@ -214,6 +214,11 @@ step "Staging the ISO files without install.wim" # The UDF mount is read-only, so its directories are too; --chmod keeps the copies # writable, otherwise cleanup cannot remove them. run rsync -rt --chmod=u+rwX --exclude=/sources/install.wim "$mount_dir/" "$stage_dir/" +if [[ "$os" == Darwin ]]; then + # macOS's openrsync ignores --chmod, so make the copies writable here (the split + # below writes into sources/). + run chmod -R u+rwX "$stage_dir" +fi # Parts must stay below the 4 GiB FAT32 file limit; wimlib takes MiB. step "Splitting install.wim into install.swm parts (FAT32 files must stay below 4 GiB)"