[vim-command-t/f20] Fix BE arch issues.
Vít Ondruch
vondruch at fedoraproject.org
Fri Aug 15 08:46:15 UTC 2014
commit 167dc6795f2fad2adae3b6552d58df770a29e5cb
Author: Vít Ondruch <vondruch at redhat.com>
Date: Fri Aug 15 10:25:37 2014 +0200
Fix BE arch issues.
...-test-failure-on-big-endian-architectures.patch | 75 ++++++++++++++++++++
vim-command-t.spec | 10 +++-
2 files changed, 84 insertions(+), 1 deletions(-)
---
diff --git a/vim-command-t-1.10-Fix-test-failure-on-big-endian-architectures.patch b/vim-command-t-1.10-Fix-test-failure-on-big-endian-architectures.patch
new file mode 100644
index 0000000..e8ee8ff
--- /dev/null
+++ b/vim-command-t-1.10-Fix-test-failure-on-big-endian-architectures.patch
@@ -0,0 +1,75 @@
+From 953aa33ab33ca6059f85dc8ebb40c3b6bbaae39c Mon Sep 17 00:00:00 2001
+From: Greg Hurrell <greg at hurrell.net>
+Date: Thu, 14 Aug 2014 07:40:39 -0700
+Subject: [PATCH] Fix (spurious) test failure on big-endian architectures
+
+Our example includes a int_64_t value (the PDU's length prefix), which
+is endian-sensitive and so needs to be asserted using native endianness.
+
+Fixes:
+
+ https://github.com/wincent/Command-T/issues/101
+ https://bugzilla.redhat.com/show_bug.cgi?id=1130079
+---
+ spec/command-t/watchman/utils_spec.rb | 45 ++++++++++++++++++++++++-----------
+ 1 file changed, 31 insertions(+), 14 deletions(-)
+
+diff --git a/spec/command-t/watchman/utils_spec.rb b/spec/command-t/watchman/utils_spec.rb
+index 8f174f7..4bb5c4e 100644
+--- a/spec/command-t/watchman/utils_spec.rb
++++ b/spec/command-t/watchman/utils_spec.rb
+@@ -379,20 +379,37 @@ def roundtrip(value)
+
+ it 'generates a correct serialization' do
+ # in Ruby 1.8, hashes aren't ordered, so two serializations are possible
+- expected = [
+- binary(
+- "\x00\x01\x06\x49\x00\x00\x00\x00\x00\x00\x00\x00\x03\x03\x02\x03" \
+- "\x05query\x02\x03\x0a/some/path\x01\x03\x02\x02\x03\x0aexpression" \
+- "\x00\x03\x02\x02\x03\x04type\x02\x03\x01f\x02\x03\x06fields\x00" \
+- "\x03\x01\x02\x03\x04name"
+- ),
+- binary(
+- "\x00\x01\x06\x49\x00\x00\x00\x00\x00\x00\x00\x00\x03\x03\x02\x03" \
+- "\x05query\x02\x03\x0a/some/path\x01\x03\x02\x02\x03\x06fields\x00" \
+- "\x03\x01\x02\x03\x04name\x02\x03\x0aexpression\x00\x03\x02\x02" \
+- "\x03\x04type\x02\x03\x01f"
+- )
+- ]
++ if little_endian?
++ expected = [
++ binary(
++ "\x00\x01\x06\x49\x00\x00\x00\x00\x00\x00\x00\x00\x03\x03\x02\x03" \
++ "\x05query\x02\x03\x0a/some/path\x01\x03\x02\x02\x03\x0a" \
++ "expression\x00\x03\x02\x02\x03\x04type\x02\x03\x01f\x02\x03\x06" \
++ "fields\x00\x03\x01\x02\x03\x04name"
++ ),
++ binary(
++ "\x00\x01\x06\x49\x00\x00\x00\x00\x00\x00\x00\x00\x03\x03\x02\x03" \
++ "\x05query\x02\x03\x0a/some/path\x01\x03\x02\x02\x03\x06fields" \
++ "\x00\x03\x01\x02\x03\x04name\x02\x03\x0aexpression\x00\x03\x02" \
++ "\x02\x03\x04type\x02\x03\x01f"
++ )
++ ]
++ else
++ expected = [
++ binary(
++ "\x00\x01\x06\x00\x00\x00\x00\x00\x00\x00\x49\x00\x03\x03\x02\x03" \
++ "\x05query\x02\x03\x0a/some/path\x01\x03\x02\x02\x03\x0a" \
++ "expression\x00\x03\x02\x02\x03\x04type\x02\x03\x01f\x02\x03\x06" \
++ "fields\x00\x03\x01\x02\x03\x04name"
++ ),
++ binary(
++ "\x00\x01\x06\x00\x00\x00\x00\x00\x00\x00\x49\x00\x03\x03\x02\x03" \
++ "\x05query\x02\x03\x0a/some/path\x01\x03\x02\x02\x03\x06fields" \
++ "\x00\x03\x01\x02\x03\x04name\x02\x03\x0aexpression\x00\x03\x02" \
++ "\x02\x03\x04type\x02\x03\x01f"
++ )
++ ]
++ end
+ expect(expected).to include(described_class.dump(query))
+ end
+ end
+--
+2.0.3
+
diff --git a/vim-command-t.spec b/vim-command-t.spec
index eb950d0..ec40785 100644
--- a/vim-command-t.spec
+++ b/vim-command-t.spec
@@ -6,7 +6,7 @@
Name: vim-command-t
Version: 1.10
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: An extremely fast, intuitive mechanism for opening files in VIM
Group: Applications/Editors
License: BSD
@@ -16,6 +16,9 @@ URL: https://wincent.com/products/command-t
# git clone git://git.wincent.com/command-t.git && cd command-t/
# git archive 1.10 -o command-t-1.10.tar.gz
Source0: command-t-%{version}.tar.gz
+# Fix test failure on BE architectures (rhbz#1130079).
+# https://github.com/wincent/Command-T/commit/953aa33ab33ca6059f85dc8ebb40c3b6bbaae39c
+Patch0: vim-command-t-1.10-Fix-test-failure-on-big-endian-architectures.patch
Requires: ruby(release)
# Although command-t does not depend on rubygems directly, the RubyGems are
# required by Ruby, but not always (rhbz#845011). So it is necessary to enforce
@@ -45,6 +48,8 @@ more weight.
%prep
%setup -q -c
+%patch0 -p1
+
%build
pushd ./ruby/command-t
@@ -101,6 +106,9 @@ vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null
%changelog
+* Fri Aug 15 2014 Vít Ondruch <vondruch at redhat.com> - 1.10-3
+- Fix BE arch issues.
+
* Mon Aug 11 2014 Vít Ondruch <vondruch at redhat.com> - 1.10-1
- Update to Command-T 1.10.
More information about the scm-commits
mailing list