From 29c42171794709f4ff8f31a62409143019b98665 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sat, 30 Oct 2021 16:06:41 +0200 Subject: [PATCH] proton-bridge: update to 1.8.10 Fixes https://github.com/termux/termux-packages/issues/7872. --- packages/proton-bridge/build.sh | 23 ++++++++--- .../proton-bridge/disable_secretservice.patch | 39 ------------------- .../replace_imap-specialuse.patch | 10 ----- packages/proton-bridge/updater-url.patch | 9 +++++ 4 files changed, 26 insertions(+), 55 deletions(-) delete mode 100644 packages/proton-bridge/disable_secretservice.patch delete mode 100644 packages/proton-bridge/replace_imap-specialuse.patch create mode 100644 packages/proton-bridge/updater-url.patch diff --git a/packages/proton-bridge/build.sh b/packages/proton-bridge/build.sh index 1a21e768a..10cbec10f 100644 --- a/packages/proton-bridge/build.sh +++ b/packages/proton-bridge/build.sh @@ -1,19 +1,30 @@ 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.5.7 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_VERSION=1.8.10 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 " +TERMUX_PKG_DEPENDS=libsecret + +# On 32bit arches we get: +# ../build/pkg/mod/github.com/!proton!mail/go-rfc5322@v0.8.0/parser/rfc5322_parser.go:2756: constant 4230534781 overflows int +# ../build/pkg/mod/github.com/!proton!mail/go-rfc5322@v0.8.0/parser/rfc5322_parser.go:2780: constant 4230534781 overflows int +# ../build/pkg/mod/github.com/!proton!mail/go-rfc5322@v0.8.0/parser/rfc5322_parser.go:6683: constant 2740715144 overflows int +# ../build/pkg/mod/github.com/!proton!mail/go-rfc5322@v0.8.0/parser/rfc5322_parser.go:6683: constant 4294967167 overflows int +# ../build/pkg/mod/github.com/!proton!mail/go-rfc5322@v0.8.0/parser/rfc5322_parser.go:11728: constant 4244674173 overflows int +# ../build/pkg/mod/github.com/!proton!mail/go-rfc5322@v0.8.0/parser/rfc5322_parser.go:12153: constant 4292870143 overflows int TERMUX_PKG_BLACKLISTED_ARCHES="arm, i686" -termux_step_make_install() { +termux_step_make() { termux_setup_golang export GOPATH=$TERMUX_PKG_BUILDDIR - export BUILDDIR=$TERMUX_PREFIX/bin cd $TERMUX_PKG_SRCDIR - go mod tidy + make build-nogui - install -Dm700 proton-bridge "$TERMUX_PREFIX"/bin/proton-bridge +} + +termux_step_make_install() { + install -Dm700 $TERMUX_PKG_SRCDIR/proton-bridge \ + "$TERMUX_PREFIX"/bin/proton-bridge } diff --git a/packages/proton-bridge/disable_secretservice.patch b/packages/proton-bridge/disable_secretservice.patch deleted file mode 100644 index b06dd3b22..000000000 --- a/packages/proton-bridge/disable_secretservice.patch +++ /dev/null @@ -1,39 +0,0 @@ -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 - } - diff --git a/packages/proton-bridge/replace_imap-specialuse.patch b/packages/proton-bridge/replace_imap-specialuse.patch deleted file mode 100644 index 30c7883f6..000000000 --- a/packages/proton-bridge/replace_imap-specialuse.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/go.mod b/go.mod -index c0e8754..08c6caf 100644 ---- a/go.mod -+++ b/go.mod -@@ -77,4 +77,5 @@ replace ( - github.com/emersion/go-imap => github.com/ProtonMail/go-imap v0.0.0-20201102134601-418cd74e9474 - 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 -+ github.com/emersion/go-imap-specialuse => github.com/exander77/go-imap-specialuse noannouncecapability - ) diff --git a/packages/proton-bridge/updater-url.patch b/packages/proton-bridge/updater-url.patch new file mode 100644 index 000000000..e53da4777 --- /dev/null +++ b/packages/proton-bridge/updater-url.patch @@ -0,0 +1,9 @@ +--- ./internal/updater/version.go.orig 2021-10-30 14:03:57.695224491 +0000 ++++ ./internal/updater/version.go 2021-10-30 14:04:11.848561016 +0000 +@@ -86,5 +86,5 @@ + // - https://protonmail.com/download/bridge/version_linux.json + // - https://protonmail.com/download/ie/version_linux.json + func (u *Updater) getVersionFileURL() string { +- return fmt.Sprintf("%v/%v/version_%v.json", Host, u.updateURLName, u.platform) ++ return fmt.Sprintf("%v/%v/version_linux.json", Host, u.updateURLName) + }