[libssh2/private-kdudka-use-cmake: 2/3] libssh2.spec: use git to apply patches in %prep

Kamil Dudka kdudka at fedoraproject.org
Mon Dec 8 13:08:23 UTC 2014


commit 045c80fddbe37de309273c4c91082b83bb598b5b
Author: Kamil Dudka <kdudka at redhat.com>
Date:   Mon Dec 8 10:32:44 2014 +0100

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

 libssh2.spec |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/libssh2.spec b/libssh2.spec
index 1df6f32..b93dbe1 100644
--- a/libssh2.spec
+++ b/libssh2.spec
@@ -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 at redhat.com> 1.4.3-16.1
+- use git to apply patches
+
 * Fri Oct 10 2014 Kamil Dudka <kdudka at redhat.com> 1.4.3-16
 - prevent a not-connected agent from closing STDIN (#1147717)
 


More information about the scm-commits mailing list