Commit Graph

950 Commits

Author SHA1 Message Date
Brad Fitzpatrick 3fa6d69405 client: be robust against servers/proxies returning compressed content
Change-Id: Id87c26a7d6e6d3f794a5421ece7cd344b10e1a8b
2013-11-24 18:27:41 -08:00
Brad Fitzpatrick 2fb3d06d49 Remove dependency on the testing package from pkg/index. Polluted flags.
Change-Id: Id5492fcab022c03e40501830d9253b5605a14ee6
2013-11-24 17:45:45 -08:00
Brad Fitzpatrick 4c01434929 blobserver: run blobhub receive hooks in parallel.
Change-Id: I918a124a01a2d75a64c26e136d28ed7f2547509d
2013-11-24 17:12:56 -08:00
Brad Fitzpatrick cf388c2f2a sync: have handler register receive hook with its source.
Lets legacy configs work, even without replicating directly to it.

Change-Id: I8bdb8651040794ae346f19d6dd67a0da07505f07
2013-11-24 16:20:11 -08:00
Brad Fitzpatrick b9fd11a8f6 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2013-11-24 15:13:24 -08:00
Brad Fitzpatrick eae8a74fc9 serverconfig/genconfig: add kv queues to all sync handlers.
In the future this might be more configurable (e.g. mysql or sqlite or whatever, or different
paths).  But this works for now.

Change-Id: I85853e6bfdd9063fc2eba5922b138d5552b730a9
2013-11-24 15:12:11 -08:00
Brad Fitzpatrick f4294cecdf Format pkg/serverconfig/testdata golden files consistently. No semantic changes.
Change-Id: I8c190baf6514a2cf0580da45220d411b81445733
2013-11-24 15:08:47 -08:00
Brad Fitzpatrick a7f7fb8741 serverconfig test: simplify pretty-printing, use test.Diff, add flag to update golden files
Change-Id: I8c259dad8fc6f161f25fb4f63f97c4aef4b703b0
2013-11-24 15:04:20 -08:00
Brad Fitzpatrick 26f9b630f8 Add func test.BrokenTest and RUN_BROKEN_TESTS to doc/environment-vars.txt
Change-Id: I43dc7b10ac6175ab8ab5eae4cfdd98bc08515ff5
2013-11-24 15:00:16 -08:00
Bill Thiede 60e10a99ad blobserver/diskpacked: Remove TODO, close index.
https://camlistore.org/gw/1f407edd588d8ae33475818d891fc0e0058d1628 makes this
possible.

Change-Id: Ibf21f7f7d3c11139192599d6e18fa0aa5dbc7007
2013-11-24 14:28:01 -08:00
Brad Fitzpatrick 1f407edd58 sorted: add Close method to KeyValure; register 'kv' impl type for cznic/kv
Change-Id: Ie4e21450dac9dad3433c65631706f52527502cbc
2013-11-23 21:07:03 -08:00
Brad Fitzpatrick 2f802e7ecd Fix blobhub test, broken in earlier commit. :/
Change-Id: I0c6d1ab672387afcdca7af878be00745c4c29e6f
2013-11-23 21:05:52 -08:00
Brad Fitzpatrick 3ccdb025c0 sync: add forgotten channel close.
Change-Id: Ie6d14b0bad1229fc775dc9a0afda349ee163cbda
2013-11-23 11:20:08 -08:00
Brad Fitzpatrick 62fbbb61a0 encrypt: use key metaIndex for index, not meta; that was used. fixes devcam server.
Change-Id: I483c696dcc3402537bec136f8847c17767760b3b
2013-11-23 11:11:05 -08:00
Brad Fitzpatrick 2a781196e7 Add BlobHub.AddReceiveHook; clean up docs, clarify how to use BlobReceiver.
Change-Id: Icc5b55fcbabc852c7cacc9a806f12098d5e59377
2013-11-23 11:09:06 -08:00
Brad Fitzpatrick ab19715dc6 docs and TODOs
Change-Id: I434c4d00a4dd63d338646376a563f69b122a3c53
2013-11-23 09:09:40 -08:00
Brad Fitzpatrick b0b054ca27 Doc tweaks
Change-Id: I7c4cdd9b0cc37b2a40084f1cf11b81d8ce3a39fa
2013-11-23 09:00:18 -08:00
Brad Fitzpatrick 8cd6084aef Merge "Display a folder icon and make camliPath attributes navigable." 2013-11-23 16:04:57 +00:00
Brad Fitzpatrick 90c1e48afe Rename index.Storage to sorted.KeyValue and move it into a new package.
Having index.Index and index.Storage both in the same package led to
confusing discussions about "an index". Better names now, and smaller
packages.
2013-11-22 23:24:54 -08:00
Aaron Boodman 650bd9b61e Display a folder icon and make camliPath attributes navigable.
Like we do for camliMember.

