cb2fee8
## Purpose
cb2fee8
cb2fee8
SELinux Fedora Policy is a large patch off the mainline. The [fedora-selinux/selinux-policy](https://github.com/selinux-policy/selinux-policy.git) makes Fedora Policy packaging more simple and transparent for developers, upstream developers and users. It is used for applying downstream Fedora fixes, for communication about proposed/committed changes, for communication with upstream and the community. It reflects upstream repository structure to make submitting patches to upstream easy.
cb2fee8
cb2fee8
## Structure
cb2fee8
cb2fee8
### github
cb2fee8
On GitHub, we have two repositories (selinux-policy and selinux-policy-contrib ) for dist-git repository.
cb2fee8
cb2fee8
    $ cd selinux-policy
cb2fee8
    $ git remote -v
cb2fee8
    origin	git@github.com:fedora-selinux/selinux-policy.git (fetch)
cb2fee8
cb2fee8
cb2fee8
    $ git branch -r
cb2fee8
    origin/HEAD -> origin/master
cb2fee8
    origin/f27
cb2fee8
    origin/f28
cb2fee8
    origin/master
cb2fee8
    origin/rawhide
cb2fee8
cb2fee8
    $ cd selinux-policy-contrib
cb2fee8
    $ git remote -v 
cb2fee8
    origin	git@github.com:fedora-selinux/selinux-policy-contrib.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
cb2fee8
Note: _master_ branch on GitHub does not reflect master branch in dist-git. For this purpose, we created the _rawhide github branches in both selinux-policy and selinux-policy-contrib repositories.
cb2fee8
cb2fee8
### dist-git
cb2fee8
Package sources in dist-git are generally composed from a _selinux-policy and _selinux-policy-contrib repository snapshots tarballs and from other config files.
cb2fee8
cb2fee8
## Build process
cb2fee8
cb2fee8
1. clone [fedora-selinux/selinux-policy](https://github.com/fedora-selinux/selinux-policy) repository
cb2fee8
	
cb2fee8
		$ cd ~/devel/github
cb2fee8
		$ git clone git@github.com:fedora-selinux/selinux-policy.git
cb2fee8
		$ cd selinux-policy
cb2fee8
cb2fee8
2. clone [fedora-selinux/selinux-policy-contrib](https://github.com/fedora-selinux/selinux-policy-contrib) repository
cb2fee8
	
cb2fee8
		$ cd ~/devel/github
cb2fee8
		$ git clone git@github.com:fedora-selinux/selinux-policy-contrib.git
cb2fee8
		$ cd selinux-policy-contrib
cb2fee8
cb2fee8
3. create, backport, cherry-pick needed changes to a particular branch and push them
cb2fee8
cb2fee8
4. clone **selinux-policy** dist-git repository
cb2fee8
cb2fee8
		$ cd ~/devel/dist-git
cb2fee8
		$ fedpkg clone selinux-policy 
cb2fee8
		$ cd selinux-policy
cb2fee8
cb2fee8
4. Download the latest snaphots from selinux-policy and selinux-policy-contrib github repositories
cb2fee8
cb2fee8
        $ ./make-rhat-patches.sh
cb2fee8
cb2fee8
5. add changes to the dist-git repository, bump release, create a changelog entry, commit and push
cb2fee8
6. build the package
cb2fee8
	
cb2fee8
         $ fedpkg build
cb2fee8