MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Sigil for Mac & macOS 10.15 Catalina (https://www.mobileread.com/forums/showthread.php?t=320944)

odamizu 06-21-2019 04:13 PM

Sigil for Mac & macOS 10.15 Catalina
 
I started this discussion in a Catalina thread on the Apple forum and was asked to take it elsewhere.

Starting with macOS 10.15 Catalina, Apple is requiring app notarization by default: "Mac apps, installer packages, and kernel extensions that are signed with Developer ID must also be notarized by Apple in order to run on macOS Catalina."

Meanwhile, this discussion on MacRumors suggests Catalina's Gatekeeper can be overridden via System Prefs > Security or spectl to allow unsigned/unnotarized apps to run.

KevinH weighed in on the new notarization requirement thus:

Quote:

Originally Posted by KevinH (Post 3858909)
This is actually an important issue for Sigil. Right now I volunteer my time as a Sigil developer (all donations are disabled on our site). Sigil does not use the Mac App store as we have no interest in it. That said, Apple still charges me over $100 Canadian per year just to be able to digitally sign Sigil. They make no exceptions for open source developers.

According to a nastigram I received from Apple Developer Relations ... I must now rebuild and relink my app to enable their special runtime and then to declare "limits" of what the app can do and what files/folders it can access.

Given Sigil is an ebook editing environment, it needs to access Photos, Images, Audio, Video, xhtml files anyplace, etc. Sigil also embeds an entire Python 3.7.2 interpreter and allows full Plugins, I can not even begin to "narrow down" what a plugin should do nor limit it. So this "notarization" is a complete waste as any user added plugin could access whatever they want in python.

Then I must "submit" it for them to quote "notarize" it. As well as all previous releases of Sigil that I have signed.

So this is no trivial task.

Then to add insult to injury the Apple dev docs to do all of this are only provided for XCode IDE "novice" developers who need gui hand holding. No command line instructions were posted so no automating the build process with scripts can be done. We build Sigil across 3 platforms (Windows, Linux, and Mac) and build automation is crucial.

I asked Apple's Developer Relations (who said if I had questions I should ask them) for simple directions on how to do this without XCode and its nonsense baggage and my only response was that I should ask for help from other developers on their developer's forums.

So right now the chances of Sigil getting anything notarized by Apple for its new walled garden on macOS is about 0. And the day they prevent power users from running whatever apps they want, will be the last day I use a macOS. I will just go back to Linux.

The most silly thing about Apple's security model is that it completely ignores unix level security features. If I have a new app I either run it in a VM or create a non-admin account where there are no other files it can even access outside of what I place in that VM or non-admin account for it to use. So it (or me) can not delete my entire music library!

My2 cents ...

I replied:
Quote:

Originally Posted by odamizu (Post 3858987)
Thanks Kevin. Your 2 cents are always worth more like $2million to me.

If Catalina (and future macOS's) will run unsigned apps without notarization, would you be willing to continue developing Sigil without signing it?

Thank you

KevinH 06-21-2019 05:13 PM

See the related discussion I had with Kovid here:

https://www.mobileread.com/forums/sh...43#post3859243

His plan is a wait-and-see approach but the new "hardened runtime" requirement would be an issue for Calibre as well. To be notarized an app must use the Apple hardened runtime.

The only way to get Sigil to use the hardened runtime would be to ask for almost all of the entitlements (exceptions) as both Sigil and Calibre use python plugins which may load many python packages and associated shared libraries and modules, none of which we sign), we both use QtWebKit/QtWebEngine which means we use JIT compilation, javascripts, and areas of the stack are walked for garbage collection, etc. Access to user's Photos, Audio, and Video would be restricted. They do not want you to allow the user to run a debugger to help track down an error, they do not want you to use DYLD library path setting, and etc.

Basically, Apple views any 3rd party app as an "attack vector" for an uncaught virus or malware, instead of a real app. This makes no sense at all. If anyone gets physical access to your mac machine, you are screwed anyway. The silly thing is anyone can write a python plugin package that does anything it wants and a user could install that and run it via Sigil or Calibre or even from the command line, so this notarization is effectively shutting a barn door after all the animals inside have already fled.

So my plan is similar to Kovids. First wait and see what develops. The beta is allowing us both to run now since we are signed but that may change.

If that door closes, the problem will be figuring a way to actually get our apps to work with the "hardened runtime" if at all possible. If so, I will try for "notarization" but it might be impossible to actually pass that requirement even when asking for almost all of the exceptions.

If I can not get notarization to pass, then we come to a real problem. As long as Apple allows unsigned and unnotarized apps to be run, I will simply stop signing it (actually lessening security not increasing it) and keep releasing. If Apple ever prevents power users from installing and running the apps we want, I will simply stop being a Mac user. At that point, some other Apple volunteer developer would have to step up, redesign Sigil to curtail or limit its usefulness to fit the hardened runtime limits or development on macOS would stop.

odamizu 06-21-2019 09:20 PM

Quote:

Originally Posted by KevinH (Post 3859326)
... So my plan is similar to Kovids. First wait and see what develops. The beta is allowing us both to run now since we are signed but that may change.

If that door closes, the problem will be figuring a way to actually get our apps to work with the "hardened runtime" if at all possible. If so, I will try for "notarization" but it might be impossible to actually pass that requirement even when asking for almost all of the exceptions.

If I can not get notarization to pass, then we come to a real problem. As long as Apple allows unsigned and unnotarized apps to be run, I will simply stop signing it (actually lessening security not increasing it) and keep releasing. If Apple ever prevents power users from installing and running the apps we want, I will simply stop being a Mac user. At that point, some other Apple volunteer developer would have to step up, redesign Sigil to curtail or limit its usefulness to fit the hardened runtime limits or development on macOS would stop.

Thank you, KevinH.

If Apple insists on driving developers like you and KovidGoyal away, I will likely abandon Mac as well — words I thought I'd never say. The last non-Mac operating system I used was DOS. I have never used Windows or Linux, and the thought of leaving Mac is daunting and deeply unhappy-making.

odamizu 10-05-2019 04:54 PM

With regard to notarization, here are two interesting articles that may (or may not) include useful information if notarization is a no-go for Sigil: disabling Gatekeeper on Catalina and Catalina Security Explained

odamizu 10-14-2019 02:54 PM

Good news! Looks like all my worry about notarization is moot.

From Apple Support:

Quote:

How to open an app that hasn’t been notarized or is from an unidentified developer

In macOS Catalina and macOS Mojave, when an app fails to install because it hasn’t been notarized or is from an unidentified developer, it will appear in System Preferences > Security & Privacy, under the General tab. Click Open Anyway to confirm your intent to open or install the app.

The warning prompt reappears, and you can click Open.* The app is now saved as an exception to your security settings, and you can open it in the future by double-clicking it, just as you can any authorized app.

* If you're prompted to open Finder: control-click the app in Finder, choose Open from the menu, and then click Open in the dialog that appears. Enter your admin name and password to open the app.

Vroni 10-14-2019 03:15 PM

Did you already updated to catalina?

odamizu 10-14-2019 03:29 PM

Not yet. I've been trying to find time to install it on an external SSD for testing purposes. Hopefully this week.

(I don't plan to update my primary Mac any time in the foreseeable future because I have 32-bit apps I need.)

DiapDealer 10-14-2019 04:21 PM

Quote:

Originally Posted by odamizu (Post 3903439)
Good news! Looks like all my worry about notarization is moot.

From Apple Support:
Quote:

How to open an app that hasn’t been notarized or is from an unidentified developer

In macOS Catalina and macOS Mojave, when an app fails to install because it hasn’t been notarized or is from an unidentified developer, it will appear in System Preferences > Security & Privacy, under the General tab. Click Open Anyway to confirm your intent to open or install the app.

The warning prompt reappears, and you can click Open.* The app is now saved as an exception to your security settings, and you can open it in the future by double-clicking it, just as you can any authorized app.

* If you're prompted to open Finder: control-click the app in Finder, choose Open from the menu, and then click Open in the dialog that appears. Enter your admin name and password to open the app.

I really hope it turns out to be that simple. I mean it should be. Who in their right mind would make it so a developer couldn't write an app on their development machine and test it on another machine they own without having the app notarized? Forget distribution of opensource software: nobody would be able to write/compile their own program without signing it and notorizing it just to test it out on different hardware. :eek:

odamizu 10-15-2019 12:56 AM

This whole notarization thing has been rather murky from the start.

A lot of developer talk is over my head, but early discussion on the Internet suggested it would only apply once an app was signed or if it was downloaded from the Internet, or that Gatekeeper could be overridden using a Terminal command (spctl) or overridden the way Apple now confirms it can be — all of which would allow a developer to test on other machines they own without notarizing.

kovidgoyal said Gatekeeper is triggered by downloading with Safari here: https://www.mobileread.com/forums/sh...84#post3886884

In any case, I am hopeful this is now moot :)

Vroni 10-15-2019 04:46 AM

Quote:

Originally Posted by odamizu (Post 3903463)
Not yet. I've been trying to find time to install it on an external SSD for testing purposes. Hopefully this week.

(I don't plan to update my primary Mac any time in the foreseeable future because I have 32-bit apps I need.)

I replaced PiBaker last weekend. This was my last 32 bit App. Ok, one exception, i still have ADE 2.something to test ebpubs with that version. But usage is very rare.

DNSB 10-15-2019 03:31 PM

For what it's worth, I cloned my Mojave VM and updated the clone to Catalina over the weekend (long weekend here for Thanksgiving). Calibre 4.1 and Sigil 9.1.8 downloaded, installed and ran with the usual Mac query over trusting the application. Now I just need to clean out the remaining 32-bit apps.

odamizu 10-15-2019 04:44 PM

It does appear that the notarization requirement is not as stringent as Apple first implied, and KevinH and DiapDealer can leave Sigil unnotarized if notarization turns out to be too much of a pain in the behind :)

DiapDealer 10-15-2019 04:59 PM

I'm determined not to pay the extortion money they want to keep Windows from popping warnings about unknown publishers. ;)

It's not really even the money at this point (though the prices ARE ridiculous--and getting more so). It's the hoops I would have to jump through and the documents I would have to provide just to be allowed to spend too much money on a certificate (assuming one doesn't want to get a fly-by-night cert). All just to eliminate a pop-up warning that can be easily dismissed. I'm not p(l)aying.

odamizu 10-15-2019 05:23 PM

Is Apple charging a fee for notarization?! :eek:

BetterRed 10-15-2019 05:32 PM

Apparently so, for popup Windows only :)

DiapDealer 10-15-2019 05:57 PM

I don't know if Apple charges for notarization. I was referring to Windows and all the various certification issuers they're in cahoots with to get software devs to pay exorbitant fees for codesigning certs so they won't be an "unknown publisher" any more.

kovidgoyal 10-15-2019 07:27 PM

Apple does not charge for notarization but for notarization to work you need an active Apple developer subscription which costs $99 a year, so effectively you pay Apple a hundred dollars a year for notarization. With only codesigning, you could let the developer account lapse, renewing it only once every 5 years when the codesigning key expires, so the effective cost was $20 a year.

On Windows, you have to pay a third party, not microsoft, for a codesigning certificate, and the cost varies from about $50 to $100 a year.

Vroni 10-16-2019 04:38 AM

Uhhh this is becoming offtopic, but just to be sure i understood this correctly: The notarizitaion is only for apps not being solf through the app store to get rif of the message "You downloaded it from the internet and unsafe blablablabla Are you sure? blablabla?"

odamizu 10-16-2019 02:54 PM

Yes, notarization is only for apps distributed outside the App Store. Apps distributed inside the App Store have a different screening process.

When notarization was first announced, Apple implied that apps would not run at all on Catalina if they weren't notarized, which posed a problem for apps like Sigil if notarization proved too much of a pain in the behind for developers to implement.

Discussion on the Internet suggested there would be ways around notarization, including resorting to a Terminal command to disable Gatekeeper. Fortunately, that's not necessary as Apple has provided a simple, straightforward way around it.

odamizu 10-21-2019 03:21 AM

Hmmmm ... According to Oracle: "Eventually (as of January 2020), you will only be able to install and run Mac software distributed outside the Mac App store on macOS 10.15 systems that are notarized by Apple."

This is consistent with Apple's Sept 3 statement: "Mac software distributed outside the Mac App Store must be notarized by Apple in order to run on macOS Catalina. To make this transition easier and to protect users on macOS Catalina who continue to use older versions of software, we’ve adjusted the notarization prerequisites until January 2020."

This is a bit in contradiction to Apple's Oct 7 support document providing instructions to override Gatekeeper and run unsigned/unnotarized apps.

I suppose we just have to wait until January to see if Apple is indeed going to close the door to unsigned/unnotarized apps :(

Vroni 10-21-2019 01:56 PM

Good to know, thx. Then i will wait with Catalina, maybe Mojave is the last version.

odamizu 10-24-2019 01:26 PM

Poking around Catalina ...

1) Catalina defaults to zsh instead of bash in Terminal (though you can apparently switch it back to bash if you want).

I don't really know what this means, but what I'm trying to figure out is:

Does it matter whether you use zsh or bash when unpacking the Sigil .txz installer?

Does it matter whether you use zsh or bash for any other ebook-related Terminal things, like java -jar for epubcheck or running KindleGen or Calibre modules from a Terminal window?

2) Catalina includes Python 2.7.16.

