Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 480496 - net-libs/curvezmq - An encryption and authentication library for ZeroMQ
Summary: net-libs/curvezmq - An encryption and authentication library for ZeroMQ
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Default Assignee for New Packages
URL: https://github.com/zeromq/curvezmq
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2013-08-10 14:01 UTC by lalebarde
Modified: 2013-08-13 16:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
curvezmq-9999.ebuild (curvezmq-9999.ebuild,1015 bytes, text/plain)
2013-08-10 14:01 UTC, lalebarde
Details
curvezmq-9999.ebuild (curvezmq-9999.ebuild,1.61 KB, text/plain)
2013-08-13 14:49 UTC, lalebarde
Details
curvezmq-9999.ebuild (curvezmq-9999.ebuild,2.09 KB, text/plain)
2013-08-13 16:57 UTC, lalebarde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lalebarde 2013-08-10 14:01:50 UTC
Created attachment 355610 [details]
curvezmq-9999.ebuild

From upstream : "CurveZMQ implements the rfc.zeromq.org/spec:26 elliptic curve security mechanism and makes it easy to use in ZeroMQ applications."

No official release is yet available (on line on June 2013).

It builds right, but the test fails. I have to check with upstream.
Comment 1 lalebarde 2013-08-12 08:08:10 UTC
Finally, test passes and was not due to curvezmq. I had a process already binded to port 9000 which is used by the curvezmq autotest.

PASS: curvezmq_selftest
=============
1 test passed
=============

I still have a problem with the installation of the documentation. When I install manually in /opt, I have the following documents :

/opt/curvezmq $ find . -name "*.[1-9]" | egrep "man|doc"
./doc/curvezmq_keypair.3
./doc/CurveZMQ.7
./doc/curvezmq_codec.3

When I emerge my ebuild, I have :

Making install in doc
make[1] : on entre dans le répertoire « /var/tmp/portage/net-libs/curvezmq-9999/work/curvezmq-9999/doc »
./mkman curvezmq.txt
asciidoc -d manpage -b docbook -f  ./asciidoc.conf \
	-aclab_version=1.0.0 -ocurvezmq.xml curvezmq.txt
xmlto man curvezmq.xml
Note: Writing CurveZMQ.7
make[2] : on entre dans le répertoire « /var/tmp/portage/net-libs/curvezmq-9999/work/curvezmq-9999/doc »
make[2]: Rien à faire pour « install-exec-am ».
xmlto man curvezmq.xml
Note: Writing CurveZMQ.7
 /bin/mkdir -p '/var/tmp/portage/net-libs/curvezmq-9999/image//usr/share/man/man3'
 /bin/mkdir -p '/var/tmp/portage/net-libs/curvezmq-9999/image//usr/share/man/man7'
 /usr/bin/install -c -m 644 curvezmq_codec.3 curvezmq_keypair.3 '/var/tmp/portage/net-libs/curvezmq-9999/image//usr/share/man/man3'
 /usr/bin/install -c -m 644 ./curvezmq.7 '/var/tmp/portage/net-libs/curvezmq-9999/image//usr/share/man/man7'
/usr/bin/install: impossible d'évaluer « ./curvezmq.7 »: Aucun fichier ou dossier de ce type
make[2]: *** [install-man7] Erreur 1
make[2]: *** Attente des tâches non terminées....
make[2] : on quitte le répertoire « /var/tmp/portage/net-libs/curvezmq-9999/work/curvezmq-9999/doc »
make[1]: *** [install-am] Erreur 2
rm curvezmq.xml
make[1] : on quitte le répertoire « /var/tmp/portage/net-libs/curvezmq-9999/work/curvezmq-9999/doc »
make: *** [install-recursive] Erreur 1
 * ERROR: net-libs/curvezmq-9999 failed (install phase):
 *   emake failed


The point is that it tries to install curvezmq.7 instead of CurveZMQ.7

I don't know how to force portage to install CurveZMQ.7 instead of curvezmq.7

Any help is welcome.....
Comment 2 lalebarde 2013-08-13 12:54:12 UTC
cf Gentoo forum help request here : http://forums.gentoo.org/viewtopic-p-7371744.html#7371744
Comment 3 lalebarde 2013-08-13 14:49:21 UTC
Created attachment 355880 [details]
curvezmq-9999.ebuild

This time it works with an awful trick in src_install() :
cp ${S}/doc/CurveZMQ.7 ${S}/doc/curvezmq.7

Tests passes right.
Comment 4 lalebarde 2013-08-13 15:26:54 UTC
Though, when rerun the selftest /usr/bin/curvezmq_selftest, it fails !

$ /usr/bin/curvezmq_selftest
Running CurveZMQ self tests...
curvezmq_selftest: curvezmq_codec.c:758: server_task: Assertion `rc != -1' failed.
 * curvezmq_codec: Abandon
Comment 5 lalebarde 2013-08-13 15:29:50 UTC
Sorry, it works :

$ /usr/bin/curvezmq_selftest -v
Running CurveZMQ self tests...
 * curvezmq_codec: S:WELCOME: OK
C:READY: (received 34 bytes metadata) OK
S:MESSAGE: (received 12 bytes data) OK
S:MESSAGE: (received 12 bytes data) OK
Testing message of size=0...
S:MESSAGE: (received 0 bytes data) OK
Testing message of size=1...
S:MESSAGE: (received 1 bytes data) OK
Testing message of size=3...
S:MESSAGE: (received 3 bytes data) OK
Testing message of size=7...
S:MESSAGE: (received 7 bytes data) OK
Testing message of size=15...
S:MESSAGE: (received 15 bytes data) OK
Testing message of size=31...
S:MESSAGE: (received 31 bytes data) OK
Testing message of size=63...
S:MESSAGE: (received 63 bytes data) OK
Testing message of size=127...
S:MESSAGE: (received 127 bytes data) OK
Testing message of size=255...
S:MESSAGE: (received 255 bytes data) OK
Testing message of size=511...
S:MESSAGE: (received 511 bytes data) OK
Testing message of size=1023...
S:MESSAGE: (received 1023 bytes data) OK
Testing message of size=2047...
S:MESSAGE: (received 2047 bytes data) OK
Testing message of size=4095...
S:MESSAGE: (received 4095 bytes data) OK
Testing message of size=8191...
S:MESSAGE: (received 8191 bytes data) OK
Testing message of size=16383...
S:MESSAGE: (received 16383 bytes data) OK
Testing message of size=32767...
S:MESSAGE: (received 32767 bytes data) OK
Testing message of size=65535...
S:MESSAGE: (received 65535 bytes data) OK
Testing message of size=131071...
S:MESSAGE: (received 131071 bytes data) OK
OK
 * curvezmq_keypair: OK
Tests passed OK


It failed first because I have Eclipse openned and it uses port 9000, which is the port also used by curvezmq_selftest
Comment 6 lalebarde 2013-08-13 16:57:56 UTC
Created attachment 355890 [details]
curvezmq-9999.ebuild

upstream ensures that curvezmq is built whatever libsodium is installed or not. So there is no direct status if curvezmq is built with it or not - one has to check the log. What is dangerous in terms of security.

I have added here the use flag libsodium. When it is set, the ebuild checks that libsodium has been found and tested by the autotools and that it is linked with curvezmq. If the use flag libsodium is not set, we have the default behaviour and you may or not have curvezmq built with libsodium.

There are probably simplier ways to do it, but I don't know how to test if configure has set the variable HAVE_LIBSODIUM or not. I have tested with [[ -v HAVE_LIBSODIUM ]], but it does not work. The shell might be different. So my solution here is to find configure in $S and to grep into it.