2014-12-10 17:11:09 +01:00
# Contributing to void-packages
void-packages is the backbone of the Void Linux distribution. It contains all definitions how packages are built from source.
This document describes how you as a contributor can help adding packages, correcting bugs and adding features to void-packages.
2016-03-22 17:22:05 +01:00
## Getting your packages into Void by yourself
2014-12-10 17:11:09 +01:00
If you really want to get a package into Void Linux we recommend you to package it yourself.
We provide a [comprehensive Manual ](https://github.com/voidlinux/void-packages/blob/master/Manual.md )
on how you can create new packages. Also there's a
[manual about xbps-src ](https://github.com/voidlinux/void-packages/blob/master/README.md ) which is used
to build package files from templates.
For this guide, we assume you have basic knowledge about [git ](http://git-scm.org ) and a [GitHub Account ](http://github.com )
2015-05-31 20:13:12 +02:00
Please note that we do not accept any packages containing non-release versions such
as specific git- or svn-revisions anymore.
2016-03-22 17:22:05 +01:00
### Creating a new template
2014-12-10 17:11:09 +01:00
templates must be placed in `void-packages/srcpkgs/<pkgname>/template` where `pkgname` is the same as the pkgname variable in the template.
For deeper insights on the contents of template files consider reading the [manual ](https://github.com/voidlinux/void-packages/blob/master/Manual.md )
There's a helper tool for creating new packages in the [xtools ](https://github.com/chneukirchen/xtools ) package:
2015-06-28 06:00:12 +02:00
$ xnew pkgname subpkg1 subpkg2 ...
2014-12-10 17:11:09 +01:00
2016-03-22 17:22:05 +01:00
### Committing your changes
2014-12-10 17:11:09 +01:00
2015-06-28 10:57:40 +02:00
Once you have built your template files there are certain rules on how the commit should be named.
2014-12-10 17:11:09 +01:00
2014-12-10 17:22:03 +01:00
* Use the following for newly added packages: ```New package: < pkgname > -< version > ```
[Example ](https://github.com/voidlinux/void-packages/commit/176d9655429188aac10cd229827f99b72982ab10 )
2014-12-10 17:11:09 +01:00
2014-12-10 17:22:03 +01:00
* Use the following if you update a package: ```< pkgname > : update to < version > .```
[Example ](https://github.com/voidlinux/void-packages/commit/b6b82dcbd4aeea5fc37a32e4b6a8dd8bd980d5a3 )
2014-12-10 17:11:09 +01:00
2014-12-10 17:22:03 +01:00
* If you changed something on the template without a version change use ```< pkgname > : < reason > ```
[Example ](https://github.com/voidlinux/void-packages/commit/8b68d6bf1eb997cd5e7c095acd040e2c5379c91d )
2014-12-10 17:11:09 +01:00
If you want to describe your changes in more detail, make an empty line and add the description afterwards.
2014-12-10 17:22:03 +01:00
[Example ](https://github.com/voidlinux/void-packages/commit/f1c45a502086ba1952f23ace9084a870ce437bc6 )
2014-12-10 17:11:09 +01:00
This is also described in the [manual ](https://github.com/voidlinux/void-packages/blob/master/Manual.md ) in deeper detail.
2015-06-28 10:57:40 +02:00
There's a helper tool for committing packages in the [xtools ](https://github.com/chneukirchen/xtools ) package:
2015-06-28 06:00:12 +02:00
$ xbump < pkgname >
2014-12-10 17:11:09 +01:00
2016-03-22 17:22:05 +01:00
### Starting a pull request
2014-12-10 17:11:09 +01:00
Once you successfully build the package at least on x86 (building it on armv* is recommended too) you can start a pull request.
2014-12-13 03:46:37 +01:00
Most pull request should only contain a single package and its dependencies which are not part of void-packages yet.
2014-12-10 17:11:09 +01:00
If you make updates to packages containing a soname bump you also need to revbump all packages that are dependant. Those
packages should also be part of the same pull request.
2016-03-22 17:22:05 +01:00
#### Travis
2014-12-10 17:11:09 +01:00
Once you have started a pull request, you will get instant feedback from Travis. It will check if the templates you have changed
comply with the our guidelines. At the moment not all packages comply to the rules, so if you update a package, it may happen, that Travis
reports errors on places you haven't touched. So feel free to fix those errors too.
You are encouraged to check your templates beforehand using the helper from the [xtools ](https://github.com/chneukirchen/xtools ) package:
2015-06-28 06:00:12 +02:00
$ xlint template
2014-12-10 17:11:09 +01:00
2016-03-22 17:22:05 +01:00
#### Review
2014-12-10 17:11:09 +01:00
GitHub reports new pull request at our IRC-Channel, so the reviewers will be instantly informed. Most of the time
your pull request will contain mistakes. It's nothing bad, it just happens.
The reviewers will comment your pull request and point out which changes are needed before the template can be included.
2015-06-28 10:57:40 +02:00
We recommend having only a single commit for pull request, so if you need to make changes in commits but already have a pull request, use the following commands:
2015-06-28 06:00:12 +02:00
$ git add < file >
$ git commit --amend
$ git push -f
2016-03-22 17:22:05 +01:00
#### Closing the pull request
2014-12-10 17:11:09 +01:00
Once you have applied all comments, the reviewers will merge your request.
2014-12-10 17:16:39 +01:00
If the pull request gets inactive for some days, the reviewers may or may not warn you when they are about to close it.
2014-12-10 17:11:09 +01:00
If it stays inactive further, it'll be closed.
Please abstain from temporary closing a pull request while revising the templates. Only close your pull request if
you're sure you don't want your changes to be included.
2016-03-22 17:22:05 +01:00
#### Publishing the package
2014-12-10 17:11:09 +01:00
2015-06-28 10:57:40 +02:00
Once the reviewers have merged the pull request, our [build server ](http://build.voidlinux.eu ) is automatically triggered and builds
2014-12-10 17:11:09 +01:00
all packages from this pull request for all supported platforms. Once it is finished, the packages are available to all Void Linux users.