Accepting request 1093088 from devel:tools:building

OBS-URL: https://build.opensuse.org/request/show/1093088
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/protobuf?expand=0&rev=73
This commit is contained in:
Dominique Leuenberger 2023-06-30 17:58:15 +00:00 committed by Git OBS Bridge
commit 16dc405c9e
9 changed files with 238 additions and 203 deletions

View File

@ -0,0 +1,71 @@
From 9820a511465c6f31a19bb3cad276e680ed9f2ee9 Mon Sep 17 00:00:00 2001
From: "Romain Geissler @ Amadeus" <romain.geissler@amadeus.com>
Date: Tue, 6 Jun 2023 10:49:55 -0700
Subject: [PATCH] Use the same ABI for static and shared libraries on
non-Windows platforms (#12983)
Hi,
It seems that until last year, the logic behind `PROTOBUF_USE_DLLS` was for Windows (MSCV) only. It was changed to all platforms here in https://github.com/protocolbuffers/protobuf/commit/5a0887fc6529596eff5c0f72febc602a9d494cc2
Last month, the generated pkg config files were updated to reflect the protobuf build-time value of `PROTOBUF_USE_DLLS` as it was indeed noted that it changes the ABI. This was done in https://github.com/protocolbuffers/protobuf/pull/12700 In the commit message it is mentionned that most likely we shall rather have a stable ABI.
Finally in https://github.com/protocolbuffers/protobuf/issues/12746 which at some point mentions https://issuetracker.google.com/issues/283987730#comment7 where a Google employee hits the linker issue:
```
undefined reference to `google::protobuf::internal::ThreadSafeArena::thread_cache_'
```
which denotes a mix of some .o or libs built `PROTOBUF_USE_DLLS` defined and some others build with `PROTOBUF_USE_DLLS` undefined, resulting in ABI incompatibilities.
I also hit this issue while trying to include protobuf in a corporate environment using it's own proprietary build system in which it is expected that .a and .so use a compatible ABI.
From my own understanding, ideally we should always use `thread_local` variables, but experience has shown that:
- old iOS (iOS < 9) didn't seem to accept `thread_local`, leading to the `GOOGLE_PROTOBUF_NO_THREADLOCAL` macro later renamed `PROTOBUF_NO_THREADLOCAL` which allowed to disable this, but it is not set anywhere in the protobuf code base. Also I doubt you still want to support such old iOS now, so maybe you should consider removing all `PROTOBUF_NO_THREADLOCAL` related code paths (this pull request doesn't do this).
- MSVC's DLL interface doesn't seem to accept exporting thread local variables (at least from what I understood, I know absolutely nothing about the Windows ecosystem), yet we can "hide" a thread local variable in a static function using a thread local variable. However in that case the access to TLS variable is not inlined, leading to worse performances, this hack shall be done only for Windows (actually when using MSVC) *AND* we build a shared library.
- In all other cases, a classical `thread_local` shall be used, no matter if we build a static or a shared library. In particular on Linux which I guess is the target Google cares the more about for its own production. This pull request achieves this.
Am I right in my conclusion ?
Closes #12983
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12983 from Romain-Geissler-1A:stable-abi-use-dll-non-windows dc23ff50f67cf0c8e45900a78700d1fc3e8bec39
PiperOrigin-RevId: 538230923
(cherry picked from commit 4329fde9cf3fab7d1b3a9abe0fbeee1ad8a8b111)
---
src/google/protobuf/arena.cc | 2 +-
src/google/protobuf/thread_safe_arena.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/google/protobuf/arena.cc b/src/google/protobuf/arena.cc
index 071360f14..0e4f12140 100644
--- a/src/google/protobuf/arena.cc
+++ b/src/google/protobuf/arena.cc
@@ -493,7 +493,7 @@ ThreadSafeArena::ThreadCache& ThreadSafeArena::thread_cache() {
new internal::ThreadLocalStorage<ThreadCache>();
return *thread_cache_->Get();
}
-#elif defined(PROTOBUF_USE_DLLS)
+#elif defined(PROTOBUF_USE_DLLS) && defined(_MSC_VER)
ThreadSafeArena::ThreadCache& ThreadSafeArena::thread_cache() {
static PROTOBUF_THREAD_LOCAL ThreadCache thread_cache;
return thread_cache;
diff --git a/src/google/protobuf/thread_safe_arena.h b/src/google/protobuf/thread_safe_arena.h
index d2a3e6e72..bcb9869d5 100644
--- a/src/google/protobuf/thread_safe_arena.h
+++ b/src/google/protobuf/thread_safe_arena.h
@@ -257,9 +257,9 @@ class PROTOBUF_EXPORT ThreadSafeArena {
// iOS does not support __thread keyword so we use a custom thread local
// storage class we implemented.
static ThreadCache& thread_cache();
-#elif defined(PROTOBUF_USE_DLLS)
- // Thread local variables cannot be exposed through DLL interface but we can
- // wrap them in static functions.
+#elif defined(PROTOBUF_USE_DLLS) && defined(_MSC_VER)
+ // Thread local variables cannot be exposed through MSVC DLL interface but we
+ // can wrap them in static functions.
static ThreadCache& thread_cache();
#else
PROTOBUF_CONSTINIT static PROTOBUF_THREAD_LOCAL ThreadCache thread_cache_;
--
2.41.0

View File

@ -1,85 +0,0 @@
From 15daef3b7912b9434955a8614e018de00591aefb Mon Sep 17 00:00:00 2001
From: Deanna Garcia <deannagarcia@google.com>
Date: Wed, 3 Aug 2022 17:40:03 +0000
Subject: [PATCH 1/2] Use release version instead of libtool version
---
src/Makefile.am | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: protobuf-21.12/src/Makefile.am
===================================================================
--- protobuf-21.12.orig/src/Makefile.am
+++ protobuf-21.12/src/Makefile.am
@@ -18,7 +18,7 @@ else
PTHREAD_DEF =
endif
-PROTOBUF_VERSION = 32:12:0
+PROTOBUF_VERSION = 3.21.12
if GCC
# Turn on all warnings except for sign comparison (we ignore sign comparison
@@ -188,7 +188,7 @@ nobase_include_HEADERS =
lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
-libprotobuf_lite_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined
+libprotobuf_lite_la_LDFLAGS = -release $(PROTOBUF_VERSION) -export-dynamic -no-undefined
if HAVE_LD_VERSION_SCRIPT
libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map
EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map
@@ -235,7 +235,7 @@ libprotobuf_lite_la_SOURCES =
google/protobuf/wire_format_lite.cc
libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
-libprotobuf_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined
+libprotobuf_la_LDFLAGS = -release $(PROTOBUF_VERSION) -export-dynamic -no-undefined
if HAVE_LD_VERSION_SCRIPT
libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map
EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map
@@ -320,7 +320,7 @@ libprotobuf_la_SOURCES =
nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES)
libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
-libprotoc_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined
+libprotoc_la_LDFLAGS = -release $(PROTOBUF_VERSION) -export-dynamic -no-undefined
if HAVE_LD_VERSION_SCRIPT
libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map
EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map
Index: protobuf-21.12/cmake/libprotobuf-lite.cmake
===================================================================
--- protobuf-21.12.orig/cmake/libprotobuf-lite.cmake
+++ protobuf-21.12/cmake/libprotobuf-lite.cmake
@@ -112,7 +112,6 @@ if(protobuf_BUILD_SHARED_LIBS)
endif()
set_target_properties(libprotobuf-lite PROPERTIES
VERSION ${protobuf_VERSION}
- SOVERSION 32
OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
add_library(protobuf::libprotobuf-lite ALIAS libprotobuf-lite)
Index: protobuf-21.12/cmake/libprotobuf.cmake
===================================================================
--- protobuf-21.12.orig/cmake/libprotobuf.cmake
+++ protobuf-21.12/cmake/libprotobuf.cmake
@@ -128,7 +128,6 @@ if(protobuf_BUILD_SHARED_LIBS)
endif()
set_target_properties(libprotobuf PROPERTIES
VERSION ${protobuf_VERSION}
- SOVERSION 32
OUTPUT_NAME ${LIB_PREFIX}protobuf
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
add_library(protobuf::libprotobuf ALIAS libprotobuf)
Index: protobuf-21.12/cmake/libprotoc.cmake
===================================================================
--- protobuf-21.12.orig/cmake/libprotoc.cmake
+++ protobuf-21.12/cmake/libprotoc.cmake
@@ -130,7 +130,6 @@ endif()
set_target_properties(libprotoc PROPERTIES
COMPILE_DEFINITIONS LIBPROTOC_EXPORTS
VERSION ${protobuf_VERSION}
- SOVERSION 32
OUTPUT_NAME ${LIB_PREFIX}protoc
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
add_library(protobuf::libprotoc ALIAS libprotoc)

View File

@ -0,0 +1,11 @@
--- a/src/google/protobuf/port.h.orig 2023-04-24 14:27:40.734888878 +0200
+++ b/src/google/protobuf/port.h 2023-04-24 14:27:53.607255222 +0200
@@ -33,6 +33,8 @@
// port_def.inc and port_undef.inc so they are not visible from outside of
// protobuf.
+#include <stdint.h>
+
#ifndef GOOGLE_PROTOBUF_PORT_H__
#define GOOGLE_PROTOBUF_PORT_H__

View File

@ -1,3 +1,3 @@
libprotobuf3_21_12
libprotoc3_21_12
libprotobuf-lite3_21_12
libprotobuf22_5_0
libprotoc22_5_0
libprotobuf-lite22_5_0

View File

@ -1,16 +0,0 @@
Index: protobuf-21.4/src/google/protobuf/port_def.inc
===================================================================
--- protobuf-21.4.orig/src/google/protobuf/port_def.inc
+++ protobuf-21.4/src/google/protobuf/port_def.inc
@@ -652,7 +652,11 @@
#define PROTOBUF_CONSTINIT [[clang::require_constant_initialization]]
#define PROTOBUF_CONSTEXPR constexpr
#elif PROTOBUF_GNUC_MIN(12, 2)
+#if PROTOBUF_CPLUSPLUS_MIN(201703L)
#define PROTOBUF_CONSTINIT __constinit
+#else
+#define PROTOBUF_CONSTINIT
+#endif
#define PROTOBUF_CONSTEXPR constexpr
// MSVC 17 currently seems to raise an error about constant-initialized pointers.
#elif defined(_MSC_VER) && _MSC_VER >= 1930

BIN
protobuf-21.12.tar.gz (Stored with Git LFS)

Binary file not shown.

3
protobuf-22.5.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4b98c800b352e7582bc92ed398999030ce4ebb49c7858dcb070850ec476b72f2
size 4924661

View File

@ -1,3 +1,45 @@
-------------------------------------------------------------------
Wed Jun 14 08:32:55 UTC 2023 - Fabian Vogt <fvogt@suse.com>
- Add patch to fix linking ThreadSafeArena:
* 0001-Use-the-same-ABI-for-static-and-shared-libraries-on-.patch
- Drop the protobuf-source package, no longer used
-------------------------------------------------------------------
Tue Jun 13 06:12:11 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 22.5:
C++
* Add missing cstdint header
* Fix: missing -DPROTOBUF_USE_DLLS in pkg-config (#12700)
* Avoid using string(JOIN..., which requires cmake 3.12
* Explicitly include GTest package in examples
* Bump Abseil submodule to 20230125.3 (#12660)
- update to 22.4:
C++
* Fix libprotoc: export useful symbols from .so
* Fix btree issue in map tests.
Python
* Fix bug in _internal_copy_files where the rule would fail in
downstream repositories.
Other
* Bump utf8_range to version with working pkg-config (#12584)
* Fix declared dependencies for pkg-config
* Update abseil dependency and reorder dependencies to ensure
we use the version specified in protobuf_deps.
* Turn off clang::musttail on i386
-------------------------------------------------------------------
Sun Jun 11 19:19:40 UTC 2023 - Dirk Müller <dmueller@suse.com>
- drop python2 handling
- fix version handling and package the private libs again
-------------------------------------------------------------------
Tue May 9 09:26:46 UTC 2023 - Martin Pluskal <mpluskal@suse.com>
- Fix confusion in versions
-------------------------------------------------------------------
Fri Apr 28 07:07:50 UTC 2023 - Fridrich Strba <fstrba@suse.com>
@ -9,6 +51,54 @@ Thu Apr 27 06:59:31 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Make possible to build on older systems, like SLE12 that miss
some of the used macros.
-------------------------------------------------------------------
Mon Apr 24 12:30:51 UTC 2023 - Adrian Schröter <adrian@suse.de>
- update to v22.3
UPB (Python/PHP/Ruby C-Extension)
* Remove src prefix from proto import
* Fix .gitmodules to use the correct absl branch
* Remove erroneous dependency on googletest
- update to 22.2:
Java
* Add version to intra proto dependencies and add kotlin stdlib
dependency
* Add $ back for osgi header
* Remove $ in pom files
- update to 22.1:
* Add visibility of plugin.proto to python directory
* Strip "src" from file name of plugin.proto
* Add OSGi headers to pom files.
* Remove errorprone dependency from kotlin protos.
* Version protoc according to the compiler version number.
- update to 22.0:
* This version includes breaking changes to: Cpp.
Please refer to the migration guide for information:
https://protobuf.dev/support/migration/#compiler-22
* [Cpp] Migrate to Abseil's logging library.
* [Cpp] `proto2::Map::value_type` changes to `std::pair`.
* [Cpp] Mark final ZeroCopyInputStream, ZeroCopyOutputStream,
and DefaultFieldComparator classes.
* [Cpp] Add a dependency on Abseil (#10416)
* [Cpp] Remove all autotools usage (#10132)
* [Cpp] Add C++20 reserved keywords
* [Cpp] Dropped C++11 Support
* [Cpp] Delete Arena::Init
* [Cpp] Replace JSON parser with new implementation
* [Cpp] Make RepeatedField::GetArena non-const in order to
support split RepeatedFields.
* long list of bindings specific fixes see
https://github.com/protocolbuffers/protobuf/releases/tag/v22.0
- python sub packages version is set 4.22.3 as defined in
python/google/protobuf/__init__.py to stay compatible
- skip python2 builds by default
- drop patches:
* 10355.patch,
* gcc12-disable-__constinit-with-c++-11.patch (merged upstream)
- added patches:
* add-missing-stdint-header.patch added for compile fixes
-------------------------------------------------------------------
Thu Mar 23 09:01:50 UTC 2023 - Martin Liška <mliska@suse.cz>

View File

@ -18,17 +18,17 @@
%{!?make_build:%global make_build make %{?_smp_mflags}}
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define sover 3_21_12
%define tarname protobuf
%define src_install_dir %{_prefix}/src/%{name}
%define extra_java_flags -source 7 -target 7
# requires gmock, which is not yet in the distribution
%bcond_with check
%bcond_without java
%bcond_without python2
%bcond_without python3
Name: protobuf
Version: 21.12
Version: 22.5
# python module have their own version specified in python/google/protobuf/__init__.py
%global gversion 22.5
%global sover 22_5_0
Release: 0
Summary: Protocol Buffers - Google's data interchange format
License: BSD-3-Clause
@ -38,17 +38,17 @@ Source0: https://github.com/protocolbuffers/protobuf/archive/v%{version}.
Source1: manifest.txt.in
Source2: baselibs.conf
Source1000: %{name}-rpmlintrc
Patch0: gcc12-disable-__constinit-with-c++-11.patch
# https://github.com/protocolbuffers/protobuf/pull/10355
Patch1: 10355.patch
Patch0: add-missing-stdint-header.patch
# PATCH-FIX-UPSTREAM https://github.com/protocolbuffers/protobuf/commit/4329fde9cf3fab7d1b3a9abe0fbeee1ad8a8b111
Patch1: 0001-Use-the-same-ABI-for-static-and-shared-libraries-on-.patch
BuildRequires: %{python_module abseil}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module setuptools}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: abseil-cpp-devel >= 20230125
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(zlib)
@ -105,29 +105,39 @@ RPC protocols and file formats.
%package devel
Summary: Header files, libraries and development documentation for %{name}
Group: Development/Libraries/C and C++
Requires: abseil-cpp-devel >= 20230125
Requires: gcc-c++
Requires: libprotobuf%{sover} = %{version}
Requires: libprotobuf%{sover} = %{gversion}
Requires: libprotobuf-lite%{sover}
Requires: pkgconfig(zlib)
Conflicts: protobuf2-devel
Provides: libprotobuf-devel = %{version}
Conflicts: protobuf21-devel
Provides: libprotobuf-devel = %{gversion}
%description devel
Protocol Buffers are a way of encoding structured data in an efficient yet
extensible format. Google uses Protocol Buffers for almost all of its internal
RPC protocols and file formats.
%package source
Summary: Source code of protobuf
Group: Development/Sources
BuildArch: noarch
%if 0%{?python_subpackage_only}
%package -n python-%{name}
Version: 4.%{gversion}
Summary: Python Bindings for Google Protocol Buffers
Group: Development/Libraries/Python
%description source
Protocol Buffers are a way of encoding structured data in an efficient yet
extensible format. Google uses Protocol Buffers for almost all of its internal
RPC protocols and file formats.
%description -n python-%{name}
This package contains the Python bindings for Google Protocol Buffers.
This package contains source code for Protocol Buffers.
%else
%package -n python3-%{name}
Version: 4.%{gversion}
Summary: Python3 Bindings for Google Protocol Buffers
Group: Development/Libraries/Python
%description -n python3-%{name}
This package contains the Python bindings for Google Protocol Buffers.
%endif
%package -n %{name}-java
Summary: Java Bindings for Google Protocol Buffers
@ -137,44 +147,14 @@ Requires: java >= 1.6.0
%description -n %{name}-java
This package contains the Java bindings for Google Protocol Buffers.
%if 0%{?python_subpackage_only}
%package -n python-%{name}
Summary: Python Bindings for Google Protocol Buffers
Group: Development/Libraries/Python
Requires: python-six >= 1.9
%description -n python-%{name}
This package contains the Python bindings for Google Protocol Buffers.
%else
%package -n python2-%{name}
Summary: Python2 Bindings for Google Protocol Buffers
Group: Development/Libraries/Python
Provides: python-%{name} = %{version}
Obsoletes: python-%{name} < %{version}
Requires: python2-six >= 1.9
%description -n python2-%{name}
This package contains the Python bindings for Google Protocol Buffers.
%package -n python3-%{name}
Summary: Python3 Bindings for Google Protocol Buffers
Group: Development/Libraries/Python
Requires: python3-six >= 1.9
%description -n python3-%{name}
This package contains the Python bindings for Google Protocol Buffers.
%endif
%prep
%autosetup -p1 -n %{tarname}-%{version}
%autosetup -p1 -n %{tarname}-%{gversion}
# The previous blank line is crucial for older system being able
# to use the autosetup macro
mkdir gmock
%if %{with python2} || %{with python3}
%if %{with python3}
# only needed for test suite which we don't call anyways.
# googleapis is broken on sle12
sed -i '/apputils/d' python/setup.py
@ -184,15 +164,17 @@ sed -i '/google_test_dir/d' python/setup.py
sed -i -e '/env python/d' python/google/protobuf/internal/*.py
%build
autoreconf -fvi
%configure \
--disable-static
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
%make_build
# tests are not part of offical tar ball
%cmake \
-Dprotobuf_BUILD_TESTS=OFF \
-Dprotobuf_ABSL_PROVIDER=package
%cmake_build
%if %{with java}
pushd java
../src/protoc --java_out=core/src/main/java -I../src ../src/google/protobuf/descriptor.proto
pushd ../java
../build/protoc --java_out=core/src/main/java -I../src ../src/google/protobuf/descriptor.proto
mkdir classes
javac %{extra_java_flags} -d classes core/src/main/java/com/google/protobuf/*.java
sed -e 's/@VERSION@/%{version}/' < %{SOURCE1} > manifest.txt
@ -200,7 +182,8 @@ jar cfm %{name}-java-%{version}.jar manifest.txt -C classes com
popd
%endif
pushd python
pushd ../python
export PROTOC=../build/protoc
%python_build
popd
@ -210,10 +193,8 @@ popd
%endif
%install
%make_install
%cmake_install
install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto.vim
# no need for that
find %{buildroot} -type f -name "*.la" -delete -print
%if %{with java}
pushd java
@ -229,27 +210,11 @@ popd
%endif
pushd python
export PROTOC=../build/protoc
%python_install
popd
%python_expand %fdupes %{buildroot}%{$python_sitelib}
mkdir -p %{buildroot}%{src_install_dir}
tar -xzf %{SOURCE0} --strip-components=1 -C %{buildroot}%{src_install_dir}
%fdupes %{buildroot}%{src_install_dir}
# Fix env-script-interpreter rpmlint error
find %{buildroot}%{src_install_dir} -type f -name "*.js" -exec sed -i 's|#!.*%{_bindir}/env node|#!%{_bindir}/node|' "{}" +
find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*%{_bindir}/env python2.7|#!%{_bindir}/python2.7|' "{}" +
find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*%{_bindir}/env python|#!%{_bindir}/python|' "{}" +
find %{buildroot}%{src_install_dir} -type f -name "*.rb" -exec sed -i 's|#!.*%{_bindir}/env ruby|#!%{_bindir}/ruby|' "{}" +
find %{buildroot}%{src_install_dir} -type f -name "*.sh" -exec sed -i 's|#!.*%{_bindir}/env bash|#!/bin/bash|' "{}" +
# And stop requiring ridiculously old Python version
find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!%{_bindir}/python2.4|#!%{_bindir}/python2.7|' "{}" +
# Fix spurious-executable-perm rpmlint error
chmod -x %{buildroot}%{src_install_dir}/src/google/protobuf/arenastring.h
chmod -x %{buildroot}%{src_install_dir}/src/google/protobuf/reflection.h
# Fix version-control-internal-file rpmlint warning
find %{buildroot}%{src_install_dir} -type f -name ".gitignore" -exec rm -f "{}" +
%fdupes %{buildroot}%{_prefix}
%post -n libprotobuf%{sover} -p /sbin/ldconfig
@ -261,42 +226,41 @@ find %{buildroot}%{src_install_dir} -type f -name ".gitignore" -exec rm -f "{}"
%files -n libprotobuf%{sover}
%license LICENSE
%{_libdir}/libprotobuf-3.%{version}.so
%{_libdir}/libprotobuf.so.%{gversion}.0
%files -n libprotoc%{sover}
%{_libdir}/libprotoc-3.%{version}.so
%{_libdir}/libprotoc.so.%{gversion}.0
%files -n libprotobuf-lite%{sover}
%{_libdir}/libprotobuf-lite-3.%{version}.so
%{_libdir}/libprotobuf-lite.so.%{gversion}.0
%files devel
%doc CHANGES.txt CONTRIBUTORS.txt README.md
%{_bindir}/protoc
%doc CONTRIBUTORS.txt README.md
%{_bindir}/protoc*
%{_includedir}/google
%{_includedir}/*.h
%{_libdir}/cmake/protobuf
%{_libdir}/cmake/utf8_range
%{_libdir}/pkgconfig/*
%{_libdir}/libprotobuf-lite.so
%{_libdir}/libprotobuf.so
%{_libdir}/libprotoc.so
%{_libdir}/libutf8_range.a
%{_libdir}/libutf8_validity.a
%{_datadir}/vim
%files source
%{src_install_dir}
%if %{with java}
%files -n %{name}-java -f java/.mfiles
%{_javadir}/%{name}.jar
%endif
%if %{with python2} && ! 0%{?python_subpackage_only}
%files -n python2-%{name}
%license LICENSE
%{python2_sitelib}/*
%endif
%if %{with python3} || ( %{with python2} && 0%{?python_subpackage_only} )
%if %{with python3}
%files %{python_files %{name}}
%license LICENSE
%{python_sitelib}/*
%dir %{python_sitelib}/google
%{python_sitelib}/google/protobuf
%{python_sitelib}/protobuf*nspkg.pth
%{python_sitelib}/protobuf*info
%endif
%changelog