Skip to content

Commit f44ff30

Browse files
Merge pull request #3880 from kpcyrd/docs/openbsd
Fix install_unsupported for openbsd, add docs
2 parents 76cd541 + 4f98f8f commit f44ff30

File tree

3 files changed

+42
-3
lines changed

3 files changed

+42
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ mismatched APIs.
132132
#### Troubleshooting
133133

134134
* Separate [instructions are available for building on Windows](docs/windows.md).
135+
* Also, [instructions for OpenBSD](docs/openbsd.md).
135136
* `git` is required in order for `go get` to fetch all dependencies.
136137
* Package managers often contain out-of-date `golang` packages.
137138
Ensure that `go version` reports at least 1.7. See above for how to install go.

Rules.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,14 @@ install: cmd/ipfs-install
105105
install_unsupported:
106106
@echo "note: this command has yet to be tested to build in the system you are using"
107107
@echo "installing gx"
108-
go get -u github.com/whyrusleeping/gx
109-
go get -u github.com/whyrusleeping/gx-go
108+
go get -v -u github.com/whyrusleeping/gx
109+
go get -v -u github.com/whyrusleeping/gx-go
110+
@echo check gx and gx-go
111+
gx -v && gx-go -v
110112
@echo downloading dependencies
111113
gx install --global
112114
@echo "installing go-ipfs"
113-
go install ./cmd/ipfs
115+
go install -v -tags nofuse ./cmd/ipfs
114116
.PHONY: install_unsupported
115117

116118
uninstall:

docs/openbsd.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Building on OpenBSD
2+
3+
## Prepare your system
4+
5+
Make sure you have `git`, `go` and `gmake` installed on your system.
6+
7+
```
8+
$ doas pkg_add -v git go gmake
9+
```
10+
11+
## Prepare go environment
12+
13+
Make sure your gopath is set:
14+
15+
```
16+
$ export GOPATH=~/go
17+
$ echo "$GOPATH"
18+
$ export PATH="$PATH:$GOPATH/bin"
19+
```
20+
21+
## Build
22+
23+
The `install_unsupported` target works nicely for openbsd. This will install `gx`, `gx-go` and run `go install -tags nofuse ./cmd/ipfs`.
24+
25+
```
26+
$ go get -v -u -d github.com/ipfs/go-ipfs
27+
28+
$ cd $GOPATH/src/github.com/ipfs/go-ipfs
29+
$ gmake install_unsupported
30+
```
31+
32+
if everything went well, your ipfs binary should be ready at `$GOPATH/bin/ipfs`.
33+
34+
```
35+
$ ipfs version
36+
```

0 commit comments

Comments
 (0)