Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] OpenBSD port #574

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
OpenBSD Port: Add initial porting work from issue #567
This is a very basic, non functioning port to OpenBSD 6.6-current.

Before trying to build, you will need to install the following dependencies

	pkg_add go
	pkg_add augeas
	pkg_add ruby

I am unsure of the importance of the ruby dependency, but follow
their respective pkg_readmes to set them up.

The following list of go packages should all be installed, but I'm
not yet sure if some of these are optional.

	go get $pkg

github.com/aws/aws-sdk-go/aws
github.com/aws/aws-sdk-go/aws/awserr
github.com/aws/aws-sdk-go/aws/request
github.com/aws/aws-sdk-go/aws/session
github.com/aws/aws-sdk-go/service/cloudwatchevents
github.com/aws/aws-sdk-go/service/ec2
github.com/aws/aws-sdk-go/service/sns
github.com/coreos/bbolt
github.com/coreos/go-semver/semver
github.com/coreos/go-systemd/dbus
github.com/coreos/go-systemd/journal
github.com/coreos/go-systemd/machine1
github.com/coreos/go-systemd/unit
github.com/coreos/go-systemd/util
github.com/coreos/pkg/capnslog
github.com/deniswernert/go-fstab
github.com/dgrijalva/jwt-go
github.com/ghodss/yaml
github.com/godbus/dbus
github.com/gogo/protobuf/gogoproto
github.com/gogo/protobuf/proto
github.com/golang/protobuf/jsonpb
github.com/golang/protobuf/proto
github.com/golang/protobuf/ptypes
github.com/google/btree
github.com/hashicorp/consul/api
github.com/hashicorp/go-multierror
github.com/hashicorp/hil
github.com/hashicorp/hil/ast
github.com/iancoleman/strcase
github.com/jonboulle/clockwork
github.com/pborman/uuid
github.com/pkg/errors
github.com/prometheus/client_golang/prometheus
github.com/prometheus/client_golang/prometheus/promhttp
github.com/soheilhy/cmux
github.com/spf13/afero
github.com/tmc/grpc-websocket-proxy/wsproxy
github.com/urfave/cli
github.com/vishvananda/netlink
github.com/xiang90/probing
go.uber.org/zap
golang.org/x/crypto/bcrypt
golang.org/x/crypto/openpgp
golang.org/x/crypto/openpgp/packet
golang.org/x/net/context
golang.org/x/net/http2
golang.org/x/net/http2/hpack
golang.org/x/net/trace
golang.org/x/sys/unix
golang.org/x/time/rate
google.golang.org/genproto/googleapis/rpc/status
gopkg.in/src-d/go-git.v4
gopkg.in/yaml.v2

Afterwards, you can try a build with

	GOTAGS='novirt nodocker' gmake build

Fair warning though, this does not work yet.

The dependency stuff could be moved over to the make deps
step, but I'm unsure this works well with OpenBSD porting guidelines
and I might need to make separate ports for every dependency. I
will have to look at other ports of go projects. Finally, it's probably
not a good idea to hardcode the path for bash in misc/header.sh,
but I'll cross that bridge later.
  • Loading branch information
Superpat committed Nov 22, 2019
commit 4452099f715094d1391d1cb83012c2301b30e973
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ REMOTE_PATH = 'pub/alt/$(USERNAME)/$(PROGRAM)'
ifneq ($(GOTAGS),)
BUILD_FLAGS = -tags '$(GOTAGS)'
endif
GOOSARCHES ?= linux/amd64 linux/ppc64 linux/ppc64le linux/arm64 darwin/amd64
GOOSARCHES ?= linux/amd64 linux/ppc64 linux/ppc64le linux/arm64 darwin/amd64 openbsd/amd64

GOHOSTOS = $(shell go env GOHOSTOS)
GOHOSTARCH = $(shell go env GOHOSTARCH)
Expand Down
2 changes: 1 addition & 1 deletion misc/header.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/local/bin/bash

if [ "$1" = "" ] || [ "$1" = "--help" ]; then
echo "usage: append standard header to file"
Expand Down