Commit Graph

342 Commits

Author SHA1 Message Date
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
Brad Fitzpatrick 47828b6900 camput: add --delete_after_upload flag.
But untested in tree mode. I think it's incomplete still.

Change-Id: Ia0c692e53a099b12a2b66735c228ea6f78d9c940
2013-12-10 15:05:41 +04:00
Brad Fitzpatrick b82b8efe4c Start of new context package and *context.Context type.
Will eventually be plumbed through lots of APIs, especially those requiring or benefiting from
cancelation notification and/or those needing access to the HTTP context (e.g. App Engine).

Change-Id: I591496725d620126e09d49eb07cade7707c7fc64
2013-12-02 13:20:51 -08:00
mpl d51647ae33 camput: delete command, to send a delete claim
http://camlistore.org/issue/191

Change-Id: I053ab468420cc173e6122909bf3a0b16e4d43224
2013-11-29 00:19:42 +01:00
Brad Fitzpatrick 3fd356f457 gofmt
Change-Id: I900a49b3f76aec7ef65419f2a5ecaf3eae95defb
2013-11-28 11:58:47 -08:00
Tamás Gulácsi cb6f423eeb Add diskpacked-reindex subcommand to camtool
For checking and/or rebuilding index.kv of diskpacked packs.

Change-Id: I1ad87974b2daf58b1e767bb1df6f7b64e8b6359a
2013-11-28 20:44:27 +01:00
Brad Fitzpatrick dcf5f6abe7 client: clean up. finish moving all Android stuff to pkg/client/android
Change-Id: Ia3d19a323d9c734a01ec9a12509b115191afcfdd
2013-10-26 11:08:34 -07:00
Brad Fitzpatrick 2040d2e442 Add new pkg/client/android, to clean up Android API gunk from pkg/client's godoc.
This is just a start. AndroidStatsTransport and AndroidStatusReceiver and most (all?)
of pkg/client/android.go should migrate too.

Change-Id: Id4140730bbdd218fdf7ba7cedc7870ce5164e06c
2013-10-22 07:37:15 -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
Salman Aljammaz a607971f5f cammount: handle SIGINT, so that we unmount too in that case.
Change-Id: I5e82c6326aab892674c775e0615a91af71532d3c
2013-10-17 15:22:18 +01:00
Tamás Gulácsi e056081be1 add capctime flag to camput
I can recreate the file, set the modification time, but can't forge creation
time, thus cannot recreate the exact same uploaded file twice.
This change targets this problem.

As this is a very rarely used flag, this is enabled only if the CAMLI_DEBUG
environment variable is true - such as the other "gross" options
(statcache, sqlitecache...).

Change-Id: I99c7805898ed97883043de4e7dcec23a472e462c
2013-10-09 21:06:51 +02:00
Steve Phillips 5dc853110f Added missing var 'which' used in a fmt.Errorf
Change-Id: I0b9a7c6a0c7e523a75f3e5beebbd860e0092a81f
2013-10-04 18:44:40 -07:00
mpl 304f5c4b38 camput attr: support -del
Change-Id: I28460fed5b572ba9a83cfcb04f38e42124fa723f
2013-10-03 15:07:43 +02:00
Brad Fitzpatrick e70f258b0b Merge two copies of StatsReceiver into common location.
Change-Id: I05bd36aef3293927fb518296b43a088f284356ea
2013-09-22 11:19:10 +01:00
mpl 0c1dc0d6e4 devcam test: generate keyblob with devcam put init
The integration tests run by devcam test require a
GPG keyblob in the default location (for camput), and
we do not track in git such a keyblob.
This change allows devcam test to create the keyblob
with devcam put init before running the tests.

Also, devcam server is now using CAMLI_KEYID instead
of hardcoding the key id in the dev server config file.

Change-Id: I030b88c9a9321016fedb62424e0e707621206922
2013-09-20 20:03:21 +02:00
Brad Fitzpatrick 79065de4b9 For SQLite compile errors, link to the wiki.
Change-Id: I34b1485daba6173d6665cfc56b6bba43164534d8
2013-09-19 10:17:57 +01:00
Brad Fitzpatrick 8319411ab4 Convert more ReceiveBlob into blobserver.Receive or blobserver.ReceiveNoHash
Change-Id: I9199555324b617167a6062a8b55ed09b449bae4f
2013-09-16 15:57:14 +01:00
Brad Fitzpatrick 59534f0ad6 Move pkg/gate to pkg/syncutil, to house more stuff.
Change-Id: I737458641a9de03da55ed627bfac10f3377a13aa
2013-09-12 16:04:10 +01:00
Brad Fitzpatrick ee4550bff4 camput: fix deadlock when uploading a large directory tree
The upload was constrained to have only 5 workers goroutines at a
time, but those goroutines could have been uploading directories and
blocked waiting for their dependent children, which never got to
upload if all 5 goroutines were uploading directories.

