Bug 210545 - [NEW PORT] devel/riemann-c-client: C client library for the Riemann monitoring system
Summary: [NEW PORT] devel/riemann-c-client: C client library for the Riemann monitorin...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords: feature, needs-patch, needs-qa
Depends on:
Blocks: 213124
  Show dependency treegraph
 
Reported: 2016-06-25 01:05 UTC by John Hixson
Modified: 2016-10-02 17:40 UTC (History)
5 users (show)

See Also:


Attachments
SHAR file (4.99 KB, application/x-shar)
2016-06-25 01:05 UTC, John Hixson
koobs: maintainer-approval-
Details
devel_riemann-c-client.shar (5.83 KB, text/plain)
2016-09-30 16:55 UTC, Krzysztof
ports: maintainer-approval?
Details
v3 patch - dch version (2.63 KB, patch)
2016-09-30 22:44 UTC, Dave Cottlehuber
no flags Details | Diff
riemann-c-client shar file (2.71 KB, application/x-shar)
2016-10-01 19:10 UTC, John Hixson
no flags Details
riemann-c-client shar file (2.64 KB, application/x-shar)
2016-10-01 21:10 UTC, John Hixson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Hixson freebsd_committer freebsd_triage 2016-06-25 01:05:26 UTC
Created attachment 171768 [details]
SHAR file
Comment 1 Jan Beich freebsd_committer freebsd_triage 2016-07-21 00:13:29 UTC
Comment on attachment 171768 [details]
SHAR file

Install ports-mgmt/portlint and make sure it doesn't complain. In this case all are true positives.

  $ portlint -AC
  WARN: devel/riemann-c-client/pkg-plist: [11]: installing shared libraries, please define USE_LDCONFIG as appropriate
  WARN: devel/riemann-c-client/pkg-plist: [12]: installing shared libraries, please define USE_LDCONFIG as appropriate
  FATAL: devel/riemann-c-client/pkg-plist: [14]: installing pkg-config files into lib/pkgconfig.  All pkg-config files must be installed into libdata/pkgconfig for them to be found by pkg-config.
  FATAL: Makefile: [10]: use a tab (not space) after a variable name
  FATAL: Makefile: [11]: use a tab (not space) after a variable name
  FATAL: Makefile: [29]: use a tab (not space) after a variable name
  4 fatal errors and 2 warnings found.

The port fails to build inside poudriere as pkgconfig isn't installed.

  ===>  Configuring for riemann-c-client-1.9.0
  libtoolize: putting auxiliary files in '.'.
  libtoolize: copying file './ltmain.sh'
  libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
  libtoolize: copying file 'm4/libtool.m4'
  libtoolize: copying file 'm4/ltoptions.m4'
  libtoolize: copying file 'm4/ltsugar.m4'
  libtoolize: copying file 'm4/ltversion.m4'
  libtoolize: copying file 'm4/lt~obsolete.m4'
  configure.ac:25: error: possibly undefined macro: AC_MSG_ERROR
	If this token and others are legitimate, please use m4_pattern_allow.
	See the Autoconf documentation.
  configure.ac:44: error: possibly undefined macro: dnl
  configure.ac:51: error: possibly undefined macro: AC_CHECK_LIB
  autoreconf-2.69: /usr/local/bin/autoconf-2.69 failed with exit status: 1
  *** [do-autoreconf] Error code 1

Even successful build needs attention.

  ====> Running Q/A tests (stage-qa)
  Warning: 'lib/libriemann-client.so.0.9.0' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}

> XBUILD_DEPENDS=	libtool>=2.2:devel/libtool \
> X		protobuf-c>=1.2.1:devel/protobuf-c \
> X		gnutls>=2.8.0:security/gnutls \
> X		json-c>=0.12:devel/json-c
> XRUN_DEPENDS=	libtool>=2.2:devel/libtool \
> X		protobuf-c>=1.2.1:devel/protobuf-c \
> X		gnutls>=2.8.0:security/gnutls \
> X		json-c>=0.12:devel/json-c

Convert to LIB_DEPENDS, at least RUN_DEPENDS.

USES=libtool already covers BUILD_DEPENDS=libtool. Why do you need libtool at runtime as well?

> XGH_PROJECT=	riemann-c-client

GH_PROJECT is by default the same as PORTNAME.

> XGH_TAGNAME=	riemann-c-client-${PORTVERSION}

Convert to DISTVERSIONPREFIX.

