libssh2.spec: use git to apply patches in %prep

This commit is contained in:
Kamil Dudka 2014-12-08 10:32:44 +01:00
parent c5618432a5
commit 045c80fddb
1 changed files with 14 additions and 4 deletions

View File

@ -12,7 +12,7 @@
Name: libssh2
Version: 1.4.3
Release: 16%{?dist}
Release: 16.1%{?dist}
Summary: A library implementing the SSH2 protocol
Group: System Environment/Libraries
License: BSD
@ -77,9 +77,12 @@ developing applications that use libssh2.
%prep
%setup -q
# Replace hard wired port number in the test suite to avoid collisions
# between 32-bit and 64-bit builds running on a single build-host
sed -i s/4711/47%{?__isa_bits}/ tests/ssh2.{c,sh}
# use git to apply patches
git init
git add --all
git commit -m init
git branch init
%global __patch sh -c 'git am --keep-cr'
# Make sure things are UTF-8...
%patch0 -p1
@ -106,6 +109,10 @@ sed -i s/4711/47%{?__isa_bits}/ tests/ssh2.{c,sh}
# prevent a not-connected agent from closing STDIN (#1147717)
%patch12 -p1
# Replace hard wired port number in the test suite to avoid collisions
# between 32-bit and 64-bit builds running on a single build-host
sed -i s/4711/47%{?__isa_bits}/ tests/ssh2.{c,sh}
# Make sshd transition appropriately if building in an SELinux environment
%if !(0%{?fedora} >= 17 || 0%{?rhel} >= 7)
chcon $(/usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd) tests/ssh2.sh || :
@ -180,6 +187,9 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/libssh2.pc
%changelog
* Mon Dec 08 2014 Kamil Dudka <kdudka@redhat.com> 1.4.3-16.1
- use git to apply patches
* Fri Oct 10 2014 Kamil Dudka <kdudka@redhat.com> 1.4.3-16
- prevent a not-connected agent from closing STDIN (#1147717)