Index: head/security/trezord/Makefile =================================================================== --- head/security/trezord/Makefile (revision 481155) +++ head/security/trezord/Makefile (revision 481156) @@ -1,31 +1,31 @@ # Created by: Alex Dupre # $FreeBSD$ PORTNAME= trezord -PORTVERSION= 2.0.23 DISTVERSIONPREFIX= v +DISTVERSION= 2.0.24-5 +DISTVERSIONSUFFIX= -gf593bf3 CATEGORIES= security MAINTAINER= ale@FreeBSD.org COMMENT= TREZOR Communication Daemon aka TREZOR Bridge LICENSE= LGPL3 LICENSE_FILE= ${WRKSRC}/COPYING USES= go USE_RC_SUBR= ${PORTNAME} USE_GITHUB= yes GH_ACCOUNT= trezor GH_PROJECT= ${PORTNAME}-go GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT} -GH_TAGNAME= 0e82873 PLIST_FILES= bin/${GH_PROJECT} .include .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1102000 -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-usb_webusb.go +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-usb_libusb.go .endif .include Index: head/security/trezord/distinfo =================================================================== --- head/security/trezord/distinfo (revision 481155) +++ head/security/trezord/distinfo (revision 481156) @@ -1,3 +1,3 @@ -TIMESTAMP = 1537790982 -SHA256 (trezor-trezord-go-v2.0.23-0e82873_GH0.tar.gz) = 87f359982952429d4f8303966ce750985fb1be484e3ee22ed636594b0dcc4345 -SIZE (trezor-trezord-go-v2.0.23-0e82873_GH0.tar.gz) = 954886 +TIMESTAMP = 1538563785 +SHA256 (trezor-trezord-go-v2.0.24-5-gf593bf3_GH0.tar.gz) = c246624c7456e313e9900fb304fc427608c43352f0c5622adb1be32f97912b81 +SIZE (trezor-trezord-go-v2.0.24-5-gf593bf3_GH0.tar.gz) = 955195 Index: head/security/trezord/files/extra-patch-usb_webusb.go =================================================================== --- head/security/trezord/files/extra-patch-usb_webusb.go (revision 481155) +++ head/security/trezord/files/extra-patch-usb_webusb.go (nonexistent) @@ -1,52 +0,0 @@ ---- usb/webusb.go.orig 2018-09-21 13:31:27 UTC -+++ usb/webusb.go -@@ -274,13 +274,21 @@ func (b *WebUSB) matchVidPid(vid uint16, - } - - func (b *WebUSB) identify(dev lowlevel.Device) string { -- var ports [8]byte -- p, err := lowlevel.Get_Port_Numbers(dev, ports[:]) -- if err != nil { -- b.mw.Println(fmt.Sprintf("webusb - identify - error getting port numbers %s", err.Error())) -- return "" -+ var path string -+ if runtime.GOOS != "freebsd" { -+ var ports [8]byte -+ p, err := lowlevel.Get_Port_Numbers(dev, ports[:]) -+ if err != nil { -+ b.mw.Println(fmt.Sprintf("webusb - identify - error getting port numbers %s", err.Error())) -+ return "" -+ } -+ path = hex.EncodeToString(p) -+ } else { -+ bn := lowlevel.Get_Bus_Number(dev) -+ da := lowlevel.Get_Device_Address(dev) -+ path = fmt.Sprintf("%02x%02x", bn, da) - } -- return webusbPrefix + hex.EncodeToString(p) -+ return webusbPrefix + path - } - - type WUD struct { -@@ -331,6 +339,12 @@ func (d *WUD) finishReadQueue() { - } - - func (d *WUD) readWrite(buf []byte, endpoint uint8) (int, error) { -+ var timeout uint -+ if runtime.GOOS != "freebsd" { -+ timeout = usbTimeout -+ } else { -+ timeout = 0 -+ } - d.mw.Println("webusb - rw - start") - for { - d.mw.Println("webusb - rw - checking closed") -@@ -343,7 +357,7 @@ func (d *WUD) readWrite(buf []byte, endp - d.mw.Println("webusb - rw - lock transfer mutex") - d.transferMutex.Lock() - d.mw.Println("webusb - rw - actual interrupt transport") -- p, err := lowlevel.Interrupt_Transfer(d.dev, endpoint, buf, usbTimeout) -+ p, err := lowlevel.Interrupt_Transfer(d.dev, endpoint, buf, timeout) - d.transferMutex.Unlock() - d.mw.Println("webusb - rw - single transfer done") - Property changes on: head/security/trezord/files/extra-patch-usb_webusb.go ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/trezord/files/extra-patch-usb_libusb.go =================================================================== --- head/security/trezord/files/extra-patch-usb_libusb.go (nonexistent) +++ head/security/trezord/files/extra-patch-usb_libusb.go (revision 481156) @@ -0,0 +1,38 @@ +--- usb/libusb.go.orig 2018-10-01 19:43:54 UTC ++++ usb/libusb.go +@@ -3,6 +3,7 @@ package usb + import ( + "encoding/hex" + "fmt" ++ "runtime" + "strings" + "sync" + "sync/atomic" +@@ -311,13 +312,21 @@ func (b *LibUSB) matchVidPid(vid uint16, + } + + func (b *LibUSB) identify(dev lowlevel.Device) string { +- var ports [8]byte +- p, err := lowlevel.Get_Port_Numbers(dev, ports[:]) +- if err != nil { +- b.mw.Println(fmt.Sprintf("libusb - identify - error getting port numbers %s", err.Error())) +- return "" ++ var path string ++ if runtime.GOOS != "freebsd" { ++ var ports [8]byte ++ p, err := lowlevel.Get_Port_Numbers(dev, ports[:]) ++ if err != nil { ++ b.mw.Println(fmt.Sprintf("webusb - identify - error getting port numbers %s", err.Error())) ++ return "" ++ } ++ path = hex.EncodeToString(p) ++ } else { ++ bn := lowlevel.Get_Bus_Number(dev) ++ da := lowlevel.Get_Device_Address(dev) ++ path = fmt.Sprintf("%02x%02x", bn, da) + } +- return libusbPrefix + hex.EncodeToString(p) ++ return libusbPrefix + path + } + + type WUD struct { Property changes on: head/security/trezord/files/extra-patch-usb_libusb.go ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property