cb2fee8
## Purpose
cb2fee8
58fb34f
SELinux Fedora Policy is a fork of the [SELinux reference policy](https://github.com/SELinuxProject/refpolicy/). The [fedora-selinux/selinux-policy](https://github.com/selinux-policy/selinux-policy.git) repo makes Fedora packaging simpler and more transparent for packagers, upstream developers, and users. It is used for applying downstream Fedora fixes, for communication about proposed/committed changes, and for communication with upstream and the community. It reflects the upstream repository structure to make submitting patches to upstream easy.
cb2fee8
cb2fee8
## Structure
cb2fee8
aebc05f
### GitHub
5487666
On GitHub, we have one repository containing the policy sources.
cb2fee8
cb2fee8
    $ cd selinux-policy
cb2fee8
    $ git remote -v
cb2fee8
    origin	git@github.com:fedora-selinux/selinux-policy.git (fetch)
cb2fee8
cb2fee8
    $ git branch -r
cb2fee8
    origin/HEAD -> origin/master
cb2fee8
    origin/f27
cb2fee8
    origin/f28
cb2fee8
    origin/master
cb2fee8
    origin/rawhide
cb2fee8
5487666
Note: As opposed to dist-git, the Rawhide content resides in the _rawhide_ branch rather than _master_.
cb2fee8
cb2fee8
### dist-git
58fb34f
Package sources in dist-git are composed from the _selinux-policy_ repository snapshot tarball, _container-selinux_ policy files snapshot, the _macro-expander_ script snapshot, and from other config files.
cb2fee8
cb2fee8
## Build process
cb2fee8
aebc05f
1. Clone the [fedora-selinux/selinux-policy](https://github.com/fedora-selinux/selinux-policy) repository.
fe20768
aebc05f
        $ cd ~/devel/github
aebc05f
        $ git clone git@github.com:fedora-selinux/selinux-policy.git
aebc05f
        $ cd selinux-policy
cb2fee8
58fb34f
2. Create, backport, or cherry-pick needed changes to a particular branch and push them.
cb2fee8
5487666
3. Clone the **selinux-policy** dist-git repository.
cb2fee8
aebc05f
        $ cd ~/devel/dist-git
aebc05f
        $ fedpkg clone selinux-policy
aebc05f
        $ cd selinux-policy
cb2fee8
58fb34f
4. Download the latest snapshot from the selinux-policy GitHub repository.
cb2fee8
cb2fee8
        $ ./make-rhat-patches.sh
cb2fee8
58fb34f
5. Add changes to the dist-git repository, bump release, create a changelog entry, commit, and push.
5487666
6. Build the package.
cb2fee8
aebc05f
        $ fedpkg build