https://bugzilla.redhat.com/show_bug.cgi?id=1872373
Bug ID: 1872373 Summary: Review Request: rust-prost-build - Protocol Buffers implementation for the Rust Language Product: Fedora Version: rawhide Status: NEW Component: Package Review Assignee: nobody@fedoraproject.org Reporter: pbrobinson@gmail.com QA Contact: extras-qa@fedoraproject.org CC: package-review@lists.fedoraproject.org Target Milestone: --- Classification: Fedora
SPEC: https://pbrobinson.fedorapeople.org/rust-prost-build.spec SRPM: https://pbrobinson.fedorapeople.org/rust-prost-build-0.6.1-1.fc32.src.rpm
Description: Protocol Buffers implementation for the Rust Language
FAS: pbrobinson
https://bugzilla.redhat.com/show_bug.cgi?id=1872373
Peter Robinson pbrobinson@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1862796 | |(rust-parsec-interface) Depends On| |1872372 (rust-prost-types) Alias| |rust-prost-build Doc Type|--- |If docs needed, set a value
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1862796 [Bug 1862796] Review Request: rust-parsec-interface - Parsec interface library to communicate using the wire protocol https://bugzilla.redhat.com/show_bug.cgi?id=1872372 [Bug 1872372] Review Request: rust-prost-types - Protocol Buffers implementation for the Rust Language
https://bugzilla.redhat.com/show_bug.cgi?id=1872373
Robert-André Mauchin 🐧 zebob.m@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zebob.m@gmail.com Assignee|nobody@fedoraproject.org |zebob.m@gmail.com
--- Comment #1 from Robert-André Mauchin 🐧 zebob.m@gmail.com --- I've got this error at the end of the build:
RPM build errors: error: Arch dependent binaries in noarch package Arch dependent binaries in noarch package
https://bugzilla.redhat.com/show_bug.cgi?id=1872373
--- Comment #2 from Robert-André Mauchin 🐧 zebob.m@gmail.com --- - You shouldn't bundle protobuf and shouldn't install it in a noarch package
ll builddir/build/BUILDROOT/rust-prost-build-0.6.1-1.fc34.x86_64/usr/share/cargo/registry/prost-build-0.6.1/third-party/protobuf/ total 28472 -rw-r--r--. 1 mockbuild mock 1732 Jun 13 2019 LICENSE drwxr-xr-x. 1 mockbuild mock 12 Aug 25 23:48 include -rwxr-xr-x. 1 mockbuild mock 4974596 Jan 12 2020 protoc-linux-aarch_64 -rwxr-xr-x. 1 mockbuild mock 4684564 Aug 25 23:50 protoc-linux-x86_32 -rwxr-xr-x. 1 mockbuild mock 5068568 Aug 25 23:50 protoc-linux-x86_64 -rwxr-xr-x. 1 mockbuild mock 11773784 Jan 12 2020 protoc-osx-x86_64 -rwxr-xr-x. 1 mockbuild mock 2639360 Jan 12 2020 protoc-win32.exe
https://bugzilla.redhat.com/show_bug.cgi?id=1872373
--- Comment #3 from Robert-André Mauchin 🐧 zebob.m@gmail.com --- Also the protobuf code is BSD and we can't ship precompiled binary
https://bugzilla.redhat.com/show_bug.cgi?id=1872373
--- Comment #4 from Robert-André Mauchin 🐧 zebob.m@gmail.com --- The build.rs is helpful:
//! Finds the appropriate `protoc` binary and Protobuf include directory for this host, and outputs //! build directives so that the main `prost-build` crate can use them. //! //! The following locations are checked for `protoc` in decreasing priority: //! //! 1. The `PROTOC` environment variable. //! 2. The bundled `protoc`. //! 3. The `protoc` on the `PATH`. //! //! If no `protoc` binary is available in these locations, the build fails. //! //! The following locations are checked for the Protobuf include directory in decreasing priority: //! //! 1. The `PROTOC_INCLUDE` environment variable. //! 2. The bundled Protobuf include directory.
You should BR protobuf-compiler and protobuf-devel then define
export PROTOC=%{_bindir}/protoc export PROTOC_INCLUDE=%{_includedir}
Not sure if the devel package should also Requires: protobuf-compiler to work correctly.
You also need to exclude third_party in the Cargo.toml
# prost-build-fix-metadata.diff ============================================================================ --- prost-build-0.6.1/Cargo.toml 1970-01-01T00:00:00+00:00 +++ prost-build-0.6.1/Cargo.toml 2020-08-25T22:22:26.646471+00:00 @@ -20,6 +20,7 @@ readme = "README.md" license = "Apache-2.0" repository = "https://github.com/danburkert/prost" +exclude = ["/third-party"] [dependencies.bytes] version = "0.5"
============================================================================
And:
Source: %{crates_source} # Initial patched metadata # - exclude /third-party from install Patch0: prost-build-fix-metadata.diff
https://bugzilla.redhat.com/show_bug.cgi?id=1872373
--- Comment #5 from Robert-André Mauchin 🐧 zebob.m@gmail.com --- It should:
Requires: protobuf-compiler
to work correctly.
And the crate depending on this one should also specify
export PROTOC=%{_bindir}/protoc
https://bugzilla.redhat.com/show_bug.cgi?id=1872373 Bug 1872373 depends on bug 1872372, which changed state.
Bug 1872372 Summary: Review Request: rust-prost-types - Protocol Buffers implementation for the Rust Language https://bugzilla.redhat.com/show_bug.cgi?id=1872372
What |Removed |Added ---------------------------------------------------------------------------- Status|POST |CLOSED Resolution|--- |RAWHIDE
https://bugzilla.redhat.com/show_bug.cgi?id=1872373
--- Comment #6 from Peter Robinson pbrobinson@gmail.com --- SPEC: https://pbrobinson.fedorapeople.org/rust-prost-build.spec SRPM: https://pbrobinson.fedorapeople.org/rust-prost-build-0.6.1-2.fc32.src.rpm
koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=50959288
https://bugzilla.redhat.com/show_bug.cgi?id=1872373
Peter Robinson pbrobinson@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(zebob.m@gmail.com | |)
--- Comment #7 from Peter Robinson pbrobinson@gmail.com --- Robert I think the latest update fixes everything.
https://bugzilla.redhat.com/show_bug.cgi?id=1872373
Robert-André Mauchin 🐧 zebob.m@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |POST Flags|needinfo?(zebob.m@gmail.com |fedora-review+ |) |
--- Comment #8 from Robert-André Mauchin 🐧 zebob.m@gmail.com --- - always add a comment above patch to explain what changes you made:
# Fix XXXX Patch1: prost-build-fix-metadata.diff
Package approved.
https://bugzilla.redhat.com/show_bug.cgi?id=1872373
--- Comment #9 from Gwyn Ciesla gwync@protonmail.com --- (fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-prost-build
https://bugzilla.redhat.com/show_bug.cgi?id=1872373
Peter Robinson pbrobinson@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|POST |CLOSED Resolution|--- |RAWHIDE Last Closed| |2020-09-11 16:33:12
package-review@lists.fedoraproject.org