Now, allow an unlimited number of upload goroutines (see commit
058434449), but add a gate around things that allocate file
descriptors within the upload function.

This means that now we could have a ton of goroutines existing but
blocked on the gate, wasting ~4KB of memory each rather than the
relatively small amount of memory we used for the *node on the
container/list before.

Future CLs can reduce the memory usage and/or rewrite this.

Or maybe we forget to clean this up, but get smaller goroutine memory
usage in Go 1.3 as is being discussed.  It _is_ convenient to just
launch tons of goroutines and manage dependencies with channel
operations rather than managing the dependencies state and goroutine
scheduling in your own code, just to save some memory.

Change-Id: I43d9d7795e5df4d790d6086d18e4b4b99eaacbc8
2013-09-10 20:16:16 -07:00
Brad Fitzpatrick 058434449c camput: add an unbounded mode to chanworker.
Change-Id: I90040fc6a67c88ae54338ab9556295861170a871
2013-09-10 20:07:20 -07:00
mpl ad84a3565e camput: check stat cache value form
Addresses last comment from
http://camlistore.org/r/606

Change-Id: I5c0eb5492fdcfeb71becdeb25c6c09a1971ac09c
2013-09-09 19:08:07 +02:00
Brad Fitzpatrick 5c83627a1f camput: add debugging for camlistore.org/issue/221
Change-Id: If0ed73cb16409ac5c1f67ffc878038075cb7e432
2013-09-08 18:19:54 -07:00
Brad Fitzpatrick 4270ec4ce5 camput: remove unnecessary parens and allocation
Change-Id: I78b22458d4bd001313d6d49c6e401bc409b953fd
2013-09-08 18:17:51 -07:00
Brad Fitzpatrick 2cf4d68267 Let shares have expiration times.
Change-Id: Iecae106302ba43c354b6987163830cf78a70d12c
2013-09-08 17:46:40 -07:00
Brad Fitzpatrick d2d65912d9 Merge "Document environment variables usage." 2013-09-08 15:25:56 +00:00
Aaron Boodman 8dd7dd42cf Fix crash in `camput file` when configuration discovery has failed.
Change-Id: I8a7ac26e5d550f25eddf149dadde5013a1d50fe7
2013-09-07 19:15:44 -07:00
Bill Thiede 630f6ca61f Document environment variables usage.
Running 'go run dev/envvardoc/envvardoc.go' now shows:
'All environment variables are documented'

I also took the liberty of cleaning-up our mishmash of logic for handling
boolean environment variables, and cleaned up a couple other spots that didn't
seem right.

This change adds docmentation for all variables starting with (CAM|DEV|AWS).
This leaves some variables still undocumented.  If there are variables worth
documenting in the following list, maybe we should rename them to have a
CAM{LI} prefix for consistency's sake:

APPDATA                  pkg/osutil/paths.go:86
APPDATA                  pkg/osutil/paths.go:102
DISPLAY                  pkg/misc/gpgagent/gpgagent.go:126
GOPATH                   pkg/fileembed/genfileembed/genfileembed.go:321
GOPATH                   pkg/osutil/paths.go:168
GOPATH                   pkg/test/world.go:54
GOPATH                   server/appengine/build_test.go:77
GPGKEY                   cmd/camput/init.go:77
GPG_AGENT_INFO           cmd/camput/init.go:153
GPG_AGENT_INFO           pkg/misc/gpgagent/gpgagent.go:50
HOME                     pkg/jsonsign/keys.go:79
HOME                     pkg/jsonsign/signhandler/sig.go:64
HOME                     pkg/osutil/paths.go:36
HOMEPATH                 pkg/osutil/paths.go:34
PKG_CONFIG_PATH          pkg/index/sqlite/dbschema.go:59
RUN_BROKEN_TESTS         pkg/fs/fs_test.go:67
SKIP_DEP_TESTS           pkg/test/testdep.go:29
TERM                     pkg/misc/gpgagent/gpgagent.go:133
TERM                     pkg/misc/pinentry/pinentry.go:99
TESTING_PORT_WRITE_FD    pkg/webserver/webserver.go:135
TEST_GPGAGENT_LIB        pkg/misc/gpgagent/gpgagent_test.go:27
USER                     pkg/netutil/ident.go:135
USER                     pkg/osutil/paths.go:45
USERNAME                 pkg/jsonconfig/eval.go:228
USERNAME                 pkg/osutil/paths.go:43
VERBOSE_FUSE             pkg/fs/fs_test.go:133
VERBOSE_FUSE_STDERR      pkg/fs/fs_test.go:137
XDG_CONFIG_HOME          pkg/osutil/paths.go:104

