1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-11 07:22:22 +00:00

- Add update tool.

- Add update instructions (datastore needs to be updated).
 - Convert pkg-message to UCL format.
 - Rework plist generation target.
This commit is contained in:
Alexander Leidinger 2019-09-11 17:53:23 +00:00
parent 2508c9b1a3
commit 9e587ead73
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=511830
4 changed files with 32 additions and 6 deletions

View File

@ -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

View File

@ -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 <bsd.port.mk>

View File

@ -1,3 +1,6 @@
[
{
message: <<EOT
Bastille is now installed in %%PREFIX%%/%%WWWDIR%% and %%PREFIX%%/jetty_bastillion.
Before the first start (but not if you update), you have to set a DB password in
@ -11,4 +14,15 @@ You may want to activate it in /etc/rc.conf:
Once Bastille is started, point your web browser to the login page at
https://<hostname>:8443/.
EOT
}
{
type: upgrade
maximum_version: "3.08.00"
message: <<EOT
The datastore of bastillion needs to be upgraded (if you do not see users / can not login
as someone else than admin, you forgot to upgrade it):
java -jar %%PREFIX%%/jetty_bastillion/upgrade/bastillion-upgrade-3.08.00.jar %%PREFIX%%/jetty_bastillion/bastillion/WEB-INF/classes/BastillionConfig.properties
EOT
}
]

View File

@ -434,6 +434,7 @@ jetty_bastillion/modules/webapp.mod
jetty_bastillion/modules/websocket.mod
jetty_bastillion/notice.html
jetty_bastillion/start.jar
jetty_bastillion/upgrade/bastillion-upgrade-3.08.00.jar
@dir(www,www,755) jetty_bastillion/bastillion/WEB-INF/classes
@dir(www,www,755) %%WWWDIR%%
@dir(www,www,755) %%WWWDIR%%/work