Even when AltLookupFun was defined, Lookup used to fallthrough after the
AltLookupFn, depending on what AltLookupFn returned.
This means in some cases, our tests in pkg/search did end up calling the
Google API (which was not intended). We found out because with the new
dependency on an API key for the Google service, we now rely on reading
the key from the config dir, which is wired to panic if it is accessed
during tests.
This change therefore simplifies Lookup, by making it return the results
of the AltLookupFn call, if AltLookupFn exists.
Change-Id: Ie196f892f36d309c725a6e869094364d49cffdc8
Since we don't support the latest MySQL version, our tests in Travis CI
are failing since they pull the latest docker image.
We should fix the issue
(https://github.com/perkeep/perkeep/issues/1114), but in the meantime,
we might as well restrict the tests to MySQL 5, so that CI tests keep on
being useful to alert us about other errors.
Change-Id: I32a2cc1dc5a4194c891183d96498dee14c759baf
If a GPS coordinate is bogus, we should have caught it when receiving
the blob, and not write it out as an index row.
If we did not, we end up catching it when trying to slurp it to the
corpus. At this point there's no reason to penalize the user by
panicking, we can instead skip it and log about the error.
Change-Id: Ie40479befca78d8b5da343ef1a8420f703f07cb7
For now, no user-visible changes.
But this will permit an SFTP blobstorage layer in the future.
Next step will be moving 90% of the code from the localdisk package
into the files package.
Updates #1111
Change-Id: I62b924e3d69ca47e7c0fa83c78a77808a71ea33e
We migrated to using the long form for key IDs sometime ago, but we
never updated the client of the gpgchallenge accordingly, so in
functions that take a keyID as an argument, it would fail to find the
given long keyID within a key ring.
However, for usability reasons, we want to keep the short form in the
hostname of the instance (and hence as the DNS entry), so we revert to
using the short form when perkeepd is setting its host name.
Change-Id: I8373016671fdead32780a04f6d64045e81cc9cd1
It used to be a feature of make.go that it could run from anywhere and
users could ignore GOPATH. We would still like that, but the
shenanigans we did before to mirror the perkeep source tree to a temp
directory and set GOPATH to that temp directory were annoying. And
fortunately GOPATH is slowly dying, so we won't need to deal with this
forever. As of Go 1.8, there is always now a default GOPATH
(https://golang.org/doc/go1.8#gopath), so at least people don't need
to set environment variables. And in Go 1.12-ish, we'll probably ditch
GOPATH entirely.
So, for now require that users build in their GOPATH, which might be
the implicit GOPATH if they haven't set one. This only affects
developers. Regular users can use release binaries.
Change-Id: Ib4e3f05fa987baeaba5aa51349887e6c243f0092
As make.go now does not install binaries in ./bin, but rather let them be
installed wherever go install does, the test World should now rely on
os/exec's LookPath to find the binaries it needs.
Fixes related failing tests
Change-Id: I256e79673ca994001e831aed9e7a3ab5ba485ead
Foursquare was rebranded Swarm (for check-ins) some time ago, so
rename our implementation to match the upstream branding. But still
store "foursquare" as the permanode importer type, to not break old
users. That override is now added to the new Properties struct, and
all importers now return their properties.
More stuff will be added to Properties later: WIP flag, bug link,
proper title, icon?
Change-Id: I31cbe2feec3dbf9c6bdb0c866056d9c6966313e3
We had checks in place to return an error if a search query had both
no constraint and no expression. However:
1) we accepted " " as a valid search expression (which is the
work-around that was used by the web UI for the index page)
2) the rest of the code seems to be coping well if we remove these
checks, which this CL does.
This allows us to remove the q=" " trick in the web UI, which does not
seem to be breaking anything, and has the side-effect of improving the
map aspect story (issue 1081). Because with this change, the index page
is not considered anymore as the result of a search query, which means
if one then clicks on an image, one then gets to the image permanode as
a "standalone" item, instead of as one item part of set.
As a consequence:
1) If one then clicks on the map aspect, one gets only this item on the
map (with the proper zoom level), instead of all the items from the
index page.
2) The other side of the coin is left/right navigation does not "work"
anymore in this context, since the item is not part of a set anymore.
In other words, this change makes the index page (i.e. the empty search)
a somewhat particular case, and makes it behave a little differently
from the result of any other (non-empty) search.
Updates issue #1081
Change-Id: Ibbb1711c67c7cf8adaf94ab5d2c68c3755e4983b
Also removed misc/buildbot while at it (which contained camput
references) since we don't use it anymore at all.
TODO: the OSX app seems to be relying on finding a binary in ../bin,
which we do not use anymore. This will probably need fixing.
Updates #981
Change-Id: I14220fbad2e81181330fca4bb2d2e5fe170e1bd6
When installing, respect user defined GOBIN and/or GOPATH, or the
Go defaults.
But when cross-compiling, disable GOBIN, as it's not supported.
Fixes#1100
Change-Id: I69485722d6dbfcbf7721463077f828efc950d9d3
Also disable the annoying mouse hover enter/exit behavior. Require
clicks. TODO: more focus events elsewhere should close the menu, but
this is better than before.
Also, rename the PIGGY variable to KEEPY for now, in prep for changing
the logo from a pig to the Keepy the Perkeep Parakeet mascot.
Updates #981
Change-Id: I48d9dd7267701b39122836aaad708726b1c105ac