Use dmg on Mac
davidanthoff opened this issue · 7 comments
@IanButterworth I looked a bit into dmg files, here are some random thoughts:
- How would we extract the dmg file? All I find is instructions on "here is how you do that with finder", but that obviously doesn't help us...
- Related: do we understand how the attached ticket is handled? If (for example) the ticket is checked somehow by finder when one moves the content of the dmg file, then this won't work for us, right?
- Also, there seems to be yet another installer tech, namely installer with pkg files. Do we know what that is?
setup-Julia used to use dmgs and had all that figured out.
julia-actions/setup-julia#117 And if you're wondering why it changed and why it's not a problem for juliaup julia-actions/setup-julia#105 (comment)
https://github.com/julia-actions/setup-julia/blob/f2dfec4debe6a31c20070a66aa6d33580f91e8c8/src/installer.ts#L314 seems the relevant code.
So that is essentially just mounting the dmg file with hdiutil
and then copying the content via bash cp
.
So what I am wondering is: at which stage it the attached ticket going to be "recorded" by the OS? During the mounting step? Or does the cp
command that ships with MacOS handle these tickets? I think we first need to make sure that this approach actually gets the ticket to be recognized by the OS. I could also imagine a situation where the ticket only gets handled properly if one copies the stuff out of the dmg file via finder. I have no indication it is one or the other, so we just need to make sure to find out how it works.
https://forums.developer.apple.com/forums/thread/741219 suggests that in fact hdiutil
will not ingest the ticket, but instead we need to open the image or something like that...
I think that will mean the mounted dmg will appear in finder. Hopefully we can unmount it too and delete the dmg
https://forums.developer.apple.com/forums/thread/706442 kind of makes it sound as if Gatekeeper only ever kicks in if the app has the quarantine attribute, which I would assume it doesn't have when installed via Juliaup. Or is that outdated info?