svn commit: r528898 - in head/security/gopass: . files
Ashish SHUKLA
ashish at FreeBSD.org
Sun Mar 22 05:50:32 UTC 2020
Author: ashish
Date: Sun Mar 22 05:50:30 2020
New Revision: 528898
URL: https://svnweb.freebsd.org/changeset/ports/528898
Log:
- Add patches to fix brokenness in curses UI
- Pet portlint
PR: 244955
Approved by: Sascha Holzleiter <sascha at root-login dot org> (maintainer)
Added:
head/security/gopass/files/
head/security/gopass/files/patch-vendor_github.com_gdamore_tcell_termbox_compat.go (contents, props changed)
head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_gui.go (contents, props changed)
head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_keybinding.go (contents, props changed)
Modified:
head/security/gopass/Makefile
Modified: head/security/gopass/Makefile
==============================================================================
--- head/security/gopass/Makefile Sun Mar 22 05:47:50 2020 (r528897)
+++ head/security/gopass/Makefile Sun Mar 22 05:50:30 2020 (r528898)
@@ -4,7 +4,7 @@
PORTNAME= gopass
DISTVERSIONPREFIX= v
DISTVERSION= 1.8.6
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MAINTAINER= sascha at root-login.org
@@ -13,6 +13,9 @@ COMMENT= Gopass is a rewrite of the pass password mana
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
+ONLY_FOR_ARCHS= amd64
+ONLY_FOR_ARCHS_REASON= Upstream only supports amd64
+
RUN_DEPENDS= git:devel/git \
gpg2:security/gnupg
@@ -20,14 +23,17 @@ USES= go
USE_GITHUB= yes
GH_ACCOUNT= gopasspw
-ONLY_FOR_ARCHS= amd64
-ONLY_FOR_ARCHS_REASON= Upstream only supports amd64
-
GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME}
PLIST_FILES= bin/gopass \
etc/bash_completion.d/gopass.sh \
share/zsh/site-functions/_gopass
+
+pre-build:
+ ${GREP} -FRl github.com/nsf/termbox-go \
+ ${WRKSRC}/vendor/github.com/jroimartin/gocui/ | \
+ ${XARGS} ${REINPLACE_CMD} -e \
+ s,github.com/nsf/termbox-go,github.com/gdamore/tcell/termbox,
post-install:
@${STAGEDIR}${PREFIX}/bin/gopass completion bash > ${WRKDIR}/gopass.comp.sh
Added: head/security/gopass/files/patch-vendor_github.com_gdamore_tcell_termbox_compat.go
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/gopass/files/patch-vendor_github.com_gdamore_tcell_termbox_compat.go Sun Mar 22 05:50:30 2020 (r528898)
@@ -0,0 +1,158 @@
+--- vendor/github.com/gdamore/tcell/termbox/compat.go.orig 2019-07-26 09:44:40 UTC
++++ vendor/github.com/gdamore/tcell/termbox/compat.go
+@@ -1,4 +1,4 @@
+-// Copyright 2016 The TCell Authors
++// Copyright 2020 The TCell Authors
+ //
+ // Licensed under the Apache License, Version 2.0 (the "License");
+ // you may not use file except in compliance with the License.
+@@ -12,7 +12,7 @@
+ // See the License for the specific language governing permissions and
+ // limitations under the License.
+
+-// Package termbox is a compatibility layer to allow tcells to emulate
++// Package termbox is a compatibility layer to allow tcell to emulate
+ // the github.com/nsf/termbox package.
+ package termbox
+
+@@ -236,63 +236,83 @@ const (
+
+ // Keys codes.
+ const (
+- KeyF1 = Key(tcell.KeyF1)
+- KeyF2 = Key(tcell.KeyF2)
+- KeyF3 = Key(tcell.KeyF3)
+- KeyF4 = Key(tcell.KeyF4)
+- KeyF5 = Key(tcell.KeyF5)
+- KeyF6 = Key(tcell.KeyF6)
+- KeyF7 = Key(tcell.KeyF7)
+- KeyF8 = Key(tcell.KeyF8)
+- KeyF9 = Key(tcell.KeyF9)
+- KeyF10 = Key(tcell.KeyF10)
+- KeyF11 = Key(tcell.KeyF11)
+- KeyF12 = Key(tcell.KeyF12)
+- KeyInsert = Key(tcell.KeyInsert)
+- KeyDelete = Key(tcell.KeyDelete)
+- KeyHome = Key(tcell.KeyHome)
+- KeyEnd = Key(tcell.KeyEnd)
+- KeyArrowUp = Key(tcell.KeyUp)
+- KeyArrowDown = Key(tcell.KeyDown)
+- KeyArrowRight = Key(tcell.KeyRight)
+- KeyArrowLeft = Key(tcell.KeyLeft)
+- KeyCtrlA = Key(tcell.KeyCtrlA)
+- KeyCtrlB = Key(tcell.KeyCtrlB)
+- KeyCtrlC = Key(tcell.KeyCtrlC)
+- KeyCtrlD = Key(tcell.KeyCtrlD)
+- KeyCtrlE = Key(tcell.KeyCtrlE)
+- KeyCtrlF = Key(tcell.KeyCtrlF)
+- KeyCtrlG = Key(tcell.KeyCtrlG)
+- KeyCtrlH = Key(tcell.KeyCtrlH)
+- KeyCtrlI = Key(tcell.KeyCtrlI)
+- KeyCtrlJ = Key(tcell.KeyCtrlJ)
+- KeyCtrlK = Key(tcell.KeyCtrlK)
+- KeyCtrlL = Key(tcell.KeyCtrlL)
+- KeyCtrlM = Key(tcell.KeyCtrlM)
+- KeyCtrlN = Key(tcell.KeyCtrlN)
+- KeyCtrlO = Key(tcell.KeyCtrlO)
+- KeyCtrlP = Key(tcell.KeyCtrlP)
+- KeyCtrlQ = Key(tcell.KeyCtrlQ)
+- KeyCtrlR = Key(tcell.KeyCtrlR)
+- KeyCtrlS = Key(tcell.KeyCtrlS)
+- KeyCtrlT = Key(tcell.KeyCtrlT)
+- KeyCtrlU = Key(tcell.KeyCtrlU)
+- KeyCtrlV = Key(tcell.KeyCtrlV)
+- KeyCtrlW = Key(tcell.KeyCtrlW)
+- KeyCtrlX = Key(tcell.KeyCtrlX)
+- KeyCtrlY = Key(tcell.KeyCtrlY)
+- KeyCtrlZ = Key(tcell.KeyCtrlZ)
+- KeyBackspace = Key(tcell.KeyBackspace)
+- KeyBackspace2 = Key(tcell.KeyBackspace2)
+- KeyTab = Key(tcell.KeyTab)
+- KeyEnter = Key(tcell.KeyEnter)
+- KeyEsc = Key(tcell.KeyEscape)
+- KeyPgdn = Key(tcell.KeyPgDn)
+- KeyPgup = Key(tcell.KeyPgUp)
+- MouseLeft = Key(tcell.KeyF63) // arbitrary assignments
+- MouseRight = Key(tcell.KeyF62)
+- MouseMiddle = Key(tcell.KeyF61)
+- KeySpace = Key(tcell.Key(' '))
++ KeyF1 = Key(tcell.KeyF1)
++ KeyF2 = Key(tcell.KeyF2)
++ KeyF3 = Key(tcell.KeyF3)
++ KeyF4 = Key(tcell.KeyF4)
++ KeyF5 = Key(tcell.KeyF5)
++ KeyF6 = Key(tcell.KeyF6)
++ KeyF7 = Key(tcell.KeyF7)
++ KeyF8 = Key(tcell.KeyF8)
++ KeyF9 = Key(tcell.KeyF9)
++ KeyF10 = Key(tcell.KeyF10)
++ KeyF11 = Key(tcell.KeyF11)
++ KeyF12 = Key(tcell.KeyF12)
++ KeyInsert = Key(tcell.KeyInsert)
++ KeyDelete = Key(tcell.KeyDelete)
++ KeyHome = Key(tcell.KeyHome)
++ KeyEnd = Key(tcell.KeyEnd)
++ KeyArrowUp = Key(tcell.KeyUp)
++ KeyArrowDown = Key(tcell.KeyDown)
++ KeyArrowRight = Key(tcell.KeyRight)
++ KeyArrowLeft = Key(tcell.KeyLeft)
++ KeyCtrlA = Key(tcell.KeyCtrlA)
++ KeyCtrlB = Key(tcell.KeyCtrlB)
++ KeyCtrlC = Key(tcell.KeyCtrlC)
++ KeyCtrlD = Key(tcell.KeyCtrlD)
++ KeyCtrlE = Key(tcell.KeyCtrlE)
++ KeyCtrlF = Key(tcell.KeyCtrlF)
++ KeyCtrlG = Key(tcell.KeyCtrlG)
++ KeyCtrlH = Key(tcell.KeyCtrlH)
++ KeyCtrlI = Key(tcell.KeyCtrlI)
++ KeyCtrlJ = Key(tcell.KeyCtrlJ)
++ KeyCtrlK = Key(tcell.KeyCtrlK)
++ KeyCtrlL = Key(tcell.KeyCtrlL)
++ KeyCtrlM = Key(tcell.KeyCtrlM)
++ KeyCtrlN = Key(tcell.KeyCtrlN)
++ KeyCtrlO = Key(tcell.KeyCtrlO)
++ KeyCtrlP = Key(tcell.KeyCtrlP)
++ KeyCtrlQ = Key(tcell.KeyCtrlQ)
++ KeyCtrlR = Key(tcell.KeyCtrlR)
++ KeyCtrlS = Key(tcell.KeyCtrlS)
++ KeyCtrlT = Key(tcell.KeyCtrlT)
++ KeyCtrlU = Key(tcell.KeyCtrlU)
++ KeyCtrlV = Key(tcell.KeyCtrlV)
++ KeyCtrlW = Key(tcell.KeyCtrlW)
++ KeyCtrlX = Key(tcell.KeyCtrlX)
++ KeyCtrlY = Key(tcell.KeyCtrlY)
++ KeyCtrlZ = Key(tcell.KeyCtrlZ)
++ KeyCtrlUnderscore = Key(tcell.KeyCtrlUnderscore)
++ KeyBackspace = Key(tcell.KeyBackspace)
++ KeyBackspace2 = Key(tcell.KeyBackspace2)
++ KeyTab = Key(tcell.KeyTab)
++ KeyEnter = Key(tcell.KeyEnter)
++ KeyEsc = Key(tcell.KeyEscape)
++ KeyPgdn = Key(tcell.KeyPgDn)
++ KeyPgup = Key(tcell.KeyPgUp)
++ KeySpace = Key(tcell.Key(' '))
++ KeyTilde = Key(tcell.Key('~'))
++
++ // The following assignments are provided for termbox
++ // compatibility. Their use in applications is discouraged.
++ // The mouse keys are completely not supported as tcell uses
++ // a separate mouse event instead of key strokes.
++ MouseLeft = Key(tcell.KeyF63) // arbitrary assignments
++ MouseRight = Key(tcell.KeyF62)
++ MouseMiddle = Key(tcell.KeyF61)
++ MouseRelease = Key(tcell.KeyF60)
++ MouseWheelUp = Key(tcell.KeyF59)
++ MouseWheelDown = Key(tcell.KeyF58)
++ KeyCtrl2 = Key(tcell.KeyNUL) // termbox defines theses
++ KeyCtrl3 = Key(tcell.KeyEscape)
++ KeyCtrl4 = Key(tcell.KeyCtrlBackslash)
++ KeyCtrl5 = Key(tcell.KeyCtrlRightSq)
++ KeyCtrl6 = Key(tcell.KeyCtrlCarat)
++ KeyCtrl7 = Key(tcell.KeyCtrlUnderscore)
++ KeyCtrlSlash = Key(tcell.KeyCtrlUnderscore)
++ KeyCtrlRsqBracket = Key(tcell.KeyCtrlRightSq)
++ KeyCtrlBackslash = Key(tcell.KeyCtrlBackslash)
++ KeyCtrlLsqBracket = Key(tcell.KeyCtrlLeftSq)
+ )
+
+ // Modifiers.
Added: head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_gui.go
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_gui.go Sun Mar 22 05:50:30 2020 (r528898)
@@ -0,0 +1,15 @@
+--- vendor/github.com/jroimartin/gocui/gui.go.orig 2019-07-26 09:44:40 UTC
++++ vendor/github.com/jroimartin/gocui/gui.go
+@@ -115,11 +115,7 @@ func (g *Gui) SetRune(x, y int, ch rune, fgColor, bgCo
+ // Rune returns the rune contained in the cell at the given position.
+ // It checks if the position is valid.
+ func (g *Gui) Rune(x, y int) (rune, error) {
+- if x < 0 || y < 0 || x >= g.maxX || y >= g.maxY {
+- return ' ', errors.New("invalid point")
+- }
+- c := termbox.CellBuffer()[y*g.maxX+x]
+- return c.Ch, nil
++ return ' ', errors.New("unimplemented")
+ }
+
+ // SetView creates a new view with its top-left corner at (x0, y0)
Added: head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_keybinding.go
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_keybinding.go Sun Mar 22 05:50:30 2020 (r528898)
@@ -0,0 +1,23 @@
+--- vendor/github.com/jroimartin/gocui/keybinding.go.orig 2019-07-26 09:44:40 UTC
++++ vendor/github.com/jroimartin/gocui/keybinding.go
+@@ -78,9 +78,9 @@ const (
+
+ // Keys combinations.
+ const (
+- KeyCtrlTilde Key = Key(termbox.KeyCtrlTilde)
++// KeyCtrlTilde Key = Key(termbox.KeyCtrlTilde)
+ KeyCtrl2 = Key(termbox.KeyCtrl2)
+- KeyCtrlSpace = Key(termbox.KeyCtrlSpace)
++// KeyCtrlSpace = Key(termbox.KeyCtrlSpace)
+ KeyCtrlA = Key(termbox.KeyCtrlA)
+ KeyCtrlB = Key(termbox.KeyCtrlB)
+ KeyCtrlC = Key(termbox.KeyCtrlC)
+@@ -123,7 +123,7 @@ const (
+ KeyCtrlUnderscore = Key(termbox.KeyCtrlUnderscore)
+ KeySpace = Key(termbox.KeySpace)
+ KeyBackspace2 = Key(termbox.KeyBackspace2)
+- KeyCtrl8 = Key(termbox.KeyCtrl8)
++// KeyCtrl8 = Key(termbox.KeyCtrl8)
+ )
+
+ // Modifier allows to define special keys combinations. They can be used
More information about the svn-ports-all
mailing list