Change-Id: Ief28710d3deefd1e65247cb5d3b1d8dde73e1f2d
2013-09-06 21:54:03 -07:00
mpl 8d71c9bb60 camput: have cache and stat cache based on github.com/cznic/kv
Added pkg/kvutil/kvutil.Open for convenience

Change-Id: Ie8db58e2c644a7358f252548bc57cccff7627497
2013-08-30 23:54:22 +02:00
Brad Fitzpatrick b24cad68dd Cleanup: remove BlobHub and time.Duration waits from storage interface
Move up a layer to the HTTP.  Also, start to remove ContextWrapper
stuff.  We've done it differently for App Engine instead, and will do
it differently yet moving forward.

Also add blobserver.Receive and use it in most places, moving checksum
verification up a layer.

Bunch of other cleanup and TODO fixing too.

Much simpler and cleaner.

Change-Id: I12e56c5d4e53bfcf82bdd8fb0b6d57c248ff605c
2013-08-21 13:57:28 -07:00
mpl 31df3635a4 camput: ignore files like .DS_Store with -filenodes
Also made initTrustedCertsOnce a field of the Client
object, as it is a similar change.

http://camlistore.org/issue/104

Change-Id: Iabbd7f06e06d31265f390a23c4bdaac956f856f7
2013-08-19 17:21:10 +02:00
mpl 9fcb4b6434 dumpconfig: typo in date
Change-Id: Iebd75442070896b588092f8bad62e0d21cab3b27
2013-08-09 18:12:47 +02:00
Brad Fitzpatrick 462eb7e4c2 Add camtool dumpconfig subcommand.
Fixes http://code.google.com/p/camlistore/issues/detail?id=192
2013-08-08 17:06:45 -07:00
Brad Fitzpatrick 0bdf20884b all: delete pkg/blobref; convert all from *blobref.BlobRef to new blob.Ref
Change-Id: Id2dfb7f19452bedf4f3c9310b36227fd8117b225
2013-08-03 19:54:30 -07:00
Bill Thiede e6b86ddb9d Fixes to appease make presubmit and make forcefull on FreeBSD.
This change adds a dependency on lsof(1) when running on FreeBSD.
lsof(1) is not part of the base system, and lsof(1) would need to be
installed (usually from ports).  If lsof(1) is not installed an error
will be returned in the form of:

ident_test.go:88: exec: "lsof": executable file not found in $PATH

Change-Id: I3cb15af369dc10a8a39aeaf82cceff3c788104b8
2013-08-03 11:48:57 -07:00
Brad Fitzpatrick 38bb307085 camtool: typo from Adrian (ajft.org) and run gofmt
Change-Id: Ibbebea7bcf9a583c0ea1e86f09eff69acd2b174e
2013-08-02 16:32:50 -07:00
Brad Fitzpatrick 98eb69b5e1 fs: bunch of read-write FUSE work, debugging, and integration tests.
Change-Id: I74807f693720effb7ae8405259797331f79f59fd
2013-07-21 12:26:05 -07:00
Brad Fitzpatrick 62b0f66f05 cammount: fix imports. lazy partial git foo before. never built what I pushed.
Change-Id: I4ebc020220f6c6c15ba77e76b09cf1f5daf2169e
2013-07-21 11:54:20 -07:00
Brad Fitzpatrick 0e28959c51 fs: move unmount from cammount to fs.Unmount
Change-Id: I2c21ccbbd81f4fa7ffc40cc769eacb8a6bf30558
2013-07-20 23:26:56 -07:00
Brad Fitzpatrick 41f3e652a9 cammount: kill xterm on exit
Change-Id: Id64901853cd2adbf9aa27c9d5cc40f93b732bbbe
2013-07-21 05:23:39 +12:00
Brad Fitzpatrick 2b879e73bc cammount, dev-cammount: add verbose/debug flag
Change-Id: If53ec139db178b44c2dd5c7f1cad33f7ab62c847
2013-07-21 05:18:18 +12:00
mpl 257fd29afa camget: allow insecure TLS with shared URLs
Change-Id: I22f610009edfecea932019c35310ae62b0613cb8
2013-07-16 15:56:32 +02:00
Brad Fitzpatrick e43e703599 dev-cammount, cammount: add xterm flag, to bring up a debug xterm in that dir.
remove child process mode. not necessary.

Change-Id: I4f6e75efe127a2b9e7867dbfac5c42fcc874e3a6
2013-07-15 21:29:00 +10:00
Brad Fitzpatrick 167138fd65 cammount: quieter. and only exit when 'q' is pressed.
Change-Id: I2c8719490f977d14e526cd34672ce784589dd460
2013-07-11 19:21:59 +10:00
Brad Fitzpatrick 02d38b07ca camput, client: move lot of camput's code into pkg/client
so cammount can use it.