As 2.7 is reaching end of life, if I install Python 3, will that screw up anything I have that requires Python 2 to run? From what I've read, I can have both 2 and 3 installed, but how do I point to one or the other at will? Or will the script or process know which one it needs and pick the correct one automatically?

It's probably obvious that I don't know what I'm talking about here. I'm not doing any programming. Just running Python scripts and apps and want to make sure I can keep running them.

Thank you!

KevinH 10-24-2019 03:43 PM

- Zsh should be a close drop in replacement for bash, so hopefully no issues there.
- python 2.x has always been installed on macOS. There are no issues installing Python 3.x at the same time. They end up in different places. Also Sigil has its own internal Python 3 on macOS again with no troubles.

So no worries here.

odamizu 10-25-2019 03:11 AM

Thank you, KevinH. As you predicted, zsh worked find to unpack Sigil's .txz (and also run epubcheck.jar and kindlegen from the command line).

What was surprising, though, is I accidentally double-clicked Sigil's .txz file, and Catalina's default Archive Utility unpacked it just fine. So Terminal command is not necessary in Catalina. (I tested it both ways — tar -xvf on Terminal and simply double-clicking the .txz file. Both worked.)

Launching Sigil the first time (I did a clean install) resulted in a pop-up that says, Sigil can't be opened because Apple cannot check it for malicious software. This software needs to be updated. Contact the developer for more information. It then offers two buttons: Show in Finder and Okay. If, instead, you right-click-Open, you get three choices: Show in Finder, Okay and Open. Clicking Open launches Sigil, no problem. You can also go to System Prefs > Security after the initial launch attempt and there will be a message saying, Sigil was blocked from use because it is not from an identified developer with a button to Open Anyway. This message is a bit off-putting since Sigil is code-signed (confirmed with spctl -a -v).

