Skip to content

Commit

Permalink
fix build on Plan 9
Browse files Browse the repository at this point in the history
Fixes #7575
  • Loading branch information
fhs committed Sep 21, 2020
1 parent 1b4f5e7 commit 9f9e088
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 14 deletions.
2 changes: 2 additions & 0 deletions cmd/ipfswatch/ipfswatch_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !plan9

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/ipfswatch/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !plan9

package main

import (
Expand Down
3 changes: 1 addition & 2 deletions cmd/seccat/seccat.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,7 @@ func netcat(c io.ReadWriteCloser) {

// wait until we exit.
sigc := make(chan os.Signal, 1)
signal.Notify(sigc, syscall.SIGHUP, syscall.SIGINT,
syscall.SIGTERM, syscall.SIGQUIT)
signal.Notify(sigc, notifySignals...)

select {
case <-done:
Expand Down
8 changes: 8 additions & 0 deletions cmd/seccat/seccat_plan9.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package main

import (
"os"
"syscall"
)

var notifySignals = []os.Signal{syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM}
10 changes: 10 additions & 0 deletions cmd/seccat/seccat_posix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// +build !plan9

package main

import (
"os"
"syscall"
)

var notifySignals = []os.Signal{syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT}
2 changes: 1 addition & 1 deletion core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (

"github.com/ipfs/go-ipfs/core/commands/cmdenv"

"github.com/cheggaaa/pb"
cmds "github.com/ipfs/go-ipfs-cmds"
files "github.com/ipfs/go-ipfs-files"
coreiface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/options"
mh "github.com/multiformats/go-multihash"
pb "gopkg.in/cheggaaa/pb.v1"
)

// ErrDepthLimitExceeded indicates that the max depth has been exceeded.
Expand Down
2 changes: 1 addition & 1 deletion core/commands/dag/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
//gipselector "github.com/ipld/go-ipld-prime/traversal/selector"
//gipselectorbuilder "github.com/ipld/go-ipld-prime/traversal/selector/builder"

"gopkg.in/cheggaaa/pb.v1"
"github.com/cheggaaa/pb"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion core/commands/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
"github.com/ipfs/go-ipfs/core/commands/e"

"github.com/cheggaaa/pb"
cmds "github.com/ipfs/go-ipfs-cmds"
files "github.com/ipfs/go-ipfs-files"
"github.com/ipfs/interface-go-ipfs-core/path"
"github.com/whyrusleeping/tar-utils"
"gopkg.in/cheggaaa/pb.v1"
)

var ErrInvalidCompressionLevel = errors.New("compression level must be between 1 and 9")
Expand Down
2 changes: 1 addition & 1 deletion fuse/ipns/ipns_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !nofuse,!openbsd,!netbsd
// +build !nofuse,!openbsd,!netbsd,!plan9

package ipns

Expand Down
2 changes: 1 addition & 1 deletion fuse/ipns/ipns_unix.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !nofuse,!openbsd,!netbsd
// +build !nofuse,!openbsd,!netbsd,!plan9

// package fuse/ipns implements a fuse filesystem that interfaces
// with ipns, the naming system for ipfs.
Expand Down
2 changes: 1 addition & 1 deletion fuse/ipns/link_unix.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !nofuse,!openbsd,!netbsd
// +build !nofuse,!openbsd,!netbsd,!plan9

package ipns

Expand Down
2 changes: 1 addition & 1 deletion fuse/mount/fuse.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !nofuse,!windows,!openbsd,!netbsd
// +build !nofuse,!windows,!openbsd,!netbsd,!plan9

package mount

Expand Down
2 changes: 1 addition & 1 deletion fuse/node/mount_notsupp.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !nofuse,openbsd !nofuse,netbsd
// +build !nofuse,openbsd !nofuse,netbsd !nofuse,plan9

package node

Expand Down
2 changes: 1 addition & 1 deletion fuse/node/mount_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !openbsd,!nofuse,!netbsd
// +build !openbsd,!nofuse,!netbsd,!plan9

package node

Expand Down
2 changes: 1 addition & 1 deletion fuse/node/mount_unix.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !windows,!openbsd,!netbsd,!nofuse
// +build !windows,!openbsd,!netbsd,!plan9,!nofuse

package node

Expand Down
2 changes: 1 addition & 1 deletion fuse/readonly/ipfs_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !nofuse,!openbsd,!netbsd
// +build !nofuse,!openbsd,!netbsd,!plan9

package readonly

Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ require (
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
github.com/blang/semver v3.5.1+incompatible
github.com/bren2010/proquint v0.0.0-20160323162903-38337c27106d
github.com/cheggaaa/pb v1.0.29
github.com/coreos/go-systemd/v22 v22.1.0
github.com/dgraph-io/badger v1.6.2 // indirect
github.com/dustin/go-humanize v1.0.0
github.com/elgris/jsondiff v0.0.0-20160530203242-765b5c24c302
github.com/fatih/color v1.9.0 // indirect
Expand Down Expand Up @@ -107,7 +109,6 @@ require (
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1
golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375 // indirect
gopkg.in/cheggaaa/pb.v1 v1.0.28
)

go 1.13
11 changes: 11 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOv
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM=
github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
github.com/Kubuxu/go-os-helper v0.0.1 h1:EJiD2VUQyh5A9hWJLmc6iWg6yIcJ7jpBcwC8GMGXfDk=
github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y=
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
Expand Down Expand Up @@ -85,6 +87,8 @@ github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE=
github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ=
github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo=
github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
Expand Down Expand Up @@ -119,8 +123,12 @@ github.com/dgraph-io/badger v1.6.0 h1:DshxFxZWXUcO0xX476VJC07Xsr6ZCBVRHKZ93Oh7Ev
github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4=
github.com/dgraph-io/badger v1.6.1 h1:w9pSFNSdq/JPM1N12Fz/F/bzo993Is1W+Q7HjPzi7yg=
github.com/dgraph-io/badger v1.6.1/go.mod h1:FRmFw3uxvcpa8zG3Rxs0th+hCLIuaQg8HlNV5bjgnuU=
github.com/dgraph-io/badger v1.6.2 h1:mNw0qs90GVgGGWylh0umH5iag1j6n/PeJtNvL6KY/x8=
github.com/dgraph-io/badger v1.6.2/go.mod h1:JW2yswe3V058sS0kZ2h/AXeDSqFjxnZcRrVH//y2UQE=
github.com/dgraph-io/ristretto v0.0.2 h1:a5WaUrDa0qm0YrAAS1tUykT5El3kt62KNZZeMxQn3po=
github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA=
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA=
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
Expand Down Expand Up @@ -199,6 +207,8 @@ github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
Expand Down Expand Up @@ -910,6 +920,7 @@ github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
Expand Down

0 comments on commit 9f9e088

Please sign in to comment.