Commit Graph

281 Commits

Author SHA1 Message Date
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 5458321511 campit: add -blobdir flag for serverless mode.
Fixes camlistore.org/issue/362

Change-Id: If4c75b649cc4cc62f3e7a0ab07c61b088560c3e4
2014-02-07 11:02:07 -08:00
mpl 9add1d2c87 Merge "camtool list: introduce -describe to print camliType for each blob" 2014-01-31 23:10:54 +00:00
mpl 8084d6a4c7 camtool list: introduce -describe to print camliType for each blob
Change-Id: I73630dc135a169f5b24a403b5662e7ad617cb40d
2014-01-31 19:12:29 +01:00
Brad Fitzpatrick 48373fc8a7 camput: clean stale stuf in cachedir on start
Change-Id: Ie7b8d7da49703e5c430b8195202791445223cf25
2014-01-31 12:42:59 +01:00
Brad Fitzpatrick bda047eef7 camtool: add env camsrcroot
Change-Id: I701e81ab732d7574a227e8f01ca09ac91c608481
2014-01-31 12:21:04 +01:00
Brad Fitzpatrick 63d4bafd0c cammount: add -term flag, like -xterm but different
Change-Id: Idd81e345c4995a0ee939a2b4fe01d339f44ba526
2014-01-31 12:20:50 +01:00
Brad Fitzpatrick e2dc7a9256 camput: make uploading a directory tree less verbose. maybe too much.
Change-Id: Ia33588f4adc5af76bdca9ea8d26cec2340a94b30
2014-01-31 11:50:08 +01:00
Brad Fitzpatrick d77426ed6e camput: remove some android TODOs, now done
Change-Id: I206808f59bbf5a8f8dae35586b61180e0d404374
2014-01-30 17:29:41 +01:00
Brad Fitzpatrick 3f27e4f708 Add android camput pre-exit hook.
Change-Id: I30f9771e5562ece6a35d44cc8ab57c305a2899cb
2014-01-30 17:29:28 +01:00
Brad Fitzpatrick eb27581da7 httputil: add DecodeJSON and CloseBody helpers, then use them everywhere
httputil.CloseBody closes a http.Response.Body nicely, such that it's
more likely to be re-used.

httputil.DecodeJSON parses JSON from a Response.Body and closes the
body. It also keeps a temporary copy of the input, for error messages.

Then use them everywhere, to improve HTTP TCP connection re-use.

And misc other clean-ups.

Change-Id: I5dc44be0165b13659459ed29ce5ab44c17d9739f
2014-01-28 22:00:52 -08:00
Brad Fitzpatrick a70b554023 pkg/client, camput: don't stat each chunk before uploading
Trust the have cache for skipping uploads.

Reduces total number of HTTP requests.

Also, set Transport's MaxIdleConnsPerHost to be the same as
our HTTP concurrency level, to not keep re-creating TCP
connections.
2014-01-27 16:07:15 -08:00
Tommi Virtanen 6cda29582b third_party: Switch FUSE library to bazil.org/fuse
import bazil.org/fuse at f6649cd46fb76b1e04ba9eeffb773cb189278d31
remove code.google.com/p/rsc/fuse.

Huge thanks to Tommi Virtanen for the fuse support.

Change-Id: I44b95ac1ea344648593c7376f83ca675a56077b3
2014-01-24 13:28:08 -08:00
mpl 448f266d72 rename pkg/serverconfig to pkg/serverinit
To avoid awkwardness with future pkg/types/serverconfig

http://camlistore.org/issue/339

Change-Id: If8a00941cdc269d6bcfe0f76c596154d5969bf0d
2014-01-23 17:18:46 +01:00
Brad Fitzpatrick a384ff188d Get rid of CAMLI_DEV_KEYBLOBS / keyblobs / etc.
Fixes camlistore.org/issue/277

