Skip to content

DMG/HFS support - #40

Open
JanisErdmanis wants to merge 4 commits into
mainfrom
hfs-support
Open

DMG/HFS support#40
JanisErdmanis wants to merge 4 commits into
mainfrom
hfs-support

Conversation

@JanisErdmanis

@JanisErdmanis JanisErdmanis commented Aug 28, 2026

Copy link
Copy Markdown
Member

This PR improves DMG bundling by enabling HFS+ images with full macOS metadata preservation. This better aligns with standard macOS application distribution practices, reduces the risk of notarization and compatibility issues, and enables deeper DMG customization than ISO-based images.

The build chain now follows the Mozilla recipe, roughly as follows:

# Stage the payload
rsync -a --copy-unsafe-links source/ stage/
chmod -R a+rX,a-st,u+w,go-w stage

# Create the HFS+ volume — using newfs_hfs
size=$(( $(du -s stage | cut -f1) / 1000 * 102 / 100 + 1 ))   # 2% slack
dd if=/dev/zero of=staged.hfs bs=1M count=$size
newfs_hfs -v "$volume_name" staged.hfs

# Populate and wrap — using hfsplus and dmg from libdmg_hfsplus_jll
hfsplus staged.hfs symlink "/ " /Applications   # Drag-to-Applications alias
hfsplus staged.hfs addall stage
dmg build staged.hfs out.dmg

Remaining work

  • Add an HFS filesystem creation utility: [hfsprogs] new recipe v540.1.3 JuliaPackaging/Yggdrasil#14580
  • Integrate the new HFS utility into the build chain
    • Test that hfsplus and the other utilities work together correctly when creating HFS+ images
    • Get the test suite running again
    • Replace du and dd with platform-independent implementations
    • Test hfsplus with the Jumbo Julia distribution to uncover any additional issues
  • Clean up the implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant