On Tue, November 29, 2016 12:50, Stuart Henderson wrote:
> On 2016/11/28 17:11, Kirill Bychkov wrote:
>>  # $OpenBSD: Makefile,v 1.22 2016/07/08 16:48:21 sthen Exp $
>>
>> -COMMENT =           console interface for nagios
>> +COMMENT =           console interface for nagios/icinga
>> +
>> +GH_ACCOUNT =                dannywarren
>> +GH_PROJECT =                cnagios
>> +GH_TAGNAME =                0.33
>>
>> -DISTNAME =          cnagios-0.30
>> -REVISION =          1
>>  CATEGORIES =                net
>>
>>  WANTLIB =           c perl pthread curses m
>> @@ -13,12 +15,25 @@ PERMIT_PACKAGE_CDROM =   Yes
>>
>>  NO_TEST =           Yes
>>
>> -RUN_DEPENDS =               net/nagios/nagios>=3.0
>>  CONFIGURE_STYLE =   gnu
>> -CONFIGURE_ARGS =    --with-nagios-data=3 \
>> -                    --with-etc-dir="${SYSCONFDIR}/cnagios" \
>> -                    --with-var-dir="/var/nagios" \
>> +CONFIGURE_ARGS +=   --with-nagios-data=3 \
>> +                    --with-etc-dir="${SYSCONFDIR}/cnagios"
>
> Here you set CONFIGURE_ARGS once...
>
>> +
>> +FLAVORS =           icinga
>> +FLAVOR ?=
>> +
>> +.if ${FLAVOR:Micinga}
>> +RUN_DEPENDS =               net/icinga/core
>> +CONFIGURE_ARGS =    --with-var-dir="/var/icinga" \
>> +                    --with-nagios-data=3 \
>> +                    --with-status-file="/var/icinga/status.dat"
>> +.else
>> +RUN_DEPENDS =               net/nagios/nagios>=3.0
>> +CONFIGURE_ARGS =    --with-var-dir="/var/nagios" \
>> +                    --with-nagios-data=4 \
>>                      --with-status-file="/var/nagios/status.dat"
>
> ...but here you override it so --with-etc-dir isn't used, which breaks
> configure:
>
> ->8-------
> ===>  Configuring for cnagios-0.33
> Using /usr/obj/ports/cnagios-0.33/config.site (generated)
> configure: WARNING: unrecognized options: --disable-silent-rules,
> --disable-gtk-doc
> configure: loading site script /usr/obj/ports/cnagios-0.33/config.site
> checking build system type... x86_64-unknown-openbsd6.0
> checking host system type... x86_64-unknown-openbsd6.0
> checking target system type... x86_64-unknown-openbsd6.0
> checking for cc... (cached) cc
> checking for perl... /usr/bin/perl
> nagios etc dir...
>
> FATAL ERROR: Nagios etc directory not found
> Try ./configure --with-etc-dir=/path/to/nagios/etc
> ->8-------
>
> (Fix is obvious :)

Yeah. Got lost between two machines when was testing a diff.

>
> It's annoying that the status.dat path and nagios version are compiled-in;
> it would be easy enough to make these config options in cnagiosrc, then you
> wouldn't need the flavour. (version is silly anyway; it's really "v1" or
> "not v1" and nobody should be running nagios v1). As that's how it is
> now, I don't object to the flavour, but it should be mentioned in DESCR,
> and linked into ports/net/nagios/Makefile. (It maybe easier to write a
> diff to allow setting the status.dat path in the config file than it is
> to handle re-merging port flavours later...)

Agreed. Status file shouldn't be hardcoded. Concerning data versin (according
to upstream comments) it is now in TODO to stop detect version on configure
and detect it at a runtime instead.

>
> pthread can be removed from WANTLIB.
>
> If someone is bored they should probably look at these which are probably
> long long time_t problems, I won't because I already did enough of them in
> ports/net/icinga/core/patches ;)
>
> readv1.c: In function 'read_v1_status':
> readv1.c:104: warning: cast to pointer from integer of different size
> readv1.c:128: warning: cast to pointer from integer of different size
> readv1.c:134: warning: cast to pointer from integer of different size
> readv1.c:203: warning: cast to pointer from integer of different size
> readv1.c:209: warning: cast to pointer from integer of different size
>
> readv23.c: In function 'read_v23_status':
> readv23.c:245: warning: cast to pointer from integer of different size
> readv23.c:249: warning: cast to pointer from integer of different size
> readv23.c:261: warning: cast from pointer to integer of different size
> readv23.c:422: warning: cast to pointer from integer of different size
> readv23.c:433: warning: cast from pointer to integer of different size
> readv23.c:479: warning: cast to pointer from integer of different size
>
> I'm surprised they didn't get a nastygram from Nagios for using the
> name yet..
>
>


Reply via email to