From 9e587ead7349554b399273975ec0e8c6bc2be46a Mon Sep 17 00:00:00 2001 From: Alexander Leidinger Date: Wed, 11 Sep 2019 17:53:23 +0000 Subject: [PATCH] - Add update tool. - Add update instructions (datastore needs to be updated). - Convert pkg-message to UCL format. - Rework plist generation target. --- UPDATING | 8 ++++++++ security/bastillion/Makefile | 13 ++++++++----- security/bastillion/files/pkg-message.in | 16 +++++++++++++++- security/bastillion/pkg-plist | 1 + 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/UPDATING b/UPDATING index 03391fa04652..15183756e95c 100644 --- a/UPDATING +++ b/UPDATING @@ -5,6 +5,14 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20190911: + AFFECTS: users of security/bastillion + AUTHOR: netchild@FreeBSD.org + + The datastore of bastillion needs to be updated: + java -jar $PREFIX/jetty_bastillion/upgrade/bastillion-upgrade-3.08.00.jar \ + $PREFIX/jetty_bastillion/bastillion/WEB-INF/classes/BastillionConfig.properties + 20190909: AFFECTS: users of lang/ruby25 AUTHOR: mfechner@FreeBSD.org diff --git a/security/bastillion/Makefile b/security/bastillion/Makefile index 2a3c9206ae2e..a879029c0706 100644 --- a/security/bastillion/Makefile +++ b/security/bastillion/Makefile @@ -3,7 +3,9 @@ PORTNAME= bastillion DISTVERSIONPREFIX= jetty-v DISTVERSION= 3.08_00 -PORTREVISION= 1 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ + ${PORTNAME}-upgrade-${PORTVERSION}.jar +PORTREVISION= 2 CATEGORIES= security www java MASTER_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/v${PORTVERSION}/ @@ -65,20 +67,21 @@ do-install: ${MKDIR} ${STAGEDIR}/var/log/${PORTNAME} ${MKDIR} ${STAGEDIR}/var/run/${PORTNAME} cd ${WRKSRC}; ${COPYTREE_BIN} jetty_bastillion ${STAGEDIR}${PREFIX} "! -name *\.orig" + ${MKDIR} ${STAGEDIR}${PREFIX}/jetty_bastillion/upgrade cd ${WRKSRC}; ${COPYTREE_SHARE} webapps ${STAGEDIR}${PREFIX}/${WWWDIR} "! -name *\.orig" cd ${WRKSRC}; ${COPYTREE_SHARE} etc ${STAGEDIR}${PREFIX}/${WWWDIR} "! -name *\.orig" ${RLN} ${STAGEDIR}${PREFIX}/${WWWDIR}/etc ${STAGEDIR}${PREFIX}/jetty_bastillion/etc ${INSTALL_DATA} ${WRKSRC}/start.ini ${STAGEDIR}${PREFIX}/${WWWDIR} ${INSTALL_DATA} ${WRKSRC}/*.md ${STAGEDIR}${PREFIX}/${WWWDIR} ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.sample ${STAGEDIR}${ETCDIR}/ + ${INSTALL_DATA} ${DISTDIR}/bastillion-upgrade-3.08.00.jar ${STAGEDIR}${PREFIX}/jetty_bastillion/upgrade/ gen-plist: ${ECHO} '@sample %%ETCDIR%%/%%APP_NAME%%.sample' >${PLIST}.new ${ECHO} '@sample(www,www,644) jetty_bastillion/bastillion/WEB-INF/classes/BastillionConfig.properties.sample' >> ${PLIST}.new ${ECHO} '@dir(www,www,755) /var/log/%%APP_NAME%%' >> ${PLIST}.new ${ECHO} '@dir(www,www,755) /var/run/%%APP_NAME%%' >> ${PLIST}.new - ${FIND} ${WRKSRC}/jetty_bastillion -type f -a ! -name \*.orig | ${SED} -e "s:${WRKSRC}/::g" | ${SORT} >> ${PLIST}.new -# ${REINPLACE_CMD} 's:jetty_bastillion/bastillion/WEB-INF/classes/BastillionConfig.properties$$:@(www,www,644) jetty_bastillion/bastillion/WEB-INF/classes/BastillionConfig.properties:g' ${PLIST}.new + ${FIND} ${STAGEDIR}${PREFIX}/jetty_bastillion -type f -a ! -name \*.orig -a ! -name \*.sample | ${SED} -e "s:${STAGEDIR}${PREFIX}/::g" | ${SORT} >> ${PLIST}.new ${ECHO} '@dir(www,www,755) jetty_bastillion/bastillion/WEB-INF/classes' >> ${PLIST}.new ${ECHO} '@dir(www,www,755) %%WWWDIR%%' >> ${PLIST}.new ${ECHO} '@dir(www,www,755) %%WWWDIR%%/work' >> ${PLIST}.new @@ -86,8 +89,8 @@ gen-plist: ${ECHO} '%%WWWDIR%%/3rdPartyLicenses.md' >> ${PLIST}.new ${ECHO} '%%WWWDIR%%/LICENSE.md' >> ${PLIST}.new ${ECHO} '%%WWWDIR%%/README.md' >> ${PLIST}.new - ${FIND} ${WRKSRC}/webapps -type f -a ! -name \*.orig | ${SED} -e "s:${WRKSRC}/webapps:%%WWWDIR%%/webapps:g" | ${SORT} >> ${PLIST}.new - ${FIND} ${WRKSRC}/etc -type f -a ! -name \*.orig | ${SED} -e "s:${WRKSRC}/etc:%%WWWDIR%%/etc:g" | ${SORT} >> ${PLIST}.new + ${FIND} ${STAGEDIR}${PREFIX}/${WWWDIR}/webapps -type f -a ! -name \*.orig | ${SED} -e "s:${STAGEDIR}${PREFIX}/${WWWDIR}:%%WWWDIR%%:g" | ${SORT} >> ${PLIST}.new + ${FIND} ${STAGEDIR}${PREFIX}/${WWWDIR}/etc -type f -a ! -name \*.orig | ${SED} -e "s:${STAGEDIR}${PREFIX}/${WWWDIR}:%%WWWDIR%%:g" | ${SORT} >> ${PLIST}.new ${ECHO} 'jetty_bastillion/etc' >> ${PLIST}.new .include diff --git a/security/bastillion/files/pkg-message.in b/security/bastillion/files/pkg-message.in index 32c71f8c3c9c..6a26a0f95ae1 100644 --- a/security/bastillion/files/pkg-message.in +++ b/security/bastillion/files/pkg-message.in @@ -1,3 +1,6 @@ +[ +{ + message: <:8443/. - +EOT +} +{ + type: upgrade + maximum_version: "3.08.00" + message: <