Change-Id: I1bd513e6dfe6faab785c856abbd0d1337e978dd9
2013-07-11 16:46:23 +10:00
Brad Fitzpatrick ae8aec21e4 dev-cammount / cammount: sane hack/debug cycle. reliable start-up & shutdown / unmount.
especially on OS X.

Change-Id: Ibb60b82be72049dc44984e8aff7cb54560800364
2013-07-10 21:27:54 +10:00
Andrew Gerrand 1a89d81bf1 cammount: instruct user to install FUSE
Change-Id: Ia3e30bbd9713dad542e3d2f946c27892e6bb35ea
2013-07-10 19:37:31 +10:00
Michael Zuffoletti c2669a6dfc issue 23: Fix google storage blobserver as sync dest
Change-Id: I33d88dc5028ebb76d4c17d2a00d8f8346114f876
2013-07-08 11:33:10 -05:00
Brad Fitzpatrick 9468e5ba70 More docs. Every package is documented now.
misc.CountingReader moves into readerutil.

pkg/atomics is folded into pkg/types.

pkg/test/testdep is folded into pkg/test, with better name/docs.

Old cruft from pkg/webserver is deleted.

Change-Id: I3f72d8b29804254ef944995fb085837c878f79f5
2013-07-07 21:12:30 -07:00
Brad Fitzpatrick 76013089a4 Move blobref.ParseMulti to its sole caller, with error checking.
Change-Id: I6351591497879ea5a113bc8e8414b751b3d1c812
2013-07-07 11:46:21 -07:00
mpl fd8af44431 camput: stat cache: use a different key in -filenodes mode
http://camlistore.org/issue/157

Change-Id: If58116be6073e0bd160d57bb8f778e498a8763bb
2013-06-28 19:52:57 +02:00
mpl f7732db604 cammount: rm TODO
Change-Id: Id97cd0400c14ddbbfc7590055ba14d6bc1d1c554
2013-06-26 15:36:19 +02:00
mpl bb7487ea0b cammount: setup transport (trusted certs support)
Change-Id: I2970986637094d5bf581545bbedab601c62c1641
2013-06-26 15:19:14 +02:00
Brad Fitzpatrick 90ecd785ba Merge "client: factorize the transport setup, and use it in camget" 2013-06-26 01:58:07 +00:00
Josh Huckabee a5d72541c3 Enhance PostgreSQL support:
* Fix dbinit command in dev server
* Make sslmode configurable in dbinit
* Don't fail on index schema setup when plpsql language already exists

Change-Id: Ic70461963f6266172d21cda8e6f071e2442d7651
2013-06-25 16:48:38 -07:00
Josh Huckabee 65f3079498 Replace github.com/bmizerany/pq with github.com/lib/pq postgres driver.
Change-Id: If62fd5b489696171c8be6b42a988e1c7d0a634d0
2013-06-25 16:13:22 -07:00
mpl b24ac50965 client: factorize the transport setup, and use it in camget
Fixes http://camlistore.org/issue/153

Change-Id: If393b34bbfcf4a6282357c9c57ebb85bae8741a3
2013-06-25 23:37:41 +02:00
Brad Fitzpatrick ded8f8d0d7 Be helpful about how to setup SQLite, especially on a Mac.
Change-Id: I87dbcd077383f0148a8c50f4120e6606139fcacd
2013-06-22 17:51:09 -07:00
mpl 0de2881a16 client: help (wrt to the gpg key) initialize the config
Change-Id: I983e4396abacbc4d8fc354863cffeece65dd5b90
2013-06-22 01:16:11 +02:00
Brad Fitzpatrick 2e632793ca encrypt: start of index recovery/compaction from meta blobs on start-up
Change-Id: I8aae66194ee67b1d63704ff98868e02f8b943e17
2013-06-17 21:56:25 -07:00
Brad Fitzpatrick d1fd483548 camput: remove Go 1.0 workaround.
Now that we rely on Go 1.1, we no longer need to workaround https://code.google.com/p/go/issues/detail?id=4589

Change-Id: Ib6631679e7f9bcea82ef96df0f50d9ecace31aa3
2013-06-16 20:56:58 -07:00
mpl a32b4a10be Merge "sqlite: Write-Ahead Logging, for improved concurrency" 2013-06-12 15:00:30 +00:00
Brad Fitzpatrick 36c1ecebd9 Let camtool sync's --dest and --thirdleg flags take local disk paths, instead of servers.
Change-Id: I8daddf06a7201384edff2cb22ecfd5872fc84928
2013-06-09 11:36:26 +02:00
mpl 893b5b2f22 camput: sqlite backend for have cache and stat cache
http://camlistore.org/issue/73

Change-Id: Id6fb95f1980139f2b525321a7e1b553cb11fe727
2013-05-01 18:42:48 +02:00
mpl a4aba6671a sqlite: Write-Ahead Logging, for improved concurrency
http://camlistore.org/issue/114

