etesync / etesync-dav

This is a CalDAV and CardDAV adapter for EteSync
https://www.etesync.com
GNU General Public License v3.0
293 stars 49 forks source link

macOS installer #126

Open devurandom opened 4 years ago

devurandom commented 4 years ago

To be blunt, the installation story on macOS is currently catastrophic. The steps to end up with a usable setup involve a fair bit of command line fiddling, understanding of the inner workings of the macOS operating system and workarounds that are tricky to get right. It took me (newbie on macOS) about an hour. That's nothing I would expect Joe Random to be able or willing to do.

I propose to:

tasn commented 4 years ago

I wouldn't say catastrophic, but I completely agree it's far from perfect. To address some of the points:

Either way, I'm sorry for the time you had to spend on setting it up, and I agree we should definitely improve it!

devurandom commented 4 years ago

launchd agent - yeah, we need to do that.

Thanks, that would be great. I think the launchd agent plist I created does not really work and I do not yet have experience in debugging launchd issues (or much chance to learn it, without an own macOS computer), so I appreciate any help in form of example files and commands to execute, until there is an installer that does it fully automatic.

Register the self-signed cert with the system: the web UI (and the CLI) can both do it for you. The web UI even pops a big message about doing it.

I remember the web UI offering a button for TLS setup, but it seemed that only made etesync-dav run with TLS. I still had to go to System Settings > Internet Accounts > CardDAV (and not CalDAV...) and try to connect to get the "do you trust this certificate" dialogue and store the certificate in the system store.

If that dialogue to trust the certificate could be automatically shown during installation of etesync-dav, that would be great.

Can we register DAV accounts automatically? I guess maybe with an enterprise profile, but I'm not sure. Any idea?

No, sadly no idea.

Disclaimer: I do not have a macOS computer or iOS phone myself. I figured these things out while assisting a friend in setting up EteSync so that I could share a todo list with them. Any experience I have with launchd and the macOS certificate store and all that is from this hour-or-so of fiddling with their computer to make it work.

Background: I personally use Linux and Android myself and have been an EteSync "Supporter" for quite a while. I like it because synchronisation works reliably and without data loss and because of the journal which allows me to undo changes. So I would like to encourage my friends and family ("non-technical people") to also use it. For that I need EteSync to be as easy to use as possible.

tasn commented 4 years ago

launchd agent - yeah, we need to do that.

Thanks, that would be great. I think the launchd agent plist I created does not really work and I do not yet have experience in debugging launchd issues (or much chance to learn it, without an own macOS computer), so I appreciate any help in form of example files and commands to execute, until there is an installer that does it fully automatic.

Mind sharing it so I have something to start with? I'm also not a macOS user (or developer), and also learning as I go.

Register the self-signed cert with the system: the web UI (and the CLI) can both do it for you. The web UI even pops a big message about doing it.

I remember the web UI offering a button for TLS setup, but it seemed that only made etesync-dav run with TLS. I still had to go to System Settings > Internet Accounts > CardDAV (and not CalDAV...) and try to connect to get the "do you trust this certificate" dialogue and store the certificate in the system store.

If that dialogue to trust the certificate could be automatically shown during installation of etesync-dav, that would be great.

It's meant to install them automatically when you click the web UI button. Were you not prompted for your superuser password when clicking on that button on the web UI?

Can we register DAV accounts automatically? I guess maybe with an enterprise profile, but I'm not sure. Any idea?

No, sadly no idea.

Disclaimer: I do not have a macOS computer or iOS phone myself. I figured these things out while assisting a friend in setting up EteSync so that I could share a todo list with them. Any experience I have with launchd and the macOS certificate store and all that is from this hour-or-so of fiddling with their computer to make it work.

I have a mac and an iPhone for development, though I'm also not a user/developer usually so I'm learning as I go. I'm sure I can figure these things out though as they sound pretty straightforward.

Background: I personally use Linux and Android myself and have been an EteSync "Supporter" for quite a while. I like it because synchronisation works reliably and without data loss and because of the journal which allows me to undo changes. So I would like to encourage my friends and family ("non-technical people") to also use it. For that I need EteSync to be as easy to use as possible.

Yeah, the same as me. :) I'm also frustrated that it's hard than it should be on the desktop. That's why there's work on adding native integration to Thunderbird, Evolution and Akonadi. Improving etesync-dav for macOS and Windows is thus highly desired too.

devurandom commented 4 years ago

Thanks, that would be great. I think the launchd agent plist I created does not really work and I do not yet have experience in debugging launchd issues (or much chance to learn it, without an own macOS computer), so I appreciate any help in form of example files and commands to execute, until there is an installer that does it fully automatic.

Mind sharing it so I have something to start with? I'm also not a macOS user (or developer), and also learning as I go.

I "installed" etesync-dav as I know how: I dragged the "app" into the "Applications" folder in Finder. Afterwards the binary could be found under /Applications/etesync-dav/..., so that's what I used in the launchd agent file.

com.etesync.etesync-dav.plist

Register the self-signed cert with the system: the web UI (and the CLI) can both do it for you. The web UI even pops a big message about doing it.

I remember the web UI offering a button for TLS setup, but it seemed that only made etesync-dav run with TLS. I still had to go to System Settings > Internet Accounts > CardDAV (and not CalDAV...) and try to connect to get the "do you trust this certificate" dialogue and store the certificate in the system store. If that dialogue to trust the certificate could be automatically shown during installation of etesync-dav, that would be great.

It's meant to install them automatically when you click the web UI button. Were you not prompted for your superuser password when clicking on that button on the web UI?

I think that I pressed these buttons (and maybe it asked for the password, but I do not recall that), but definitely I still got the ~"do you trust this certificate" dialogue when I set up the CardDAV account. (And there was no dialogue at all, just an authentication failure, when I tried to set up the CalDAV account when I had not yet set up the CardDAV account.)

Background: I personally use Linux and Android myself and have been an EteSync "Supporter" for quite a while. I like it because synchronisation works reliably and without data loss and because of the journal which allows me to undo changes. So I would like to encourage my friends and family ("non-technical people") to also use it. For that I need EteSync to be as easy to use as possible.

Yeah, the same as me. :) I'm also frustrated that it's hard than it should be on the desktop. That's why there's work on adding native integration to Thunderbird, Evolution and Akonadi. Improving etesync-dav for macOS and Windows is thus highly desired too.

Thanks a lot for your work on making EteSync easier to use. I know you have already come a long way in the past year. Sorry, if I came along frustrated.

tasn commented 4 years ago

For reference: apparently you don't need launchd, and you can just add autostart apps from the GUI: https://www.idownloadblog.com/2015/03/24/apps-launch-system-startup-mac/ For the more code oriented solution: https://apple.stackexchange.com/questions/356110/location-of-login-autostart-apps-setting-file-in-macos

As for signing: I tried doing it today and was hell. I couldn't get it to work. I need to find some more time to get it to work.

You haven't mentioned it, but related to the onboarding: I finally got a nice icon for the etesync app. :)

devurandom commented 4 years ago

Also you'll find a set of LaunchAgents stored in this folder:

~/Library/LaunchAgents/

That is the launchd directory for per-user services. cf. https://launchd.info/ under "Job Definitions".

You haven't mentioned it, but related to the onboarding: I finally got a nice icon for the etesync app. :)

:+1:

tasn commented 4 years ago

Ah, I thought launchd was for system apps only. Thanks for the info.