# macOS hdiutil packaging on GitHub Actions can fail if prepackage scripts are used

**URL:** https://discourse.cmake.org/t/macos-hdiutil-packaging-on-github-actions-can-fail-if-prepackage-scripts-are-used/14990
**Category:** Development
**Tags:** os:macos, gen:ninja
**Created:** [August 12, 2025, 8:04pm UTC](https://discourse.cmake.org/t/macos-hdiutil-packaging-on-github-actions-can-fail-if-prepackage-scripts-are-used/14990 "2025-08-12T20:04:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Gonzalo\_Garramuno](https://discourse.cmake.org/user_avatar/discourse.cmake.org/gonzalo_garramuno/32/265_2.png) [@Gonzalo\_Garramuno](https://discourse.cmake.org/u/Gonzalo_Garramuno)
#### Post date: [August 12, 2025, 8:04pm UTC](https://discourse.cmake.org/t/macos-hdiutil-packaging-on-github-actions-can-fail-if-prepackage-scripts-are-used/14990/1 "2025-08-12T20:04:02Z")

</div>

When the prepackage.cmake scripts are used on macOS and these do a lot of file I/O macOS on GitHub actions can make hdiutil fail with a resource busy. Note that this happens sometimes only and I’ve been unable to reproduce it locally. Find attached a big project that fails on packaging.

Suggestion: before running hdiutil, add a “sync” command.

_VERY verbose log_, see end of Build mrv2:

[logs\_43382604917.zip](https://discourse.cmake.org/uploads/short-url/lL5yF0yKlpdTCgmSWZCgT4mWv9s.zip) (1.2 MB)

Project is:

> **[GitHub - ggarra13/mrv2: Professional player and review tool for vfx,...](https://github.com/ggarra13/mrv2)**
>
> Professional player and review tool for vfx, animation and computer graphics.

Thanks.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [August 13, 2025, 2:16pm UTC](https://discourse.cmake.org/t/macos-hdiutil-packaging-on-github-actions-can-fail-if-prepackage-scripts-are-used/14990/2 "2025-08-13T14:16:04Z")

</div>

Thanks. That could explain spurious hdiutil failures we’ve seen before. It looks like you’ve opened [CMake Issue 27136](https://gitlab.kitware.com/cmake/cmake/-/issues/27136) for this already. I’d welcome a merge request with the proposed `sync`.

---

<div class="post-metadata">

### Author: ![Gonzalo\_Garramuno](https://discourse.cmake.org/user_avatar/discourse.cmake.org/gonzalo_garramuno/32/265_2.png) [@Gonzalo\_Garramuno](https://discourse.cmake.org/u/Gonzalo_Garramuno)
#### Post date: [August 15, 2025, 1:04pm UTC](https://discourse.cmake.org/t/macos-hdiutil-packaging-on-github-actions-can-fail-if-prepackage-scripts-are-used/14990/3 "2025-08-15T13:04:18Z")

</div>

I did try a merge request, and it failed on Pipeline #455660, ghostflow-check-master.

Unfortunately, I have no clue what that means or how to fix it.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [August 16, 2025, 2:05am UTC](https://discourse.cmake.org/t/macos-hdiutil-packaging-on-github-actions-can-fail-if-prepackage-scripts-are-used/14990/4 "2025-08-16T02:05:09Z")

</div>

That is our robot’s checks making itself show up as a pipeline status. See the comment posted by the `kwrobot` user for details. Note that we check individual commits for most things, so “fixup” commits on top of the topic will not resolve things.
