tormod_bjorøy wrote:
The sshfs was compiled using meson and ninja. Maybe these tools already have a "pkgutil tool" built in ?
No. They are from a completely different world. However, if you were able to compile something with those tools, then pkgutil should be easy. I have used ninja before. I'm not exaggerating when I say pkgutil is 100 times easier.
If you can give me the commands to run - very specific - Than maybe I will give it a try.
First of all, I was wrong. It isn't pkgutil. That is an older tool. The correct tool to use now is "productbuild". I have no idea about meson or ninja. When I see something like ninja being used, I just take a whole day off and build an Xcode project instead and I'm done with it forever.
Here are instructions I made for someone who was trying to get a notarized, 64-bit build of Ghostscript. In this example, Ghostscript has already been built and installed into the standard location /usr/local. These instructions create a temporary packaging area, copy over all the installed Ghostscript files into the corresponding temp directories, wrap it all into a package, sign, and notarize it. These instructions are a few years old. The "altool" has since been replaced but I'm not familiar with the replacement. I think this should still work though. You will obviously have to adapt it to sshfs, which I'm also pretty unfamiliar with. The different colours are just an artifact of these forums.
# All executables need to be signed with the hardened runtime.
# I am assuming that all these executables have already been built in the project area,
# but not yet installed.
# Obviously, your executable files will be different.
codesign --timestamp --options=runtime -s "Developer ID Application: <your developer id>" -v bin/gs
codesign --timestamp --options=runtime -s "Developer ID Application: <your developer id>" -v bin/pdftoraster
codesign --timestamp --options=runtime -s "Developer ID Application: <your developer id>" -v cups/pstoraster
codesign --timestamp --options=runtime -s "Developer ID Application: <your developer id>" -v cups/pstopxl
# Install into /usr/local
sudo make install
# Copy the installed files into a temporary packaging area
# Again, your files will be different.
sudo mkdir /tmp/ghostscript
ditto /usr/local/bin /tmp/ghostscript/usr/local/bin
ditto /usr/local/share /tmp/ghostscript/usr/local/share
ditto /usr/libexec/cups/filter/pdftoraster /tmp/ghostscript/usr/libexec/cups/filter/
ditto /usr/libexec/cups/filter/pstoraster /tmp/ghostscript/usr/libexec/cups/filter/
ditto /usr/libexec/cups/filter/pstopxl /tmp/ghostscript/usr/libexec/cups/filter/
ditto /private/etc/cups/pdftoraster.convs /tmp/ghostscript/private/etc/cups/
ditto /private/etc/cups/pstoraster.convs /tmp/ghostscript/private/etc/cups/
# Build the installer package
# I went ahead and changed the bundle identifier to something plausible for sshfs just so nobody
# accidentally uses my own bundle identifier.
productbuild --identifier "org.osxfuse.sshfs.pkg" --sign "Developer ID Installer: <your developer id>" --timestamp --root /tmp/ghostscript / sshfs.pkg
# Apple has a new replacement for the "altool" but I've never used it.
xcrun altool --notarize-app --primary-bundle-id "org.osxfuse.sshfs.pkg" --username "<your apple id>" --password "<your app-specific password>" --file sshfs.pkg
# Hopefully the notarization happens quickly. You may have to do this a couple of
# of times until it goes through. Or just wait for the e-mail from Apple.
xcrun altool --notarization-history 0 -u "<your apple id>" -p "<your app-specific password>"
# After the notarization is successful, you can staple.
xcrun stapler staple sshfs.pkg