Hello community, here is the log from the commit of package protobuf for openSUSE:Factory checked in at 2019-02-04 21:21:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/protobuf (Old) and /work/SRC/openSUSE:Factory/.protobuf.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "protobuf" Mon Feb 4 21:21:51 2019 rev:35 rq:667019 version:3.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/protobuf/protobuf.changes 2018-12-21 08:19:34.625673446 +0100 +++ /work/SRC/openSUSE:Factory/.protobuf.new.28833/protobuf.changes 2019-02-04 21:21:52.859647317 +0100 @@ -1,0 +2,7 @@ +Tue Jan 8 12:35:43 UTC 2019 - MichaĆ Rostecki <[email protected]> + +- Add protobuf-source package - some programs using gRPC and + protobuf need protobuf definitions which are included inside the + source code, but are not included in the devel package. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ protobuf.spec ++++++ --- /var/tmp/diff_new_pack.G5FSJG/_old 2019-02-04 21:21:54.127647012 +0100 +++ /var/tmp/diff_new_pack.G5FSJG/_new 2019-02-04 21:21:54.131647011 +0100 @@ -1,7 +1,7 @@ # # spec file for package protobuf # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,6 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define sover 17 %define tarname protobuf +%define src_install_dir /usr/src/%{name} # requires gmock, which is not yet in the distribution %bcond_with check %bcond_without java @@ -102,6 +103,18 @@ 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 + +%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. + +This package contains source code for Protocol Buffers. + %package -n %{name}-java Summary: Java Bindings for Google Protocol Buffers Group: Development/Libraries/Java @@ -190,6 +203,26 @@ 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|#!.*/usr/bin/env node|#!/usr/bin/node|' "{}" + +find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*/usr/bin/env python2.7|#!/usr/bin/python2.7|' "{}" + +find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*/usr/bin/env python|#!/usr/bin/python|' "{}" + +find %{buildroot}%{src_install_dir} -type f -name "*.rb" -exec sed -i 's|#!.*/usr/bin/env ruby|#!/usr/bin/ruby|' "{}" + +find %{buildroot}%{src_install_dir} -type f -name "*.sh" -exec sed -i 's|#!.*/usr/bin/env bash|#!/bin/bash|' "{}" + +# And stop requiring ridiculously old Python version +find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!/usr/bin/python2.4|#!/usr/bin/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/compiler/js/js_generator.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 %postun -n libprotobuf%{sover} -p /sbin/ldconfig %post -n libprotoc%{sover} -p /sbin/ldconfig @@ -215,6 +248,9 @@ %{_libdir}/pkgconfig/* %{_datadir}/vim +%files source +%{src_install_dir} + %if %{with java} %files -n %{name}-java %{_javadir}/protobuf*
