hockeypuck-dev team mailing list archive
-
hockeypuck-dev team
-
Mailing list archive
-
Message #00003
1.0rc, godeps, install notes & more
Some notes on issues experienced so far.
Running "Ubuntu 12.04.3 LTS", I first tried to install hockeypuck from
the PPA per instructions at:
<http://hockeypuck.github.io/install-ubuntu.html>.
I filed <https://bugs.launchpad.net/hockeypuck/+bug/1250701> before
discovering that while `apt-cache showsrc hockeypuck` references (only)
"1.0~rc1~bzr257~precise", `apt-cache policy hockeypuck` confirms that I
have installed the only candidate, "0.9.0149~precise" from
<http://ppa.launchpad.net/hockeypuck/ppa/ubuntu/>.
That version is using MongoDB.
So I use <http://hockeypuck.github.io/install-source.html> and use the
PPA "ppa:juju/golang" as described, where normally for development I
just use the release from upstream. (I'm fortunate enough to use Go in
my day-job). The instructions are insufficient to counter Go 1.0
installed from universe.
I ended up using:
apt-get install golang-go=2:1.1.2-2ubuntu1~ubuntu12.04.1~juju1
to get the more current version with support for the newer ability to
figure out when a function doesn't really "end" without a return
statement, needed for building hockeypuck.
(I don't know Debian/Ubuntu well enough to ever remember the correct way
to pin to one source and would appreciate guidance on this)
Using "make godeps" (which leads to a question of why "godeps" instead
of "godep" per <https://github.com/kr/godep>), the build fails because
the "freeze-godeps" and "apply-godeps" make targets assume that $GOPATH
is a single directory, when it's defined as a colon-separated list, much
like $PATH, $CLASSPATH, etc.
So near the top of the Makefile, I added:
----------------------------8< cut here >8------------------------------
override GOPATH1=$(firstword $(subst :, ,$(GOPATH)))
----------------------------8< cut here >8------------------------------
and then used $(GOPATH1) below for those two rules.
Which then revealed that "godeps" does not manage the "go get" part of
the dependencies.
So, after running:
go get ./...
I then ran "make apply-godeps" (which did another get/build of the
.PHONY'd "require-godeps"), to end up with a current source tree which
builds.
Running `./hockeypuck version` (from my Go bin dir) then scared me
because it reported "0.9.0149~precise"; I then recalled the existence of
/etc/hockeypuck/version, which I then nuked, to get DEVELOPMENT.
So I adjusted the Makefile to have:
----------------------------8< cut here >8------------------------------
VERSION_VAR := launchpad.net/hockeypuck.Version
#REPO_VERSION := $(shell git describe --always --dirty --tags)
REPO_VERSION := 0.$(shell bzr version-info | sed -n 's/^revno: //p')
GO_LDFLAGS := -ldflags "-X $(VERSION_VAR) $(REPO_VERSION)"
#...
compile:
go build $(GO_LDFLAGS) launchpad.net/hockeypuck/...
go install $(GO_LDFLAGS) launchpad.net/hockeypuck/...
make -C doc
----------------------------8< cut here >8------------------------------
Cue some debugging because a build /... appears to not overwrite the
binary in ${GOPATH%%:*}/bin/ by default. Grr at Go.
I don't know enough about bazaar to get correct versions beyond what I
found in revno from version-info; so I left in the git variant above,
which I normally use, to provide context. "bzr tags" lists no tags, but
I suspect something based on a tag would be better. In the meantime, I
went for 0.${revno}.
No combination of help invocation seemed to reveal where the default
configuration file was, or failing that how a config file could be
specified to hockeypuck. Then I found "debian/upstart", which showed
the New World invocation (instead of "exec /usr/bin/hockeypuck-mgo").
Starting manually, to debug failure:
hockeypuck@barrow:~$ hockeypuck run --config /etc/hockeypuck/hockeypuck.conf
unterminated array
I installed tomlv from github.com/BurntSushi/toml/tomlv; that validates
the configuration file. After some prodding, I discovered that in this:
----------------------------8< cut here >8------------------------------
[conflux.recon]
#...
partners = [
"sks-peer.spodhuis.org:11370", # Phil Pennock
]
----------------------------8< cut here >8------------------------------
the comment at the end of the array item line was causing a parse
failure.
Note that in <https://github.com/mojombo/toml> the second example block
under Array explicitly shows that this is supposed to be supported, so
there's something hinky with the "github.com/pelletier/go-toml" library
which might be worth a bug report from you, Casey?
Right now, fetching the data from a recent dump, so I can start a load
later. Will probably start that tomorrow morning, leaving the fetch
running now.
Regards
-Phil
Follow ups