[gnupg/f16] fix build on big-endian arches (gnupg bug #1461)
Dan Horák
sharkcz at fedoraproject.org
Mon Jan 7 14:32:53 UTC 2013
commit 26608c7752cfedaac8e7d2175536e32a73dbb1c0
Author: Dan Horák <dan at danny.cz>
Date: Mon Jan 7 15:30:38 2013 +0100
fix build on big-endian arches (gnupg bug #1461)
gnupg-1.4.13-big-endian.patch | 21 +++++++++++++++++++++
gnupg.spec | 8 +++++++-
2 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/gnupg-1.4.13-big-endian.patch b/gnupg-1.4.13-big-endian.patch
new file mode 100644
index 0000000..ba06b50
--- /dev/null
+++ b/gnupg-1.4.13-big-endian.patch
@@ -0,0 +1,21 @@
+diff -up gnupg-1.4.13/cipher/idea.c.endian gnupg-1.4.13/cipher/idea.c
+--- gnupg-1.4.13/cipher/idea.c.endian 2013-01-07 08:37:48.899033247 -0500
++++ gnupg-1.4.13/cipher/idea.c 2013-01-07 08:39:03.239030102 -0500
+@@ -201,7 +201,7 @@ cipher( byte *outbuf, const byte *inbuf,
+ x2 = *in++;
+ x3 = *in++;
+ x4 = *in;
+- #ifndef WORDS_BIGENDIAN
++ #ifndef BIG_ENDIAN_HOST
+ x1 = (x1>>8) | (x1<<8);
+ x2 = (x2>>8) | (x2<<8);
+ x3 = (x3>>8) | (x3<<8);
+@@ -234,7 +234,7 @@ cipher( byte *outbuf, const byte *inbuf,
+ MUL(x4, *key);
+
+ out = (u16*)outbuf;
+- #ifndef WORDS_BIGENDIAN
++ #ifndef BIG_ENDIAN_HOST
+ *out++ = (x1>>8) | (x1<<8);
+ *out++ = (x3>>8) | (x3<<8);
+ *out++ = (x2>>8) | (x2<<8);
diff --git a/gnupg.spec b/gnupg.spec
index 6f6e5af..050b468 100644
--- a/gnupg.spec
+++ b/gnupg.spec
@@ -1,13 +1,15 @@
Summary: A GNU utility for secure communication and data storage
Name: gnupg
Version: 1.4.13
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv3+ with exceptions
Group: Applications/System
Source0: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2
Source1: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2.sig
Source2: gnupg-shm-coprocessing.expect
Patch0: gnupg-1.4.1-gcc.patch
+# https://bugs.g10code.com/gnupg/issue1461
+Patch1: gnupg-1.4.13-big-endian.patch
URL: http://www.gnupg.org/
# Requires autoconf >= 2.60 because earlier autoconf didn't define $localedir.
BuildRequires: autoconf >= 2.60
@@ -33,6 +35,7 @@ only IDEA for symmetric-key encryption, which is patented worldwide).
%prep
%setup -q
%patch0 -p1 -b .gcc
+%patch1 -p1 -b .big-endian
# Convert these files to UTF-8, per rpmlint.
iconv -f koi8-ru -t utf-8 doc/gpg.ru.1 > doc/gpg.ru.utf8.1
@@ -113,6 +116,9 @@ exit 0
%{_mandir}/man7/gnupg.7.gz
%changelog
+* Mon Jan 07 2013 Dan Horák <dan[at]danny.cz> 1.4.13-2
+- fix build on big-endian arches (gnupg bug #1461)
+
* Wed Jan 02 2013 Brian C. Lane <bcl at redhat.com> 1.4.13-1
- New upstream v1.4.13
fixes for CVE-2012-6085 (#891142)
More information about the scm-commits
mailing list