Accepting request 736839 from home:mrostecki:branches:devel:kubic

- Make sure that patches are included in the source package.
- Filter out several rpmlintrc warnings for the source package.

OBS-URL: https://build.opensuse.org/request/show/736839
OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=50
This commit is contained in:
Martin Pluskal 2019-10-12 11:07:48 +00:00 committed by Git OBS Bridge
parent 27265e211d
commit 68faf79ec0
3 changed files with 21 additions and 10 deletions

9
grpc-rpmlintrc Normal file
View File

@ -0,0 +1,9 @@
# Ignore the following errors in the source package.
addFilter("grpc-source.* env-script-interpreter")
addFilter("grpc-source.* files-duplicate")
addFilter("grpc-source.* hidden-file-or-dir")
addFilter("grpc-source.* non-executable-script")
addFilter("grpc-source.* pem-certificate")
addFilter("grpc-source.* script-without-shebang")
addFilter("grpc-source.* suse-filelist-forbidden-fhs23")
addFilter("grpc-source.* version-control-internal-file")

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Oct 10 00:23:16 UTC 2019 - Michał Rostecki <mrostecki@opensuse.org>
- Make sure that patches are included in the source package.
- Filter out several rpmlintrc warnings for the source package.
-------------------------------------------------------------------
Wed Oct 2 18:39:47 UTC 2019 - Jan Engelhardt <jengelh@inai.de>

View File

@ -28,7 +28,8 @@ Summary: HTTP/2-based Remote Procedure Call implementation
License: Apache-2.0
Group: Development/Tools/Building
URL: https://grpc.io/
Source: https://github.com/grpc/grpc/archive/v%rver.tar.gz
Source0: https://github.com/grpc/grpc/archive/v%rver.tar.gz
Source1: %{name}-rpmlintrc
Patch1: gettid.patch
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
@ -148,16 +149,11 @@ popd
%python_install
# Install sources
make clean
rm -f "b" "a.out"
find . -type f "(" -name "*.so" -o -name "*.o" -o -name ".git*" ")" -exec rm -rf {} +
mkdir -p "%buildroot/%src_install_dir"
tar -xzf %SOURCE0 --strip-components=1 -C "%buildroot/%src_install_dir"
find "%buildroot/%src_install_dir" -type d -name ".git*" -exec rm -Rf {} +
# Fix env-script-interpreter rpmlint error
find "%buildroot/%src_install_dir" -type f \
-exec sed -i 's|#!%_bindir/env bash|#!/bin/bash|' "{}" + \
-exec sed -i 's|#!%_bindir/env ruby|#!%_bindir/ruby|' "{}" +
find "%buildroot/%src_install_dir" -type f "(" -name "*.bzl" -o -name "*.py" ")" \
-exec sed -i 's|#!%_bindir/env python2.7|#!%_bindir/python2.7|' "{}" + \
-exec sed -i 's|#!%_bindir/env python|#!%_bindir/python|' "{}" +
cp -r * "%buildroot/%src_install_dir"
%fdupes %buildroot/%_prefix