Change-Id: I93c3d48f06a6cb0703bd9ce3f89b03fc59826a73
2013-05-01 18:04:03 +02:00
Brad Fitzpatrick 2ebd1aa8e4 Merge "camput: reenable -secret-keyring, use flag.StringVar" 2013-05-01 14:34:12 +00:00
mpl db9fdb7e6e camput: reenable -secret-keyring, use flag.StringVar
http://camlistore.org/issue/76

Change-Id: I37229a1082e5d955cadcc63521ea1b13dd63a33c
2013-05-01 16:48:19 +02:00
Brad Fitzpatrick 6be77f09e4 Merge "Allow HTTPS with a self-signed certificate." 2013-05-01 02:30:23 +00:00
mpl 9b145ad1d7 camput: refactor; break up uploadNodeRegularFile
Change-Id: Ifde8f1a249eb4831757a09ea0ac881b049a90525
2013-04-24 17:51:04 +02:00
mpl ac431439f3 Allow HTTPS with a self-signed certificate.
A new client configuration parameter, "trustedCerts" (list of strings)
is introduced. A certificate fingerprint is defined as the 10 digits
prefix of the sha1 of the whole certificate (in ASN1. DER form).
trustedCerts should contain the list of fingerprints of the
certificates we trust. If not empty, the server's certificate
is checked against that list, instead of using the full x509 validation
on it.

-added a dial function and tls configuration, which check if we're using
SSL, and if we're in "trustedCerts" mode.
pkg/client/client.go
pkg/client/config.go

-moved android specific hacks from camput to the client layer, so that
the dial and tls config could reuse/access them. Also allows future
reuse for other commands, such as camget.
pkg/client/android.go

-adapted camput to the above changes:
cmd/camput/android.go
cmd/camput/camput.go
cmd/camput/files.go

-server prints a hint when it generates the self-signed:
pkg/misc/misc.go
server/camlistored/camlistored.go

-camliactivity:
clients/android/res/xml/preferences.xml
clients/android/src/org/camlistore/Preferences.java
clients/android/src/org/camlistore/SettingsActivity.java
clients/android/src/org/camlistore/UploadService.java
clients/android/src/org/camlistore/UploadThread.java

http://camlistore.org/issue/131

Change-Id: I6be20161549a69aafc8eb7b9e96e9351dc1c5b09
2013-04-23 17:10:37 +02:00
mpl 0b873649cb camput: change "name" option to "title".
Title is the attribute used in the ui, and actually recorded
by the indexer, so having "name" in camput was not consistent.

