On Sun, 16 Jun 2019 at 20:26:14 +0200, Juan Francisco Cantero Hurtado wrote: > Works for me. I've added git-remote-keybase to the port, so you can now > work with git repos hosted on keybase. There are some remaining bugs > with the git repos, but I can reproduce the same problems on Linux. > > If you know something about OpenBSD syscalls, please check my patches > and tell me if I'm doing the conversion from Linux syscalls correctly. > > Comments? OK?
Works dandy here! Was able to push / clone without problems! OK abieber@ > > > Index: Makefile > =================================================================== > --- Makefile (revision 138830) > +++ Makefile (working copy) > @@ -8,7 +8,7 @@ > COMMENT = client for keybase.io > > # XXX: https://github.com/keybase/client/issues/10800 > -V = 4.0.0 > +V = 4.1.0 > GH_ACCOUNT = keybase > GH_PROJECT = client > GH_TAGNAME = v${V} > @@ -37,8 +37,11 @@ > do-build: > cd ${WRKSRC}/go/keybase && ${MODGO_CMD} build -tags \ > production > + cd ${WRKSRC}/go/kbfs/kbfsgit/git-remote-keybase && \ > + ${MODGO_CMD} build -tags production > > do-install: > ${INSTALL_PROGRAM} ${WRKSRC}/go/keybase/keybase ${PREFIX}/bin/ > + ${INSTALL_PROGRAM} > ${WRKSRC}/go/kbfs/kbfsgit/git-remote-keybase/git-remote-keybase ${PREFIX}/bin/ > > .include <bsd.port.mk> > Index: distinfo > =================================================================== > --- distinfo (revision 138830) > +++ distinfo (working copy) > @@ -1,2 +1,2 @@ > -SHA256 (keybase-4.0.0.tar.gz) = UD4Gjn6JpXxJfkDO5bFhcEwjkZvFmEamUH38Xs1BgJE= > -SIZE (keybase-4.0.0.tar.gz) = 48707909 > +SHA256 (keybase-4.1.0.tar.gz) = fmcPTGB702ft7F9Y0tJ9z/gmzVVfM7UZJhi0T++9QbA= > +SIZE (keybase-4.1.0.tar.gz) = 61605137 > Index: patches/patch-go_kbfs_libkbfs_disk_limits_unix_go > =================================================================== > --- patches/patch-go_kbfs_libkbfs_disk_limits_unix_go (nonexistent) > +++ patches/patch-go_kbfs_libkbfs_disk_limits_unix_go (working copy) > @@ -0,0 +1,25 @@ > +$OpenBSD$ > + > > +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 @@ > + } > + > + // 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 > Index: patches/patch-go_vendor_gopkg_in_src_d_go_git_v4_worktree_bsd_go > =================================================================== > --- patches/patch-go_vendor_gopkg_in_src_d_go_git_v4_worktree_bsd_go > (nonexistent) > +++ patches/patch-go_vendor_gopkg_in_src_d_go_git_v4_worktree_bsd_go > (working copy) > @@ -0,0 +1,14 @@ > +$OpenBSD$ > + > +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 @@ > + func init() { > + fillSystemInfo = func(e *index.Entry, sys interface{}) { > + if os, ok := sys.(*syscall.Stat_t); ok { > +- e.CreatedAt = time.Unix(int64(os.Atimespec.Sec), > int64(os.Atimespec.Nsec)) > ++ e.CreatedAt = time.Unix(int64(os.Atim.Sec), > int64(os.Atim.Nsec)) > + e.Dev = uint32(os.Dev) > + e.Inode = uint32(os.Ino) > + e.GID = os.Gid > Index: pkg/PLIST > =================================================================== > --- pkg/PLIST (revision 138830) > +++ pkg/PLIST (working copy) > @@ -1,2 +1,3 @@ > @comment $OpenBSD: PLIST,v 1.1.1.1 2016/09/09 14:11:43 abieber Exp $ > +@bin bin/git-remote-keybase > @bin bin/keybase -- PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A 4AF0 1F81 112D 62A9 ADCE
