add make-rhat-patches.sh script which recreates libselinux-rhat.patch
from https://github.com/fedora-selinux/selinux/
This commit is contained in:
parent
e0682defe3
commit
baa2bfaada
@ -17,6 +17,7 @@ Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/rele
|
|||||||
Source1: selinuxconlist.8
|
Source1: selinuxconlist.8
|
||||||
Source2: selinuxdefcon.8
|
Source2: selinuxdefcon.8
|
||||||
Url: https://github.com/SELinuxProject/selinux/wiki
|
Url: https://github.com/SELinuxProject/selinux/wiki
|
||||||
|
# use make-rhat-patches.sh to create following patches from https://github.com/fedora-selinux/selinux/
|
||||||
Patch1: libselinux-rhat.patch
|
Patch1: libselinux-rhat.patch
|
||||||
BuildRequires: pkgconfig python-devel ruby-devel ruby libsepol-static >= %{libsepolver} swig pcre-devel xz-devel
|
BuildRequires: pkgconfig python-devel ruby-devel ruby libsepol-static >= %{libsepolver} swig pcre-devel xz-devel
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
|
27
make-rhat-patches.sh
Executable file
27
make-rhat-patches.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
LIBSELINUX_VERSION=2.3
|
||||||
|
BRANCH=master
|
||||||
|
|
||||||
|
REBASEDIR=`mktemp -d rebase.XXXXXX`
|
||||||
|
pushd $REBASEDIR
|
||||||
|
|
||||||
|
git clone https://github.com/fedora-selinux/selinux.git
|
||||||
|
pushd selinux; git checkout $BRANCH; COMMIT=`git rev-parse --verify HEAD`; popd
|
||||||
|
|
||||||
|
# prepare libselinux-rhat.patch
|
||||||
|
tar xfz ../libselinux-$LIBSELINUX_VERSION.tar.gz
|
||||||
|
pushd libselinux-$LIBSELINUX_VERSION
|
||||||
|
|
||||||
|
git init; git add .; git commit -m "init"
|
||||||
|
cp -r ../selinux/libselinux/* .
|
||||||
|
git add -A .
|
||||||
|
|
||||||
|
git diff --cached --src-prefix=libselinux-$LIBSELINUX_VERSION/ --dst-prefix=libselinux-$LIBSELINUX_VERSION/ > ../../libselinux-rhat.patch
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
popd
|
||||||
|
# echo rm -rf $REBASEDIR
|
||||||
|
|
||||||
|
echo libselinux-rhat.patch created from https://github.com/fedora-selinux/selinux/commit/$COMMIT
|
Loading…
Reference in New Issue
Block a user