CONTRIBUTING.md 2.87 KB
Newer Older
Boris Kraut's avatar
Boris Kraut committed
1
# Contributing to F-Droid
2

3 4 5
For information about all aspects of F-Droid, check out the
[docs](https://f-droid.org/docs)

6

7
## Issue Tracker
Boris Kraut's avatar
Boris Kraut committed
8

9 10 11 12
You may use the
[issue tracker](https://gitlab.com/fdroid/fdroiddata/issues) to report
issues on app metadata and issues with the packages distributed
through our repository.
13

Daniel Martí's avatar
Daniel Martí committed
14
Before opening an issue about an outdated app, have a look at its metadata
15 16
file and make sure that updating the app is actually possible.

Boris Kraut's avatar
Boris Kraut committed
17 18 19

## Merge Requests

Daniel Martí's avatar
Daniel Martí committed
20
### Setting up fdroiddata for merge requests
21

Boris Kraut's avatar
Boris Kraut committed
22
* [Register on GitLab](http://gitlab.com)
23

24
* Visit and fork the [fdroiddata repository](https://gitlab.com/fdroid/fdroiddata)
Daniel Martí's avatar
Daniel Martí committed
25

26 27 28 29 30 31 32
* Clone your fork

* Follow the [Quickstart](README.md#quickstart)

Note that to use the master branch of fdroiddata you will need the
master branch of fdroidserver. Using the latest stable release of
fdroidserver would probably work, but it is not guaranteed.
Daniel Martí's avatar
Daniel Martí committed
33 34 35 36 37 38

### Adding a new app

If you want to add a new app you will have to add a new metadata file to the
repository, like `metadata/app.id.txt`. Here is how to write that file.

39
If the app is on GitHub, GitLab or Bitbucket, use `fdroid import`:
Daniel Martí's avatar
Daniel Martí committed
40 41 42

	fdroid import --url https://github.com/foo/bar --subdir app

43
Alternatively, start the metadata file from scratch:
Daniel Martí's avatar
Daniel Martí committed
44 45 46 47 48 49 50 51 52

	cp templates/app-minimal metadata/app.id.txt

Now that the file is created, you need to fill up all the app information and
add a working build recipe.

You can use the [metadata section](https://f-droid.org/manual/html_node/Metadata.html)
in the manual for reference, or the full template at `templates/app-full` for
some suggestions.
53

54 55
Once you're done, see if `fdroid readmeta` runs without any errors. If it
doesn't, there are syntax errors in your metadata file.
56

57 58 59 60 61 62 63 64 65 66 67
### Building it

We build apps from source, so a new app must have at least one working build.

You can have a look at the build templates at `templates/build-*` for some
quick suggestions. You may also follow the manual or look at how other apps
are built for working examples.

* Run `fdroid readmeta` again to make sure there still aren't any syntax
  errors

Daniel Martí's avatar
Daniel Martí committed
68
* Run `fdroid rewritemeta app.id` to clean up your file
69

Daniel Martí's avatar
Daniel Martí committed
70 71
* Run `fdroid checkupdates app.id` to fill automated fields like `Auto Name`
  and `Current Version`
72

Daniel Martí's avatar
Daniel Martí committed
73 74
* Make sure that `fdroid lint app.id` doesn't report any warnings. If it does,
  fix them.
75

Daniel Martí's avatar
Daniel Martí committed
76
* Test your build recipe with `fdroid build -v -l app.id`
77

Daniel Martí's avatar
Daniel Martí committed
78
Congratulations! You can now open a merge request to add your app.
79

Daniel Martí's avatar
Daniel Martí committed
80 81
Our buildserver runs builds once a day, so it may take up to 24h for your app
to appear in our repository.
82 83 84 85

### General recommendations

* [Squash](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) your commits
86 87 88 89 90

* Make sure you've ran `fdroid lint` and `fdroid rewritemeta` before opening a
  merge request

* If you haven't tested your build, say so in the merge request.
91 92

* Check for CI errors once you have opened your Merge Request