Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 436538

Summary: app-admin/collectd-5.1.0-r1 USE=collectd_plugins_write_mongodb should depend on dev-libs/mongo-c-driver
Product: Gentoo Linux Reporter: Florian Eitel <gentoobugs>
Component: Current packagesAssignee: Johan Bergström <bugs>
Status: RESOLVED FIXED    
Severity: normal CC: proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 436746    
Bug Blocks:    
Attachments: collectd-5.1.0-mongoc06.patch

Description Florian Eitel 2012-09-28 20:22:05 UTC
$ /etc/make.conf:

COLLECTD_PLUGINS="write_mongodb"

$ emerge -vat collectd

configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Configuration:
  Libraries:
...
  Modules:
...
    write_mongodb . . . . no (dependency error)
...

configure: error: "Some plugins are missing dependencies - see the summary above for details"

Reproducible: Always

Steps to Reproduce:
1. enable write_monodb flag
2. emerge app-admin/collectd-5.1.0
Actual Results:  
collectd compile fail

Expected Results:  
dev-libs/mongo-c-driver should be a dependency. But there is no such ebuild
Comment 1 Johan Bergström 2012-10-01 03:10:09 UTC
Created attachment 325432 [details, diff]
collectd-5.1.0-mongoc06.patch

Haven't really tried the mongodb driver. I recall the old co-maintainer adding it but mentioned not testing a lot as well. I've created a new bug for adding the c-driver to tree (bug 436746). On top of this, we need an additional patch to collectd, which I'm attaching (see http://gentoo-pr.org/node/40 for an easy way of testing user patches). Please test and get back to me.
Comment 2 Johan Bergström 2012-10-10 22:06:59 UTC
Hey Florian, just wanted to see if you've tried this out yet.
Comment 3 Florian Eitel 2012-10-11 08:13:43 UTC
Sorry, haven't seen your first post.

Jepp, I tried it (oh I LOVE this userpatch thing!!).

Installation works for me. I Haven't tried using collectd with mongodb yet. But I can test this to these days.

