Improve make-rhat-patches.sh for local development
make-rhat-patches.sh had everything hard coded and didn't update spec file so it
was hard to use for local selinux-policy development. This patch doesn't change
default behavior, but makes this script configurable using environmental
variables and one option.
Usage:
If you want to change location of repositories set the following variables:
REPO_SELINUX_POLICY
selinux-policy repository
REPO_SELINUX_POLICY_BRANCH
selinux-policy repository branch
REPO_SELINUX_POLICY_CONTRIB
selinux-policy repository
REPO_SELINUX_POLICY_CONTRIB_BRANCH
selinux-policy-contrib repository branch
REPO_CONTAINER_SELINUX
container-selinux repository
If you want to use locally created tarball (and don't download tarballs from
github), use '-l' option.
Example:
export REPO_SELINUX_POLICY=~/devel/local/selinux-policy.git
export REPO_SELINUX_POLICY_BRANCH=WIP-my-new-fix
export REPO_SELINUX_POLICY_CONTRIB=~/devel/local/selinux-policy-contrib.git
export REPO_SELINUX_POLICY_CONTRIB_BRANCH=WIP-some-contrib-fix
export REPO_CONTAINER_SELINUX=~/devel/local/container-selinux.git
./make-rhat-patches.sh -l