Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1394275 - Review Request: librdkafka - C/C++ library implementation of the Apache Kafka protocol
Summary: Review Request: librdkafka - C/C++ library implementation of the Apache Kafka...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1390595 (view as bug list)
Depends On:
Blocks: FE-NEEDSPONSOR
TreeView+ depends on / blocked
 
Reported: 2016-11-11 14:40 UTC by Radovan Sroka
Modified: 2017-02-03 21:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-03 20:49:00 UTC
Type: ---
Embargoed:
jjelen: fedora-review+


Attachments (Terms of Use)

Description Radovan Sroka 2016-11-11 14:40:12 UTC
Spec URL: https://pagure.io/librdkafka/raw/master/f/librdkafka.spec
SRPM URL: https://pagure.io/librdkafka/blob/master/f/librdkafka-0.9.2-1.fc24.src.rpm
Description: 

Librdkafka is a C/C++ library implementation of the Apache Kafka protocol,
containing both Producer and Consumer support.
It was designed with message delivery reliability and high performance in mind,
current figures exceed 800000 messages/second for the producer and 3 million 
messages/second for the consumer.

Fedora Account System Username: rsroka

Comment 1 Daniel Kopeček 2016-11-11 15:00:13 UTC
Found a small issue in the spec. Here's the pagure PR:

https://pagure.io/librdkafka/pull-request/1

Comment 3 Jakub Jelen 2016-11-11 15:41:55 UTC
Rpmlint
-------
Checking: librdkafka-0.9.2-2.fc24.x86_64.rpm
          librdkafka-devel-0.9.2-2.fc24.x86_64.rpm
          librdkafka-debuginfo-0.9.2-2.fc24.x86_64.rpm
          librdkafka-0.9.2-2.fc24.src.rpm
librdkafka.x86_64: W: devel-file-in-non-devel-package /usr/lib64/librdkafka.so
librdkafka.x86_64: W: devel-file-in-non-devel-package /usr/lib64/librdkafka++.so

> Non-versioned *.so files should go to the *-devel package

librdkafka-devel.x86_64: W: only-non-binary-in-usr-lib
librdkafka-devel.x86_64: W: no-documentation
librdkafka-devel.x86_64: W: spurious-executable-perm /usr/include/librdkafka/rdkafka.h
librdkafka-devel.x86_64: W: spurious-executable-perm /usr/include/librdkafka/rdkafkacpp.h
4 packages and 0 specfiles checked; 0 errors, 6 warnings.

in specfile:
> %defattr(444,root,root)

> The %defattr directive in the %files list SHOULD ONLY be used when setting a non-default value, or to reset to the default value after having set a non-default value. 

From https://fedoraproject.org/wiki/Packaging:Guidelines

Comment 4 Jakub Jelen 2016-11-11 16:07:04 UTC
Few more notes from fedora-review:

Issues:
=======
- Development (unversioned) .so files in -devel subpackage, if present.
  Note: Unversioned so-files directly in %_libdir.
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages
- All build dependencies are listed in BuildRequires, except for any that
  are listed in the exceptions section of Packaging Guidelines.
  Note: These BR are not needed: gcc gcc-c++
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#Exceptions_2

Comment 6 Jakub Jelen 2016-11-11 17:13:29 UTC
The testsuite requires python

  [librdkafka-0.9.2]$ grep -r "python"
  tests/LibrdkafkaTestApp.py:#!/usr/bin/env python
  [...]

so I guess we need BuildRequires python for the tests.



Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory

> probably bug in fedora-review in rawhide

librdkafka-devel.x86_64: W: only-non-binary-in-usr-lib

> The *.so files in the non-devel should have reasonable permissions (but it does not look like helping the message above). A bug in rpmlint (bug #1251505)?:

> %attr(0644,root,root) %{_libdir}/librdkafka.so.*
> %attr(0644,root,root) %{_libdir}/librdkafka++.so.*

librdkafka-devel.x86_64: W: no-documentation

> We should have some manual page. Though it is not crucial

librdkafka.x86_64: W: unused-direct-shlib-dependency /usr/lib64/librdkafka++.so.1 /lib64/libz.so.1
librdkafka.x86_64: W: unused-direct-shlib-dependency /usr/lib64/librdkafka++.so.1 /lib64/librt.so.1

> Make sure the libraries (libz, librt) are used in the code or the proper configure flags are used to build the package with these dependencies.

3 packages and 0 specfiles checked; 0 errors, 4 warnings.

===
Otherwise it looks good

Comment 8 Igor Gnatenko 2016-11-22 11:35:04 UTC
* Missing BuildRequires for compiler (gcc, gcc-c++)
* make %{?_smp_mflags} -> %make_build
* %clean section should not be used
* don't use 0644 permissions on shared objects
* %dir %{_includedir}/librdkafka -> %{_includedir}/librdkafka/
* Group tag is not needed

Comment 10 Jakub Jelen 2016-11-22 12:14:21 UTC
Igor, thanks for amendment.

The compilers (gcc, gcc-c++) are not needed according to Fedora review tool, but I can't find the actual paragraph in the Guidelines. Can you point to this one? If so, we should probably fix the tool not to report this kind of issue.

Please, remove the %clean section.

Also the %dir is needed (not sure what was meant by the 5th item above). If removed we end with

- Package does not contain duplicates in %files.
  Note: warning: File listed twice: /usr/include/librdkafka/rdkafka.h
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#DuplicateFiles

Comment 12 Jakub Jelen 2016-11-22 12:47:45 UTC
Now it looks good.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


Issues:
=======
- All build dependencies are listed in BuildRequires, except for any that
  are listed in the exceptions section of Packaging Guidelines.
  Note: These BR are not needed: gcc gcc-c++
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#Exceptions_2

>>> Missing reference to evaluate this item, but not a blocker

===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig called in %post and %postun if required.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "BSD (2 clause) MIT/X11 (BSD like)",
     "zlib/libpng", "BSD (2 clause) ISC", "BSD (3 clause)", "BSD (2
     clause)". 100 files have unknown license.

