Skip to content

Instantly share code, notes, and snippets.

@satmandu
satmandu / gist:37ce878ba5c3e002b7cb6c3a47aa598a
Last active November 14, 2024 19:12
Extract macos dmg with pkg inside from Linux (ubuntu 22.04)
# Install build prereqs:
sudo apt-get install build-essential libxml2-dev libssl-dev zlib1g-dev
# You can extract a dmg using 7z thus: 7z x File.dmg
# This installs tools like lsbom to see what is inside bom files
git clone https://github.com/hogliux/bomutils && cd bomutils && make && sudo make install
# Now install xar so you can extract the pkg file
curl -OLf https://opensource.apple.com/tarballs/xar/xar-425.2.tar.gz
tar fxv xar-425.2.tar.gz
cd xar-xar-425.2/xar/
curl -OLf https://raw.githubusercontent.com/macports/macports-ports/master/archivers/xar/files/xar-1.8-openssl-1.1.patch