On Thu, Oct 12, 2017 at 07:02:54PM +0000, William Leuschner wrote:
> Now that the release hubbub is over, what do you all think of this patch
> to add an ssh flavor to net/zabbix that lets it run SSH checks?

Is it worth adding yet another FLAVOR to this port? Can't we enable it by
default?

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/zabbix/Makefile,v
> retrieving revision 1.122
> diff -u -p -r1.122 Makefile
> --- Makefile  7 Jul 2016 18:47:32 -0000       1.122
> +++ Makefile  22 Sep 2017 18:29:39 -0000
> @@ -29,7 +29,7 @@ MODPHP_BUILDDEP =   No
> 
>  MULTI_PACKAGES =     -main -web
>  PSEUDO_FLAVORS =     no_server
> -FLAVORS =            mysql pgsql sqlite3
> +FLAVORS =            mysql pgsql sqlite3 ssh
> 
>  SUBST_VARS +=                PREFIX-web ZABBIX_WEB MAJV
> 
> @@ -77,7 +77,7 @@ FLAVOR =            sqlite3
>  #if non-backend-related flavors are added, add them to
>  #the following line as ":L:Nflavor1:Nflavor2" so that
>  #they don't trigger a "Conflicting flavors" error.
> -BACKEND =            ${FLAVOR}
> +BACKEND =            ${FLAVOR:L:Nssh}
>  .if ${BACKEND} == "mysql"
>  MULTI_PACKAGES += -server
>  LIB_DEPENDS-server +=        databases/mariadb,-main
> @@ -97,6 +97,13 @@ CONFIGURE_ARGS += --disable-server \
>               --disable-proxy
>  .else
>  ERRORS +=            "Fatal: Conflicting flavors: ${FLAVOR}";
> +.endif
> +
> +# Include libssh if the ssh flavor is requested
> +.if ${FLAVOR:Mssh}
> +LIB_DEPENDS-server += security/libssh2
> +WANTLIB-server += ssh2
> +CONFIGURE_ARGS += --with-ssh2
>  .endif
> 
>  pre-configure:
> 
> ───────────────────────────────
> William Leuschner
> wel2...@rit.edu
> 
> On 9/25/2017 1:17 PM, William Leuschner wrote:
> > Ah, that did it! Thank you for the pointers. The now-fixed patch is 
> > below. Comments? ─────────────────────────────── William Leuschner 
> > wel2...@rit.edu
> > 
> > 
> > On 9/21/2017 5:24 PM, Nigel Taylor wrote:
> >> 
> >> $ cd /usr/ports/mystuff/net/zabbix $ doas make configure $ cd
> >> /usr/ports/pobj/zabbix-3.2.7-mysql/zabbix-3.2.7 $ ./configure
> >> --help | grep -i ssh If you want to use SSH2 based checks: 
> >> --with-ssh2[=DIR]       use SSH2 package [default=no], DIR is the
> >> SSH2
> >> 
> >> I don't see a --with-ssh option
> >> 
> >> that's LIB_DEPENDS-server += security/libssh2 WANTLIB-server +=
> >> ssh2 CONFIGURE_ARGS += --with-ssh2
> >> 
> >> You drop the lib on the WANTLIB, check the SHARED_LIBS in 
> >> security/libssh{,2}
> 

-- 
Antoine

Reply via email to