This reverts commit 758aa03c6c
.
This commit is contained in:
Родитель
310b1439e8
Коммит
51975100a3
|
@ -1,102 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
SRC_TARBALL="grpc-1.42.0.tar.gz"
|
||||
OUT_FOLDER="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
PKG_VERSION="1.42.0"
|
||||
|
||||
# parameters:
|
||||
#
|
||||
# --srcTarball : src tarball file
|
||||
# this file contains the 'initial' source code of the component
|
||||
# and should be replaced with the new/modified src code
|
||||
# --outFolder : folder where to copy the new tarball(s)
|
||||
# --pkgVersion : package version
|
||||
#
|
||||
PARAMS=""
|
||||
while (( "$#" )); do
|
||||
case "$1" in
|
||||
--srcTarball)
|
||||
if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
|
||||
SRC_TARBALL=$2
|
||||
shift 2
|
||||
else
|
||||
echo "Error: Argument for $1 is missing" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
--outFolder)
|
||||
if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
|
||||
OUT_FOLDER=$2
|
||||
shift 2
|
||||
else
|
||||
echo "Error: Argument for $1 is missing" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
--pkgVersion)
|
||||
if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
|
||||
PKG_VERSION=$2
|
||||
shift 2
|
||||
else
|
||||
echo "Error: Argument for $1 is missing" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
-*|--*=) # unsupported flags
|
||||
echo "Error: Unsupported flag $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
*) # preserve positional arguments
|
||||
PARAMS="$PARAMS $1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "--srcTarball -> $SRC_TARBALL"
|
||||
echo "--outFolder -> $OUT_FOLDER"
|
||||
echo "--pkgVersion -> $PKG_VERSION"
|
||||
|
||||
if [ -z "$PKG_VERSION" ]; then
|
||||
echo "--pkgVersion parameter cannot be empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "-- create temp folder"
|
||||
TEMPDIR=$(mktemp -d)
|
||||
function cleanup {
|
||||
echo "+++ cleanup -> remove $TEMPDIR"
|
||||
rm -rf $TEMPDIR
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
echo 'Starting gRPC source tarball creation'
|
||||
cd $TEMPDIR
|
||||
git clone --depth 1 https://github.com/grpc/grpc.git
|
||||
pushd grpc
|
||||
git fetch --all --tags
|
||||
git checkout tags/v$PKG_VERSION -b grpc-$PKG_VERSION
|
||||
git submodule update --init
|
||||
popd
|
||||
mv grpc grpc-$PKG_VERSION
|
||||
|
||||
if [[ -n $SRC_TARBALL ]]; then
|
||||
TARBALL_NAME="$(basename $SRC_TARBALL)"
|
||||
else
|
||||
TARBALL_NAME="grpc-$PKG_VERSION.tar.gz"
|
||||
fi
|
||||
|
||||
NEW_TARBALL="$OUT_FOLDER/$TARBALL_NAME"
|
||||
|
||||
# Create a reproducible tarball
|
||||
# Credit to https://reproducible-builds.org/docs/archives/ for instructions
|
||||
# Do not update mtime value for new versions- keep the same value for ease of
|
||||
# reproducing old tarball versions in the future if necessary
|
||||
tar --sort=name --mtime="2021-11-10 00:00Z" \
|
||||
--owner=0 --group=0 --numeric-owner \
|
||||
--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
|
||||
-zcf $NEW_TARBALL grpc-$PKG_VERSION
|
||||
|
||||
echo "Source tarball $NEW_TARBALL successfully created!"
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"Signatures": {
|
||||
"grpc-1.42.0.tar.gz": "3b3b11266234bfeada6e20eff8e2f51dba7cee5da0d1946dd6f104b185819370"
|
||||
}
|
||||
}
|
||||
"Signatures": {
|
||||
"grpc-1.42.0.tar.gz": "b2f2620c762427bfeeef96a68c1924319f384e877bc0e084487601e4cc6e434c"
|
||||
}
|
||||
}
|
|
@ -1,38 +1,30 @@
|
|||
Summary: Open source remote procedure call (RPC) framework
|
||||
Name: grpc
|
||||
Version: 1.42.0
|
||||
Release: 3%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: ASL 2.0
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Mariner
|
||||
Group: Applications/System
|
||||
URL: https://www.grpc.io
|
||||
Source0: %{_mariner_sources_url}/%{name}-%{version}.tar.gz
|
||||
Source0: https://github.com/grpc/grpc/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: abseil-cpp-devel
|
||||
BuildRequires: c-ares-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc
|
||||
BuildRequires: git
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: protobuf-devel
|
||||
BuildRequires: re2-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: ninja-build
|
||||
|
||||
Requires: abseil-cpp
|
||||
Requires: c-ares
|
||||
Requires: openssl
|
||||
Requires: protobuf
|
||||
Requires: zlib
|
||||
|
||||
# Python
|
||||
BuildRequires: build-essential
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-Cython
|
||||
BuildRequires: python3-six
|
||||
BuildRequires: python3-wheel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-protobuf
|
||||
|
||||
%description
|
||||
gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. It enables client and server applications to communicate transparently, and simplifies the building of connected systems.
|
||||
|
||||
|
@ -50,21 +42,11 @@ Summary: Plugins files for grpc
|
|||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: protobuf
|
||||
|
||||
|
||||
%description plugins
|
||||
The grpc-plugins package contains the grpc plugins.
|
||||
|
||||
%package -n python3-grpcio
|
||||
Summary: Python language bindings for gRPC
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: python3-six
|
||||
%{?python_provide:%python_provide python3-grpcio}
|
||||
|
||||
%description -n python3-grpcio
|
||||
Python language bindings for gRPC.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%autosetup
|
||||
|
||||
%build
|
||||
# Updating used C++ version to be compatible with the build dependencies.
|
||||
|
@ -73,9 +55,8 @@ Python language bindings for gRPC.
|
|||
CXX_VERSION=$(c++ -dM -E -x c++ /dev/null | grep -oP "(?<=__cplusplus \d{2})\d{2}")
|
||||
|
||||
mkdir -p cmake/build
|
||||
pushd cmake/build
|
||||
%cmake ../.. -GNinja \
|
||||
-DgRPC_INSTALL=ON \
|
||||
cd cmake/build
|
||||
cmake ../.. -DgRPC_INSTALL=ON \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_STANDARD=$CXX_VERSION \
|
||||
|
@ -86,29 +67,12 @@ pushd cmake/build
|
|||
-DgRPC_RE2_PROVIDER:STRING='package' \
|
||||
-DgRPC_SSL_PROVIDER:STRING='package' \
|
||||
-DgRPC_ZLIB_PROVIDER:STRING='package'
|
||||
%cmake_build
|
||||
popd
|
||||
#python
|
||||
export GRPC_PYTHON_BUILD_WITH_CYTHON=True
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_CARES=True
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_RE2=True
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_ABSL=True
|
||||
%py3_build
|
||||
|
||||
%make_build
|
||||
|
||||
%install
|
||||
pushd cmake/build
|
||||
%cmake_install
|
||||
cd cmake/build
|
||||
%make_install
|
||||
find %{buildroot} -name '*.cmake' -delete
|
||||
popd
|
||||
#python
|
||||
pushd '%{buildroot}'
|
||||
PYROOT="${PWD}"
|
||||
popd
|
||||
%py3_install
|
||||
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
|
@ -137,16 +101,7 @@ popd
|
|||
%license LICENSE
|
||||
%{_bindir}/grpc_*_plugin
|
||||
|
||||
#imported from fedora
|
||||
%files -n python3-grpcio
|
||||
%license LICENSE
|
||||
%{python3_sitearch}/grpc
|
||||
%{python3_sitearch}/grpcio-%{version}-py%{python3_version}.egg-info
|
||||
|
||||
%changelog
|
||||
* Wed Nov 09 2022 Riken Maharjan <rmaharjan@microsoft.com> - 1.42.0-3
|
||||
- Add python binding for gRPC.
|
||||
|
||||
* Thu Jun 30 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.42.0-2
|
||||
- Bumping release to rebuild with latest 'abseil-cpp'.
|
||||
|
||||
|
@ -174,4 +129,4 @@ popd
|
|||
- Switch to system provided packages for zlib and openssl.
|
||||
|
||||
* Mon Mar 08 2021 Neha Agarwal <nehaagarwal@microsoft.com> - 1.35.0-1
|
||||
- Original version for CBL-Mariner. License Verified.
|
||||
- Original version for CBL-Mariner. License Verified.
|
||||
|
|
|
@ -4321,7 +4321,7 @@
|
|||
"other": {
|
||||
"name": "grpc",
|
||||
"version": "1.42.0",
|
||||
"downloadUrl": "https://cblmarinerstorage.blob.core.windows.net/sources/core/grpc-1.42.0.tar.gz"
|
||||
"downloadUrl": "https://github.com/grpc/grpc/archive/v1.42.0/grpc-1.42.0.tar.gz"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче