Bug 1123511 - Review Request: nanomsg - A fast, scalable, and easy to use socket library
Summary: Review Request: nanomsg - A fast, scalable, and easy to use socket library
Status: CLOSED DUPLICATE of bug 1438927
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
: 1012392 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-25 21:36 UTC by Japheth Cleaver
Modified: 2017-04-05 11:50 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-29 13:25:55 UTC
Type: ---

Attachments (Terms of Use)

Description Japheth Cleaver 2014-07-25 21:36:02 UTC
Spec URL: http://terabithia.org/rpms/misc/f20/nanomsg.spec
SRPM URL: http://terabithia.org/rpms/misc/f20/nanomsg-0.4-0.2.beta.fc20.src.rpm
Koji Build: http://koji.fedoraproject.org/koji/taskinfo?taskID=7162656


With the closure of BZ#1012392 (a different contributor's review request for nanomsg), I've decided to pick up the ball and submit an RPM for review myself.

Description:  nanomsg is a socket library that provides several common communication patterns. It aims to make the networking layer fast, scalable, and easy to use. The communication patterns, also called "scalability protocols", are basic blocks for building distributed systems. By combining them you can create a vast array of distributed applications.

This project seems to be gaining in popularity within its niche (message queuing libraries), and I'd been investigating using it within another (non-Fedora-bundled) OSS project. It feels like this package would be a useful addition to Fedora.

Fedora Account System Username: cleaver

As this is my first official package submission, I would need sponsorship to become the package maintainer... however I'd like to see some version of nanomsg in Fedora regardless.

About me:
I've been using Fedora and its predecessor since the Cartman days and have been building RPMs regularly since around 2004. Various BZ's I've been involved with are at https://www.google.com/search?q="Japheth+Cleaver"&sitesearch=bugzilla.redhat.com

Comment 1 Christopher Meng 2014-07-26 03:35:48 UTC
*** Bug 1012392 has been marked as a duplicate of this bug. ***

Comment 2 Michael Schwendt 2014-07-26 13:59:09 UTC
A couple of minor issues:

> BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

> %defattr(-,root,root)

> %clean
> rm -fR %{buildroot}

These are only needed for EL5, so unless you want to build for EL5, consider dropping them:


> %if %{with static}
> 	%configure --enable-doc --enable-debug --enable-static
> %else
> 	%configure --enable-doc --enable-debug --disable-static
> %endif

IMO, the following would be smarter (since you would not need to modify two %configure calls whenever you wanted to change the options):

  %configure --enable-doc --enable-debug \

> make %{?_smp_mflags}

The build.log output is non-verbose (=silent). One cannot see which preprocessor/compiler flags and parameters are active.

One work-around would be to call the configure script with option --disable-silent-rules, another would be to call make with V=1.

Doing that, it turns out the package is built without Fedora's global flags:

> %files devel
> %doc ChangeLog COPYING README

> %files utils
> %doc ChangeLog COPYING README

Both subpackages don't need to duplicate these %doc files, because they (unlike the -doc subpkg) depend on the base package already. Plus, note that many users prefer changelog files to be included in the base runtime package anyway.