Change-Id: I2db51d7397e0f8ab86ea71716fe06099ba22005a
2013-11-22 22:49:07 -08:00
Brad Fitzpatrick 70475701d1 Get rid of QueueCreator and all its associated complexity.
Previous TODO entry was:

-- Get rid of QueueCreator entirely. Plan:
     -- sync handler still has a source and dest (one pair) but
        instead of calling CreateQueue on the source, it instead
        has an index.Storage (configured via a RequiredObject
        so it can be a kvfile, leveldb, mysql, postgres etc)
     -- make all the index.Storage types be instantiable
        from a jsonconfig Object, perhaps with constructors keyed
        on a "type" field.
     -- make sync handler support blobserver.Receiver (or StatReceiver)
        like indexes, so it can receive blobs.  but all it needs to
        do to acknowledge the ReceiveBlob is write and flush to its
        index.Storage. the syncing is async by default. (otherwise callers
        could just use "replica" if they wanted sync replication).
        But maybe for ease of configuration switching, we could also
        support a sync mode.  when it needs to replicate a blob,
        it uses the source.
     -- future option: sync mirror to an alternate path on ReceiveBlob
        that can delete. e.g. you're uploading to s3 and google,
        but don't want to upload to both at once, so you use the localdisk
        as a buffer to spread out your upstream bandwidth.
     -- end result: no more hardlinks or queue creator.

Change-Id: I6244fc4f3a655f08470ae3160502659399f468ed
2013-11-22 14:33:31 -08:00
Brad Fitzpatrick f94dbb35fa serverconfig: show the prefixes in config cycles.
Change-Id: I3ab42efa7e4d80f15ee338411c010beb11518c86
2013-11-22 13:59:16 -08:00
Brad Fitzpatrick a57de74641 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2013-11-22 12:57:55 -08:00
Brad Fitzpatrick e25db602ba Register the 'memory' index type.
Change-Id: If697de1c3c63b2a1990353fc3ba1713f89e27d50
2013-11-22 12:57:45 -08:00
Aaron Boodman 9855ab281d Flickr importer: import sets and populate with links to photos.
Change-Id: I6c53dade3e96373fb3fb9ea4b172c53d5e22d988
2013-11-22 12:21:03 -08:00
Aaron Boodman 08ea4ed13e Flickr importer: Don't refetch or import unmodified photos.
Change-Id: I2ade0aa70e3caca8c3c1153ffee448d09d819da6
2013-11-22 10:13:21 -08:00
Aaron Boodman 376fb91747 Merge "Flickr importer: store credentials in Camlistore, not weird JSON file." 2013-11-22 17:50:49 +00:00
Aaron Boodman 93b0bbbee5 Flickr importer: store credentials in Camlistore, not weird JSON file.
Change-Id: I07ed4e9043c9fa448425144886dc3b7047c4e85b
2013-11-22 09:50:03 -08:00
mpl 8f5d54361f serverconfig: fix tests because of previous publish config changes
Change-Id: I643b31be80dcc86b4cdb76bc8a9012dcb57e65ee
2013-11-22 18:14:01 +01:00
Mathieu Lonjaret f8348c5875 Merge "buildbot/master: add Basic Auth support." 2013-11-22 15:29:06 +00:00
Bill Thiede 738783ebf4 buildbot/master: add Basic Auth support.
Moved BasicAuth parsing and localhost detection code from pkg/auth ->
pkg/httputil for use by buildbot master.

Added user config file for remote access.  The file's name is
"masterbot-config.json" and is located in osutil.CamliConfigDir(),
which on Unix will resolve to $XDG_CONFIG_HOME/camlistore/, if
XDG_CONFIG_HOME set, or ~/.config/camlistore/.  On Windows it will be
under %APPDATA%\Camlistore\.  The expected format is a json object
with usernames as the keys and sha1 sums of the password as the
values, i.e.:

    {
        "user1": "1234567890abcdef12341234567890abcdef1234",
        "user2": "1234abcdef12345678901234abcdef1234567890"
    }

This file is polled at a 1 minute interval and reparsed if the file's
modification time is more recent then the previous parse attempt.  It
is ok for the file to go missing, it will zero out the remote user
list. A malformed file will result in the master exiting.

New commandline flags, -tlsCertFile & -tlsKeyFile, added.  Specifying
both will enable TLS on the listener specified by -host.  The go
source contains generate_cert.go in crypto/tls that can be used to
generate self-signed cert.pem and key.pem for testing.

Added -skiptlscheck commandline option to builder.  This allows the
builder to report to https:// addresses with self-signed certs as we
don't currently have a way to specify the cert chains to be used
for TLS verification.  This is a stop-gap solution.

