Commit Graph

26 Commits

Author SHA1 Message Date
Brad Fitzpatrick d6a0b05df0 Rename import paths from camlistore.org to perkeep.org.
Part of the project renaming, issue #981.

After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.

This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.

Also, this only moves the lru package to internal. More will move to
internal later.

Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.

This updates some docs, but not all.

devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).

Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
2018-01-01 16:03:34 -08:00
mpl 28bc007676 pkg/serverinit: add low-level config generation for Backblaze B2
Fixes #971

Change-Id: Iba944e3597009b18a380007b72fba5127e9a1698
2017-10-26 19:59:01 +02:00
mpl 5a24ffd854 new app: scanning cabinet
WARNING: this app is still experimental, and even its data schema might
change. Do not use in production.

This change adds a Camlistore-based port of the scanning cabinet app
originally created by Brad Fitzpatrick:
https://github.com/bradfitz/scanningcabinet

Some of it is inspired from the App Engine Go port of Patrick Borgeest:
https://bitbucket.org/pborgeest/nometicland

The data schema is roughly as follows:

-a scan is a permanode, with the node type: "scanningcabinet:scan".
-a scan's camliContent attribute is set to the actual image file.
-a scan also holds the "dateCreated" attribute, as well as the
"document" attribute, which references the document this scan is a part
of (if any).

-a document is a permanode, with the node type: "scanningcabinet:doc".
-a document page, is modeled by the "camliPath:sha1-xxx" = "pageNumber"
relation, where sha1-xxx is the blobRef of a scan.
-a document can also hold the following attributes: "dateCreated",
"tag", "locationText", "title", "startDate", and "paymentDueDate".

Known caveats, in decreasing order of concern:
-the data schema might still change.
-the scancab tool, to actually create and upload the files from physical
documents, is practically untested (since I do not own a scanner).
-some parts, in particular related to searches, are probably
sub-optimized.
-the usual unavoidable bugs.

Change-Id: If6afc509e13f7c21164a3abd276fec075a3813bb
2017-02-15 17:14:45 +01:00
mpl 620388bd57 server/camlistored: request a name in camlistore.net
In order to use HTTPS, one must have a certificate, and one must have a
domain name for which the certificate is valid.
The first part is solved by the use of Let's Encrypt. For the second
part, we want to provide to any Camlistore instance a name such as
<gpgKeyId>.camlistore.net, where gpgKeyId is the fingerprint of its GPG
key. The DNS for camlistore.net agrees to add a record for that name if
and only if the Camlistore instance can prove it owns the GPG key, as
well as the IP address bound to that name in the DNS record.

A protocol such as the above is already implemented in pkg/gpgchallenge.

This CL:
- uses the client-side of the gpgchallenge protocol in camlistored, so
that it can claim a hostname in camlistore.net on startup (and then use
that hostname when requesting a certificate from Let's Encrypt).
- adds the configuration parameter "CamliNetIP" for the high-level
config. This parameter specifies the IP address that camlistored will
supply during the gpgpchallenge, so it can  prove to the DNS server that
we own this address.

Fixes #722

Change-Id: I6bf4ec149b6dffd0ae93a6fa7bf208b2e8a05445
2017-01-13 00:43:24 +01:00
mpl 885389a10f app/publisher: use autocert too when Camlistore does it
As the requests to the publisher are proxied through Camlistore's app
handler, there's no point in the publisher having its own autocert
Manager to request a certificate. Therefore, the publisher reuses
(readonly) camlistored's autocert CacheDir to get its certificate.

It follows that, for now, Let's Encrypt only works for the publisher if
it is running on the same host as camlistored (or more precisely, if they
share the same filesystem).

Fixes #458

Change-Id: Icf3be2913f85f9ec6f94b831ad58e1949b4d6961
2016-12-14 01:24:30 +01:00
mpl 0367de7b61 publisher: restore SourceRoot configurability
This change allows the publisher to use resources from a SourceRoot
directory, without having to rebuild the publisher binary, instead of
only using embedded resources.

Change-Id: Ife29e3015b8595a33f175a62d98fcf5ffa689134
2016-08-22 21:51:58 +02:00
mpl 65343d114d pkg/server/app: improve app handling
These improvements on the server app handler should help writing
and running stand-alone apps.

The two main goals are:
1) "simple" configurations should work automatically; the parameters for
the app are derived from the Listen and BaseURL of the Camlistore
server.
2) More advanced configurations, such as being behind a proxy, should be
easily configurable through the app's Listen, BackendURL, and ApiHost
parameters.

I had worked on them while doing the scanning cabinet app, and I am
backporting them now since we haven't landed the scanning cabinet yet,
and people have been having trouble setting up the publisher.

pkg/app/app_test.go is gone because app.ListenAddress is now dumb. The
hard work is done in pkg/server/app instead.

Fixes #818

Change-Id: Ice2610d6bac611b209cc3a928e67fa6093a41d3e
2016-07-04 22:21:16 +02:00
Mathieu Lonjaret c914e6cad5 Merge "pkg/serverinit: fix blobpacked_index genconfig for GCS" 2016-05-03 23:17:55 +00:00
mpl e9ae7b016c pkg/serverinit: fix blobpacked_index genconfig for GCS
The b.sortedStorageAt call had an empty filePrefix argument, which
means it would fail if the current index was not a DBMS (but a
file-based DB).