For unsigned & unnotarized apps, like the KindleUnpack applet, you get a pop-up that says, macOS cannot verify the developer of KindleUnpack 64 v0.81. Are you sure you want to open it? By opening this app, you will be overriding system security which can expose your computer and personal information to malware that may harm your Mac or compromise your privacy. Once again you can override Gatekeeper with right-click-Open or System Prefs > Security.

Interestingly, some unsigned/unnotarized apps (like Alf's standalone app) won't open at all if unzipped in Catalina, but will open if you unzip it on Mojave or High Sierra then copy it over to Catalina.

Command line tools (like Kindlegen and epubcheck) run without any warning.

Some notarized apps (like BBEdit) pop-up a milder warning: BBEdit is an app downloaded from the Internet. Are you sure you want to open it? But other notarized apps (like KindlePreviewer and Send to Kindle) launch without any warning at all.

I then did some very quick tests on plugins, all of which worked (after installing ActiveTcl). These include: EpubCheck, cssRemoveUnusedSelectors, ePub3-itizer, TagMechanic, KindleImport, KindleGen, PunctuationSmarten, ShowSemantics, etc.

I will spend more time with Sigil on Catalina in the coming days and report back anything interesting, but so far so good.

I have also spent a tiny amount of time on Calibre 3.48 and plan to install 4.2 once I get a chance.

odamizu 12-24-2019 12:06 AM

from MacRumors:
Quote:

Apple this afternoon announced that developers who create Mac apps outside of the Mac App Store will need to submit them for the notarization process starting on February 3, 2020
As far as I can tell, it will still be possible to override Gatekeeper with right-click-Open or System Prefs > Security panel (and I have an external drive set up with Catalina to test :))

KevinH 12-24-2019 09:10 AM

Yes, I am not yet going to worry about notarization. At some point, maybe. I personally think Apple's requiring a code signed app to be notarized is for the birds and will not truly help security.

odamizu 12-25-2019 04:16 PM

from Cult of Mac:

Quote:

These changes won’t stop users from running unsigned apps, it just prevents you from being able to double-click an app to run it by default. If want to run a non-notarized app you can still right-click it and then choose Open.


All times are GMT -4. The time now is 09:56 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.