> XUSES=	gmake autoreconf libtool
> XGNU_CONFIGURE=	yes
> XUSE_AUTOTOOLS=  autoheader:env

Mixing USES=autoreconf with USE_AUTOTOOLS is not supported. Pick either one but note USE_AUTOTOOLS is deprecated.

  $ echo DEVELOPER=1 >>/etc/make.conf
  $ make
  /!\ riemann-c-client-1.9.0: Makefile warnings, please consider fixing /!\

  USE_AUTOTOOLS is deprecated, please use USES=autoreconf and GNU_CONFIGURE=yes
  [...]

> XCPPFLAGS+=	-I${LOCALBASE}/include

Convert to USES=localbase.
Comment 2 Krzysztof 2016-09-30 16:55:56 UTC
Created attachment 175313 [details]
devel_riemann-c-client.shar

I've made a new port shar (requested patch)
Comment 3 Krzysztof 2016-09-30 17:01:45 UTC
I've made a new version of this port. It was tested with poudriere - see http://uld.bsdserwis.com/pkg/data/10x64-testing/2016-09-30_12h20m04s/logs/riemann-c-client-1.9.0.log for details.

I also checked Makefile with portlint -AC. The result is:
WARN: Makefile: no ftp/http mirror in MASTER_SITES for users behind a proxy.
WARN: Consider to set DEVELOPER=yes in /etc/make.conf

This port is needed for new version of net-mgmt/collectd5 - specially for write_riemann plugin. So I hope it will be commited soon so collectd5 could be committed also.
Comment 4 Krzysztof 2016-09-30 17:13:24 UTC
I've made a bug #213124 which depends on this one.
Comment 5 Dave Cottlehuber freebsd_committer freebsd_triage 2016-09-30 22:44:04 UTC
Created attachment 175322 [details]
v3 patch - dch version
Comment 6 Dave Cottlehuber freebsd_committer freebsd_triage 2016-09-30 23:01:58 UTC
It seems this is a very popular port now that we all need it for collectd5.6... sorry for the double work, I didn't see this ticket til now.

I got all the FreeBSD issues resolved upstream today, and released as 1.9.1 which means we don't need to carry any patches - yay.

Some comments especially focused on the use of this as a command-line tool, and not just a development library for other things like collectd:

Due to POLA principle, I'm not in favour of having JSON-C and Gnu-TLS as optional as the riemann-client command-line tool is then severely limited in functionality. Riemann with TLS support is very common in the wild, and JSON is almost essential these days. The command-line tool terminates with a .so error if JSON-C is not available. Not classy!

# QA for my build
- passes portlint -AC
- poudriere 11.0Rp0 amd64 is ok, waiting on the rest as my buildbot is occupied

BTW as maintainer for net-mgmt/riemann itself, I'd be happy to maintain this port too, unless somebody else prefers to, irrespective of what patches end up going in.
Comment 7 Krzysztof 2016-10-01 06:26:53 UTC
For me it is OK. I don't need to be a maintainer :-)))

I was not aware that I'm not first who made files for new port... And as a maintainer of collectd5 port I need this one to collectd5 work correctly.
Comment 8 John Hixson freebsd_committer freebsd_triage 2016-10-01 19:10:05 UTC
Created attachment 175340 [details]
riemann-c-client shar file

This shar file overrides previous shar file, addresses previous issues and fixes the port.
Comment 9 John Hixson freebsd_committer freebsd_triage 2016-10-01 21:10:06 UTC
Created attachment 175343 [details]
riemann-c-client shar file

Read comments here and took them to heart. One more shar file ;-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2016-10-01 23:41:36 UTC
A commit references this bug:

Author: jbeich
Date: Sat Oct  1 23:34:13 UTC 2016
New revision: 423096
URL: https://svnweb.freebsd.org/changeset/ports/423096

Log:
  net-mgmt/riemann-c-client: add new port

  PR:		210545
  Submitted by:	Dave Cottlehuber <dch@skunkwerks.at>

  Riemann-C-client is a C client library for the Riemann monitoring system,
  providing a convenient and simple API, high test coverage and a copyleft
  license, along with API and ABI stability.

  https://github.com/algernon/riemann-c-client/#readme

Changes:
  head/net-mgmt/Makefile
  head/net-mgmt/riemann-c-client/
  head/net-mgmt/riemann-c-client/Makefile
  head/net-mgmt/riemann-c-client/distinfo
  head/net-mgmt/riemann-c-client/pkg-descr
  head/net-mgmt/riemann-c-client/pkg-plist
