Commit Graph

209 Commits

Author SHA1 Message Date
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