github.com/olivere/camlistore@v0.0.0-20140121221811-1b7ac2da0199/HACKING (about) 1 Camlistore contributors regularly use Linux and OS X, and both are 2 100% supported. 3 4 Developing on Windows is sometimes broken, but should work. Let us 5 know if we broke something, or we accidentally depend on some 6 Unix-specific build tool somewhere. 7 8 See http://camlistore.org/docs/contributing for information on how to 9 contribute to the project and submit patches. Notably, we use Gerrit 10 for code review. Our Gerrit instance is at https://camlistore.org/r/ 11 12 See architecture docs: https://camlistore.org/docs/ 13 14 You can view docs for Camlistore packages with local godoc, or 15 godoc.org. 16 17 It's recommended you use git to fetch the source code, rather than 18 hack from a Camlistore release's zip file: 19 20 $ git clone https://camlistore.googlesource.com/camlistore 21 22 (We use github for distribution and collaboration with some people, 23 but the Gerrit git server & code review system is the main repo. See 24 http://camlistore.org/docs/contributing for how to use them.) 25 26 On Debian/Ubuntu, some deps to get started: 27 28 $ sudo apt-get install libsqlite3-dev sqlite3 pkg-config git 29 30 During development, rather than use the main binaries ("camput", 31 "camget", "camtool", "cammount", etc) directly, we instead use a 32 wrapper (devcam) that automatically configure the environment to use 33 the test server & test environment. 34 35 To build devcam: 36 37 $ go run make.go 38 39 And devcam will be in <camroot>/bin/devcam. You'll probably want to 40 symlink it into your $PATH. 41 42 Alternatively, if your Camlistore root is checked out at 43 $GOPATH/src/camlistore.org (optional, but natural for Go users), you 44 can just: 45 46 $ go install ./dev/devcam 47 48 The subcommands of devcam start the server or run camput/camget/etc: 49 50 $ devcam server # main server 51 $ devcam appengine # App Engine version of the server 52 $ devcam put # camput 53 $ devcam get # camget 54 $ devcam tool # camtool 55 $ devcam mount # cammount 56 57 Once the dev server is running, 58 59 - Upload a file: 60 devcam put file ~/camlistore/COPYING 61 - Create a permanode: 62 devcam put permanode 63 - Use the UI: http://localhost:3179/ui/ 64 65 Before submitting a patch, you should check that all the tests pass with: 66 67 $ devcam test 68 69 You can use your usual git workflow to commit your changes, but for each 70 change to be reviewed you should merge your commits into one before submitting 71 to gerrit for review. 72 You should also try to write a meaningful commit message, which at least states 73 in the first sentence what part of camlistore this commit is affecting. The 74 following text should state what problem the change is addressing, and how. 75 An example would be: 76 77 " 78 HACKING: add tips about writing a commit message. 79 80 First time committers are not always aware about good commit message etiquette. 81 These few notes should help them. 82 " 83 84 You can optionally use our pre-commit hook so that your code gets gofmt'ed 85 before being submitted (which should be done anyway). 86 87 $ cd .git/hooks 88 $ ln -s ../../misc/pre-commit.githook pre-commit 89 90 Finally, submit your code to gerrit with: 91 92 $ ./misc/review 93 94 Please update this file as appropriate.