When launching a master that listens for secure connections, we
currently need tell the builders to skip certificate validation. Add
'-builderopts="-skiptlscheck"' to the master's commandline to skip
cerfication verification.

Change-Id: I0750b5c9fa8f4def67fc05a841087b50abded2f7
2013-11-21 21:22:12 -08:00
Brad Fitzpatrick 02eb1a6e97 fs: put all importer roots in the roots folder too 2013-11-21 17:51:34 -08:00
Brad Fitzpatrick ed889d38be dummy importer: upload a file and make a node. 2013-11-21 17:51:13 -08:00
Aaron Boodman 7c3a7bd30a Ugh. Make importer.Object.SetAttr() actually ignore duplicate values.
I'm going to spend some time writing unit tests for this next I think.

Change-Id: Id19f24882f33adea4060ff852a986626ea8de171
2013-11-20 23:57:11 -08:00
Brad Fitzpatrick c5037b76e6 Fix thumbnails, broken in cb31dd58d2
Change-Id: I82defd54f53d4f6c1a594185d5e9b7d3a4a92c07
2013-11-20 17:44:10 -08:00
Brad Fitzpatrick 838a59c56f Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2013-11-19 15:28:20 -08:00
Brad Fitzpatrick bbabdfc8a6 index: move Storage interface to its own file, start of constructor registration system
Change-Id: I49547ec8cd12e2f559876fa17063d7f16e73195d
2013-11-19 15:28:13 -08:00
mpl f8b41e236e Merge "server/publish.go: use go html template for publishing" 2013-11-19 22:22:17 +00:00
mpl 8350f15547 Merge "pkg/index: write relevant keys when receiving a delete claim" 2013-11-19 17:03:04 +00:00
mpl c81f3147f6 pkg/index: write relevant keys when receiving a delete claim
This change:

1) Checks if the incoming claim is a delete claim with the use
of GetBlobMeta.

2) write the keyDeleted and keyDeletes keys when it's a delete
claim, plus the usual keys when the target is a permanode.

Yet to be done in the next CLs:
1) update the index deletes cache upon reception of a delete claim
2) update most of the search functions so they use deletedAt properly
3) add new keys necessary for GetRecentPermanodes to give a fully
correct result.

I also made indextest.DumpIndex public because it turned to be useful
to debug within pkg/search/ as well.

http://camlistore.org/issue/191

Change-Id: I8d8b9d12a535b8b1de0018b4a0e359241f14d52a
2013-11-19 18:02:12 +01:00
mpl a6aeff034c server/publish.go: use go html template for publishing
Change-Id: Ic1c55d35e52e407864d339927b453de58a64e03c
2013-11-19 17:50:26 +01:00
Aaron Boodman 2a747ccd56 Add ability to specify flickr config for devcam.
Change-Id: Ic1139730d969558e2d6375dd86c6741e3dfd2b9b
2013-11-18 21:16:09 -08:00
Brad Fitzpatrick 531b4dc32b search: remove MIME from DescribedBlob; fix Handler tests.
Change-Id: I2d92155e3446325520d91379ac24becef49ca56f
2013-11-18 16:36:08 -08:00
Brad Fitzpatrick d0916a6802 Merge "Actually import the first 100 photos from Flickr." 2013-11-18 06:29:33 +00:00
Aaron Boodman e3d71c34d1 Actually import the first 100 photos from Flickr.
Currently this just imports the title, description, and image data.

Change-Id: I95de17cddb0ac18eec05f8ee288764b04cd7f406
2013-11-17 21:58:06 -08:00
Brad Fitzpatrick 48dba353e9 query: make all tests test in all three modes.
Change-Id: I945830ddb3bfe68a7223994b94d780b46503c95e
2013-11-17 20:20:27 -08:00
Brad Fitzpatrick cb31dd58d2 In-memory search: include FileInfo. More tests pass.
Change-Id: Ic33357b63d1d57dc174fe18360e920730016c903
2013-11-17 19:49:19 -08:00
Brad Fitzpatrick 84077b6d34 New package: strutil
Change-Id: I74ea770ed59ce9a5aa2fdea10b37c418fab50598
2013-11-17 19:31:12 -08:00
Brad Fitzpatrick e8603b1293 Put claims in memory too for in-memory search. Required index schema version bump.
Change-Id: I194d65476bddea111277cd0b1472c56b5527226b
2013-11-17 16:52:51 -08:00
Brad Fitzpatrick bd11fd5cb9 importer: some TODO notes
Change-Id: Ia92be507092722d5751f42ec3c21e18cfc4cb7f0
2013-11-17 15:00:46 -08:00