Commit Graph

12 Commits

Author SHA1 Message Date
Brad Fitzpatrick 38c2a87ad2 cmd/camtool: add "camtool whoami" subcommand
Also clean up and document the client package.

And misc cleanups.

Change-Id: I385d9948d8735deb37814ac45ac58851d8e58c75
2018-01-23 14:02:32 -08:00
Brad Fitzpatrick 194d4f9443 blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps
I had intended for this to be a small change.

I was going to just add context.Context to the BlobReceiver interface,
but then I saw blob.Fetcher could also use one, so I decided to do two
in one CL.

And then it got a bit infectious and ended up touching everything.

I ended up doing SubFetch in the process by necessity.

At a certain point I finally started using context.TODO() in a few
spots, but not too many. But removing context.TODO() will come in the
future. There are more blob storage interfaces lacking context, too,
like RemoveBlobs.

Updates #733

Change-Id: Idf273180b3f8e397ac5929c6d7f520ccc5cdce08
2018-01-18 16:22:16 -08:00
Brad Fitzpatrick d6a0b05df0 Rename import paths from camlistore.org to perkeep.org.
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
2018-01-01 16:03:34 -08:00
mpl 3d048ca304 vendor: rm code.google.com/p/go.crypto/openpgp
And add golang.org/x/crypto/openpgp instead, at rev
ede567c8e044a5913dad1d1af3696d9da953104c
As well as golang.org/x/crypto/cast5 , as a dep.

Change-Id: I385fb0cd0eef438b43fa1dcd2a36e6a1442fd3b1
2016-11-28 19:34:32 +01:00
Brad Fitzpatrick 75d60962f6 Move remaining stuff in third_party/* to vendor/*
Change-Id: Ifbcc02817083cba68d8c1acec3e6ec50e8f61149
2016-04-20 16:49:15 -07:00
Salmān Aljammāz 8bee1495ab client: log when GPG signatures mismatch
Mismatching GPG keys seems to be a very common issue for newcomers.

Change-Id: If83eee5d0ba5f0c85a4d75a31ab15a5469c2965d
2015-01-12 14:06:22 +03:00
Brad Fitzpatrick bf94a73859 Get rid of SeekFetcher vs StreamingFetcher distinction and complexity.
StreamingFetcher is now just Fetcher, and its FetchStreaming is now
just Fetch.

SeekFetcher is gone. Blobs are max 16 MB anyway, so we can slurp to
memory when needed. The main thing that cared about SeekFetcher
was the GET handler, ServeBlobref, because http.ServeContent needed
one for range requests. That's rewritten in an earlier commit, using
the FakeSeeker from another earlier commit.

Lot of code got simpler as a result.

Change-Id: Ib819413e48a8f9b8d97f596d0fbf771dab211f11
2014-03-14 12:29:13 -07:00
Tamás Gulácsi 97520583b8 Use 'uint32' instead of 'int64' for blob sizes everywhere.
Not just in blob.SizedRef, but in blobserver.Fetch and
blobserver.FetchStreaming, too.
Blobs have a max size of 10-32 MB anyway, and the index.Corpus is now using
uint32 to save memory.

Change-Id: I1172445c2f9463fdaee55bfe0f1218d44be4aa53
2014-02-08 17:58:12 +01:00
Brad Fitzpatrick ee57e351d2 Remove debug cruft actually submitted.
Change-Id: Iaa805afd2d6e76108319edf06113de8a260f7e46
2013-10-24 22:49:18 -07:00
Brad Fitzpatrick 0324143892 importer: make the schema.Signer available to the importer
Change-Id: Iad1a2f3bfe381b31a381957edb85d6d4aa21b38c
2013-10-24 22:45:28 -07:00
Brad Fitzpatrick cf15b2be90 client: use the schema.Signer API, remove Client.SignBlob method
Change-Id: I177c78f4f7f4ca54afd021d4ada866a35eea06eb
2013-10-22 07:26:44 -07:00
Brad Fitzpatrick 5c3b57682e schema: integrate with the jsonsign package.
Signing schema blobs (permanodes and claims) was too hard before, and
the code was scattered in weird places.

The pkg/jsonsign code tries pretty hard to be Camlistore-neutral, so
it remains so.

The pkg/client code (which deals mostly with HTTP access to a remote
camlistore server) had the signing the logic in it before, mostly
because that's where we originally needed it (for camput), but that
should be fixed in subsequent changes, to remove most of its signing
logic and use pkg/schema's instead.

The schema package now depends on jsonsign, which I think is an
acceptable dependency edge, since the Camlistore schema does logically
depend no signed claims (and that was a gaping hole in its public
API), and it seems safe cyclic-wise, especially if jsonsign continues
to be a leaf package.

Change-Id: I10229ec5d880ddd801cb1ba77ac26b654693036d
2013-10-21 22:08:45 -07:00