> %{_libdir}/pkgconfig/*.pc

Umm, ... it says "Version: 2.0.2" which is neither the package %version (0.4 beta) nor the lib SONAME version (0, 0.2.0). Anything known about this confusing versioning?

Comment 3 Japheth Cleaver 2014-07-27 18:14:40 UTC
Thanks for the comments. Some responses:

- I'd like to keep the EL builds a possibility, definitely.
- config line updated to use that macro pattern, thanks
- turns out the --enable-debug did more than simply not strip the binaries. I've removed that and bypassed stripping another way. I believe the options should be correct now.
- doc files updated

The pkgconfig Version is coming from the ABI version in https://github.com/nanomsg/nanomsg/blob/master/src/nn.h, ultimately. As for the SONAME itself, that's... interesting. I'm not sure on the history there. I'll look into it further.

I've updated the versions at:

Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=7200652

Comment 4 Japheth Cleaver 2014-07-29 20:54:33 UTC
Based on http://www.freelists.org/post/nanomsg/Brief-introduction-and-pkgconfig-vs-SONAME-question,4 and (e.g.) http://blog.asleson.org/index.php/2014/07/08/libtool-library-versioning-version-info-currentrevisionage/, this seems to be the expected (if slightly lexicographically confusing) behavior.

The ABI has not had anything deprecated yet, so it's still at SONAME 0. Package release version is unrelated.

Any other issues seen with this package?

Comment 5 Michael Schwendt 2014-07-30 10:39:28 UTC
Yes, "libtool versioning" is this,


but while it is certainly possible to map the  current:revision:age  values into the release versioning scheme (e.g. 2:0:2 -> nanomsg-2.0.2), this has not been done here because the release is nanomsg-0.4-beta.

So, RPM package %version = 0.4 does not match the version in the pkgconfig .pc file. This also affects RPM BuildRequires on pkgconfig files ( https://fedoraproject.org/wiki/Packaging:PkgConfigBuildRequires ), pkgconfig based queries (see "pkg-config --help|grep VERS") and .pc file inter-dependencies.

I would have expected the nanonmsg release version to be the same as the .pc file version. Either 2.x.y or 0.x. With a leading 0 being better because it would match the SONAME version.


> turns out the --enable-debug did more than simply not strip the binaries.

Good catch. That's one of the reasons why verbose build output can be helpful.

> Any other issues seen with this package?

From "fedora-review -b 1123511":

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

False positive.

| [ ]: Large documentation must go in a -doc subpackage. Large could be size
|      (~1MB) or number of files.
|      Note: Documentation size is 296960 bytes in 3 files.

The currently small size of the -doc package makes it questionable. Just note that you are free to include those files in the -devel package. It could still be split off in the future in case the size would increase a lot.

| [ ]: Fully versioned dependency in subpackages if applicable.
|      Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in nanomsg-
|      utils , nanomsg-doc

1) It's good that a normal -doc package does not depend on the base library package.

2) For nanomsg-utils, it's debatable. Some packagers refuse to add a base package Requires to such subpackages, because the automatic SONAME dep is present already and sufficient for up-to-date installations. The only benefit of the base package Requires would be to make the dep more strict, i.e. installation of nanomsg-utils linked with API additions would strictly require the corresponding nanomsg base package. An older lib release with the same SONAME would not suffice due to missing the new symbols.


Have you thought about attempting at doing a few reviews?

 * http://fedoraproject.org/PackageReviewStatus/
 * https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group

Comment 6 Christopher Meng 2014-08-20 04:23:33 UTC

Comment 7 Fabian Affolter 2014-11-10 08:33:46 UTC
Any progress?

Comment 8 Japheth Cleaver 2014-11-15 01:07:29 UTC
Hello. I was actually waiting on the 0.5 beta release, which just dropped today.

Aside from the upstream fixes, there's no specific change here. SONAME was bumped to libnanomsg.so.0.2.1, with pkgconfig at 2.1.2 (per upstream nn.h generation).

I'd considered moving -doc back into the main package, but with the recent emphasis on pruning down size as much as humanly possible I suppose this is a decent future-proof for those cloud use cases.

I have not had a chance to do any other package reviews myself, unfortunately, but am certainly willing to look out for them.

I've updated the versions at:

Koji build logs: 
Rawhide: http://koji.fedoraproject.org/koji/taskinfo?taskID=8148256
Fedora20: http://koji.fedoraproject.org/koji/taskinfo?taskID=8148325
EPEL7: http://koji.fedoraproject.org/koji/taskinfo?taskID=8148332

Comment 9 Michael Schwendt 2014-12-25 14:46:16 UTC
Not much left:

* SONAME has not changed. It's still libnanomsg.so.0

* If you insist on creating a separate -doc package for only 39 files with a total size of 1,021,705 bytes, also consider adding "BuildArch: noarch" to that subpackage.

# pkg-config libnanomsg --libs
-lnanomsg -lanl -lrt 

Kinda odd to relink with libanl and librt since libnanomsg is linked with those two already, and the nanomsg API does not pull in anything for those two libs:

  # grep .*#include /usr/include/nanomsg/*
  /usr/include/nanomsg/nn.h:#include <errno.h>
  /usr/include/nanomsg/nn.h:#include <stddef.h>
  /usr/include/nanomsg/reqrep.h:#include "nn.h"

The testsuite succeeds with this release, provided that the spec file points the runtime linker at the freshly built lib:

--- nanomsg.spec.ORIG	2014-11-15 00:34:06.000000000 +0100
+++ nanomsg.spec	2014-12-25 15:42:38.301122955 +0100
@@ -115,7 +115,7 @@
 # conditional: currently failing tests: https://github.com/nanomsg/nanomsg/issues/281
 %if %{with check}
-make check DESTDIR="%{buildroot}"
+LD_LIBRARY_PATH=$(pwd)/.libs make check

Testsuite summary for nanomsg 0.5-beta
# TOTAL: 31
# PASS:  31
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0

Comment 10 Fabian Affolter 2015-03-06 22:18:20 UTC
Are there any plans to go with this?

Comment 11 Pavel Zhukov 2015-07-26 18:46:56 UTC
(In reply to Fabian Affolter from comment #10)
> Are there any plans to go with this?

Comment 12 Upstream Release Monitoring 2015-10-29 18:19:44 UTC
cleaver's scratch build of nanomsg-0.7-0.1.beta.fc20.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11629931

Comment 13 Japheth Cleaver 2015-10-29 18:29:34 UTC
(In reply to Upstream Release Monitoring from comment #12)
> cleaver's scratch build of nanomsg-0.7-0.1.beta.fc20.src.rpm for rawhide
> completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11629931

The "Currently fails checks: https://github.com/nanomsg/nanomsg/issues/281" line should be removed from the .spec file (since it now passes fine, so long as LD_LIBRARY_PATH is specified), and the dist tag indicates this was a rebuild of an f20 SRPM, however the functionality and file list should be correct.

Comment 14 Pavel Zhukov 2015-11-27 15:08:23 UTC
0.8-beta has been released

Comment 15 Neal Gompa 2015-11-29 02:00:12 UTC
@Japheth: Are you still trying to get this in? It'd be great if it was in Fedora.

Comment 16 Miroslav Suchý 2016-07-29 13:25:55 UTC
No response for past 8 months. Closing. If you want to continue, please reopen.

Comment 17 Tarjei Knapstad 2017-04-02 21:21:55 UTC
I would like to reopen this request. A stable 1.0.0 release of this package was released, which also involves changes to the packaging, mainly because upstream switched from autoconf to cmake. This leads to packaging simplifications and less of a hackish spec, so I would say it's for the better.

I've updated the original .spec file uploaded here and tried to correct it according to the comments made on the original request. I've successfully built the package in Copr and using the fedora-packager tools. The Epel7 build fails, but I don't quite understand why, so if anyone could look into that I would appreciate it.

A Copr repo is available here:

The .spec file is available here:

A summary of my changes from the .spec file:
* Sat Apr  1 2017 Tarjei Knapstad <tarjei.knapstad@gmail.com> - 1.0.0-1
- Updated to 1.0.0 final release
- nanomsg moved to CMake, so this spec did too
- Changed source URL
- Moved contents of -doc package into -devel
- Removed conditional check, all tests should pass
- The nanocat symlink stuff is gone, nanocat is now a single binary with options

Comment 18 Japheth Cleaver 2017-04-04 20:22:33 UTC
My apologies, it seems the updates from here were getting filtered away -- I didn't see this until the message on the -devel list.

I'm entirely fine handing over nanomsg's package submission to you. I never found the opportunity to finish the packager process, and it would be quite nice if it could indeed make it into Fedora (and all EPELs).

Comment 19 Tarjei Knapstad 2017-04-04 20:45:40 UTC
Thank you Japheth, no worries. I've opened a new Review Request at bug 1438927.

Comment 20 Michael Schwendt 2017-04-05 11:50:22 UTC

*** This bug has been marked as a duplicate of bug 1438927 ***

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