Commit Graph

102 Commits

Author SHA1 Message Date
mpl 2c2ce61ffa schema: missing claimType conversion
Change-Id: I92edb2b3148df8b79c6c39ea88a8c7d04cf3f789
2013-11-04 22:57:05 +01:00
Brad Fitzpatrick 05f11b5bbc schema: avoid a potential crash.
also, bb.m should only contain a string, not a typed string.

Change-Id: I235beaa460c8463f65be93ac6c78c8481fe1b758
2013-11-02 18:13:40 -07:00
mpl d4b5e413a2 schema: add delete claim
Also rename other claim types for consistent style.

http://camlistore.org/issue/191

Change-Id: I1dc1283bd961481ad793b92262cf5ce641d9fdc8
2013-11-03 00:37:49 +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
Brad Fitzpatrick 4cc81262b4 schema: clarify that WriteFileFromReader's filename is optional
Change-Id: I0df3783b282492db1dac29ed3c07e9a38df30a5e
2013-10-20 12:24:32 -07: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
mpl 304f5c4b38 camput attr: support -del
Change-Id: I28460fed5b572ba9a83cfcb04f38e42124fa723f
2013-10-03 15:07:43 +02:00
Brad Fitzpatrick 99ea128752 schema: fix a race on errors in FileReader.GetChunkOffsets, add tests
Change-Id: I51635d01c3c88c5f97ac15172c5b565f07dde350
2013-09-22 13:10:16 +01:00
Brad Fitzpatrick e70f258b0b Merge two copies of StatsReceiver into common location.
Change-Id: I05bd36aef3293927fb518296b43a088f284356ea
2013-09-22 11:19:10 +01:00
Aaron Boodman 43135068a5 Check IsTransitive in share handler and add tests.
Also fix a bug in interpretation of via chain, which caused sharing
to be overly permissive.

BUG=https://code.google.com/p/camlistore/issues/detail?id=226

Change-Id: I4459a67d1b40e4a50f111ce708dbfcbd975f3f15
2013-09-21 13:16:01 +01:00
Brad Fitzpatrick 740b8eec48 Close static-set blob after done parsing it.
Fixes http://camlistore.org/issue/230 I think.

No test, though.

Change-Id: I3b23d7e4c39bd19ba6ca9e33ec382fe3e0fd33f2
2013-09-20 12:23:28 +01:00
mpl 97fe4be9d6 Merge "devcam test, replaces make presubmit" 2013-09-19 15:05:07 +00:00
mpl ba8f88c21a devcam test, replaces make presubmit
http://camlistore.org/issue/223

Change-Id: Iaaea9926a98d7d3335fd6ee52daa225e51ec4703
2013-09-19 17:00:59 +02: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
mpl d488c576fc search: support for static directory children
This change introduces a new index entry
to help with finding the children of a static directory.
It also fixes ResolvePrefixHop so that it takes
into account static directories, and not only collections.

This is the first step to support publishing static directories.

http://camlistore.org/issue/179

Change-Id: I5666e5caa6c782004054ae4c19a6b6119d4fda8b
2013-09-10 23:06:48 +02:00
Brad Fitzpatrick abd2393c06 share: fix shares with no expiration time.
with tests.

Change-Id: I5861104c223de8b4381a69e0ab16998979ca9106
2013-09-08 18:04:54 -07:00
Brad Fitzpatrick 2cf4d68267 Let shares have expiration times.
Change-Id: Iecae106302ba43c354b6987163830cf78a70d12c
2013-09-08 17:46:40 -07:00
Bill Thiede 76338e4d29 schema: fix bug in AsShare, add tests.
Bug in AsShare() falsely returns '{{nil}}, true' for non-share claims.

Change-Id: Ib0443082fb9ca9feaf2015771967ff4bc40ac4b9
2013-08-31 12:11:43 -07:00
Brad Fitzpatrick d293b8fd34 Use pkg/gate in a couple places. Do s3 parallel state. Update TODO.
Change-Id: I23006baa7b454ceca3f07c8fa7789ad54c524849
2013-08-21 19:05:52 -05: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
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
Brad Fitzpatrick b0bff61d30 types: move ReadSeekCloser types from pkg/blobref to pkg/types
Change-Id: I24e2b2a068d9b09479b145409a3b7e5693dd8ac5
2013-07-28 20:08:55 -07:00
mpl febbaf1387 schema: share is a claim with claimType="share"
http://camlistore.org/issue/150

