1# Contributing to SELinux
2
3Contributing to the SELinux userspace project is a similar process to
4other open source projects. Bug reports, new features to the existing
5code, additional tools, or updated documentation are all welcome.
6
7You can find a list of open issues where you might contribute to the SELinux kernel code at
8https://github.com/SELinuxProject/selinux-kernel/issues or to the SELinux userspace code at
9https://github.com/SELinuxProject/selinux/issues.
10
11See the selinuxproject.org [user resources
12page](http://selinuxproject.org/page/User_Resources) for more
13information on mailing lists, documentation, and other resources.
14
15## Reporting Bugs
16
17All bugs and patches should be submitted to the [SELinux mailing
18list](https://lore.kernel.org/selinux) at selinux@vger.kernel.org.
19
20When reporting bugs please include versions of SELinux related libraries and
21tools (libsepol, libselinux, libsemanage, checkpolicy). If you are
22using a custom policy please include it as well.
23
24## Compiling
25
26There are a number of dependencies required to build the userspace
27tools/libraries. On a Fedora system you can install them with yum:
28
29    # yum install audit-libs-devel bison bzip2-devel dbus-devel dbus-glib-devel flex flex-devel flex-static glib2-devel libcap-devel libcap-ng-devel pam-devel pcre-devel python-devel setools-devel swig ustr-devel
30
31The tools and libraries can be built and installed under a private directory from the top level with make, e.g.
32
33    $ make DESTDIR=~/obj install install-pywrap
34
35## Contributing Code
36
37After obtaining the code of the repository (see below), create a patch
38against the repository, and post that patch to the [SELinux mailing
39list](https://lore.kernel.org/selinux) at selinux@vger.kernel.org. When preparing
40patches, please follow these guidelines:
41
42-   Patches should apply with -p1
43-   Must apply against HEAD of the master branch
44-   Separate large patches into logical patches
45-   Patch descriptions must end with your "Signed-off-by" line. This means your
46    code meets the Developer's certificate of origin, see below.
47
48When adding new, large features or tools it is best to discuss the
49design on the mailing list prior to submitting the patch.
50
51## Development Repository
52
53Git is a modern source code management system. For more information
54about Git please see the Git website.
55
56To get an anonymous checkout of the SELinux userland repository you can
57run:
58
59    $ git clone https://github.com/SELinuxProject/selinux.git
60
61# Developer Certificate of Origin
62
63    Developer's Certificate of Origin 1.1
64
65    By making a contribution to this project, I certify that:
66
67    (a) The contribution was created in whole or in part by me and I
68        have the right to submit it under the open source license
69        indicated in the file; or
70
71    (b) The contribution is based upon previous work that, to the best
72        of my knowledge, is covered under an appropriate open source
73        license and I have the right under that license to submit that
74        work with modifications, whether created in whole or in part
75        by me, under the same open source license (unless I am
76        permitted to submit under a different license), as indicated
77        in the file; or
78
79    (c) The contribution was provided directly to me by some other
80        person who certified (a), (b) or (c) and I have not modified
81        it.
82
83    (d) I understand and agree that this project and the contribution
84        are public and that a record of the contribution (including all
85        personal information I submit with it, including my sign-off) is
86        maintained indefinitely and may be redistributed consistent with
87        this project or the open source license(s) involved.
88