RUN_DEPENDS problem

Paul Schmehl pauls at utdallas.edu
Fri Apr 11 03:10:55 UTC 2008


--On April 10, 2008 1:03:37 PM -0500 Paul Schmehl <pauls at utdallas.edu> 
wrote:

> I'm working on an update to the sguil-server port, and I'm having a
> problem with an OPTION that includes a RUN_DEPENDS.  The dependent port
> does not install, even when the OPTION is true.  (I checked that it was
> in /var/db/ports/sguil-server/options.)
>
> Note: (this may be relevant).  The port presently resides *outside* of
> /usr/ports, because I'm not yet ready to replace the existing port with
> the updated one.  All the other dependent ports install, but the
> optional port does not.
>
> Here's the relevant portion of the Makefile.  Perhaps someone can point
> out my glaring error?
>
> PORTNAME=       sguil-server
> PORTVERSION=    0.7.0
> CATEGORIES=     security
> MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
> MASTER_SITE_SUBDIR=     sguil
>
> MAINTAINER=     pauls at utdallas.edu
> COMMENT=        Sguil is a network security monitoring program
>
> RUN_DEPENDS=    p0f:${PORTSDIR}/net-mgmt/p0f \
>                 tcpflow:${PORTSDIR}/net/tcpflow \
>                 dtplite:${PORTSDIR}/devel/tcllib \
>                 ${LOCALBASE}/lib/tclx8.4/tclx.tcl:${PORTSDIR}/lang/tclX
> LIB_DEPENDS=    tls:${PORTSDIR}/devel/tcltls
>
> NO_BUILD=       yes
> USE_RC_SUBR=    sguild.sh
> TCLSH_CMD?=     ${PREFIX}/bin/tclsh8.4
> SGUILDIR?=      sguil-server
> Makefile: 106 lines, 3836 characters
> [root at utd65257 /home/pauls/sguil-server]# less Makefile
># New ports collection makefile for:    sguil-server
># Date created:                         9 Oct 2006
># Whom:                                 Paul Schmehl <pauls at utdallas.edu>
>#
># $FreeBSD: ports/security/sguil-server/Makefile,v 1.4 2007/01/16
># 12:45:12 bsam Exp $
>#
>
> PORTNAME=       sguil-server
> PORTVERSION=    0.7.0
> CATEGORIES=     security
> MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
> MASTER_SITE_SUBDIR=     sguil
>
> MAINTAINER=     pauls at utdallas.edu
> COMMENT=        Sguil is a network security monitoring program
>
> RUN_DEPENDS=    p0f:${PORTSDIR}/net-mgmt/p0f \
>                 tcpflow:${PORTSDIR}/net/tcpflow \
>                 dtplite:${PORTSDIR}/devel/tcllib \
>                 ${LOCALBASE}/lib/tclx8.4/tclx.tcl:${PORTSDIR}/lang/tclX
> LIB_DEPENDS=    tls:${PORTSDIR}/devel/tcltls
>
> NO_BUILD=       yes
> USE_RC_SUBR=    sguild.sh
> TCLSH_CMD?=     ${PREFIX}/bin/tclsh8.4
> SGUILDIR?=      sguil-server
> WRKSRC=         ${WRKDIR}/sguil-${PORTVERSION}
> PATCH_WRKSRC=   ${WRKSRC}/server
> PLIST_SUB=      SGUILDIR=${SGUILDIR}
> SUB_FILES=      pkg-message pkg-install pkg-deinstall
> SUB_LIST=       SGUILDIR=${SGUILDIR} TCLSH=${TCLSH_CMD}
> CURDIR=${.CURDIR} \
>                 WRKSRC=${WRKSRC} DOCSDIR=${DOCSDIR}
> LIBRARIES=      SguildAccess.tcl SguildGenericDB.tcl
> SguildReportBuilder.tcl \
>                 SguildAutoCat.tcl SguildGenericEvent.tcl
> SguildSendComms.tcl \
>                 SguildClientCmdRcvd.tcl SguildHealthChecks.tcl
> SguildSensorAgentComms.tcl \
>                 SguildConnect.tcl SguildLoaderd.tcl
> SguildSensorCmdRcvd.tcl \
>                 SguildCreateDB.tcl SguildMysqlMerge.tcl
> SguildTranscript.tcl \
>                 SguildEmailEvent.tcl SguildPadsLib.tcl SguildUtils.tcl \
>                 SguildEvent.tcl SguildQueryd.tcl
> SCRIPTS=        create_ruledb.sql update_0.7.tcl
> update_sguildb_v7-v8.sql \
>                 create_sguildb.sql update_sguildb_v10-v11.sql
> update_sguildb_v8-v9.sql \
>                 migrate_event.tcl update_sguildb_v11-v12.sql
> update_sguildb_v9-v10.sql \
>                 migrate_sancp.tcl update_sguildb_v5-v6.sql
> sancp_cleanup.tcl update_sguildb_v6-v7.sql
> CONFS=          autocat.conf sguild.access sguild.conf sguild.email
> sguild.queries sguild.reports sguild.users
>
> PORTDOCS=       CHANGES FAQ INSTALL INSTALL.openbsd LICENSE.QPL \
>                 OPENSSL.README TODO UPGRADE USAGE sguildb.dia
>
> OPTIONS=        MYSQL "Install mysql server" off
>
> .include <bsd.port.pre.mk>
>
> .if defined(WITH_MYSQL)
> RUN_DEPENDS+=   mysql:${PORTSDIR}/databases/mysql50-server
> .endif

I found the problem.  The RUN_DEPENDS line *should* be 
${LOCALBASE}/libexec/mysqld:${PORTSDIR}...etc.

/usr/local/bin/mysql is not removed when mysql server is uninstalled.

I noticed there are some ports that incorrectly use the same construction 
that I did.  Should I submit PRs for them?
# grep -r "mysql:" /usr/ports/* | grep RUN_DEPENDS | grep "mysql50-server"
/usr/ports/deskutils/moregroupware/Makefile:RUN_DEPENDS+= 
	${LOCALBASE}/bin/mysql:${PORTSDIR}/databases/mysql50-server
/usr/ports/ftp/proma/Makefile:RUN_DEPENDS+= 
	mysql:${PORTSDIR}/databases/mysql50-server
/usr/ports/sysutils/syscp/Makefile:RUN_DEPENDS+= 
	mysql:${PORTSDIR}/databases/mysql50-server \


Paul Schmehl (pauls at utdallas.edu)
Senior Information Security Analyst
The University of Texas at Dallas
http://www.utdallas.edu/ir/security/



More information about the freebsd-ports mailing list