[czmq] Patch to fix sha1 on bigendian machines (#1196994)

Jose Pedro Oliveira jpo at fedoraproject.org
Sun Mar 1 23:48:11 UTC 2015


commit 026d0f3dc5acfd41efc8a0f46ad513eb9c19f055
Author: Jose Pedro Oliveira <jose.p.oliveira.oss at gmail.com>
Date:   Mon Mar 2 00:46:31 2015 +0100

    Patch to fix sha1 on bigendian machines (#1196994)

 0002-Fixed-sha1-on-bigendian-machines.patch | 37 +++++++++++++++++++++++++
 autogen.sh                                  | 43 +++++++++++++++++++++++++++++
 czmq.spec                                   | 11 +++++++-
 3 files changed, 90 insertions(+), 1 deletion(-)
---
diff --git a/0002-Fixed-sha1-on-bigendian-machines.patch b/0002-Fixed-sha1-on-bigendian-machines.patch
new file mode 100644
index 0000000..3d855f4
--- /dev/null
+++ b/0002-Fixed-sha1-on-bigendian-machines.patch
@@ -0,0 +1,37 @@
+From 03e50a9726e5977637673ccd4b6cc88e429cdcba Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jakub=20=C4=8Cajka?= <jcajka at redhat.com>
+Date: Fri, 27 Feb 2015 08:47:40 +0100
+Subject: [PATCH] Fixed sha1 on bigendian machines.
+
+---
+ configure.ac  | 1 +
+ src/zdigest.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index c1b1750..4415434 100755
+--- a/configure.ac
++++ b/configure.ac
+@@ -242,6 +242,7 @@ AC_TYPE_SSIZE_T
+ AC_HEADER_TIME
+ AC_TYPE_UINT32_T
+ AC_C_VOLATILE
++AC_C_BIGENDIAN
+ 
+ # These options are GNU compiler specific.
+ if test "x$GCC" = "xyes"; then
+diff --git a/src/zdigest.c b/src/zdigest.c
+index 0db2f0e..f914dc9 100644
+--- a/src/zdigest.c
++++ b/src/zdigest.c
+@@ -23,6 +23,7 @@
+ @end
+ */
+ 
++#include "platform.h"
+ #include "../include/czmq.h"
+ #include "../foreign/sha1/sha1.c"
+ 
+-- 
+2.3.0
+
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..f246ea5
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env sh
+################################################################################
+#  THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY  #
+#  Please refer to the README for information about making permanent changes.  #
+################################################################################
+
+#   Script to generate all required files from fresh git checkout.
+
+command -v libtool >/dev/null 2>&1
+if  [ $? -ne 0 ]; then
+    echo "autogen.sh: error: could not find libtool.  libtool is required to run autogen.sh." 1>&2
+    exit 1
+fi
+
+command -v autoreconf >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+    echo "autogen.sh: error: could not find autoreconf.  autoconf and automake are required to run autogen.sh." 1>&2
+    exit 1
+fi
+
+command -v pkg-config >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+    echo "autogen.sh: error: could not find pkg-config.  pkg-config is required to run autogen.sh." 1>&2
+    exit 1
+fi
+
+mkdir -p ./config
+if [ $? -ne 0 ]; then
+    echo "autogen.sh: error: could not create directory: ./config." 1>&2
+    exit 1
+fi
+
+autoreconf --install --force --verbose -I config
+status=$?
+if [ $status -ne 0 ]; then
+    echo "autogen.sh: error: autoreconf exited with status $status" 1>&2
+    exit 1
+fi
+
+################################################################################
+#  THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY  #
+#  Please refer to the README for information about making permanent changes.  #
+################################################################################
diff --git a/czmq.spec b/czmq.spec
index 6358572..eaee4ff 100644
--- a/czmq.spec
+++ b/czmq.spec
@@ -1,18 +1,21 @@
 Name:           czmq
 Version:        2.2.0
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        High-level C binding for 0MQ (ZeroMQ)
 
 Group:          Development/Libraries
 License:        LGPLv3+
 URL:            http://czmq.zeromq.org/
 Source0:        http://download.zeromq.org/czmq-%{version}.tar.gz
+Source1:        autogen.sh
 # Upstream patch: git format-patch -1 eebf66a
 # https://github.com/zeromq/czmq/commit/eebf66a267e0acdf8b791e541b24ab701557135e
 Patch0:         0001-Use-_DEFAULT_SOURCE-instead-of-_BSD_SOURCE.patch
+Patch1:         0002-Fixed-sha1-on-bigendian-machines.patch
 
 BuildRequires:  libuuid-devel
 BuildRequires:  zeromq-devel
+BuildRequires:  autoconf automake libtool
 
 %description
 CZMQ has the following goals:
@@ -36,8 +39,11 @@ This package contains files needed to develop applications using czmq.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+cp -f %{SOURCE1} .
 
 %build
+./autogen.sh
 %configure
 
 # remove rpath
@@ -81,6 +87,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make check
 
 
 %changelog
+* Mon Mar  2 2015 Jose Pedro Oliveira <jose.p.oliveira.oss at gmail.com> - 2.2.0-5
+- Patch to fix sha1 on bigendian machines (#1196994)
+
 * Fri Feb 27 2015 Jose Pedro Oliveira <jose.p.oliveira.oss at gmail.com> - 2.2.0-4
 - Renamed /usr/bin/makecert to avoid a file conflict (#1196483)
 


More information about the scm-commits mailing list