From bcb7feb017b8f97010a7f1a3c5fb5c6c8959847d Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Thu, 6 Nov 2014 13:20:38 -0500 Subject: [PATCH] Bump to upstream release 2.6.0 (rh# 1154474). - Rebase 'java fixes' patch on 2.6.0 pom.xml. - Drop patch #3 (fall back to generic GCC atomics if no specialized atomics exist, e.g. AArch64 GCC); this has been upstreamed. --- .gitignore | 1 + ...ic-GCC-support-for-atomic-operations.patch | 209 ------------------ protobuf-2.5.0-makefile.patch | 30 --- ...s.patch => protobuf-2.6.0-java-fixes.patch | 28 ++- protobuf.spec | 19 +- sources | 2 +- 6 files changed, 30 insertions(+), 259 deletions(-) delete mode 100644 0001-Add-generic-GCC-support-for-atomic-operations.patch delete mode 100644 protobuf-2.5.0-makefile.patch rename protobuf-2.5.0-java-fixes.patch => protobuf-2.6.0-java-fixes.patch (85%) diff --git a/.gitignore b/.gitignore index b61dc84..db06dd6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ protobuf-2.3.0.tar.bz2 /protobuf-2.4.1.tar.bz2 /protobuf-2.5.0.tar.bz2 +/protobuf-2.6.0.tar.bz2 diff --git a/0001-Add-generic-GCC-support-for-atomic-operations.patch b/0001-Add-generic-GCC-support-for-atomic-operations.patch deleted file mode 100644 index 171695f..0000000 --- a/0001-Add-generic-GCC-support-for-atomic-operations.patch +++ /dev/null @@ -1,209 +0,0 @@ -From d099ec11fc8c2eb97df2bf2fbb6996066eefca46 Mon Sep 17 00:00:00 2001 -From: Stanislav Ochotnicky -Date: Thu, 2 May 2013 10:43:47 +0200 -Subject: [PATCH] Add generic GCC support for atomic operations - -This is useful for architectures where no specialized code has been -written. ---- - src/google/protobuf/stubs/atomicops.h | 2 +- - .../stubs/atomicops_internals_generic_gcc.h | 139 +++++++++++++++++++++ - src/google/protobuf/stubs/platform_macros.h | 14 ++- - 3 files changed, 153 insertions(+), 2 deletions(-) - create mode 100644 src/google/protobuf/stubs/atomicops_internals_generic_gcc.h - -diff --git a/src/google/protobuf/stubs/atomicops.h b/src/google/protobuf/stubs/atomicops.h -index b8581fa..883b125 100644 ---- a/src/google/protobuf/stubs/atomicops.h -+++ b/src/google/protobuf/stubs/atomicops.h -@@ -185,7 +185,7 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR - #elif defined(__pnacl__) - #include - #else --GOOGLE_PROTOBUF_ATOMICOPS_ERROR -+#include - #endif - - // Unknown. -diff --git a/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h b/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h -new file mode 100644 -index 0000000..3fc2a9b ---- /dev/null -+++ b/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h -@@ -0,0 +1,139 @@ -+// Protocol Buffers - Google's data interchange format -+// Copyright 2013 Red Hat Inc. All rights reserved. -+// http://code.google.com/p/protobuf/ -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions are -+// met: -+// -+// * Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// * Redistributions in binary form must reproduce the above -+// copyright notice, this list of conditions and the following disclaimer -+// in the documentation and/or other materials provided with the -+// distribution. -+// * Neither the name of Red Hat Inc. nor the names of its -+// contributors may be used to endorse or promote products derived from -+// this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+// This file is an internal atomic implementation, use atomicops.h instead. -+ -+#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_ -+#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_ -+ -+namespace google { -+namespace protobuf { -+namespace internal { -+ -+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, -+ Atomic32 old_value, -+ Atomic32 new_value) { -+ __atomic_compare_exchange_n(ptr, &old_value, new_value, true, -+ __ATOMIC_RELAXED, __ATOMIC_RELAXED); -+ return old_value; -+} -+ -+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, -+ Atomic32 new_value) { -+ return __atomic_exchange_n(ptr, new_value, __ATOMIC_RELAXED); -+} -+ -+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, -+ Atomic32 increment) { -+ return __atomic_add_fetch(ptr, increment, __ATOMIC_RELAXED); -+} -+ -+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr, -+ Atomic32 increment) { -+ return __atomic_add_fetch(ptr, increment, __ATOMIC_SEQ_CST); -+} -+ -+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr, -+ Atomic32 old_value, -+ Atomic32 new_value) { -+ __atomic_compare_exchange(ptr, &old_value, &new_value, true, -+ __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE); -+ return old_value; -+} -+ -+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr, -+ Atomic32 old_value, -+ Atomic32 new_value) { -+ __atomic_compare_exchange_n(ptr, &old_value, new_value, true, -+ __ATOMIC_RELEASE, __ATOMIC_ACQUIRE); -+ return old_value; -+} -+ -+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) { -+ __atomic_store_n(ptr, value, __ATOMIC_RELAXED); -+} -+ -+inline void MemoryBarrier() { -+ __sync_synchronize(); -+} -+ -+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) { -+ __atomic_store_n(ptr, value, __ATOMIC_ACQUIRE); -+} -+ -+inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) { -+ __atomic_store_n(ptr, value, __ATOMIC_RELEASE); -+} -+ -+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) { -+ return __atomic_load_n(ptr, __ATOMIC_RELAXED); -+} -+ -+inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) { -+ return __atomic_load_n(ptr, __ATOMIC_ACQUIRE); -+} -+ -+inline Atomic32 Release_Load(volatile const Atomic32* ptr) { -+ return __atomic_load_n(ptr, __ATOMIC_RELEASE); -+} -+ -+#ifdef __LP64__ -+ -+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) { -+ __atomic_store_n(ptr, value, __ATOMIC_RELEASE); -+} -+ -+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) { -+ return __atomic_load_n(ptr, __ATOMIC_ACQUIRE); -+} -+ -+inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr, -+ Atomic64 old_value, -+ Atomic64 new_value) { -+ __atomic_compare_exchange_n(ptr, &old_value, new_value, true, -+ __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE); -+ return old_value; -+} -+ -+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr, -+ Atomic64 old_value, -+ Atomic64 new_value) { -+ __atomic_compare_exchange_n(ptr, &old_value, new_value, true, -+ __ATOMIC_RELAXED, __ATOMIC_RELAXED); -+ return old_value; -+} -+ -+#endif // defined(__LP64__) -+ -+} // namespace internal -+} // namespace protobuf -+} // namespace google -+ -+#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_ -diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h -index b1df60e..db691d8 100644 ---- a/src/google/protobuf/stubs/platform_macros.h -+++ b/src/google/protobuf/stubs/platform_macros.h -@@ -43,6 +43,9 @@ - #elif defined(_M_IX86) || defined(__i386__) - #define GOOGLE_PROTOBUF_ARCH_IA32 1 - #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 -+#elif defined(__aarch64__) -+#define GOOGLE_PROTOBUF_ARCH_AARCH64 1 -+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1 - #elif defined(__QNX__) - #define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1 - #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 -@@ -54,9 +57,18 @@ - #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 - #elif defined(__pnacl__) - #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 --#elif defined(__ppc__) -+#elif defined(__ppc64__) || defined(__PPC64__) -+#define GOOGLE_PROTOBUF_ARCH_PPC64 1 -+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1 -+#elif defined(__ppc__) || defined(__PPC__) - #define GOOGLE_PROTOBUF_ARCH_PPC 1 - #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 -+#elif defined(__s390x__) -+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1 -+#define GOOGLE_PROTOBUF_ARCH_S390X 1 -+#elif defined(__s390__) -+#define GOOGLE_PROTOBUF_ARCH_32_BIT 1 -+#define GOOGLE_PROTOBUF_ARCH_S390 1 - #else - #error Host architecture was not detected as supported by protobuf - #endif --- -1.8.1.4 - diff --git a/protobuf-2.5.0-makefile.patch b/protobuf-2.5.0-makefile.patch deleted file mode 100644 index 626ad1e..0000000 --- a/protobuf-2.5.0-makefile.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up protobuf-2.5.0/src/Makefile.am.generic protobuf-2.5.0/src/Makefile.am ---- protobuf-2.5.0/src/Makefile.am.generic 2013-05-16 10:25:07.000000000 +0200 -+++ protobuf-2.5.0/src/Makefile.am 2013-05-16 10:26:15.000000000 +0200 -@@ -42,6 +42,7 @@ nobase_include_HEADERS = - google/protobuf/stubs/atomicops_internals_arm_gcc.h \ - google/protobuf/stubs/atomicops_internals_arm_qnx.h \ - google/protobuf/stubs/atomicops_internals_atomicword_compat.h \ -+ google/protobuf/stubs/atomicops_internals_generic_gcc.h \ - google/protobuf/stubs/atomicops_internals_macosx.h \ - google/protobuf/stubs/atomicops_internals_mips_gcc.h \ - google/protobuf/stubs/atomicops_internals_pnacl.h \ -diff -up protobuf-2.5.0/src/Makefile.in.generic protobuf-2.5.0/src/Makefile.in ---- protobuf-2.5.0/src/Makefile.in.generic 2013-05-16 10:25:14.000000000 +0200 -+++ protobuf-2.5.0/src/Makefile.in 2013-05-16 10:27:00.000000000 +0200 -@@ -309,6 +309,7 @@ am__nobase_include_HEADERS_DIST = google - google/protobuf/stubs/atomicops_internals_arm_gcc.h \ - google/protobuf/stubs/atomicops_internals_arm_qnx.h \ - google/protobuf/stubs/atomicops_internals_atomicword_compat.h \ -+ google/protobuf/stubs/atomicops_internals_generic_gcc.h \ - google/protobuf/stubs/atomicops_internals_macosx.h \ - google/protobuf/stubs/atomicops_internals_mips_gcc.h \ - google/protobuf/stubs/atomicops_internals_pnacl.h \ -@@ -518,6 +519,7 @@ nobase_include_HEADERS = \ - google/protobuf/stubs/atomicops_internals_arm_gcc.h \ - google/protobuf/stubs/atomicops_internals_arm_qnx.h \ - google/protobuf/stubs/atomicops_internals_atomicword_compat.h \ -+ google/protobuf/stubs/atomicops_internals_generic_gcc.h \ - google/protobuf/stubs/atomicops_internals_macosx.h \ - google/protobuf/stubs/atomicops_internals_mips_gcc.h \ - google/protobuf/stubs/atomicops_internals_pnacl.h \ diff --git a/protobuf-2.5.0-java-fixes.patch b/protobuf-2.6.0-java-fixes.patch similarity index 85% rename from protobuf-2.5.0-java-fixes.patch rename to protobuf-2.6.0-java-fixes.patch index 9952627..b116235 100644 --- a/protobuf-2.5.0-java-fixes.patch +++ b/protobuf-2.6.0-java-fixes.patch @@ -1,6 +1,6 @@ ---- protobuf-2.5.0/java/pom.xml.orig 2013-02-26 09:58:21.000000000 -0800 -+++ protobuf-2.5.0/java/pom.xml 2013-03-09 19:16:29.581904896 -0800 -@@ -1,152 +1,79 @@ +--- protobuf-2.6.0/java/pom.xml.orig 2014-08-25 15:52:36.000000000 -0400 ++++ protobuf-2.6.0/java/pom.xml 2014-11-06 13:12:04.459524614 -0500 +@@ -1,160 +1,79 @@ com.google.protobuf protobuf-java - 2.5.0 + 2.6.0 bundle Protocol Buffer Java API @@ -107,6 +107,8 @@ - - - +- +- - - @@ -114,7 +116,13 @@ - - - +- +- +- - +- +- +- - - true - * + http://code.google.com/p/protobuf + com.google.protobuf + com.google.protobuf;version=2.5.0 @@ -151,11 +161,7 @@ lite - - -@@ -161,45 +88,33 @@ - **/FieldSet.java - **/GeneratedMessageLite.java +@@ -173,45 +92,33 @@ **/Internal.java **/InvalidProtocolBufferException.java **/LazyStringArrayList.java @@ -173,6 +179,8 @@ **/RopeByteString.java **/Utf8.java **/LazyField.java + **/LazyFieldLite.java + **/ProtocolStringList.java - - **/LiteTest.java diff --git a/protobuf.spec b/protobuf.spec index a39966e..693f6c0 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -15,20 +15,18 @@ Summary: Protocol Buffers - Google's data interchange format Name: protobuf -Version: 2.5.0 -Release: 11%{?dist} +Version: 2.6.0 +Release: 1%{?dist} License: BSD Group: Development/Libraries Source: http://protobuf.googlecode.com/files/protobuf-%{version}.tar.bz2 Source1: ftdetect-proto.vim Source2: protobuf-init.el Patch1: protobuf-2.5.0-fedora-gtest.patch -Patch2: protobuf-2.5.0-java-fixes.patch -Patch3: 0001-Add-generic-GCC-support-for-atomic-operations.patch -Patch4: protobuf-2.5.0-makefile.patch +Patch2: protobuf-2.6.0-java-fixes.patch URL: http://code.google.com/p/protobuf/ BuildRequires: automake autoconf libtool pkgconfig zlib-devel -BuildRequires: emacs +BuildRequires: emacs(bin) BuildRequires: emacs-el >= 24.1 %if %{with gtest} BuildRequires: gtest-devel @@ -189,9 +187,6 @@ chmod 644 examples/* rm -rf java/src/test %endif -%patch3 -p1 -b .generic-atomics -%patch4 -p1 -b .generic-atomics-makefile - %build iconv -f iso8859-1 -t utf-8 CONTRIBUTORS.txt > CONTRIBUTORS.txt.utf8 mv CONTRIBUTORS.txt.utf8 CONTRIBUTORS.txt @@ -328,6 +323,12 @@ install -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{emacs_startdir} %endif %changelog +* Sun Oct 19 2014 Conrad Meyer - 2.6.0-1 +- Bump to upstream release 2.6.0. +- Rebase 'java fixes' patch on 2.6.0 pom.xml. +- Drop patch #3 (fall back to generic GCC atomics if no specialized atomics + exist, e.g. AArch64 GCC); this has been upstreamed. + * Sun Oct 19 2014 Conrad Meyer - 2.5.0-11 - protobuf-emacs requires emacs(bin), not emacs (rh# 1154456) diff --git a/sources b/sources index cf25af4..928a5ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a72001a9067a4c2c4e0e836d0f92ece4 protobuf-2.5.0.tar.bz2 +78253c509a055dab316a21e754cb278a protobuf-2.6.0.tar.bz2