Bump keybase to 4.3.2.

- Fix readme.
- Add 'run_keybase' for easy startup.
This commit is contained in:
abieber 2019-08-24 18:40:58 +00:00
parent cd99141b90
commit eafc688492
7 changed files with 79 additions and 32 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.20 2019/07/12 20:49:03 sthen Exp $
# $OpenBSD: Makefile,v 1.21 2019/08/24 18:40:58 abieber Exp $
# go-ps only supports amd64 on OpenBSD
# ../vendor/github.com/keybase/go-ps/process.go:39: undefined: processes
@ -8,7 +8,7 @@ ONLY_FOR_ARCHS = amd64
COMMENT = client for keybase.io
# XXX: https://github.com/keybase/client/issues/10800
V = 4.2.0
V = 4.3.2
GH_ACCOUNT = keybase
GH_PROJECT = client
GH_TAGNAME = v${V}
@ -59,5 +59,7 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/go/keybase/keybase ${PREFIX}/bin/
${INSTALL_PROGRAM} ${WRKSRC}/go/kbfs/kbfsgit/git-remote-keybase/git-remote-keybase ${PREFIX}/bin/
${INSTALL_PROGRAM} ${WRKSRC}/go/kbfs/kbfsfuse/kbfsfuse ${PREFIX}/bin/
${SUBST_CMD} -m 755 -c ${FILESDIR}/run_keybase \
${PREFIX}/bin/run_keybase
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (keybase-4.2.0.tar.gz) = +UxeIVxaA1J4rO8UJpP6bHhVeSQsW0sdrqgQjVsWA3E=
SIZE (keybase-4.2.0.tar.gz) = 62061715
SHA256 (keybase-4.3.2.tar.gz) = lTAOFym3So/d0TtfKrNaO9by5TQCVo1yPmcbXPxdN3g=
SIZE (keybase-4.3.2.tar.gz) = 61740460

View File

@ -0,0 +1,4 @@
#!/bin/sh
${LOCALBASE}/bin/keybase --debug --use-default-log-file service \
--auto-forked &
${LOCALBASE}/bin/kbfsfuse -debug -log-to-file &

View File

@ -0,0 +1,50 @@
$OpenBSD: patch-go_kbfs_libkbfs_disk_limits_openbsd_go,v 1.1 2019/08/24 18:40:58 abieber Exp $
Index: go/kbfs/libkbfs/disk_limits_openbsd.go
--- go/kbfs/libkbfs/disk_limits_openbsd.go.orig
+++ go/kbfs/libkbfs/disk_limits_openbsd.go
@@ -0,0 +1,44 @@
+// Copyright 2017 Keybase Inc. All rights reserved.
+// Use of this source code is governed by a BSD
+// license that can be found in the LICENSE file.
+
+// +build openbsd
+
+package libkbfs
+
+import (
+ "math"
+ "syscall"
+
+ "github.com/pkg/errors"
+)
+
+// getDiskLimits gets the disk limits for the logical disk containing
+// the given path.
+func getDiskLimits(path string) (
+ availableBytes, totalBytes, availableFiles, totalFiles uint64, err error) {
+ // Notably we are using syscall rather than golang.org/x/sys/unix here.
+ // The latter is broken on iOS with go1.11.8 (and likely earlier versions)
+ // and always gives us 0 as available storage space. go1.12.3 is known to
+ // work fine with sys/unix.
+ var stat syscall.Statfs_t
+ err = syscall.Statfs(path, &stat)
+ if err != nil {
+ return 0, 0, 0, 0, errors.WithStack(err)
+ }
+
+ // Bavail is the free block count for an unprivileged user.
+ availableBytes = uint64(stat.F_bavail) * uint64(stat.F_bsize)
+ totalBytes = uint64(stat.F_blocks) * uint64(stat.F_bsize)
+ // Some filesystems, like btrfs, don't keep track of inodes.
+ // (See https://github.com/keybase/client/issues/6206 .) Use
+ // the total inode count to detect that case.
+ if stat.F_files > 0 {
+ availableFiles = uint64(stat.F_ffree)
+ totalFiles = uint64(stat.F_files)
+ } else {
+ availableFiles = math.MaxInt64
+ totalFiles = math.MaxInt64
+ }
+ return availableBytes, totalBytes, availableFiles, totalFiles, nil
+}

View File

@ -1,25 +1,14 @@
$OpenBSD: patch-go_kbfs_libkbfs_disk_limits_unix_go,v 1.1 2019/06/19 21:07:05 juanfra Exp $
$OpenBSD: patch-go_kbfs_libkbfs_disk_limits_unix_go,v 1.2 2019/08/24 18:40:58 abieber Exp $
Index: go/kbfs/libkbfs/disk_limits_unix.go
--- go/kbfs/libkbfs/disk_limits_unix.go.orig Sat Jun 15 22:30:45 2019
+++ go/kbfs/libkbfs/disk_limits_unix.go Sat Jun 15 22:30:56 2019
@@ -28,14 +28,14 @@
}
--- go/kbfs/libkbfs/disk_limits_unix.go.orig
+++ go/kbfs/libkbfs/disk_limits_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
-// +build !windows
+// +build !windows,!openbsd
package libkbfs
// Bavail is the free block count for an unprivileged user.
- availableBytes = uint64(stat.Bavail) * uint64(stat.Bsize)
- totalBytes = uint64(stat.Blocks) * uint64(stat.Bsize)
+ availableBytes = uint64(stat.F_bavail) * uint64(stat.F_bsize)
+ totalBytes = uint64(stat.F_blocks) * uint64(stat.F_bsize)
// Some filesystems, like btrfs, don't keep track of inodes.
// (See https://github.com/keybase/client/issues/6206 .) Use
// the total inode count to detect that case.
- if stat.Files > 0 {
- availableFiles = uint64(stat.Ffree)
- totalFiles = uint64(stat.Files)
+ if stat.F_files > 0 {
+ availableFiles = uint64(stat.F_ffree)
+ totalFiles = uint64(stat.F_files)
} else {
availableFiles = math.MaxInt64
totalFiles = math.MaxInt64

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-go_vendor_gopkg_in_src_d_go_git_v4_worktree_bsd_go,v 1.1 2019/06/19 21:07:05 juanfra Exp $
$OpenBSD: patch-go_vendor_gopkg_in_src_d_go_git_v4_worktree_bsd_go,v 1.2 2019/08/24 18:40:58 abieber Exp $
Index: go/vendor/gopkg.in/src-d/go-git.v4/worktree_bsd.go
--- go/vendor/gopkg.in/src-d/go-git.v4/worktree_bsd.go.orig Wed Jun 12 17:53:05 2019
+++ go/vendor/gopkg.in/src-d/go-git.v4/worktree_bsd.go Sat Jun 15 19:41:25 2019
@@ -12,7 +12,7 @@
--- go/vendor/gopkg.in/src-d/go-git.v4/worktree_bsd.go.orig
+++ go/vendor/gopkg.in/src-d/go-git.v4/worktree_bsd.go
@@ -12,7 +12,7 @@ import (
func init() {
fillSystemInfo = func(e *index.Entry, sys interface{}) {
if os, ok := sys.(*syscall.Stat_t); ok {

View File

@ -1,4 +1,6 @@
@comment $OpenBSD: PLIST,v 1.3 2019/07/05 15:42:54 juanfra Exp $
@comment $OpenBSD: PLIST,v 1.4 2019/08/24 18:40:58 abieber Exp $
@bin bin/git-remote-keybase
@bin bin/kbfsfuse
@bin bin/keybase
bin/run_keybase
share/doc/pkg-readmes/${PKGSTEM}