Tuesday, April 07, 2020

Re: do-install hook fails

On 2020/04/07 18:23, putridsoul66@gmail.com wrote:
> I'm trying import a package called tripwire. It calls a install-sh script during
> "make fake" which requires user intervention to set some defaults, which can be
> done later. To get around I added the following "do-install" part in the Makefile
> ,but I get an error. I've read the do-install part of bsd.port.mk, It doesn't mention
> anything related to an operator, besides I looked at another port, and the do-install
> is similar. Please help me out.

Missing tabs.

>
> *Makefile*
> # $OpenBSD: Makefile.template,v 1.87 2020/03/22 17:18:01 cwen Exp $
> #
> COMMENT= contains programs used to verify the integrity of the files on a given system
> V= 2.4.3.7
> DISTNAME= tripwire-open-source-${V}
> PKGNAME= tripwire-${V}
> REVISION= 0
> CATEGORIES= security
> # GPLv2
> PERMIT_PACKAGE= Yes
> MASTER_SITES= https://github.com/Tripwire/tripwire-open-source/releases/download/${V}/
> CONFIGURE_STYLE=simple

Should use CONFIGURE_STYLE=gnu.

> CONFIGURE_ARGS= --sysconfdir=/etc/tripwire
> do-install:
> # This package doesn't have a typical make ${INSTALL_TARGET}, so we do it by hand.
> #
> #create var/lib directories
> ${INSTALL_DATA_DIR} ${PREFIX}/var/db/tripwire
> ${INSTALL_DATA_DIR} ${PREFIX}/var/db/tripwire/report

${PREFIX} includes the /usr/local bit. Skip creating them here, just
@sample them in the PLIST.

>
> #install bin/binaries
> ${INSTALL_SCRIPT} ${WRKSRC}/bin/siggen ${PREFIX}/usr/local/bin/

${PREFIX}/bin etc.

> ${INSTALL_SCRIPT} ${WRKSRC}/bin/tripwire ${PREFIX}/usr/local/bin/
> ${INSTALL_SCRIPT} ${WRKSRC}/bin/twadmin ${PREFIX}/usr/local/bin/
> ${INSTALL_SCRIPT} ${WRKSRC}/bin/twprint ${PREFIX}/usr/local/bin/
>
> #copy install files for use by user after install, and fix a path
> ${INSTALL_DATA_DIR} ${WRKSRC}/usr/local/share/tripwire
> ${INSTALL_SCRIPT} ${WRKSRC}/installer/install.sh ${PREFIX}/usr/local/share/tripwire/
> ${INSTALL_DATA} ${WRKSRC}/installer/install.cfg ${PREFIX}/usr/local/share/tripwire/
> sed -i 's#./install/install.cfg#./install.cfg#' ${PREFIX}/usr/local/share/tripwire/install.sh
>
> #install man/man pages
> ${INSTALL_DATA} ${WRKSRC}/man/man4/*.4 ${PREFIX}/usr/local/share/man/man4/
> ${INSTALL_DATA} ${WRKSRC}/man/man5/*.5 ${PREFIX}/usr/local/share/man/man5/
> ${INSTALL_DATA} ${WRKSRC}/man/man8/*.8 ${PREFIX}/usr/local/share/man/man8/

${PREFIX}/man/manX/ (no "share").

>
> #install configuration files
> ${INSTALL_DATA_DIR} ${PREFIX}/etc/tripwire
> ${INSTALL_DATA} ${WRKSRC}/policy/twpol-OpenBSD.txt ${PREFIX}/etc/tripwire/twpol-OpenBSD.txt
>
> .include <bsd.port.mk>
>
> *Error*
> *** Parse error in /usr/ports/mystuff/security/tripwire: Need an operator in '/var/db/tripwire' (Makefile:18)
> *** Parse error: Need an operator in '/var/db/tripwire/report' (Makefile:19)
> *** Parse error: Need an operator in '/usr/local/bin/' (Makefile:22)
> *** Parse error: Need an operator in '/usr/local/bin/' (Makefile:23)
> *** Parse error: Need an operator in '/usr/local/bin/' (Makefile:24)
> *** Parse error: Need an operator in '/usr/local/bin/' (Makefile:25)
> *** Parse error: Need an operator in '/usr/local/share/tripwire' (Makefile:28)
> *** Parse error: Need an operator in '/usr/local/share/tripwire/' (Makefile:29)
> *** Parse error: Need an operator in '/usr/local/share/tripwire/' (Makefile:30)
> *** Parse error: Need an operator in ''s' (Makefile:31)
> *** Parse error: Need an operator in '/usr/local/share/man/man4/' (Makefile:34)
> *** Parse error: Need an operator in '/usr/local/share/man/man5/' (Makefile:35)
> *** Parse error: Need an operator in '/usr/local/share/man/man8/' (Makefile:36)
> *** Parse error: Need an operator in '/etc/tripwire' (Makefile:39)
> *** Parse error: Missing dependency operator (Makefile:40)
>

No comments:

Post a Comment