Also, this change adds a default "blobpacked_index" database name value
for the case when a user wants a DBMS index, but hasn't configured a
DBNames map.

Issue #693

Change-Id: Ie4386e789542c006530983e20bccc7a564bc4ee3
2016-05-04 01:15:33 +02:00
mpl 63d6e384bb path fixes for third_party move
A few more left in in misc/docker that I'll do separately

Related: 75d60962f6

Change-Id: Id5f6a3729e33aca97f8664ca8ef91afc64461891
2016-04-21 12:25:17 -07:00
Will Norris 77ed42edf8 add canonical import paths
The import path was added to the go file that included the package
documentation if one existed.  Otherwise, I used what seemed to be the
primary file for the package.

Fixes #689

Change-Id: If51be0e86529fd6f179e80af6781e639f8550fd2
2016-03-13 19:57:14 -07:00
mpl e0d719ba21 pkg/types: remove
Most of it replaced with vendor/go4.org/types and
vendor/go4.org/readerutil

u32 went where needed in pkg/blobserver/*
invertedBool went in pkg/types/serverconfig
atomics64 went in pkg/fs

Change-Id: I230426cda35be4b45ed67e869f14e6fdae89be22
2016-02-05 18:28:47 +01:00
mpl 92d5c1d045 pkg/blobserver/s3: directory & blobpacked support
Fixes issue #529

Change-Id: Iea7aea015b58c0325887fa07ae3a004b7822511e
2015-12-16 23:58:27 +01:00
mpl b78ce17e13 serverinit: add genconfig for blobpacked on Google Cloud Storage.
And enable it (blobpacked) on GCE.

Change-Id: I7b51c186325e80987e48d32392d88bb4c30ee3d5
2015-02-04 19:08:43 +01:00
Brad Fitzpatrick 3026631521 serverinit: move incompatible option checks further down, into the right places
I was getting bogus errors because I replicate to s3, but the
s3+blobpacked error should only come up if s3 is primary.

Also, document the database key used for blobpack's index when mysql
or another db is in use.

Change-Id: I21a1815715f70edc3f98abf7209744703aaf6d3b
2015-01-18 19:04:31 -08:00
Brad Fitzpatrick 4155ac6a3c serverinit: high-level config support for using blobpacked
Users need to set:

     "packRelated": true,

... in their server config. This will probably become the default
value in the future.

This is currently mutually exclusive with diskpacked, which isn't good
at deleting things, and blobpacked loves to delete things (from the
loose blobs).

Updates #532

Change-Id: I8f4ea9406859b2705f26e9d1103d3acf9d1a8411
2015-01-18 18:08:18 -08:00
mpl 8481c2236d blobserver/cloudstorage: directory support
http://camlistore.org/issue/528

Change-Id: I9d26b85af1cf91d1f2b102c7bfb80628af4d1e4d
2014-11-26 00:40:19 +01:00
mpl 9b68fd9f32 serverinit: syndtr/leveldb support
Change-Id: Id48a00f3896c38659a53cf131493d5a19dbfe4b7
2014-10-11 15:40:29 +02:00
mpl 95885192eb serverinit: enable memory storage in config
http://camlistore.org/issue/416

Change-Id: Idde32273ed651a5876581ad0ea06010970b92a9b
2014-09-11 01:11:07 +02:00
mpl bb49185463 serverinit: add support for memory-only indexer. Enable in devcam.
To avoid confusion, the previously named "memoryIndex" configuration
parameter, which actually meant to slurp the index into the memory
corpus, has been renamed to "copyIndexToMemory". "memoryIndex" is now
the parameter to enable a memory-only indexer.

http://camlistore.org/issue/416

Change-Id: I7026e5463fda3a1887a88e0b07d4e3431c60c8b7
2014-08-26 22:46:13 +02:00
Brad Fitzpatrick 6e7d3e3e1e serverinit: clean up and simplify the high-to-low-level config generator
Change-Id: Ia45457718fb8832b4da32d4d6c87c8a5ba9e2301
2014-08-07 18:47:42 -07:00
Brad Fitzpatrick c3a3883395 googlecloudstorage: whren running on GCE, get access tokens automatically from the VM
Change-Id: Ibfcca0c52ff01a8f82bb0d3081119e0ac6e16ba9
2014-08-02 19:29:57 -07:00
mpl 736648ce9c publisher app: SSL support
http://camlistore.org/issue/458

Change-Id: I89013a345dbe06fd02c877422cadb8d6def1580d
2014-06-16 19:41:22 +02:00
mpl a34f9e2669 publisher app
http://camlistore.org/issue/365

Change-Id: I281fdcbbe6a2bdf15607e75a21bc93b453f82c85
2014-06-15 00:03:03 +02:00
Tamás Gulácsi 65fa5d6d3e Picasa: add importer.
Imports all images from all albums, and puts each image in its album.
Each album is linked under "Picasa (<username>)".
Tries to skip already imported files (check based on album/filename).
See Issue #391.

Change-Id: If00751671a429891c05bbe41f59c1421b2ff2de8
2014-03-17 10:52:51 +01:00
mpl 6707837806 pkg/types/serverconfig: json-tagged struct
Also changed the TLS/HTTPS config keys for consistency.

http://camlistore.org/issue/339

Change-Id: I704ec129f91b93ebb20bc1191816166a2f10692d
2014-02-10 21:49:11 +01:00