2018-01-09 21:07:37 +00:00
|
|
|
# Contributing
|
|
|
|
|
|
|
|
## Getting Started
|
|
|
|
|
2019-06-05 16:37:42 +00:00
|
|
|
Perkeep contributors regularly use Linux and macOS, and both are
|
2013-06-11 11:14:05 +00:00
|
|
|
100% supported.
|
|
|
|
|
2019-06-05 16:37:42 +00:00
|
|
|
Developing on Windows is sometimes broken, but should work. Let us
|
2013-06-11 11:14:05 +00:00
|
|
|
know if we broke something, or we accidentally depend on some
|
|
|
|
Unix-specific build tool somewhere.
|
|
|
|
|
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 22:41:41 +00:00
|
|
|
See https://perkeep.org/doc/contributing for information on how to
|
2019-06-05 16:37:42 +00:00
|
|
|
contribute to the project and submit patches.
|
2012-10-28 11:03:52 +00:00
|
|
|
|
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 22:41:41 +00:00
|
|
|
See architecture docs: https://perkeep.org/doc/
|
2013-06-11 11:14:05 +00:00
|
|
|
|
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 22:41:41 +00:00
|
|
|
You can view docs for Perkeep packages with local godoc, or
|
2013-06-11 11:14:05 +00:00
|
|
|
godoc.org.
|
|
|
|
|
|
|
|
It's recommended you use git to fetch the source code, rather than
|
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 22:41:41 +00:00
|
|
|
hack from a Perkeep release's zip file:
|
2013-06-11 11:14:05 +00:00
|
|
|
|
2019-06-05 16:37:42 +00:00
|
|
|
$ git clone https://github.com/perkeep/perkeep.git perkeep.org
|
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
|
|
|
|
2019-04-29 21:31:44 +00:00
|
|
|
During development, rather than using the main binaries ("pk", "pk-put",
|
|
|
|
"pk-get", "pk-mount", etc) directly, we instead use a wrapper (devcam)
|
|
|
|
that automatically configures the environment to use the test server &
|
|
|
|
test environment.
|
2012-12-07 22:14:31 +00:00
|
|
|
|
2018-01-09 21:07:37 +00:00
|
|
|
## Building devcam
|
|
|
|
|
2019-06-05 16:37:42 +00:00
|
|
|
We have a development tool to help with Perkeep development that's
|
|
|
|
named `devcam` (for historical reasons: Perkeep used to be named
|
|
|
|
Camlistore).
|
|
|
|
|
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
|
|
|
|
2019-06-05 16:37:42 +00:00
|
|
|
And devcam will be in <pkroot>/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
|
|
|
|
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 22:41:41 +00:00
|
|
|
Alternatively, if your Perkeep root is checked out at
|
|
|
|
$GOPATH/src/perkeep.org (optional, but natural for Go users), you
|
2013-09-04 02:56:42 +00:00
|
|
|
can just:
|
2013-07-29 13:59:53 +00:00
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
$ go install ./dev/devcam
|
2013-07-29 13:59:53 +00:00
|
|
|
|
2018-01-09 21:07:37 +00:00
|
|
|
## Running devcam
|
|
|
|
|
2018-04-22 19:35:28 +00:00
|
|
|
The subcommands of devcam start the server or run pk-put/pk-get/etc:
|
2013-07-29 13:59:53 +00:00
|
|
|
|
2016-04-27 19:10:10 +00:00
|
|
|
$ devcam server # main server
|
2018-04-21 23:02:04 +00:00
|
|
|
$ devcam put # pk-put
|
2018-04-22 19:35:28 +00:00
|
|
|
$ devcam get # pk-get
|
2019-04-29 21:31:44 +00:00
|
|
|
$ devcam tool # pk
|
2018-01-08 03:57:49 +00:00
|
|
|
$ devcam mount # pk-mount
|
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:
|
|
|
|
|
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 22:41:41 +00:00
|
|
|
devcam put file ~/perkeep/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
|
|
|
|
2018-01-09 21:07:37 +00:00
|
|
|
|
|
|
|
## Testing Patches
|
|
|
|
|
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
|
2019-06-05 16:37:42 +00:00
|
|
|
change to be reviewed you should merge your commits into one before sending
|
|
|
|
a GitHub Pull Request for review.
|
2015-07-01 17:41:05 +00:00
|
|
|
|
2018-01-09 21:07:37 +00:00
|
|
|
## Commit Messages
|
|
|
|
|
2013-10-23 15:15:05 +00:00
|
|
|
You should also try to write a meaningful commit message, which at least states
|
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 22:41:41 +00:00
|
|
|
in the first sentence what part or package of perkeep this commit is affecting.
|
2015-07-01 17:41:05 +00:00
|
|
|
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
|
2018-01-09 21:07:37 +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.
|
2018-01-09 21:07:37 +00:00
|
|
|
>
|
2016-04-27 19:10:10 +00:00
|
|
|
> Fixes #10987
|
2013-10-22 16:01:28 +00:00
|
|
|
|
2018-01-09 21:07:37 +00:00
|
|
|
## Contributors
|
2015-01-23 15:16:47 +00:00
|
|
|
|
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
|
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 22:41:41 +00:00
|
|
|
https://perkeep.org/gw/85bf99a7, and https://perkeep.org/gw/8f9af410.
|
2016-04-06 18:24:27 +00:00
|
|
|
|
2018-01-09 21:07:37 +00:00
|
|
|
## git Hooks
|
|
|
|
|
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-06-11 11:27:04 +00:00
|
|
|
Please update this file as appropriate.
|