* Use modernc.org/sqlite
This way it can be enabled by default, as it is a cgo-free, Go-only package.
No need for build tags, conditional compilation (whether libsqlite3-dev is installed).
* make.go: Remove unused -sqlite flag
* Remove use of -sqlite flag
envvardoc: repair the script so that it does not fail on very long
lines.
envvardoc: look for env vars with the `PERKEEP` prefix too.
envvardoc: adapt the `docVar` regex to the markdown format.
envvardoc: also look for vars in internal/.
CI: run envvardoc so that we notice when we add new undocumented
environement variables.
doc: List all remaining undocumented env variables. This "shitlist"
gives us a green build in the CI and allows us to ensure all new
environment variables are documented in the future.
doc: Link to the environment variables page.
A working importer for the Instapaper service. The importer imports
bookmarks, full text articles, and highlights. A blob item handler for
Instapaper highlight permanodes is included to show summarized highlight
content from the server UI.
Also, this CL updates github.com/garyburd.com/go-auth to rev
bca2e7f09a178fd36b034107a00e2323bca6a82e in order to get support for
XAuth requests.
Fixes#1208
Change-Id: I72e0c40b245c7eec4a44bb475fcaa96a0ee9a1c5
In 5894af5196 we chose not to vendor
sqlite3-binding.c and sqlite3-binding.h in, because we rely on the
system's libsqlite3 instead. But we never told devcam test to use the
corresponding necessary "libsqlite3" tag, which is now done in this CL.
Also, comment properly about it in .gitignore.
And make Travis CI use the devcam installed in $GOPATH/bin, instead of
specifically building one in tree.
Change-Id: I4b7bb1305669037f84063c7cf6c7f356c99f3edc
Older git versions (prior to 2.13 / commit
859b7f1d0e)
required a more explicit pattern.
This also reorders the gofmt one to put the positive before the negative
match for consistency.
Fixes#1191
Change-Id: Ie74e3c3d434f667d76d5ebbb76811b4f304800c8
While I was there, I also switched gofmt's vendor ignoring logic to use
git's builtin pathspec filtering.
Change-Id: Iab8093d795e7f967cceef351c6a593ba776d9790
Unset CGO_ENABLED if no sign of gcc.
The localdisk renaming stuff was fixed in Go ages ago in
golang/go#13673 and https://golang.org/cl/6140
And a defer in storagetest meant Windows couldn't delete files
because a file was still open.
Change-Id: I57aef85f24653b19ce10e3d1e18c778cee2d48f6
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
A new "put" mode is added to the pk command, so that the "pk put"
command can be used to create and upload blobs.
What this command does is actually just call the previously named
"camput" executable, which is renamed to "pk-put" in this change.
This involves adding a new way to register a mode in cmdmain, when such
a mode is just meant to call an external binary. To emphasize the
distinction, the existing func (to register a sub-command, or a mode) is
renamed from RegisterCommand to RegisterMode, and RegisterCommand is now
the name of the new func/way.
Updates #981
Updates #1056
Change-Id: Ief954c17aa88a376f551df7de4b4e9fe41ad96d1
Introduction of an Owner type in pkg/index.
Related changes in pkg/index and pkg/serverinit.
Fixes#1047
Change-Id: Ifc316865833349d5202b5085e8f2c1235f3f2220
when its wholeref index lines contain any "sha1-" wholeref lines.
Then, have the client use that info when uploading files to also
compute the sha-1 (in addition to the sha-224) and ask the server for
both.
By client, we mean changes to cmd/camput, to pkg/client functions (for
camput and other Go clients, such as the apps), and to the web UI.
Also, add a -sha1 mode to devcam server, as well as the
CAMLI_SHA1_ENABLED env var, to facilitate testing/debugging of the
legacy sha1 mode. Fix/document unrelated options in devcam server
while we're at it.
Change-Id: I369679d2a4719f6f8b409f78dd4d065e13a3f62f
This removes NewDefault and NewFromParams.
Now the default way to create a client is:
client.New() -> (*Client, error)
Specifying a server is optional and now requires
client.OptionServer(server).
If the caller really wants to log.Fatal on error, they can use
client.NewOrFail.
Also, some of the boilerplate from GopherJS callers is now promoted to
be the default behavior in the client package.
Change-Id: Icb106cf3e13cc492fe5b2f7f240e1ad4227eaf33
Remove the blob.SHA{1,224}From{Bytes,String} constructors too. No
longer used. This adds blob.RefFromBytes which was missing. We had
blob.RefFromString. Now everything uses blob.RefFrom* instead of
specifying a hash function.
Some tests set a flag to force use of SHA-1 because there was too much
golden data to update. We can remove those one-by-one over time as we
fix up tests.
Updates #537
Change-Id: Ibe6428089a6221594c2b751f53f98b03b5a28dc2
Part of the project renaming, issue #981.
After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.
This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.
Also, this only moves the lru package to internal. More will move to
internal later.
Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.
This updates some docs, but not all.
devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).
Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
This CL addresses issues #685 and #862.
The general problem is that some critical errors, that lead clients such
as camput to exit with failure, are not displayed when not running in
verbose mode.
The reason that happens is because of code such as:
if *cmdmain.FlagVerbose {
log.SetOutput(cmdmain.Stderr)
} else {
log.SetOutput(ioutil.Discard)
}
which means that in non-verbose mode we discard absolutely all log
messages, even those that would be printed during a Fatal* call.
To address that problem, we introduce a logger, as well as the Printf
and Logf functions using it, in pkg/cmdmain. These two functions only
output when *cmdmain.FlagVerbose is true.
Commands such as camput or camtool should now always:
1) log.SetOutput(cmdmain.Stderr) in init().
2) use log.Printf for messages that should always be printed.
3) use cmdmain.Printf/Logf for messages that should only be printed when
*cmdmain.FlagVerbose is true.
4) use log.Fatal for critical errors.
5) optionally, set the Verbose and Logger of the client(s) they are
using.
Also, camput and camtool are now relying on the global -verbose flag
from cmdmain, instead of having to define one for each subcommand.
fixes#685fixes#862
Change-Id: I088032fd28184a201076097bf878894b22a8a120