Change-Id: I7f380f9d18785f600fa0c442d5a19cd118782788
2014-01-20 13:47:08 -08:00
Brad Fitzpatrick 4550d494ba cammount: more friendly UI
Change-Id: Iec402e623407f2b22d54de952e38b1da0958f529
2014-01-16 19:52:11 -08:00
Brad Fitzpatrick 2086406552 Client fixes and cleanups:
* Fix TODO about moving camput file's havecache up a layer into
  camput itself. So now it's used for all commands (camput permanode,
  camput attr, etc). Reduces HTTP requests.

* Fix camlistore.org/issue/343 -- don't do stats before uploads
  in cases where it's useless. Adds a field to UploadHandle.

* Fix camlistore.org/issue/344: upload the public key whenever
  uploading a signed blob. Usually this is a no-op because of the
  have cache.

* Use zero (or <=0 rather), not -1, to mean unknown on UploadHandle
  Size.

* More docs on public stuff.
2014-01-15 18:32:02 -08:00
Brad Fitzpatrick 94ff6ac141 pkg/search, pkg/client, cmd/camtool: add 'camtool claims' subcommand
Change-Id: Id9d8381facd97a946c3582b226d433ab59b18da7
2014-01-14 11:48:49 -08:00
Brad Fitzpatrick d3b0e933b9 camtool: add describe command
Change-Id: I956c4a76f00bc96f2e5f2b1e5b19a1b656dd1585
2014-01-11 16:46:03 -08:00
Brad Fitzpatrick 0841e93514 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-01-11 16:22:02 -08:00
Brad Fitzpatrick 67a2425ea7 Add camtool list subcommand.
Alias for sync --dest=stdout

Change-Id: Ic3714e3728852c09073f3adafe539ce494d5e219
2014-01-11 15:28:40 -08:00
Brad Fitzpatrick 9c87b07d74 Merge "if permanode or root name provided to cammount, create new mutDir, and mount it" 2014-01-10 22:14:28 +00:00
mpl b5d29a181f client,camget: add -cert to specify trusted cert with share URLs
http://camlistore.org/issue/330

Change-Id: I6d060fe4804d6cf9baa3686243e3ab93839ec9ac
2014-01-09 12:05:38 -08:00
Kristopher Cost 7ce12d53f4 if permanode or root name provided to cammount, create new mutDir, and mount it
Change-Id: I97b7508ccb3c564178cb4f0a7b9ff238e486d957
2014-01-09 11:32:45 -08:00
mpl 52a16e3483 Merge "pkg/client: auth and (camtool) TLS fixes" 2014-01-09 19:24:17 +00:00
mpl 1db2e7eaf3 pkg/client: auth and (camtool) TLS fixes
1) disallow auth from env when not in dev mode or on android
2) allow insecureTLS with flag in debug mode
3) set transport so that insecureTLS or trustedCert modes work

http://camlistore.org/issue/325

Change-Id: I6d8056bb75ffff5f002dfe9bd631ae996dc4e5ef
2014-01-09 11:23:40 -08:00
Mateus Braga 3d4ccbe0f4 Remove unused NewSetAttributeClaim in RunCommand
Change-Id: I092020f675296e729e3dfe15d97a42682dd13ab9
2014-01-08 11:11:57 -02:00
mpl 10d863e323 Merge "pkg/client: multi servers config" 2014-01-06 07:24:52 +00:00
mpl bf8c463d0a pkg/client: multi servers config
http://camlistore.org/issue/309

Change-Id: I22bbbf6a808a772272f153b2535d693bd986d13a
2014-01-05 23:19:43 -08:00
Aaron Racine 07a42aaa40 camput: Skip base directories where IsIgnoredFile() returns true.
camput currently panics if a base directory is ignored.  Fixes issue 314.

Change-Id: I9466b4576b1134994e5e53e1067e0435ddba0fdf
2014-01-02 18:41:54 -08:00
Brad Fitzpatrick 33c42a2326 Remove message about gnupg-agent.
Change-Id: Ibe239b079e52b520e87dec194c6166aabcc02f63
2013-12-29 14:46:04 -08:00
mpl 2588ff8c83 camtool: apparently forgot to add index.go in 2d85e017ff
Change-Id: I6b7ce9e70b15d622935950ac8b1f06d843590659
2013-12-29 00:03:58 +01:00
Brad Fitzpatrick 9fd329df80 Merge "cmd/camtool: (re)index command" 2013-12-26 17:29:03 +00:00
mpl 2d85e017ff cmd/camtool: (re)index command
http://camlistore.org/issue/193