Change-Id: I6f63e54e3b19a83031f3c56c717b27336b175284
2013-04-22 17:13:50 +02:00
mpl 1148a51b09 camtool dbinit: sqlite support
Change-Id: I649a28e52df8d2689daa784dd2b1c06770e4b857
2013-03-20 18:10:57 +01:00
mpl f1c5a12085 Merge "website doc: cmds: golang style + install command" 2013-03-15 22:05:26 +00:00
mpl e6a5882511 website doc: cmds: golang style + install command
Change-Id: I4f38dfb87e066ef81881bc9a2262c52109e172c9
2013-03-15 23:18:09 +01:00
mpl cca2ce6cd8 cmd: clean up obsolete camsync dir
Change-Id: Idfb82c175a5dd0b73ef277b289aeac29319b753d
2013-03-15 19:36:00 +01:00
mpl 698e8605e6 website: /pkg/ and /cmd/ work.
-added some doc.go for each command to make /cmd/*
work nicely.
-hacked a bit of style, mostly borrowed from golang too.

Change-Id: I011d70bca2c0151a29dfd53c78a896821730d5fb
2013-03-15 16:40:44 +01:00
Andrew Gerrand eb81f69fdd implement camtool sync -thirdleg flag
Fixes issue 92.

Change-Id: Ib6d5620a98d197d84f6f2954dbcbc14eaaa8e228
2013-03-11 21:09:25 +11:00
mpl 1838fe8fa6 cammount: fix for bug I introduced in 2384f368f6
Change-Id: I81e85e65496113166e9716fc553475b4bf23b1b6
2013-03-03 21:50:06 +01:00
mpl 2384f368f6 Merge "cammount: enable share URL as arg (akin to -shared for camget)" 2013-02-27 22:03:41 +00:00
mpl 7b65f21858 cammount: enable share URL as arg (akin to -shared for camget)
https://code.google.com/p/camlistore/issues/detail?id=106

Change-Id: Ib45783c0c89c9fb1d0aa7a3f7d892de9f7e03de7
2013-02-27 23:14:40 +01:00
mpl b5e75e9207 cmdmain: use ExitWithFailure, exit on error instead of returning it
Change-Id: I553bed110394cb8ab48b331ba74d551b840ada5c
2013-02-27 22:04:50 +01:00
mpl 81cb48980e camtool: added dbinit.
Change-Id: I26c58023a5275612dfd2bf85adfd59e8c08baab5
2013-02-27 16:07:02 +01:00
mpl 3a21c89712 camput: fix test. Add descriptions for better help.
Change-Id: I9016fca1dcf36ca5908947e84a5251bf587a83a7
2013-02-26 21:08:24 +01:00
mpl d1a909ea5e camtool: added gsinit, was cmd/camgsinit. Better help too.
Change-Id: Icefe51759db8b89b51f408a66a3d10f2148d7137
2013-02-26 14:45:49 +01:00
mpl 4223b02d52 Merge "camdebug moved as camtool debug" 2013-02-25 14:47:48 +00:00
mpl d2afc53a61 camdebug moved as camtool debug
Change-Id: I54a4ec816b4fdaca8b2476f304e13b23abbe217b
2013-02-23 00:53:03 +01:00
mpl 989092a39b camput: do not parse flags before AddFlags
Change-Id: I514a89999e0e2e71b97d586bd0baa74ff0330472
2013-02-22 23:27:39 +01:00
mpl 317c87c189 Merge "Create camtool cmd, with sync subcommand." 2013-02-20 22:47:33 +00:00
mpl 59d0d6cb7e Create camtool cmd, with sync subcommand.
Code in common with camput was factorized in pkg/cmdmain/
Partly addresses
http://code.google.com/p/camlistore/issues/detail?id=117

Change-Id: Iabebea7ea78e56bdb8a6eccee9456c52bfe9cceb
2013-02-20 23:47:17 +01:00
Brad Fitzpatrick 0379ff1d43 camdebug: add exif mode; camlistore.org/issue/118
Change-Id: Ifb58580fda9ca35e2f709b65f7a8c6f7b7fb3061
2013-02-18 19:42:42 -08:00
mpl 59566cd0ab camsync: some verbiage
Change-Id: Id386173d5710021e13dc6a3f9c4ab56dc05edc32
2013-02-14 01:24:20 +01:00
mpl 981a4c9fbd camput: even with -vivify, do not reupload "big" file when server has it
This change takes advantage of Uploader.fileMapFromDuplicate to avoid
reuploading "large" files when the server already has them and the
client has lost its cache (and hence does not know about it).

Fixes: http://code.google.com/p/camlistore/issues/detail?id=88

Change-Id: I9fa819cef37e1d930a5393c9bdce5f8bb71da9c6
2013-02-12 19:02:05 +01:00
Brad Fitzpatrick 1b06c3a8c1 NewCamliFileSystem needs a client. Work on Issue 95.
Change-Id: I417d9d04398e734d88d3139a91309a8f0eb8084d
2013-02-06 21:47:01 -08:00
mpl f7d048d4ee Merge "rm TODO" 2013-02-03 22:50:42 +00:00
Marc-Antoine Ruel 73870dc3c2 Enable the use of localhost as a proxy for debugging purposes.
This is useful to do blackbox performance analysis at the http layer.

Change-Id: Idf26f17e1fd0cb9421b3def9c846c4bffecaa433
2013-02-03 12:26:29 -08:00
Brad Fitzpatrick a8e3cfde54 update TODO
Change-Id: I5075de51cc8fa64658c1d74038a37c3f1a92383c
2013-02-03 10:26:18 -08:00
Brad Fitzpatrick 96ea9af952 camput: add debug mechanism CAMLI_NO_FILE_DUP_SEARCH to disable fileMapFromDuplicate
Change-Id: I1772ed69cccd4245e660887e257da2ab30bd59e4
2013-02-02 21:34:05 -08:00
Brad Fitzpatrick ddcec4e92c Add --version flags to tools.
Change-Id: I1c86c3de09fb59bc20539f7d1efbd4d4710bf494
2013-02-02 10:59:39 -08:00
Brad Fitzpatrick ed40fc89f7 Clean up the clients dir a bit
Change-Id: I1fb8e188044e8a552aa02acedb92c1c9b1d75330
2013-02-02 09:02:43 -08:00
mpl 9ef7e5d2b9 rm TODO
Verified: if a claimDate is set, the client will create
a signRequest that has a signature time set to that claimDate.
Then when the opengpg signing is done, it will use that time
instead of time.Now().

Change-Id: I658d52dadfcea7a9b6f9291c4d8020ac0efa83b5
2013-02-01 16:09:58 +01:00
mpl 0b2532d96a camput: s/androidStatusRecevier/androidStatusReceiver/
Change-Id: I9cefc638b821948fad911c3e51e4a07c4da655b0
2013-02-01 15:52:39 +01:00
Brad Fitzpatrick e8ef81c626 android/camput: more stats
Change-Id: I668b8ee0b7c32d33075e421445af2973be1f576a
2013-01-30 17:22:53 -08:00
Brad Fitzpatrick dfb45e6784 camput/android: more stat tracking. camput side only so far.
Change-Id: Ifbafda6f5fae01db44cfd557f7b3e81433f85e70
2013-01-30 10:56:10 -08:00
Brad Fitzpatrick 0c2aa8058a android: TODO notes for camput
Change-Id: I751756a6d69bda73ecc5e6b3bd52e7b8b523cc1c
2013-01-29 17:12:32 -08:00
Brad Fitzpatrick 5945b3a7dc campt: in android mode, also notify on skipped chunk uploads
Change-Id: I25e6991c3d8a0703f00091154258e1d5073a28a2
2013-01-29 16:39:18 -08:00
Brad Fitzpatrick 14f038c667 android: working but kinda-sucky progress bars. need camput to broadcast better stats.
Change-Id: I28e6a16eba835116d8e8e205fe71073e0357b9c7
2013-01-28 21:52:23 -08:00
Brad Fitzpatrick 502026bd89 android: UploadThread re-work. use pipe-to-camput-stdin model, and be more Go-like.
Change-Id: I0f598dae28e47036bf713bfde488a7af0884e932
2013-01-28 19:06:37 -08:00
Brad Fitzpatrick 34d1588a6f camput: add android child process input/input mode
Change-Id: I54c80b958c3610b5f9e9b229f68f626553241d47
2013-01-28 17:17:46 -08:00
Brad Fitzpatrick f1dc25c9c5 camput: move initCache to its own function
Change-Id: I1d2029652fe4215a71b89bce178e6df8c40826b9
2013-01-28 07:14:11 -08:00
Brad Fitzpatrick f5a588527b android: untested: more upload / status work
Change-Id: I15dbf861b0bd8684a4e61a09f910315b874db1ed
2013-01-27 17:12:08 -08:00
Brad Fitzpatrick dc49611c53 android: clean-up and start of protocol from camput to android host
Change-Id: Icda33c1d54bdcd0a57f6ac62c09fd3e9cf9cd6f7
2013-01-27 15:27:17 -08:00
Brad Fitzpatrick 2ef8612595 camput: android dialer cleanup
Change-Id: I7f3749cc81029b5a24a3d8696660c79aefdffa84
2013-01-26 17:12:07 -08:00
Brad Fitzpatrick 51e88c7434 camput: run in an Android linux non-cgo environment.
Teaches it about Android DNS resolution and Android SSL root certs.

Change-Id: I22b53d4f836f58cd3dfc8c97e993138a8a5fe318
2013-01-26 16:50:24 -08:00
Brad Fitzpatrick c7bbccf435 config: Rename blobServer config key and flag to just server. use auth from environment when an explicit server is given
Change-Id: I07cfe3df3b644e143fcb92456e56d238bbbdd52e
2013-01-25 16:23:31 -08:00
Brad Fitzpatrick cfc32e4a05 schema, camget: more work on deleting the Superset type.
not much more remains.

Change-Id: I6cfe4145f67b100a0e2509f88ce6e1c580b7f9fe
2013-01-22 09:32:40 -08:00
Brad Fitzpatrick 1bf01d7315 schema: lot of Blob/Builder work, and kill schema.Map.
Next up: unexport schema.Superset.

Change-Id: Ia4bb34790abba75bdb4d4101df7a4f15875f4237
2013-01-21 20:56:12 -08:00
Brad Fitzpatrick 02e3c08947 schema: start of eliminating/unexporting schema.Superset and schema.Map
For now, unfortunately, there are even more types. The old ones will hopefully die soon.

Change-Id: I9d0bb1743c94a0de429175ef0b05ad6a964e07c0
2013-01-21 17:31:08 -08:00
Brad Fitzpatrick 7ceaaa0012 blobref: simplify the FromHash func. Make type implicit.
Change-Id: I2e01c3663bdb1151c11dfc9a1d59c7081940ffac
2013-01-20 13:36:27 -08:00
Brad Fitzpatrick 7c319ca284 pkg/cacher: unify the cammount and camget disk caching code
Change-Id: I8e53d00f1f5459856a4e2b863d74c2b7c3f515bc
2013-01-20 09:52:03 -08:00
mpl ff382ceef5 camput: concurrent tagging
Change-Id: Ice7a77d030087648187c1c8ad37888a1a9f406ca
2013-01-17 23:20:40 +01:00
mpl 8268b2a298 camsync: set logger for all clients
Change-Id: I9d3e9eeeadbceebbd7ef371e4e405a2cea202282
2013-01-17 01:24:42 +01:00
mpl bb665b9584 camsync: added --all flag
and some guessing/discovery for --src.

This option enables camsync to discover the sync handlers on the
source server, and use that information to run all possible syncs.

Change-Id: Ie1f3c309780a168372a674c6c3a18f679a67d804
2013-01-17 00:37:40 +01:00
Brad Fitzpatrick dd72cd4434 schema: verify no slashes in fileName in FileNameString accessor.
Change-Id: I1b02e67144fed1f80123530786af55c74bd64f36
2013-01-13 20:43:55 -08:00
mpl 77d044f4b7 schema: add FileTime to guess the file
creation time from potential file metadata.
camput: add the -exiftime option that allows
the use of the above for -filenodes and -vivify.

Fixes: http://code.google.com/p/camlistore/issues/detail?id=77

Change-Id: I05d1af3d875bb984e47e06775fd149e5ed0ed7b1
2013-01-10 17:43:05 +01:00
Brad Fitzpatrick d689b8df88 camget: say the cache dir if verbose
Change-Id: Ic9e8fa9379e354d920e8c896fbcd4f3a861dfe20
2013-01-06 10:44:50 -08:00
Brad Fitzpatrick 3e5940a7ff camget, schema: read chunks more aggressively
Change-Id: I31bc3a145fc2f3a51c3cecbaa33872da077e7bd7
2013-01-05 23:12:42 -08:00
Brad Fitzpatrick ff9492c6cd camget: buffer the workc channel
Change-Id: Ic6bf443c4d91f240b0b86c34a33bf74a1f2b627f
2013-01-05 16:44:43 -08:00
Brad Fitzpatrick 9f6776dddb camget, httputil: more verbose HTTP debugging
Change-Id: I2fc1a1fe0fff99202245d391a8a76e9fab07adc2
2013-01-05 16:44:34 -08:00
mpl 39218e3cd5 Merge "Changed auth to take into account not only the credentials, but the requested operation/action too." 2013-01-04 21:09:37 +00:00
mpl 12213c058e Changed auth to take into account not only the credentials,
but the requested operation/action too.

This allows to restrict vivify credentials to only upload
(as well as get and stat, because they're needed) to the
blobserver.

Change-Id: Idaed60d1f0d679cb9795ba9a11f094f964774335
2013-01-04 22:17:12 +01:00
Brad Fitzpatrick c89dbc7130 camget: put a local disk cache in front of the client.
a simple localhost test with only 4.4 MB and 4 files drops from 350 HTTP requests to 76.

more work to be done, but this is better.

Change-Id: I66ed67fe95ddd30aeefe742395874b2eabc237c7
2013-01-03 17:55:30 -08:00
Brad Fitzpatrick fe13c7c712 move camput's statsTransport to httputil.StatsTransport, use it in camget too.
Change-Id: Iab48e32ccb8a99b8ec6b058061cff9a5b99e8712
2013-01-02 20:32:13 -08:00
Brad Fitzpatrick 8866e88db0 camget: do 10 at once. better, much pref work remains.
Change-Id: Ib2e159a8a290aff249fbec109d4e76099fa0491a
2013-01-02 15:13:22 -08:00
Brad Fitzpatrick 827feaa3ac camget, client, schema: start of camget --shared support. see flag docs.
Change-Id: I5dd43129cb0032821a5913a8f20da0ddb38c63da
2013-01-02 12:55:12 -08:00
Brad Fitzpatrick edd5cff32a camget: fix directory restoring
Change-Id: I16c433fdda8a3220befd33309b1a31bbb69c0e58
2013-01-02 11:23:00 -08:00
Brad Fitzpatrick 378b854479 camget: use bytes.NewReader instead of bytes.NewBuffer
Change-Id: If51c47f356460b32355836e67a1ce443c071b65c
2013-01-02 09:20:35 -08:00
Brad Fitzpatrick 6b7d73d757 camput: ignore atimes
Change-Id: Ia55d6fef6a8e3aa95b6265c958853da7b170e3c4
2013-01-01 21:05:02 -08:00
Brad Fitzpatrick 6b466d0faa camput, client: push havecache down deeper, make it track blob sizes.
also, clean up some camput HTTP stuff.

Change-Id: I2762e5a1b83139132b5f660d306ed45584a7799a
2013-01-01 20:23:44 -08:00
Brad Fitzpatrick f8df0845ea camput: Don't use statcache when using vivify
Change-Id: I2c450afd36efdcd2d0fbd16023435936fbc43397
2013-01-01 13:29:15 -08:00
Brad Fitzpatrick 57a60aa944 camput: flatcache TODO.
Change-Id: I4e2368f8e22d5aa71bee8f5319f59444f3c0e638
2012-12-31 13:53:44 -08:00
Brad Fitzpatrick 519c46a388 camput: add FileInfo.Sys fields to stat fingerprint
Change-Id: Idc6af6e945c922aacbf2b51dbed70f4f8e20ab2a
2012-12-31 13:52:17 -08:00