Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 222317 - net-analyzer/nagios-plugins-1.4.11: compile fail with postgresql 8.3 and postgres use flag
Summary: net-analyzer/nagios-plugins-1.4.11: compile fail with postgresql 8.3 and post...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tobias Scherbaum (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-15 22:03 UTC by Sean
Modified: 2008-05-29 12:56 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean 2008-05-15 22:03:25 UTC
If posgresql 8.3 is installed and the postgres use flag set, the check_pgsql plugin will not build.

Reproducible: Always

Steps to Reproduce:
1.install postgresql 8.3
2.USE=posgresql emerge nagios-plugins
3.

Actual Results:  
compile fails on check_pgsql

Expected Results:  
compile should complete without errors

This fixes the problem:

--- nagios-plugins-1.4.11.ebuild        2008-05-15 17:58:42.265449153 +0000
+++ nagios-plugins-1.4.11.ebuild.pgsql_patched  2008-05-15 17:58:24.155171300 +0000
@@ -56,6 +56,10 @@

        epatch "${FILESDIR}"/${PN}-1.4.10-contrib.patch

+       if use postgres; then
+               epatch "${FILESDIR}"/${PN}-1.4.11-check_pgsql.patch
+       fi
+
        AT_M4DIR="m4 gl/m4" eautoreconf
 }

files/nagios-plugins-1.4.11-check_pgsql.patch:
--- plugins/check_pgsql.c
+++ plugins/check_pgsql.c
@@ -43,6 +43,7 @@
 #include "utils.h"

 #include "netutils.h"
+#include "pg_config_manual.h"
 #include <libpq-fe.h>

 #define DEFAULT_DB "template1"
Comment 1 Caleb Tennis (RETIRED) gentoo-dev 2008-05-20 11:16:09 UTC
I can confirm this bug, however, I can't confirm whether the patch applies again older version of pgsql.  We may have to modify the patch to do a version check for 8.3.
Comment 2 Krzysztof Tomczyk 2008-05-21 10:04:58 UTC
(In reply to comment #0)
> If posgresql 8.3 is installed and the postgres use flag set, the check_pgsql
> plugin will not build.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1.install postgresql 8.3
> 2.USE=posgresql emerge nagios-plugins
> 
it is also reproducible with disabled postgres USE-flag, there is probably some error in ebuild
> 
> Actual Results:  
> compile fails on check_pgsql
> 
> Expected Results:  
> compile should complete without errors
> 
> This fixes the problem:
> 
> --- nagios-plugins-1.4.11.ebuild        2008-05-15 17:58:42.265449153 +0000
> +++ nagios-plugins-1.4.11.ebuild.pgsql_patched  2008-05-15 17:58:24.155171300
> +0000
> @@ -56,6 +56,10 @@
> 
>         epatch "${FILESDIR}"/${PN}-1.4.10-contrib.patch
> 
> +       if use postgres; then
> +               epatch "${FILESDIR}"/${PN}-1.4.11-check_pgsql.patch
> +       fi
> +
>         AT_M4DIR="m4 gl/m4" eautoreconf
>  }
> 
> files/nagios-plugins-1.4.11-check_pgsql.patch:
> --- plugins/check_pgsql.c
> +++ plugins/check_pgsql.c
> @@ -43,6 +43,7 @@
>  #include "utils.h"
> 
>  #include "netutils.h"
> +#include "pg_config_manual.h"
>  #include <libpq-fe.h>
> 
>  #define DEFAULT_DB "template1"
> 

Comment 3 Tobias Scherbaum (RETIRED) gentoo-dev 2008-05-21 18:06:14 UTC
(In reply to comment #1)
> I can confirm this bug, however, I can't confirm whether the patch applies
> again older version of pgsql.  We may have to modify the patch to do a version
> check for 8.3.
> 

nagios-plugins only seems to have a problem building w/ 8.3. I checked again with 8.2 which still builds as expected. Only applying the patch for 8.3 is accomplished by an combined use and has_version check - but applying this patch won't allow me to build the check_pgsql plugin w/ 8.3.
Comment 4 Tobias Scherbaum (RETIRED) gentoo-dev 2008-05-21 18:09:41 UTC
(In reply to comment #2)
> it is also reproducible with disabled postgres USE-flag, there is probably some
> error in ebuild

indeed it is, USE="postgres" should set --with-pgsql instead of --with-postgres, I just fixed this is one in CVS.
Comment 5 Sean 2008-05-28 19:44:27 UTC
This bug goes away with nagios-plugins 1.4.12.

From http://www.nagiosplugins.org/node/89:

check_pgsql now successfully builds with postgres lib v8.3 (Bug #1878972)
Comment 6 Tobias Scherbaum (RETIRED) gentoo-dev 2008-05-29 12:56:53 UTC
(In reply to comment #5)
> This bug goes away with nagios-plugins 1.4.12.
> 
> From http://www.nagiosplugins.org/node/89:
> 
> check_pgsql now successfully builds with postgres lib v8.3 (Bug #1878972)
> 

Thanks Sean! I just bumped the package.