|
|
|
@ -1,42 +1,119 @@
|
|
|
|
|
# Build -python subpackage
|
|
|
|
|
%bcond_without python
|
|
|
|
|
# Build -python subpackage with C++. This significantly improves performance
|
|
|
|
|
# compared to the pure-Python implementation.
|
|
|
|
|
%bcond_without python_cpp
|
|
|
|
|
# Build -java subpackage
|
|
|
|
|
%if %{defined rhel}
|
|
|
|
|
%bcond_with java
|
|
|
|
|
%else
|
|
|
|
|
%bcond_without java
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
#global rcver rc2
|
|
|
|
|
# Disable LTO to work around annobin error messages
|
|
|
|
|
%global _lto_cflags %nil
|
|
|
|
|
|
|
|
|
|
Summary: Protocol Buffers - Google's data interchange format
|
|
|
|
|
Name: protobuf
|
|
|
|
|
Version: 3.14.0
|
|
|
|
|
Release: 13%{?dist}
|
|
|
|
|
License: BSD
|
|
|
|
|
# NOTE: perl-Alien-ProtoBuf has an exact-version dependency on the version of
|
|
|
|
|
# protobuf with which it was built; it therefore needs to be rebuilt even for
|
|
|
|
|
# “patch” updates of protobuf.
|
|
|
|
|
Version: 3.19.6
|
|
|
|
|
%global so_version 30
|
|
|
|
|
Release: 11%{?dist}
|
|
|
|
|
|
|
|
|
|
# The entire source is BSD-3-Clause, except the following files, which belong
|
|
|
|
|
# to the build system; are unpackaged maintainer utility scripts; or are used
|
|
|
|
|
# only for building tests that are not packaged—and so they do not affect the
|
|
|
|
|
# licenses of the binary RPMs:
|
|
|
|
|
#
|
|
|
|
|
# FSFAP:
|
|
|
|
|
# m4/ax_cxx_compile_stdcxx.m4
|
|
|
|
|
# m4/ax_prog_cc_for_build.m4
|
|
|
|
|
# m4/ax_prog_cxx_for_build.m4
|
|
|
|
|
# Apache-2.0:
|
|
|
|
|
# python/mox.py
|
|
|
|
|
# python/stubout.py
|
|
|
|
|
# third_party/googletest/
|
|
|
|
|
# except the following, which are BSD-3-Clause:
|
|
|
|
|
# third_party/googletest/googletest/test/gtest_pred_impl_unittest.cc
|
|
|
|
|
# third_party/googletest/googletest/include/gtest/gtest-param-test.h
|
|
|
|
|
# third_party/googletest/googletest/include/gtest/gtest-param-test.h.pump
|
|
|
|
|
# third_party/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h
|
|
|
|
|
# third_party/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump
|
|
|
|
|
# third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h
|
|
|
|
|
# third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h.pump
|
|
|
|
|
# MIT:
|
|
|
|
|
# conformance/third_party/jsoncpp/json.h
|
|
|
|
|
# conformance/third_party/jsoncpp/jsoncpp.cpp
|
|
|
|
|
License: BSD-3-Clause
|
|
|
|
|
URL: https://github.com/protocolbuffers/protobuf
|
|
|
|
|
Source: https://github.com/protocolbuffers/protobuf/archive/v%{version}%{?rcver}/%{name}-%{version}%{?rcver}-all.tar.gz
|
|
|
|
|
Source0: %{url}/archive/v%{version}%{?rcver}/protobuf-%{version}%{?rcver}-all.tar.gz
|
|
|
|
|
|
|
|
|
|
Source1: ftdetect-proto.vim
|
|
|
|
|
Source2: protobuf-init.el
|
|
|
|
|
|
|
|
|
|
# We bundle a copy of the exact version of gtest that is used by upstream in
|
|
|
|
|
# the source RPM rather than using the system copy. This is to be discouraged,
|
|
|
|
|
# but necessary in this case. It is not treated as a bundled library because
|
|
|
|
|
# it is used only at build time, and contributes nothing to the installed
|
|
|
|
|
# files. We take measures to verify this in %%check. See
|
|
|
|
|
# https://github.com/protocolbuffers/protobuf/tree/v%%{version}/third_party to
|
|
|
|
|
# check the correct commit hash.
|
|
|
|
|
%global gtest_url https://github.com/google/googletest
|
|
|
|
|
%global gtest_commit 5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081
|
|
|
|
|
%global gtest_dir googletest-%{gtest_commit}
|
|
|
|
|
# For tests (using exactly the same version as the release)
|
|
|
|
|
Source3: https://github.com/google/googletest/archive/5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081.zip
|
|
|
|
|
Source3: %{gtest_url}/archive/%{gtest_commit}/%{gtest_dir}.tar.gz
|
|
|
|
|
|
|
|
|
|
# Man page hand-written for Fedora in groff_man(7) format based on “protoc
|
|
|
|
|
# --help” output.
|
|
|
|
|
Source4: protoc.1
|
|
|
|
|
|
|
|
|
|
# https://github.com/protocolbuffers/protobuf/issues/8082
|
|
|
|
|
Patch1: protobuf-3.14-disable-IoTest.LargeOutput.patch
|
|
|
|
|
# Disable tests that are failing on 32bit systems
|
|
|
|
|
Patch2: disable-tests-on-32-bit-systems.patch
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2051202
|
|
|
|
|
# java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
|
|
|
|
|
# throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @12d5624a
|
|
|
|
|
# at com.google.protobuf.ServiceTest.testGetPrototype(ServiceTest.java:107)
|
|
|
|
|
Patch3: protobuf-3.19.4-jre17-add-opens.patch
|
|
|
|
|
# Backport upstream commit da973aff2adab60a9e516d3202c111dbdde1a50f:
|
|
|
|
|
# Fix build with Python 3.11
|
|
|
|
|
#
|
|
|
|
|
# The PyFrameObject structure members have been removed from the public C API.
|
|
|
|
|
Patch4: protobuf-3.19.4-python3.11.patch
|
|
|
|
|
|
|
|
|
|
# A bundled copy of jsoncpp is included in the conformance tests, but the
|
|
|
|
|
# result is not packaged, so we do not treat it as a formal bundled
|
|
|
|
|
# dependency—thus the virtual Provides below is commented out. The bundling is
|
|
|
|
|
# removed in a later release:
|
|
|
|
|
# Make jsoncpp a formal dependency
|
|
|
|
|
# https://github.com/protocolbuffers/protobuf/pull/10739
|
|
|
|
|
# The bundled version number is obtained from JSONCPP_VERSION_STRING in
|
|
|
|
|
# conformance/third_party/jsoncpp/json.h.
|
|
|
|
|
# Provides: bundled(jsoncpp) = 1.6.5
|
|
|
|
|
|
|
|
|
|
# Fix for CVE-2021-22570 "protobuf: Incorrect parsing of nullchar in the proto symbol leads to Nullptr dereference"
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2050492
|
|
|
|
|
# Based on https://github.com/protocolbuffers/protobuf/commit/af95001202a035d78ff997e737bd67fca22ab32a
|
|
|
|
|
# As described in https://bugzilla.suse.com/show_bug.cgi?id=1195258
|
|
|
|
|
Patch2: CVE-2021-22570.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: autoconf
|
|
|
|
|
BuildRequires: automake
|
|
|
|
|
BuildRequires: emacs
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
|
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
|
|
|
|
|
BuildRequires: emacs
|
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
|
|
|
|
|
|
%if %{with java}
|
|
|
|
|
%ifnarch %{java_arches}
|
|
|
|
|
Obsoletes: protobuf-java-util < 3.19.4-4
|
|
|
|
|
Obsoletes: protobuf-javadoc < 3.19.4-4
|
|
|
|
|
Obsoletes: protobuf-parent < 3.19.4-4
|
|
|
|
|
Obsoletes: protobuf-bom < 3.19.4-4
|
|
|
|
|
Obsoletes: protobuf-javalite < 3.19.4-4
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Protocol Buffers are a way of encoding structured data in an efficient
|
|
|
|
|
yet extensible format. Google uses Protocol Buffers for almost all of
|
|
|
|
@ -52,7 +129,7 @@ breaking deployed programs that are compiled against the "old" format.
|
|
|
|
|
|
|
|
|
|
%package compiler
|
|
|
|
|
Summary: Protocol Buffers compiler
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
Requires: protobuf = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description compiler
|
|
|
|
|
This package contains Protocol Buffers compiler for all programming
|
|
|
|
@ -60,22 +137,16 @@ languages
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Protocol Buffers C++ headers and libraries
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
Requires: %{name}-compiler = %{version}-%{release}
|
|
|
|
|
Requires: protobuf = %{version}-%{release}
|
|
|
|
|
Requires: protobuf-compiler = %{version}-%{release}
|
|
|
|
|
Requires: zlib-devel
|
|
|
|
|
Requires: pkgconfig
|
|
|
|
|
|
|
|
|
|
Obsoletes: protobuf-static < 3.19.6-4
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
This package contains Protocol Buffers compiler for all languages and
|
|
|
|
|
C++ headers and libraries
|
|
|
|
|
|
|
|
|
|
%package static
|
|
|
|
|
Summary: Static development files for %{name}
|
|
|
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description static
|
|
|
|
|
Static libraries for Protocol Buffers
|
|
|
|
|
|
|
|
|
|
%package lite
|
|
|
|
|
Summary: Protocol Buffers LITE_RUNTIME libraries
|
|
|
|
|
|
|
|
|
@ -88,8 +159,10 @@ lacks descriptors, reflection, and some other features.
|
|
|
|
|
|
|
|
|
|
%package lite-devel
|
|
|
|
|
Summary: Protocol Buffers LITE_RUNTIME development libraries
|
|
|
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
|
|
|
Requires: %{name}-lite = %{version}-%{release}
|
|
|
|
|
Requires: protobuf-devel = %{version}-%{release}
|
|
|
|
|
Requires: protobuf-lite = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
Obsoletes: protobuf-lite-static < 3.19.6-4
|
|
|
|
|
|
|
|
|
|
%description lite-devel
|
|
|
|
|
This package contains development libraries built with
|
|
|
|
@ -99,39 +172,32 @@ The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code
|
|
|
|
|
which only depends libprotobuf-lite, which is much smaller than libprotobuf but
|
|
|
|
|
lacks descriptors, reflection, and some other features.
|
|
|
|
|
|
|
|
|
|
%package lite-static
|
|
|
|
|
Summary: Static development files for %{name}-lite
|
|
|
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description lite-static
|
|
|
|
|
This package contains static development libraries built with
|
|
|
|
|
optimize_for = LITE_RUNTIME.
|
|
|
|
|
|
|
|
|
|
The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code
|
|
|
|
|
which only depends libprotobuf-lite, which is much smaller than libprotobuf but
|
|
|
|
|
lacks descriptors, reflection, and some other features.
|
|
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
|
%package -n python%{python3_pkgversion}-%{name}
|
|
|
|
|
Summary: Python 3 bindings for Google Protocol Buffers
|
|
|
|
|
%package -n python3-protobuf
|
|
|
|
|
Summary: Python bindings for Google Protocol Buffers
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3dist(setuptools)
|
|
|
|
|
BuildRequires: python3dist(wheel)
|
|
|
|
|
%if %{with python_cpp}
|
|
|
|
|
Requires: protobuf%{?_isa} = %{version}-%{release}
|
|
|
|
|
%else
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-wheel
|
|
|
|
|
Requires: python%{python3_pkgversion}-six >= 1.9
|
|
|
|
|
Conflicts: %{name}-compiler > %{version}
|
|
|
|
|
Conflicts: %{name}-compiler < %{version}
|
|
|
|
|
Provides: %{name}-python3 = %{version}-%{release}
|
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
|
|
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-%{name}
|
|
|
|
|
This package contains Python 3 libraries for Google Protocol Buffers
|
|
|
|
|
%endif
|
|
|
|
|
Conflicts: protobuf-compiler > %{version}
|
|
|
|
|
Conflicts: protobuf-compiler < %{version}
|
|
|
|
|
Provides: protobuf-python3 = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n python3-protobuf
|
|
|
|
|
This package contains Python libraries for Google Protocol Buffers
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%package vim
|
|
|
|
|
Summary: Vim syntax highlighting for Google Protocol Buffers descriptions
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
Requires: vim-enhanced
|
|
|
|
|
# We don’t really need vim or vim-enhanced to be already installed in order to
|
|
|
|
|
# install a plugin for it. We do need to depend on vim-filesystem, which
|
|
|
|
|
# provides the necessary directory structure.
|
|
|
|
|
Requires: vim-filesystem
|
|
|
|
|
|
|
|
|
|
%description vim
|
|
|
|
|
This package contains syntax highlighting for Google Protocol Buffers
|
|
|
|
@ -139,21 +205,25 @@ descriptions in Vim editor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with java}
|
|
|
|
|
%ifarch %{java_arches}
|
|
|
|
|
|
|
|
|
|
%package java
|
|
|
|
|
Summary: Java Protocol Buffers runtime library
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: maven-local
|
|
|
|
|
BuildRequires: mvn(com.google.code.gson:gson)
|
|
|
|
|
BuildRequires: mvn(com.google.guava:guava)
|
|
|
|
|
BuildRequires: mvn(com.google.guava:guava-testlib)
|
|
|
|
|
BuildRequires: mvn(com.google.truth:truth)
|
|
|
|
|
BuildRequires: mvn(junit:junit)
|
|
|
|
|
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
|
|
|
|
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
|
|
|
|
|
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
|
|
|
|
|
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
|
|
|
|
BuildRequires: mvn(org.easymock:easymock)
|
|
|
|
|
Conflicts: %{name}-compiler > %{version}
|
|
|
|
|
Conflicts: %{name}-compiler < %{version}
|
|
|
|
|
Obsoletes: %{name}-javanano < 3.6.0
|
|
|
|
|
Conflicts: protobuf-compiler > %{version}
|
|
|
|
|
Conflicts: protobuf-compiler < %{version}
|
|
|
|
|
Obsoletes: protobuf-javanano < 3.6.0
|
|
|
|
|
|
|
|
|
|
%description java
|
|
|
|
|
This package contains Java Protocol Buffers runtime library.
|
|
|
|
@ -174,11 +244,11 @@ Utilities to work with protos. It contains JSON support
|
|
|
|
|
as well as utilities to work with proto3 well-known types.
|
|
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
|
Summary: Javadoc for %{name}-java
|
|
|
|
|
Summary: Javadoc for protobuf-java
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
|
This package contains the API documentation for %{name}-java.
|
|
|
|
|
This package contains the API documentation for protobuf-java.
|
|
|
|
|
|
|
|
|
|
%package parent
|
|
|
|
|
Summary: Protocol Buffer Parent POM
|
|
|
|
@ -194,6 +264,7 @@ BuildArch: noarch
|
|
|
|
|
%description bom
|
|
|
|
|
Protocol Buffer BOM POM.
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%package emacs
|
|
|
|
@ -207,43 +278,44 @@ This package contains syntax highlighting for Google Protocol Buffers
|
|
|
|
|
descriptions in the Emacs editor.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{name}-%{version}%{?rcver} -a 3
|
|
|
|
|
# IoTest.LargeOutput fails sometimes if not enough memory is available
|
|
|
|
|
%setup -q -n protobuf-%{version}%{?rcver} -a 3
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
|
# IoTest.LargeOutput fails on 32bit arches
|
|
|
|
|
# https://github.com/protocolbuffers/protobuf/issues/8082
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
mv googletest-5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081/* third_party/googletest/
|
|
|
|
|
%patch 1 -p1
|
|
|
|
|
# Need to disable more tests that fail on 32bit arches only
|
|
|
|
|
%patch 2 -p0
|
|
|
|
|
%endif
|
|
|
|
|
%patch 3 -p1 -b .jre17
|
|
|
|
|
%patch 4 -p1 -b .python311
|
|
|
|
|
|
|
|
|
|
# Copy in the needed gtest/gmock implementations.
|
|
|
|
|
%setup -q -T -D -b 3 -n protobuf-%{version}%{?rcver}
|
|
|
|
|
rm -rvf 'third_party/googletest'
|
|
|
|
|
mv '../%{gtest_dir}' 'third_party/googletest'
|
|
|
|
|
|
|
|
|
|
find -name \*.cc -o -name \*.h | xargs chmod -x
|
|
|
|
|
chmod 644 examples/*
|
|
|
|
|
%if %{with java}
|
|
|
|
|
%pom_remove_dep org.easymock:easymockclassextension java/pom.xml java/core/pom.xml java/lite/pom.xml java/util/pom.xml
|
|
|
|
|
%pom_remove_dep com.google.truth:truth java/pom.xml java/core/pom.xml java/lite/pom.xml java/util/pom.xml
|
|
|
|
|
%ifarch %{java_arches}
|
|
|
|
|
%pom_remove_dep com.google.errorprone:error_prone_annotations java/util/pom.xml
|
|
|
|
|
%pom_remove_dep com.google.guava:guava-testlib java/pom.xml java/util/pom.xml
|
|
|
|
|
# These use easymockclassextension
|
|
|
|
|
rm java/core/src/test/java/com/google/protobuf/ServiceTest.java
|
|
|
|
|
# These use truth or error_prone_annotations or guava-testlib
|
|
|
|
|
rm java/core/src/test/java/com/google/protobuf/LiteralByteStringTest.java
|
|
|
|
|
rm java/core/src/test/java/com/google/protobuf/BoundedByteStringTest.java
|
|
|
|
|
rm java/core/src/test/java/com/google/protobuf/RopeByteStringTest.java
|
|
|
|
|
rm java/core/src/test/java/com/google/protobuf/RopeByteStringSubstringTest.java
|
|
|
|
|
rm java/core/src/test/java/com/google/protobuf/TextFormatTest.java
|
|
|
|
|
rm -r java/util/src/test/java/com/google/protobuf/util
|
|
|
|
|
rm -r java/util/src/main/java/com/google/protobuf/util
|
|
|
|
|
%pom_remove_dep com.google.j2objc:j2objc-annotations java/util/pom.xml
|
|
|
|
|
|
|
|
|
|
# Remove annotation libraries we don't have
|
|
|
|
|
annotations=$(
|
|
|
|
|
find -name '*.java' |
|
|
|
|
|
xargs grep -h -e '^import com\.google\.errorprone\.annotation' \
|
|
|
|
|
-e '^import com\.google\.j2objc\.annotations' |
|
|
|
|
|
sort -u | sed 's/.*\.\([^.]*\);/\1/' | paste -sd\|
|
|
|
|
|
)
|
|
|
|
|
find -name '*.java' | xargs sed -ri \
|
|
|
|
|
"s/^import .*\.($annotations);//;s/@($annotations)"'\>\s*(\((("[^"]*")|([^)]*))\))?//g'
|
|
|
|
|
|
|
|
|
|
# Make OSGi dependency on sun.misc package optional
|
|
|
|
|
%pom_xpath_inject "pom:configuration/pom:instructions" "<Import-Package>sun.misc;resolution:=optional,*</Import-Package>" java/core
|
|
|
|
|
|
|
|
|
|
# Backward compatibility symlink
|
|
|
|
|
%mvn_file :protobuf-java:jar: %{name}/%{name}-java %{name}
|
|
|
|
|
|
|
|
|
|
# This test is incredibly slow on arm
|
|
|
|
|
# https://github.com/google/protobuf/issues/2389
|
|
|
|
|
%ifarch %{arm} s390x
|
|
|
|
|
mv java/core/src/test/java/com/google/protobuf/IsValidUtf8Test.java \
|
|
|
|
|
java/core/src/test/java/com/google/protobuf/IsValidUtf8Test.java.slow
|
|
|
|
|
mv java/core/src/test/java/com/google/protobuf/DecodeUtf8Test.java \
|
|
|
|
|
java/core/src/test/java/com/google/protobuf/DecodeUtf8Test.java.slow
|
|
|
|
|
%mvn_file :protobuf-java:jar: protobuf/protobuf-java protobuf
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
@ -254,7 +326,7 @@ iconv -f iso8859-1 -t utf-8 CONTRIBUTORS.txt > CONTRIBUTORS.txt.utf8
|
|
|
|
|
mv CONTRIBUTORS.txt.utf8 CONTRIBUTORS.txt
|
|
|
|
|
export PTHREAD_LIBS="-lpthread"
|
|
|
|
|
./autogen.sh
|
|
|
|
|
%configure
|
|
|
|
|
%configure --disable-static
|
|
|
|
|
|
|
|
|
|
# -Wno-error=type-limits:
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1838470
|
|
|
|
@ -265,68 +337,69 @@ export PTHREAD_LIBS="-lpthread"
|
|
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
|
pushd python
|
|
|
|
|
%py3_build
|
|
|
|
|
%py3_build %{?with_python_cpp:-- --cpp_implementation}
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with java}
|
|
|
|
|
%ifarch s390x %{arm}
|
|
|
|
|
%ifarch %{java_arches}
|
|
|
|
|
%ifarch %{ix86} s390x
|
|
|
|
|
export MAVEN_OPTS=-Xmx1024m
|
|
|
|
|
%endif
|
|
|
|
|
%pom_disable_module kotlin java/pom.xml
|
|
|
|
|
%pom_disable_module kotlin-lite java/pom.xml
|
|
|
|
|
%mvn_build -s -- -f java/pom.xml
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%{_emacs_bytecompile} editors/protobuf-mode.el
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
# Java tests fail on s390x
|
|
|
|
|
%ifarch s390x
|
|
|
|
|
fail=0
|
|
|
|
|
%else
|
|
|
|
|
fail=1
|
|
|
|
|
%endif
|
|
|
|
|
%make_build check CXXFLAGS="%{build_cxxflags} -Wno-error=type-limits" || exit $fail
|
|
|
|
|
%make_build check CXXFLAGS="%{build_cxxflags} -Wno-error=type-limits"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%make_install %{?_smp_mflags} STRIPBINARIES=no INSTALL="%{__install} -p" CPPROG="cp -p"
|
|
|
|
|
find %{buildroot} -type f -name "*.la" -exec rm -f {} \;
|
|
|
|
|
find %{buildroot} -type f -name "*.la" -exec rm -f {} +
|
|
|
|
|
|
|
|
|
|
# protoc.1 man page
|
|
|
|
|
install -p -m 0644 -D -t '%{buildroot}%{_mandir}/man1' '%{SOURCE4}'
|
|
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
|
pushd python
|
|
|
|
|
%py3_install
|
|
|
|
|
find %{buildroot}%{python3_sitelib} -name \*.py |
|
|
|
|
|
xargs sed -i -e '1{\@^#!@d}'
|
|
|
|
|
%py3_install %{?with_python_cpp:-- --cpp_implementation}
|
|
|
|
|
%if %{without python_cpp}
|
|
|
|
|
find %{buildroot}%{python3_sitelib} -name \*.py -exec sed -i -e '1{\@^#!@d}' {} +
|
|
|
|
|
%endif
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
install -p -m 644 -D %{SOURCE1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/proto.vim
|
|
|
|
|
install -p -m 644 -D editors/proto.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/proto.vim
|
|
|
|
|
|
|
|
|
|
%if %{with java}
|
|
|
|
|
%ifarch %{java_arches}
|
|
|
|
|
%mvn_install
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name}
|
|
|
|
|
install -p -m 0644 editors/protobuf-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name}
|
|
|
|
|
install -p -m 0644 editors/protobuf-mode.elc %{buildroot}%{_emacs_sitelispdir}/%{name}
|
|
|
|
|
mkdir -p %{buildroot}%{_emacs_sitelispdir}/protobuf
|
|
|
|
|
install -p -m 0644 editors/protobuf-mode.el %{buildroot}%{_emacs_sitelispdir}/protobuf
|
|
|
|
|
install -p -m 0644 editors/protobuf-mode.elc %{buildroot}%{_emacs_sitelispdir}/protobuf
|
|
|
|
|
mkdir -p %{buildroot}%{_emacs_sitestartdir}
|
|
|
|
|
install -p -m 0644 %{SOURCE2} %{buildroot}%{_emacs_sitestartdir}
|
|
|
|
|
|
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
%ldconfig_scriptlets lite
|
|
|
|
|
%ldconfig_scriptlets compiler
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc CHANGES.txt CONTRIBUTORS.txt README.md
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{_libdir}/libprotobuf.so.25*
|
|
|
|
|
%{_libdir}/libprotobuf.so.%{so_version}{,.*}
|
|
|
|
|
|
|
|
|
|
%files compiler
|
|
|
|
|
%doc README.md
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{_bindir}/protoc
|
|
|
|
|
%{_libdir}/libprotoc.so.25*
|
|
|
|
|
%{_mandir}/man1/protoc.1*
|
|
|
|
|
%{_libdir}/libprotoc.so.%{so_version}{,.*}
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%dir %{_includedir}/google
|
|
|
|
@ -337,44 +410,51 @@ install -p -m 0644 %{SOURCE2} %{buildroot}%{_emacs_sitestartdir}
|
|
|
|
|
%doc examples/add_person.cc examples/addressbook.proto examples/list_people.cc examples/Makefile examples/README.md
|
|
|
|
|
|
|
|
|
|
%files emacs
|
|
|
|
|
%{_emacs_sitelispdir}/%{name}/
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{_emacs_sitelispdir}/protobuf/
|
|
|
|
|
%{_emacs_sitestartdir}/protobuf-init.el
|
|
|
|
|
|
|
|
|
|
%files static
|
|
|
|
|
%{_libdir}/libprotobuf.a
|
|
|
|
|
%{_libdir}/libprotoc.a
|
|
|
|
|
|
|
|
|
|
%files lite
|
|
|
|
|
%{_libdir}/libprotobuf-lite.so.25*
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{_libdir}/libprotobuf-lite.so.%{so_version}{,.*}
|
|
|
|
|
|
|
|
|
|
%files lite-devel
|
|
|
|
|
%{_libdir}/libprotobuf-lite.so
|
|
|
|
|
%{_libdir}/pkgconfig/protobuf-lite.pc
|
|
|
|
|
|
|
|
|
|
%files lite-static
|
|
|
|
|
%{_libdir}/libprotobuf-lite.a
|
|
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
|
%files -n python%{python3_pkgversion}-protobuf
|
|
|
|
|
%files -n python3-protobuf
|
|
|
|
|
%if %{with python_cpp}
|
|
|
|
|
%dir %{python3_sitearch}/google
|
|
|
|
|
%{python3_sitearch}/google/protobuf/
|
|
|
|
|
%{python3_sitearch}/protobuf-%{version}%{?rcver}-py3.*.egg-info/
|
|
|
|
|
%{python3_sitearch}/protobuf-%{version}%{?rcver}-py3.*-nspkg.pth
|
|
|
|
|
%else
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%dir %{python3_sitelib}/google
|
|
|
|
|
%{python3_sitelib}/google/protobuf/
|
|
|
|
|
%{python3_sitelib}/protobuf-%{version}%{?rcver}-py3.*.egg-info/
|
|
|
|
|
%{python3_sitelib}/protobuf-%{version}%{?rcver}-py3.*-nspkg.pth
|
|
|
|
|
%endif
|
|
|
|
|
%doc python/README.md
|
|
|
|
|
%doc examples/add_person.py examples/list_people.py examples/addressbook.proto
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files vim
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{_datadir}/vim/vimfiles/ftdetect/proto.vim
|
|
|
|
|
%{_datadir}/vim/vimfiles/syntax/proto.vim
|
|
|
|
|
|
|
|
|
|
%if %{with java}
|
|
|
|
|
%ifarch %{java_arches}
|
|
|
|
|
|
|
|
|
|
%files java -f .mfiles-protobuf-java
|
|
|
|
|
%doc examples/AddPerson.java examples/ListPeople.java
|
|
|
|
|
%doc java/README.md
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
|
|
%files java-util -f .mfiles-protobuf-java-util
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
|
|
|
%license LICENSE
|
|
|
|
@ -387,36 +467,117 @@ install -p -m 0644 %{SOURCE2} %{buildroot}%{_emacs_sitestartdir}
|
|
|
|
|
|
|
|
|
|
%files javalite -f .mfiles-protobuf-javalite
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Mar 23 2022 Adrian Reber <areber@redhat.com> - 3.14.0-13
|
|
|
|
|
- Rebuilt for test fixes
|
|
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 3.19.6-11
|
|
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
|
Resolves: RHEL-64018
|
|
|
|
|
|
|
|
|
|
* Tue Aug 06 2024 Adrian Reber <areber@redhat.com> - 3.19.6-10
|
|
|
|
|
- copy gating.yaml from c9s
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.19.6-9
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.6-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Mar 22 2022 Adrian Reber <areber@redhat.com> - 3.14.0-12
|
|
|
|
|
- Rebuilt for test fixes
|
|
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.6-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Mar 08 2022 Adrian Reber <areber@redhat.com> - 3.14.0-11
|
|
|
|
|
- Applied patch for for CVE-2021-22570 (#2055641)
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.6-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Feb 23 2022 Adrian Reber <areber@redhat.com> - 3.14.0-9
|
|
|
|
|
- Rebuilt for errata
|
|
|
|
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.19.6-5
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.14.0-8
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
* Wed Apr 26 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 3.19.6-4
|
|
|
|
|
- Stop packaging static libraries
|
|
|
|
|
- Stop using deprecated %%patchN syntax
|
|
|
|
|
|
|
|
|
|
* Mon Jul 26 2021 Adrian Reber <areber@redhat.com> - 3.14.0-7
|
|
|
|
|
- Disabled Java subpackages
|
|
|
|
|
* Tue Apr 25 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 3.19.6-3
|
|
|
|
|
- Remove unnecessary explicit pkgconfig dependencies
|
|
|
|
|
- Remove an obsolete workaround for failing Java tests
|
|
|
|
|
- Remove conditionals for retired 32-bit ARM architecture
|
|
|
|
|
- Remove a slow-test workaround on s390x
|
|
|
|
|
- Reduce macro indirection in the spec file
|
|
|
|
|
|
|
|
|
|
* Thu May 06 2021 Adrian Reber <adrian@lisas.de> - 3.14.0-6
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.6-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Dec 07 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 3.19.6-1
|
|
|
|
|
- Update to 3.19.6; fix CVE-2022-3171
|
|
|
|
|
|
|
|
|
|
* Wed Dec 07 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 3.19.5-1
|
|
|
|
|
- Update to 3.19.5; fix CVE-2022-1941
|
|
|
|
|
|
|
|
|
|
* Sun Dec 04 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 3.19.4-7
|
|
|
|
|
- Update License to SPDX
|
|
|
|
|
- Improved handling of gtest sources
|
|
|
|
|
- Update/correct gtest commit hash to match upstream
|
|
|
|
|
- Simplify the Source0 URL with a macro
|
|
|
|
|
- Drop manual dependency on python3-six, no longer needed
|
|
|
|
|
- Drop obsolete python_provide macro
|
|
|
|
|
- Drop python3_pkgversion macro
|
|
|
|
|
- Update summary and description to refer to “Python” instead of “Python 3”
|
|
|
|
|
- Re-enable compiled Python extension on Python 3.11
|
|
|
|
|
- Ensure all subpackages always have LICENSE, or depend on something that does
|
|
|
|
|
- Remove obsolete ldconfig_scriptlets macros
|
|
|
|
|
- The -vim subpackage now depends on vim-filesystem, no longer on vim-enhanced
|
|
|
|
|
- Add a man page for protoc
|
|
|
|
|
- Use a macro to avoid repeating the .so version, and improve .so globs
|
|
|
|
|
|
|
|
|
|
* Sun Aug 14 2022 Orion Poplawski <orion@nwra.com> - 3.19.4-6
|
|
|
|
|
- Build python support with C++ (bz#2107921)
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.4-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jul 06 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 3.19.4-4
|
|
|
|
|
- Exclude java subpackages on non-java arches (fix RHBZ#2104092)
|
|
|
|
|
- Obsolete java subpackages on non-java arches
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 3.19.4-3
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Sun Feb 13 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.19.4-2
|
|
|
|
|
- Add some --add-opens option for java17
|
|
|
|
|
- Restrict heap usage for mvn also on %%ix86
|
|
|
|
|
|
|
|
|
|
* Mon Feb 07 2022 Orion Poplawski <orion@nwra.com> - 3.19.4-1
|
|
|
|
|
- Update to 3.19.4
|
|
|
|
|
|
|
|
|
|
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 3.19.0-4
|
|
|
|
|
- Rebuilt for java-17-openjdk as system jdk
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.0-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Nov 10 2021 Orion Poplawski <orion@nwra.com> - 3.19.0-2
|
|
|
|
|
- Re-enable java
|
|
|
|
|
|
|
|
|
|
* Wed Oct 27 2021 Major Hayden <major@mhtx.net> - 3.19.0-1
|
|
|
|
|
- Update to 3.19.1
|
|
|
|
|
|
|
|
|
|
* Fri Oct 22 2021 Adrian Reber <adrian@lisas.de> - 3.18.1-2
|
|
|
|
|
- Disable tests that fail on 32bit arches
|
|
|
|
|
|
|
|
|
|
* Thu Oct 14 2021 Orion Poplawski <orion@nwra.com> - 3.18.1-1
|
|
|
|
|
- Update to 3.18.1
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.0-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.14.0-5
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Thu May 06 2021 Adrian Reber <adrian@lisas.de> - 3.14.0-4
|
|
|
|
|
- Reintroduce the emacs subpackage to avoid file conflicts between
|
|
|
|
|
protobuf-compiler.x86_64 and protobuf-compiler.i686
|
|
|
|
|
- Disable LTO to fix annobin errors
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.14.0-4
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Tue Mar 30 2021 Jonathan Wakely <jwakely@redhat.com> - 3.14.0-3
|
|
|
|
|
- Rebuilt for removed libstdc++ symbol (#1937698)
|
|
|
|
|