Bug 222317 - net-analyzer/nagios-plugins-1.4.11: compile fail with postgresql 8.3 and postgres use flag
|
Bug#:
222317
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: dertobi123@gentoo.org
|
Reported By: sean@gutenpress.org
|
|
Component: Unspecified
|
|
|
URL:
|
|
Summary: net-analyzer/nagios-plugins-1.4.11: compile fail with postgresql 8.3 and postgres use flag
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2008-05-15 22:03 0000
|
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"
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.
(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"
>
(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.
(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.
(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.