2015-02-02 15:42:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-04-13 08:39:12 +00:00
|
|
|
POLICYCOREUTILS_VERSION=2.4
|
|
|
|
SEPOLGEN_VERSION=1.2.2
|
|
|
|
BRANCH=2.4
|
2015-02-02 15:42:37 +00:00
|
|
|
|
|
|
|
REBASEDIR=`mktemp -d rebase.XXXXXX`
|
|
|
|
pushd $REBASEDIR
|
|
|
|
|
2015-04-13 08:39:12 +00:00
|
|
|
# git clone git@github.com:fedora-selinux/selinux.git
|
|
|
|
git clone https://github.com/bachradsusi/selinux.git
|
2015-02-02 15:42:37 +00:00
|
|
|
pushd selinux; git checkout $BRANCH; COMMIT=`git rev-parse --verify HEAD`; popd
|
|
|
|
|
|
|
|
# prepare policycoreutils-rhat.patch
|
|
|
|
tar xfz ../policycoreutils-$POLICYCOREUTILS_VERSION.tar.gz
|
|
|
|
pushd policycoreutils-$POLICYCOREUTILS_VERSION
|
|
|
|
|
|
|
|
git init; git add .; git commit -m "init"
|
|
|
|
cp -r ../selinux/policycoreutils/* .
|
|
|
|
git add -A .
|
|
|
|
|
|
|
|
git diff --cached --src-prefix=a/policycoreutils-$POLICYCOREUTILS_VERSION/ --dst-prefix=b/policycoreutils-$POLICYCOREUTILS_VERSION/ > ../../policycoreutils-rhat.patch
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
#prepare sepolgen-rhat.patch
|
|
|
|
tar xfz ../sepolgen-$SEPOLGEN_VERSION.tar.gz
|
|
|
|
pushd sepolgen-$SEPOLGEN_VERSION
|
|
|
|
|
|
|
|
git init; git add .; git commit -m "init"
|
|
|
|
cp -r ../selinux/sepolgen/* .
|
|
|
|
git add -A .
|
|
|
|
|
|
|
|
git diff --cached --src-prefix=a/sepolgen-$SEPOLGEN_VERSION/ --dst-prefix=b/sepolgen-$SEPOLGEN_VERSION/ > ../../sepolgen-rhat.patch
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
popd
|
|
|
|
# echo rm -rf $REBASEDIR
|
|
|
|
|
2015-02-02 16:23:15 +00:00
|
|
|
echo policycoreutils-rhat.patch and sepolgen-rhat.patch created from https://github.com/fedora-selinux/selinux/commit/$COMMIT
|