>>> Please, make sure with upstream that the licence headers are added to the missing files (src/rdkafka_queue.c, src/rdkafka_queue.h, tests/test.h, ...).

[x]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 51200 bytes in 3 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     librdkafka-debuginfo
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Scriptlets must be sane, if used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: The placement of pkgconfig(.pc) files are correct.
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.


Rpmlint
-------
Checking: librdkafka-0.9.2-9.fc24.x86_64.rpm
          librdkafka-devel-0.9.2-9.fc24.x86_64.rpm
          librdkafka-debuginfo-0.9.2-9.fc24.x86_64.rpm
          librdkafka-0.9.2-9.fc24.src.rpm
librdkafka-devel.x86_64: W: only-non-binary-in-usr-lib
librdkafka-devel.x86_64: W: no-documentation
4 packages and 0 specfiles checked; 0 errors, 2 warnings.




Rpmlint (debuginfo)
-------------------
Checking: librdkafka-debuginfo-0.9.2-9.fc24.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
librdkafka-devel.x86_64: W: only-non-binary-in-usr-lib
librdkafka-devel.x86_64: W: no-documentation
librdkafka.x86_64: W: unused-direct-shlib-dependency /usr/lib64/librdkafka++.so.1 /lib64/librt.so.1
3 packages and 0 specfiles checked; 0 errors, 3 warnings.



Requires
--------
librdkafka-devel (rpmlib, GLIBC filtered):
    /usr/bin/pkg-config
    librdkafka(x86-64)
    librdkafka++.so.1()(64bit)
    librdkafka.so.1()(64bit)

librdkafka (rpmlib, GLIBC filtered):
    /sbin/ldconfig
    ld-linux-x86-64.so.2()(64bit)
    libc.so.6()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libpthread.so.0()(64bit)
    librdkafka.so.1()(64bit)
    librt.so.1()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.9)(64bit)
    rtld(GNU_HASH)

librdkafka-debuginfo (rpmlib, GLIBC filtered):



Provides
--------
librdkafka-devel:
    librdkafka-devel
    librdkafka-devel(x86-64)
    pkgconfig(rdkafka)
    pkgconfig(rdkafka++)

librdkafka:
    librdkafka
    librdkafka(x86-64)
    librdkafka++.so.1()(64bit)
    librdkafka.so.1()(64bit)

librdkafka-debuginfo:
    librdkafka-debuginfo
    librdkafka-debuginfo(x86-64)



Source checksums
----------------
https://github.com/edenhill/librdkafka/archive/v0.9.2.tar.gz#/librdkafka-0.9.2.tar.gz :
  CHECKSUM(SHA256) this package     : c243b66956ebb196510ee0efda67825467e31b93639d5f24eb082b5d83f56824
  CHECKSUM(SHA256) upstream package : c243b66956ebb196510ee0efda67825467e31b93639d5f24eb082b5d83f56824

Comment 13 Igor Gnatenko 2016-11-22 13:44:52 UTC
(In reply to Jakub Jelen from comment #10)
> Igor, thanks for amendment.
> 
> The compilers (gcc, gcc-c++) are not needed according to Fedora review tool,
> but I can't find the actual paragraph in the Guidelines. Can you point to
> this one? If so, we should probably fix the tool not to report this kind of
> issue.
There were changes in guidelines couple of months ago. There was section about BRs which you don't need to include, now you have:
"It is important that your package list all necessary build dependencies using the BuildRequires: tag. You may assume that enough of an environment exists for RPM to function, to build packages and execute basic shell scripts, but you should not assume any other packages are present as RPM dependencies and anything brought into the buildroot by the build system may change over time."

I'm not sure if there is open ticket for fedora-review.

Comment 14 Jakub Jelen 2016-11-22 13:48:44 UTC
Thanks for the explanation. I though there was something like this, but I was unable to find it. So it is certainly bug in fedora-review, which would be good to resolve. For the reference, there is already a ticket in the fedora-review [1], but it was not touched yet.

[1] https://fedorahosted.org/FedoraReview/ticket/278

Comment 15 Gwyn Ciesla 2016-11-22 13:59:49 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/librdkafka

Comment 16 Fedora Update System 2016-11-28 12:01:51 UTC
librdkafka-0.9.2-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-02b847f9d7

Comment 17 Fedora Update System 2016-11-28 12:02:40 UTC
librdkafka-0.9.2-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-2e06f45c93

Comment 18 Fedora Update System 2016-11-28 12:02:52 UTC
librdkafka-0.9.2-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b48ed650ca

Comment 19 Michael Schwendt 2016-12-08 16:19:50 UTC
> Name:		librdkafka	
> Group:		Development/Libraries

The base Group for runtime library packages has been "System Environment/Libraries" for many years back to very old releases of Red Hat Linux.

Comment 20 Michael Schwendt 2016-12-08 16:22:30 UTC
*** Bug 1390595 has been marked as a duplicate of this bug. ***

Comment 21 Fedora Update System 2017-02-03 20:49:00 UTC
librdkafka-0.9.2-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2017-02-03 21:48:19 UTC
librdkafka-0.9.2-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.