Comment 11 Jan Beich freebsd_committer freebsd_triage 2016-10-01 23:44:26 UTC
Landed attachment 175322 [details] while fixing tests, other versions needed more work. TEST_TARGET is documented in ports r398125 or in /usr/ports/CHANGES (20150928). poudriere support is still N/A[1], so folks either run tests manually (and eventually forget to), hook them to always run during build/install phase (like here) or run only when TEST option is selected.

[1] https://github.com/freebsd/poudriere/pull/355
Comment 12 John Hixson freebsd_committer freebsd_triage 2016-10-02 00:04:32 UTC
(In reply to Jan Beich (mail not working) from comment #11)


Seriously guys, you are shafting me? I'm really getting tired of this community. I in fact submitted the port and was willing to fix it to the degree in which it needed fixing. This is yet another disappointment with the FreeBSD community. I've been trying to work with you guys and get a ports or source commit for years and this is how it always goes down. *sigh*.
Comment 13 John Hixson freebsd_committer freebsd_triage 2016-10-02 00:11:30 UTC
Keep up the good work on pushing out newcomers. You'll eventually eliminate anyone who wants anything to do with your project. You're all a bunch of bullies.
Comment 14 Jan Beich freebsd_committer freebsd_triage 2016-10-02 17:40:53 UTC
(In reply to jhixson from comment #12)

Apologies, due to time constraints I may not have enough time or expertise to do Q/A myself and provide detailed review if there're issues. Due to peer pressure submissions of subpar quality often cannot land (rememeber BSD daemon having a pitchfork?). Giving up and moving on to the next bug/patch is easier.

Maybe try triaging other bugs (or join #freebsd-bugbusters) to get a clue why some patches don't get due attention, then improve your own based on the experience. For one, it appears your bugs lack any Q/A (manual or via automation), description of changes or fast enough followup on review (i.e. within a week).

CC'ing bugmeister in case I've stepped out of line.

> XLIB_DEPENDS=	protobuf-c>=1.2.1:devel/protobuf-c \
> X		gnutls>=2.8.0:security/gnutls \
> X		json-c>=0.12:devel/json-c

Invalid syntax for LIB_DEPENDS.

  $ make
  [...]
  Error: pattern protobuf-c>=1.2.1 in LIB_DEPENDS is not valid
  Error: pattern gnutls>=2.8.0 in LIB_DEPENDS is not valid
  Error: pattern json-c>=0.12 in LIB_DEPENDS is not valid
  Errors with dependencies.
  *** Error code 1

  $ DEVELOPER=1 make
  /!\ riemann-c-client-1.9.1: Makefile errors /!\

  All LIB_DEPENDS should use the new format and start out with lib. (libfoo.so vs foo.so)

  *** Error code 1

  $ portlint -AC
  WARN: Makefile: LIB_DEPENDS don't specify the ABI version number .1 in protobuf-c>=1.2.1 unless it is really necessary.
  WARN: Makefile: LIB_DEPENDS the new format is libFOO.so (e.g., libprotobuf-c>=1.2.1.so).
  WARN: Makefile: LIB_DEPENDS don't specify the ABI version number .0 in gnutls>=2.8.0 unless it is really necessary.
  WARN: Makefile: LIB_DEPENDS the new format is libFOO.so (e.g., libgnutls>=2.8.0.so).
  WARN: Makefile: LIB_DEPENDS don't specify the ABI version number .12 in json-c>=0.12 unless it is really necessary.
  WARN: Makefile: LIB_DEPENDS the new format is libFOO.so (e.g., libjson-c>=0.12.so).
  0 fatal errors and 6 warnings found.

> XRUN_DEPENDS=	protobuf-c>=1.2.1:devel/protobuf-c \
> X		gnutls>=2.8.0:security/gnutls \
> X		json-c>=0.12:devel/json-c

Requiring specific versions for dependencies is rarely needed outside of build. Partial package upgrades aren't really supported, anyway.

> XGH_TAGNAME=	riemann-c-client-${PORTVERSION}

Per comment 1:

  Convert to DISTVERSIONPREFIX.

> XUSES=	autoreconf gmake pathfix pkgconfig

$ DEVELOPER=1 make
[...]
====> Running Q/A tests (stage-qa)
Error: .la libraries found, port needs USES=libtool
*** Error code 1