From a3f72ec4f2f25ff508dda2ddc0ed5e31c2757313 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Apr 13 2015 08:07:50 +0000 Subject: use make-rhat-patches.sh --- diff --git a/libselinux.spec b/libselinux.spec index 8f39a88..1bd20de 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -16,6 +16,7 @@ Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/rele Source1: selinuxconlist.8 Source2: selinuxdefcon.8 Url: https://github.com/SELinuxProject/selinux/wiki +# use make-rhat-patches.sh to create following patch from https://github.com/bachradsusi/selinux.git Patch1: libselinux-rhat.patch BuildRequires: pkgconfig python-devel ruby-devel ruby libsepol-static >= %{libsepolver} swig pcre-devel xz-devel %if 0%{?with_python3} diff --git a/make-rhat-patches.sh b/make-rhat-patches.sh new file mode 100755 index 0000000..4541f6a --- /dev/null +++ b/make-rhat-patches.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +LIBSELINUX_VERSION=2.4 +BRANCH=2.4 + +REBASEDIR=`mktemp -d rebase.XXXXXX` +pushd $REBASEDIR + +# git clone git@github.com:fedora-selinux/selinux.git +git clone https://github.com/bachradsusi/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