new package: proton-bridge (#5979)
This commit is contained in:
parent
fccd91414e
commit
743b2f3dcf
16
packages/proton-bridge/build.sh
Normal file
16
packages/proton-bridge/build.sh
Normal file
@ -0,0 +1,16 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/ProtonMail/proton-bridge
|
||||
TERMUX_PKG_DESCRIPTION="ProtonMail Bridge application"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_VERSION=1.4.5
|
||||
TERMUX_PKG_SRCURL=https://github.com/ProtonMail/proton-bridge.git
|
||||
TERMUX_PKG_GIT_BRANCH=br-$TERMUX_PKG_VERSION
|
||||
TERMUX_PKG_MAINTAINER="Radomír Polách <rp@t4d.cz>"
|
||||
|
||||
termux_step_make_install() {
|
||||
termux_setup_golang
|
||||
export GOPATH=$TERMUX_PKG_BUILDDIR
|
||||
export BUILDDIR=$TERMUX_PREFIX/bin
|
||||
cd $TERMUX_PKG_SRCDIR
|
||||
make build-nogui
|
||||
install -Dm700 Desktop-Bridge "$TERMUX_PREFIX"/bin/proton-bridge
|
||||
}
|
39
packages/proton-bridge/disable_secretservice.patch
Normal file
39
packages/proton-bridge/disable_secretservice.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/pkg/keychain/keychain_linux.go b/pkg/keychain/keychain_linux.go
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index 9376d9a..465d857
|
||||
--- a/pkg/keychain/keychain_linux.go
|
||||
+++ b/pkg/keychain/keychain_linux.go
|
||||
@@ -20,7 +20,7 @@ package keychain
|
||||
import (
|
||||
"github.com/docker/docker-credential-helpers/credentials"
|
||||
"github.com/docker/docker-credential-helpers/pass"
|
||||
- "github.com/docker/docker-credential-helpers/secretservice"
|
||||
+// "github.com/docker/docker-credential-helpers/secretservice"
|
||||
)
|
||||
|
||||
func newKeychain() (credentials.Helper, error) {
|
||||
@@ -30,15 +30,16 @@ func newKeychain() (credentials.Helper, error) {
|
||||
if passErr == nil {
|
||||
return passHelper, nil
|
||||
}
|
||||
+ return passHelper, nil
|
||||
|
||||
- log.Debug("Creating secretservice")
|
||||
- sserviceHelper := &secretservice.Secretservice{}
|
||||
- _, sserviceErr := sserviceHelper.List()
|
||||
- if sserviceErr == nil {
|
||||
- return sserviceHelper, nil
|
||||
- }
|
||||
+ //log.Debug("Creating secretservice")
|
||||
+ //sserviceHelper := &secretservice.Secretservice{}
|
||||
+ //_, sserviceErr := sserviceHelper.List()
|
||||
+ //if sserviceErr == nil {
|
||||
+ // return sserviceHelper, nil
|
||||
+ //}
|
||||
|
||||
- log.Error("No keychain! Pass: ", passErr, ", secretService: ", sserviceErr)
|
||||
+ //log.Error("No keychain! Pass: ", passErr, ", secretService: ", sserviceErr)
|
||||
return nil, ErrNoKeychainInstalled
|
||||
}
|
||||
|
17
packages/proton-bridge/ignore_not.patch
Normal file
17
packages/proton-bridge/ignore_not.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/internal/imap/mailbox_messages.go b/internal/imap/mailbox_messages.go
|
||||
index 95419df..52ec0ec 100644
|
||||
--- a/internal/imap/mailbox_messages.go
|
||||
+++ b/internal/imap/mailbox_messages.go
|
||||
@@ -269,7 +269,11 @@ func (im *imapMailbox) SearchMessages(isUID bool, criteria *imap.SearchCriteria)
|
||||
// Called from go-imap in goroutines - we need to handle panics for each function.
|
||||
defer im.panicHandler.HandlePanic()
|
||||
|
||||
- if criteria.Not != nil || criteria.Or != nil {
|
||||
+ if criteria.Not != nil {
|
||||
+ //ignore
|
||||
+ }
|
||||
+
|
||||
+ if criteria.Or != nil {
|
||||
return nil, errors.New("unsupported search query")
|
||||
}
|
||||
|
12
packages/proton-bridge/replace_imap-specialuse.patch
Normal file
12
packages/proton-bridge/replace_imap-specialuse.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/go.mod b/go.mod
|
||||
index fbefaa6..8ce4bae 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -77,6 +77,7 @@ replace (
|
||||
github.com/emersion/go-imap => github.com/ProtonMail/go-imap v0.0.0-20200828124548-d04b0dc1f399
|
||||
github.com/emersion/go-mbox => github.com/ProtonMail/mbox v0.0.0-20200918064939-909a18c9af45
|
||||
github.com/emersion/go-smtp => github.com/ProtonMail/go-smtp v0.0.0-20181206232543-8261df20d309
|
||||
+ github.com/emersion/go-imap-specialuse => github.com/exander77/go-imap-specialuse noannouncecapability
|
||||
github.com/jameskeane/bcrypt => github.com/ProtonMail/bcrypt v0.0.0-20170924085257-7509ea014998
|
||||
golang.org/x/crypto => github.com/ProtonMail/crypto v0.0.0-20200818122824-ed5d25e28db8
|
||||
)
|
36
packages/proton-bridge/replace_intro.patch
Normal file
36
packages/proton-bridge/replace_intro.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff --git a/internal/frontend/cli/frontend.go b/internal/frontend/cli/frontend.go
|
||||
index 82c0dbc..c34d73a 100644
|
||||
--- a/internal/frontend/cli/frontend.go
|
||||
+++ b/internal/frontend/cli/frontend.go
|
||||
@@ -241,21 +241,16 @@ func (f *frontendCLI) Loop(credentialsError error) error {
|
||||
}
|
||||
|
||||
f.Print(`
|
||||
- Welcome to ProtonMail Bridge interactive shell
|
||||
- ___....___
|
||||
- ^^ __..-:'':__:..:__:'':-..__
|
||||
- _.-:__:.-:'': : : :'':-.:__:-._
|
||||
- .':.-: : : : : : : : : :._:'.
|
||||
- _ :.': : : : : : : : : : : :'.: _
|
||||
- [ ]: : : : : : : : : : : : : :[ ]
|
||||
- [ ]: : : : : : : : : : : : : :[ ]
|
||||
- :::::::::[ ]:__:__:__:__:__:__:__:__:__:__:__:__:__:[ ]:::::::::::
|
||||
- !!!!!!!!![ ]!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!![ ]!!!!!!!!!!!
|
||||
- ^^^^^^^^^[ ]^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[ ]^^^^^^^^^^^
|
||||
- [ ] [ ]
|
||||
- [ ] [ ]
|
||||
- jgs [ ] [ ]
|
||||
- ~~^_~^~/ \~^-~^~ _~^-~_^~-^~_^~~-^~_~^~-~_~-^~_^/ \~^ ~~_ ^
|
||||
+ Welcome to ProtonMail Bridge
|
||||
+ interactive shell for Android
|
||||
+
|
||||
+ ^^
|
||||
+ _ _
|
||||
+___[ ]_____________________[ ]___
|
||||
+!!![ ]!!!!!!!!!!!!!!!!!!!!![ ]!!!
|
||||
+^^^[ ]^^^^^^^^^^^^^^^^^^^^^[ ]^^^
|
||||
+jgs[ ] [ ]
|
||||
+^~/ \^~~~~~~~~~~~~~~~~~^/ \~^
|
||||
`)
|
||||
f.Run()
|
||||
return nil
|
Loading…
Reference in New Issue
Block a user