Change-Id: I498f92bdc153f44dc84d4b47f03c47a8e7b54ad9
2013-12-26 18:23:15 +01:00
Dustin Sallings 3f967a1111 camput: set handlerConfig=true when generating a config
Change-Id: I10ca5274a90640dd72f7c678f1000cf0ddf5adf9
2013-12-25 01:53:02 -08:00
Brad Fitzpatrick 649390b9ef camtool: make diskpacked-reindex command a bit more user-friendly
Change-Id: Ic7cde2f453f5cd2716d929800b297cb766826acd
2013-12-24 20:16:36 -08:00
mpl 4a87b954fb Merge "pkg/index: move postgresql to sorted + some fixes" 2013-12-23 23:49:14 +00:00
mpl 8fec95752c pkg/index: move postgresql to sorted + some fixes
Change-Id: Ia6410256ffe8d4cbc2b9a5c056d075707105ab08
2013-12-24 00:37:14 +01:00
mpl 6e7eacea4a Merge "pkg/client: some cleanup, doc on the website" 2013-12-23 22:31:45 +00:00
mpl 1e8d46ee45 pkg/client: some cleanup, doc on the website
Changed some keys to be consistent with the server config, and removed
some others.

We're now using jsonconfig to get the keys and validate the config.

Removed some unused funcs/methods, moved some global vars as members of a client.

Also, having two possible defaults for the secret keyring
(.config/camlistore/identity-secring.gpg and .gnupg/secring.gpg)
was annoying and confusing imho, so I removed the latter.

http://camlistore.org/issue/259

Change-Id: Icf79fa8822b62b5d91843698861dd19cb553607a
2013-12-23 20:23:21 +01:00
Brad Fitzpatrick 450409d0a8 camput: rename -name flag to -title for consistency with other commands
Fixes camlistore.org/issue/285

Change-Id: Ide3fba2c40fc8e9f0ff187c183f2cc0acd97f68e
2013-12-22 09:29:32 -08:00
mpl 62f8a252ff pkg/index: move mysql to sorted
also minor cleanups in sqlite and mongo

Change-Id: I1f371358997d929c72a8f63d2630a1c3fa4a0240
2013-12-18 20:18:20 +01:00
Brad Fitzpatrick 66164b186e Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2013-12-17 11:27:31 -08:00
Brad Fitzpatrick 2af4040223 camtool: add env sub-command 2013-12-17 11:27:24 -08:00
Mathieu Lonjaret ac7b19de20 Merge "camput: allow ignoring files NOT only if --filenodes used" 2013-12-17 15:11:07 +00:00
Brad Fitzpatrick 8af7795f4a cammount: don't require a mount dir; add --open flag
Change-Id: I87c280b333a1ee9445b74e3ee1c87f6c08931ef3
2013-12-16 20:57:43 -08:00
mpl b62c94fdd1 pkg/index: move sqlite implementation to sorted
Change-Id: I1e300ffa14547fabeac8d255fd694054ebcb9e53
2013-12-16 17:35:27 +01:00
jakubbrzeski 33e925ffa1 camput: allow ignoring files NOT only if --filenodes used
Change-Id: I7856c5f6602e6b439ebcebbcb83eddb1d1865e88
2013-12-16 16:52:59 +01:00
mpl 8c562e9135 camtool: dbinit mongo support
Change-Id: I289759ed9bdb34a6e108af1364c4a6bcfbb5982f
2013-12-13 17:25:03 +01:00
mpl 62cbf8550c camput init: use osutil.KeyBlobsDir()
Change-Id: I1b9f29c24361ffab708af4bdaff8c870ff8730e6
2013-12-11 00:47:50 +01:00