2013-06-11 11:14:05 +00:00
|
|
|
Camlistore contributors regularly use Linux and OS X, and both are
|
|
|
|
100% supported.
|
|
|
|
|
|
|
|
Developing on Windows is sometimes broken, but should work. Let us
|
|
|
|
know if we broke something, or we accidentally depend on some
|
|
|
|
Unix-specific build tool somewhere.
|
|
|
|
|
2016-04-27 15:48:50 +00:00
|
|
|
See https://camlistore.org/doc/contributing for information on how to
|
2013-06-11 14:02:32 +00:00
|
|
|
contribute to the project and submit patches. Notably, we use Gerrit
|
|
|
|
for code review. Our Gerrit instance is at https://camlistore.org/r/
|
2012-10-28 11:03:52 +00:00
|
|
|
|
2016-04-27 15:48:50 +00:00
|
|
|
See architecture docs: https://camlistore.org/doc/
|
2013-06-11 11:14:05 +00:00
|
|
|
|
|
|
|
You can view docs for Camlistore packages with local godoc, or
|
|
|
|
godoc.org.
|
|
|
|
|
|
|
|
It's recommended you use git to fetch the source code, rather than
|
|
|
|
hack from a Camlistore release's zip file:
|
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
$ git clone https://camlistore.googlesource.com/camlistore
|
2013-06-11 11:14:05 +00:00
|
|
|
|
2014-03-18 20:21:42 +00:00
|
|
|
(We use github for distribution but its code review system is so poor,
|
|
|
|
we don't use its Pull Request mechanism. The Gerrit git server & code
|
|
|
|
review system is the main repo. See
|
2016-04-27 15:48:50 +00:00
|
|
|
https://camlistore.org/doc/contributing for how to use them. We might
|
2014-03-18 20:21:42 +00:00
|
|
|
support github for pull requests in the future, once it's properly
|
|
|
|
integrated with external code review tools. We had a meeting with Github
|
|
|
|
to discuss the ways in which their code review tools are poor.)
|
2013-06-11 11:14:05 +00:00
|
|
|
|
|
|
|
On Debian/Ubuntu, some deps to get started:
|
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
$ sudo apt-get install libsqlite3-dev sqlite3 pkg-config git
|
2013-06-11 11:14:05 +00:00
|
|
|
|
2013-08-04 21:28:14 +00:00
|
|
|
During development, rather than use the main binaries ("camput",
|
2013-09-04 02:56:42 +00:00
|
|
|
"camget", "camtool", "cammount", etc) directly, we instead use a
|
|
|
|
wrapper (devcam) that automatically configure the environment to use
|
|
|
|
the test server & test environment.
|
2012-12-07 22:14:31 +00:00
|
|
|
|
2013-09-04 02:56:42 +00:00
|
|
|
To build devcam:
|
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
$ go run make.go
|
2013-09-04 02:56:42 +00:00
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
And devcam will be in <camroot>/bin/devcam. You'll probably want to
|
2013-09-04 02:56:42 +00:00
|
|
|
symlink it into your $PATH.
|
2012-12-07 22:14:31 +00:00
|
|
|
|
2013-09-04 02:56:42 +00:00
|
|
|
Alternatively, if your Camlistore root is checked out at
|
|
|
|
$GOPATH/src/camlistore.org (optional, but natural for Go users), you
|
|
|
|
can just:
|
2013-07-29 13:59:53 +00:00
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
$ export GO15VENDOREXPERIMENT=1 # required for all Camlistore builds
|
|
|
|
$ go install ./dev/devcam
|
2013-07-29 13:59:53 +00:00
|
|
|
|
2013-09-04 02:56:42 +00:00
|
|
|
The subcommands of devcam start the server or run camput/camget/etc:
|
2013-07-29 13:59:53 +00:00
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
$ devcam server # main server
|
|
|
|
$ devcam appengine # App Engine version of the server
|
|
|
|
$ devcam put # camput
|
|
|
|
$ devcam get # camget
|
|
|
|
$ devcam tool # camtool
|
|
|
|
$ devcam mount # cammount
|
2013-07-29 13:59:53 +00:00
|
|
|
|
2013-09-04 02:56:42 +00:00
|
|
|
Once the dev server is running,
|
2013-08-04 21:28:14 +00:00
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
- Upload a file:
|
|
|
|
|
2013-08-28 16:40:23 +00:00
|
|
|
devcam put file ~/camlistore/COPYING
|
2016-04-27 19:10:10 +00:00
|
|
|
|
|
|
|
- Create a permanode:
|
|
|
|
|
2013-08-28 16:40:23 +00:00
|
|
|
devcam put permanode
|
2016-04-27 19:10:10 +00:00
|
|
|
|
|
|
|
- Use the UI: http://localhost:3179/ui/
|
2012-12-07 22:14:31 +00:00
|
|
|
|
2013-09-11 17:51:07 +00:00
|
|
|
Before submitting a patch, you should check that all the tests pass with:
|
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
$ devcam test
|
2013-09-11 17:51:07 +00:00
|
|
|
|
2013-10-22 16:01:28 +00:00
|
|
|
You can use your usual git workflow to commit your changes, but for each
|
|
|
|
change to be reviewed you should merge your commits into one before submitting
|
2013-10-23 15:15:05 +00:00
|
|
|
to gerrit for review.
|
2015-07-01 17:41:05 +00:00
|
|
|
|
2013-10-23 15:15:05 +00:00
|
|
|
You should also try to write a meaningful commit message, which at least states
|
2015-07-01 17:41:05 +00:00
|
|
|
in the first sentence what part or package of camlistore this commit is affecting.
|
|
|
|
The following text should state what problem the change is addressing, and how.
|
|
|
|
Finally, you should refer to the github issue(s) the commit is addressing, if any,
|
|
|
|
and with the appropriate keyword if the commit is fixing the issue. (See
|
|
|
|
https://help.github.com/articles/closing-issues-via-commit-messages/).
|
|
|
|
|
|
|
|
For example:
|
2013-10-22 16:01:28 +00:00
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
> pkg/search: add "file" predicate to search by file name
|
2015-07-01 17:41:05 +00:00
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
> File names were already indexed but there was no way to query the index for a file
|
|
|
|
> by its name. The "file" predicate can now be used in search expressions (e.g. in the
|
|
|
|
> search box of the web user interface) to achieve that.
|
2013-10-23 15:15:05 +00:00
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
> Fixes #10987
|
2013-10-22 16:01:28 +00:00
|
|
|
|
2015-01-23 15:16:47 +00:00
|
|
|
If your commit is adding or updating a vendored third party, you must indicate
|
|
|
|
in your commit message the version (e.g. git commit hash) of said third party.
|
|
|
|
|
2016-04-06 18:24:27 +00:00
|
|
|
We follow the Go convention for commits (messages) about new Contributors.
|
|
|
|
See https://golang.org/doc/contribute.html#copyright , and examples such as
|
2016-04-27 19:10:10 +00:00
|
|
|
https://camlistore.org/gw/85bf99a7
|
2016-04-06 18:24:27 +00:00
|
|
|
|
2013-10-22 16:01:28 +00:00
|
|
|
You can optionally use our pre-commit hook so that your code gets gofmt'ed
|
|
|
|
before being submitted (which should be done anyway).
|
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
$ devcam hook
|
2013-10-22 16:01:28 +00:00
|
|
|
|
2013-10-23 15:15:05 +00:00
|
|
|
Finally, submit your code to gerrit with:
|
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
$ devcam review
|
2013-10-23 15:15:05 +00:00
|
|
|
|
2013-06-11 11:27:04 +00:00
|
|
|
Please update this file as appropriate.
|