Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Oct 2018 10:58:17 +0000 (UTC)
From:      Alex Dupre <ale@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r481156 - in head/security/trezord: . files
Message-ID:  <201810031058.w93AwH66012707@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ale
Date: Wed Oct  3 10:58:17 2018
New Revision: 481156
URL: https://svnweb.freebsd.org/changeset/ports/481156

Log:
  Update to post 2.0.24 release.

Added:
  head/security/trezord/files/extra-patch-usb_libusb.go   (contents, props changed)
Deleted:
  head/security/trezord/files/extra-patch-usb_webusb.go
Modified:
  head/security/trezord/Makefile
  head/security/trezord/distinfo

Modified: head/security/trezord/Makefile
==============================================================================
--- head/security/trezord/Makefile	Wed Oct  3 10:42:07 2018	(r481155)
+++ head/security/trezord/Makefile	Wed Oct  3 10:58:17 2018	(r481156)
@@ -2,8 +2,9 @@
 # $FreeBSD$
 
 PORTNAME=	trezord
-PORTVERSION=	2.0.23
 DISTVERSIONPREFIX=	v
+DISTVERSION=	2.0.24-5
+DISTVERSIONSUFFIX=	-gf593bf3
 CATEGORIES=	security
 
 MAINTAINER=	ale@FreeBSD.org
@@ -18,14 +19,13 @@ 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 <bsd.port.pre.mk>
 
 .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1102000
-EXTRA_PATCHES+=	${FILESDIR}/extra-patch-usb_webusb.go
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-usb_libusb.go
 .endif
 
 .include <bsd.port.post.mk>

Modified: head/security/trezord/distinfo
==============================================================================
--- head/security/trezord/distinfo	Wed Oct  3 10:42:07 2018	(r481155)
+++ head/security/trezord/distinfo	Wed Oct  3 10:58:17 2018	(r481156)
@@ -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

Added: head/security/trezord/files/extra-patch-usb_libusb.go
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/trezord/files/extra-patch-usb_libusb.go	Wed Oct  3 10:58:17 2018	(r481156)
@@ -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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810031058.w93AwH66012707>