Thanks for your work!
Comment 4 Florian Eitel 2012-10-11 09:19:18 UTC
Ok, testing was easier than expected. Mongodb collect plugin works fine for me.
Comment 5 Johan Bergström 2012-10-12 01:59:47 UTC
(In reply to comment #4)
> Ok, testing was easier than expected. Mongodb collect plugin works fine for
> me.

Perfect. Now we just got to wait for proxy to review my stuff.
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2012-10-28 17:27:48 UTC
Hmm, could you please attach a diff for the new ebuild that is related to the ebuild committed in bug #436746 and to the patch attached here? Then I can commit it ;)
Comment 7 Johan Bergström 2012-10-28 22:06:57 UTC
diff (never mind the perl change, that's bug 437680):

--- collectd-5.1.0-r1.ebuild	2012-10-29 08:31:38.857618582 +1100
+++ collectd-5.1.0-r2.ebuild	2012-10-29 09:05:05.906082445 +1100
@@ -84,7 +84,7 @@
 	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
 	collectd_plugins_varnish?		( www-servers/varnish )
 	collectd_plugins_write_http?		( net-misc/curl )
-
+	collectd_plugins_write_mongodb?		( dev-libs/mongo-c-driver )
 	kernel_FreeBSD? (
 		collectd_plugins_disk?		( >=sys-libs/libstatgrab-0.16 )
 		collectd_plugins_interface?	( >=sys-libs/libstatgrab-0.16 )
@@ -104,10 +104,11 @@
 	collectd_plugins_syslog?		( virtual/logger )"
 
 PATCHES=(
-	"${FILESDIR}/${PN}-4.10.1"-libperl.patch
+	"${FILESDIR}/${PN}-5.1.0"-libperl.patch
 	"${FILESDIR}/${PN}-4.10.2"-{libocci,nohal}.patch
 	"${FILESDIR}/${PN}-4.10.3"-{lt,werror}.patch
 	"${FILESDIR}/${PN}-5.1.0"-netlink.patch
+	"${FILESDIR}/${PN}-5.1.0"-mongoc06.patch
 	)
 
 # @FUNCTION: collectd_plugin_kernel_linux
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2012-10-30 19:34:23 UTC
+*collectd-5.1.0-r2 (30 Oct 2012)
+
+  30 Oct 2012; Markos Chandras <hwoarang@gentoo.org> +collectd-5.1.0-r2.ebuild,
+  +files/collectd-5.1.0-libperl.patch, +files/collectd-5.1.0-mongoc06.patch:
+  Revbump for #436538 and #437680. Thanks to Johan Bergström
+  <bugs@bergstroem.nu>
+
Comment 9 Florian Eitel 2012-11-04 13:45:39 UTC
collectd-5.1.0-mongoc06.patch fails for me in 5.1.0-r2:

***** collectd-5.1.0-mongoc06.patch *****
PWD: /var/tmp/portage/app-admin/collectd-5.1.0-r2/work/collectd-5.1.0

=========================================

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch  < '/etc/portage/patches//app-admin/collectd/collectd-5.1.0-mongoc06.patch'

=========================================
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/write_mongodb.c b/src/write_mongodb.c
|index 8d76b60..c7b7682 100644
|--- a/src/write_mongodb.c
|+++ b/src/write_mongodb.c
--------------------------
No file to patch.  Skipping patch.
patch unexpectedly ends in middle of line
1 out of 1 hunk ignored

patch program exited with status 1
=========================================

PATCH COMMAND:  patch -p1 -g0 -E --no-backup-if-mismatch  < '/etc/portage/patches//app-admin/collectd/collectd-5.1.0-mongoc06.patch'

=========================================
patching file src/write_mongodb.c
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 195.
1 out of 1 hunk FAILED -- saving rejects to file src/write_mongodb.c.rej

patch program exited with status 1
=========================================

PATCH COMMAND:  patch -p2 -g0 -E --no-backup-if-mismatch  < '/etc/portage/patches//app-admin/collectd/collectd-5.1.0-mongoc06.patch'

=========================================
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/write_mongodb.c b/src/write_mongodb.c
|index 8d76b60..c7b7682 100644
|--- a/src/write_mongodb.c
|+++ b/src/write_mongodb.c
--------------------------
No file to patch.  Skipping patch.
patch unexpectedly ends in middle of line
1 out of 1 hunk ignored

patch program exited with status 1
=========================================

PATCH COMMAND:  patch -p3 -g0 -E --no-backup-if-mismatch  < '/etc/portage/patches//app-admin/collectd/collectd-5.1.0-mongoc06.patch'

=========================================
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/write_mongodb.c b/src/write_mongodb.c
|index 8d76b60..c7b7682 100644
|--- a/src/write_mongodb.c
|+++ b/src/write_mongodb.c
--------------------------
No file to patch.  Skipping patch.
patch unexpectedly ends in middle of line
1 out of 1 hunk ignored

patch program exited with status 1
=========================================

PATCH COMMAND:  patch -p4 -g0 -E --no-backup-if-mismatch  < '/etc/portage/patches//app-admin/collectd/collectd-5.1.0-mongoc06.patch'

=========================================
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/write_mongodb.c b/src/write_mongodb.c
|index 8d76b60..c7b7682 100644
|--- a/src/write_mongodb.c
|+++ b/src/write_mongodb.c
--------------------------
No file to patch.  Skipping patch.
patch unexpectedly ends in middle of line
1 out of 1 hunk ignored

patch program exited with status 1
Comment 10 Markos Chandras (RETIRED) gentoo-dev 2012-11-04 14:38:54 UTC
Full build.log please
Comment 11 Markos Chandras (RETIRED) gentoo-dev 2012-11-04 14:42:10 UTC
FYI it applies fine for me

>>> Source unpacked in /var/tmp/portage/app-admin/collectd-5.1.0-r2/work
>>> Preparing source in /var/tmp/portage/app-admin/collectd-5.1.0-r2/work/collectd-5.1.0 ...
 * Applying collectd-5.1.0-libperl.patch ...                             [ ok ]
 * Applying collectd-4.10.2-libocci.patch ...                            [ ok ]
 * Applying collectd-4.10.2-nohal.patch ...                              [ ok ]
 * Applying collectd-4.10.3-lt.patch ...                                 [ ok ]
 * Applying collectd-4.10.3-werror.patch ...                             [ ok ]
 * Applying collectd-5.1.0-netlink.patch ...                             [ ok ]
 * Applying collectd-5.1.0-mongoc06.patch ...                            [ ok ]
Comment 12 Florian Eitel 2012-11-04 16:09:19 UTC
SORRY! I forgot to delete the userpatch thing. Patch works fine for me! thx!