ProtonMail / proton-bridge

Proton Mail Bridge application
GNU General Public License v3.0
1.16k stars 157 forks source link

Add possibility to disable update mechanisms during build #172

Closed FriesischScott closed 3 years ago

FriesischScott commented 3 years ago

I am packaging the bridge application for Solus (Linux). Since automatic updates and early access don't work for native applications it would be great if they could be disabled during build.

I suggest to add the ability to disable the following menu items and during build time:

andrzejsza commented 3 years ago

autoupdate and early access is designed in the way that it works when installed as a native app - could you explain what you mean by 'don't work'?

FriesischScott commented 3 years ago

Maybe I'm using the term native wrong.

I am maintaining the build files (https://dev.getsol.us/source/protonmail-bridge/) which are used to build the app as an .eopkg package against the system libraries of Solus. I don't see how an automatic update or early access version would be possible in this context.

FriesischScott commented 3 years ago

Currently "updating" application from the menu will simply restart without any changes.

cuthix commented 3 years ago

Sorry, I was not able to understand the eopkg so I will ask: Are you also building and packing the launcher together with bridge?

https://github.com/ProtonMail/proton-bridge#launchers

FriesischScott commented 3 years ago

The .eopkg file is the package file that Solus uses. It's equivalent to something like the Debian .deb files. I am not currently building the launcher. But since I obviously have no access to the private key used by ProtonMail I don't see how the launcher would help my case. The way I understand it, it is only useful for officially packaged apps by ProtonMail.

cuthix commented 3 years ago

Private key is used for signing data which we are publishing on web. For main build (e.g. .deb file) you need only public key (which is hardcoded in source). Bridge and launcher are using the pubkey to check that update files are from Proton.

You are right you won't be able to create your own update files or version files, but even your build will check the official bridge releases and it will be able to update using official update from us.

FriesischScott commented 3 years ago

Thanks for the info, I'll have a look at building the launcher.

FriesischScott commented 3 years ago

I built the launcher and it is able to start downloaded updates without problems. However, on a fresh install where no version is found in the user's home directory it just fails with a fatal error.

FATA[Apr 23 16:52:40.416] Failed to find any launchable executable      error="no executable found"

I was assuming it would instead load the default binary, in this case /usr/bin/protonmail-bridge. How is the system intended to work?

FriesischScott commented 3 years ago

I got it working after I realized I had to set the APP environment variable to have it look for the proper binary. I'll see to include the launcher in the Solus package now. Thanks for the help.