Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2024 08:13:48 GMT
From:      Matthias Fechner <mfechner@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 9e6fcaf3eaa2 - main - security/trivy: include templates
Message-ID:  <202403090813.4298DmKj093234@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mfechner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9e6fcaf3eaa2e2f5a8036bcdfde6bd18810d72dd

commit 9e6fcaf3eaa2e2f5a8036bcdfde6bd18810d72dd
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2024-03-09 08:12:31 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2024-03-09 08:13:37 +0000

    security/trivy: include templates
    
    These templates can be used to integrate trivy into gitlab pipelines.
    But it seems that gitlab does support the full parsing not in the
    community edition of gitlab.
---
 security/trivy/Makefile | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/security/trivy/Makefile b/security/trivy/Makefile
index 44282f9226e1..862dba088fd4 100644
--- a/security/trivy/Makefile
+++ b/security/trivy/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	trivy
 DISTVERSION=	0.49.1
+PORTREVISION=	1
 DISTVERSIONPREFIX=	v
 CATEGORIES=	security
 
@@ -21,6 +22,14 @@ GO_BUILDFLAGS= -ldflags=" \
 
 PLIST_FILES=	bin/${PORTNAME}
 
+post-install:
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/contrib/*.tpl ${STAGEDIR}${DATADIR}/
+	${FIND} -s ${STAGEDIR}${DATADIR} -not -type d | ${SORT} | \
+		${SED} -e 's#^${STAGEDIR}${PREFIX}/##' | \
+		${SED} -E -e '/sample$$/ s#^#@sample #; \
+		s#${DATADIR_REL}/bin#@(,,555) ${DATADIR_REL}/bin#; ' >> ${TMPPLIST}
+	cat ${TMPPLIST}
 	
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403090813.4298DmKj093234>