In the src.fedoraproject.org/rpms/selinux-policy packages repository,
the default branch name has changed to "rawhide", with a symref (link)
of "main". The make-rhat-patches.sh file was updated to use "rawhide"
in the DISTGIT_BRANCH variable instead of "master".
The "rawhide" branch of selinux-policy and selinux-policy-contrib is
about to be merged together. Update dist-git for this, so that the next
build can be performed with the new repo structure.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
The selinux-policy repos are quite big - use --depth=1 to fetch only the
latest commit of the requested branch, to save network traffic and time.
A possible downside of this is that one can no longer pass a commit ID
via REPO_SELINUX_POLICY_*BRANCH, but that's unlikely to be useful in
practice.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
It's better to use the standard /tmp, since it commonly has tmpfs
mounted over it, which avoids unnecessary disk I/O. Let's make our SSDs
slightly happier :)
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
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
Fixes:
File policy/modules/contrib is not a regular file -- refusing to patch
1 out of 1 hunk ignored -- saving rejects to file policy/modules/contrib.rej