Change-Id: I1dcd1709c886839df507b02beee2e19986783693
2013-06-22 00:48:51 +02:00
Brad Fitzpatrick ca58d8e2e0 Remove noisy var _ = log.Printf lines.
Change-Id: Ia58b8ef5f271f542ae4fe61c7fb1497322770322
2013-06-14 12:55:55 -07:00
mpl 0830902ffb schema: add Share type
This changes allows to get rid of the use of map[string]interface{} in
pkg/server/share.go

Change-Id: Ifeae6b194ff4db679be63d0087cb6d1c5df2f3ca
2013-03-11 21:53:56 +01:00
mpl e6f4a75e87 schema: bugfix, store permanode ref as string in claim
Change-Id: I8ed216f268cc458ea2c79943f956034cea60e38d
2013-02-26 23:48:24 +01:00
mpl a55595ba8e schema: populate claim with permanode too
Change-Id: Ide340baa9ffa6a9cfd2994c2e4fc41383af01a03
2013-02-26 19:21:19 +01:00
Brad Fitzpatrick 3602a03188 schema: add support for multi-claims.
No indexing support yet.

Part of http://camlistore.org/issue/110

Change-Id: Ibeb04ef24e24857a462eeefc7857fda4bbb5dbed
2013-02-25 20:56:20 -08:00
Brad Fitzpatrick fa690ad3d7 schema: support bytes.Reader and strings.Reader in FileTime
Change-Id: Ib42a0478782f7e421e3f3125b1fc876d27d6ee68
2013-02-18 21:29:19 -08:00
Brad Fitzpatrick d2bc6f6cd3 fs: use schema.DirReader, rather than doing it by hand
Change-Id: I7e79621d621314ed1f50219f0cafc44b1b82ab1f
2013-02-18 10:17:38 -08:00
Brad Fitzpatrick 9efdf83d3e schema: use better types in superset: blobref and Time3339
Change-Id: I7004220789e1048c1ebcc8703bf2948a733bae10
2013-02-10 12:58:51 -08:00
Brad Fitzpatrick 0309c22285 schema: work-around fix for Issue 97/100 until 102 is fixed
Change-Id: Ied51ffe2b50acc390d068696ebbe88e60061ef91
2013-02-07 17:12:08 -08:00
Brad Fitzpatrick 16c70de194 schema: fix hang in WriteFileChunks, used by vivify & the Android app
Change-Id: I6099633a300119ef3f0e47266bb6196c475b6378
2013-02-03 22:28:11 -08:00
Brad Fitzpatrick 9eed2f6082 schema: remove FileWriter's serial byte/file schema uploads after chunks are uploaded
Change-Id: I1c3a9c496ce168cc8b6d087ef1a0de99cac22127
2013-02-02 22:35:08 -08:00
Brad Fitzpatrick 6a4eff5b84 schema: make serverHasBlob just use blobserver.StatBlob
Change-Id: I3012763660c9ed87eb48b2d95b8265c3c77f32df
2013-02-02 21:50:03 -08:00
Brad Fitzpatrick 9d339355f0 schema: make FileWriter upload different chunks in parallel
Change-Id: I4608a21ffc45324512a696dfe070b38416aae130
2013-02-02 20:17:14 -08:00
Brad Fitzpatrick f266b843ed schema: simplify WriteFileChunks
Change-Id: Icf9077db0adb5081b93f89ddc9d74a4cc45f20e1
2013-02-02 19:34:23 -08:00
Brad Fitzpatrick ebb6fc85c2 schema: simplify uploadBytes signature
Change-Id: I508934ab83b25ef3a066de9128e16a18a7d82dd3
2013-02-02 10:58:47 -08:00
mpl 83fa932f3c signhandler: inject the claimdate (if present) in the signrequest
This allows to set a signature time (instead of using time.Now()),
so that identical files will result in identical permanodes.

Change-Id: I315c06bd30e8ac5e4d36b0e3f758483c22a31063
2013-02-02 02:48:00 +01:00
Brad Fitzpatrick f1f670079b server.vivify: use the right claim date on all 3 relevant dates.
Fixes https://code.google.com/p/camlistore/issues/detail?id=93

Change-Id: I9d9ab02d47f2ef78f6f690414a04fc5c24f95fac
2013-01-31 17:52:11 -08:00
Brad Fitzpatrick 070592444a schema: unexport Superset
Change-Id: If45569b1b6d72b1cb6450b9d634f59e88fae4851
2013-01-22 10:32:15 -08:00
Brad Fitzpatrick af2b2987c5 pkg/fs: stop using Superset
Change-Id: I890b2376124de129f8035af5b9424f3ba3861895
2013-01-22 10:20:34 -08:00
Brad Fitzpatrick f9ac0ab109 pkg/client: stop using Superset for sharing
Change-Id: I4f034b73584413d3d37f399680c67330783951b2
2013-01-22 09:52:01 -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