diff --git a/devel/sonarqube-community/Makefile b/devel/sonarqube-community/Makefile index ec10321182b0..29828cf602f5 100644 --- a/devel/sonarqube-community/Makefile +++ b/devel/sonarqube-community/Makefile @@ -1,165 +1,165 @@ PORTNAME= sonarqube DISTVERSION= 10.1.0.73491 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel security www java MASTER_SITES= https://binaries.sonarsource.com/Distribution/sonarqube/:m_core \ https://binaries.sonarsource.com/Distribution/sonar-csharp-plugin/:m_csharp \ https://binaries.sonarsource.com/Distribution/sonar-java-plugin/:m_java \ https://binaries.sonarsource.com/Distribution/sonar-javascript-plugin/:m_javascript \ https://binaries.sonarsource.com/Distribution/sonar-php-plugin/:m_php \ https://binaries.sonarsource.com/Distribution/sonar-python-plugin/:m_python \ https://binaries.sonarsource.com/Distribution/sonar-vbnet-plugin/:m_vbnet PKGNAMESUFFIX= -community DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:m_core \ sonar-csharp-plugin-${SONARCSHARP_VER}.jar:m_csharp \ sonar-java-plugin-${SONARJAVA_VER}.jar:m_java \ sonar-javascript-plugin-${SONARJAVASCRIPT_VER}.jar:m_javascript \ sonar-php-plugin-${SONARPHP_VER}.jar:m_php \ sonar-python-plugin-${SONARPYTHON_VER}.jar:m_python \ sonar-vbnet-plugin-${SONARVBNET_VER}.jar:m_vbnet EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= netchild@FreeBSD.org COMMENT= Web-based continuous code inspection tool WWW= https://www.sonarqube.org/ LICENSE= LGPL3 LICENSE_FILE= ${WRKSRC}/COPYING #BUILD_DEPENDS= jna>0:devel/jna RUN_DEPENDS= bash:shells/bash #\ # jna>0:devel/jna USES= cpe shebangfix zip CPE_VENDOR= sonarsource USE_JAVA= yes SHEBANG_FILES= elasticsearch/bin/elasticsearch-cli \ elasticsearch/bin/elasticsearch-env NO_ARCH= yes NO_BUILD= yes JAVA_VERSION= 17+ JAVA_VENDOR= openjdk USE_RC_SUBR= ${PORTNAME} APP_NAME= ${PORTNAME} APP_DIR= libexec/${PORTNAME} LOG_DIR= /var/log/${PORTNAME} PID_DIR= /var/run/${PORTNAME} JAR_VERSION= ${DISTVERSION} DBBASE_DIR= /var/db/${PORTNAME} DATA_DIR= ${DBBASE_DIR}/data TEMP_DIR= ${DBBASE_DIR}/temp SONARCSHARP_VER= 9.5.0.73987 SONARJAVA_VER= 7.20.0.31692 SONARJAVASCRIPT_VER= 10.3.1.21905 SONARPHP_VER= 3.30.0.9766 SONARPYTHON_VER= 4.5.0.11949 SONARVBNET_VER= ${SONARCSHARP_VER} USERS= sonarqube GROUPS= sonarqube SUB_LIST= \ APP_NAME=${APP_NAME} \ APP_DIR=${APP_DIR} \ JAVA_HOME=${JAVA_HOME} \ JAVA=${JAVA} \ LOG_DIR=${LOG_DIR} \ PID_DIR=${PID_DIR} \ JAR_VERSION=${JAR_VERSION} \ DATA_DIR=${DATA_DIR} \ TEMP_DIR=${TEMP_DIR} SUB_FILES= \ ${APP_NAME} \ pkg-message PLIST_SUB= APP_NAME=${APP_NAME} \ APP_DIR=${APP_DIR} \ LOG_DIR=${LOG_DIR} \ PID_DIR=${PID_DIR} \ JAR_VERSION=${JAR_VERSION} \ DBBASE_DIR=${DBBASE_DIR} \ DATA_DIR=${DATA_DIR} \ TEMP_DIR=${TEMP_DIR} \ SONARCSHARP_VER=${SONARCSHARP_VER} \ SONARJAVA_VER=${SONARJAVA_VER} \ SONARJAVASCRIPT_VER=${SONARJAVASCRIPT_VER} \ SONARPHP_VER=${SONARPHP_VER} \ SONARPYTHON_VER=${SONARPYTHON_VER} \ SONARSCMGIT_VER=${SONARSCMGIT_VER} \ SONARSCMSVN_VER=${SONARSCMSVN_VER} \ SONARVBNET_VER=${SONARVBNET_VER} post-extract: ${RM} -r ${WRKSRC}/bin ${WRKSRC}/lib/jsw ${WRKSRC}/conf/wrapper.conf # ${RM} ${WRKSRC}/elasticsearch/lib/jna*.jar ${MV} ${WRKSRC}/conf/sonar.properties ${WRKSRC}/conf/sonar.properties.sample .for plugin in sonar-csharp-plugin \ sonar-java-plugin \ sonar-javascript-plugin \ sonar-php-plugin \ sonar-python-plugin \ sonar-vbnet-plugin ${RM} ${WRKSRC}/lib/extensions/${plugin}-*.jar .endfor .for plugin in sonar-csharp-plugin-${SONARCSHARP_VER}.jar \ sonar-java-plugin-${SONARJAVA_VER}.jar \ sonar-javascript-plugin-${SONARJAVASCRIPT_VER}.jar \ sonar-php-plugin-${SONARPHP_VER}.jar \ sonar-python-plugin-${SONARPYTHON_VER}.jar \ sonar-vbnet-plugin-${SONARVBNET_VER}.jar ${CP} ${DISTDIR}/${plugin} ${WRKSRC}/lib/extensions/ .endfor post-patch: ${REINPLACE_CMD} -e 's:%%LOG_DIR%%:${LOG_DIR}:g ; s:%%DATA_DIR%%:${DATA_DIR}:g ; s:%%TEMP_DIR%%:${TEMP_DIR}:g' ${WRKSRC}/conf/sonar.properties.sample do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/${APP_DIR}/elasticsearch/plugins ${MKDIR} ${STAGEDIR}${LOG_DIR} ${STAGEDIR}${PID_DIR} \ ${STAGEDIR}${DATA_DIR} ${STAGEDIR}${TEMP_DIR} .for dir in conf elasticsearch extensions lib web cd ${WRKSRC}; ${COPYTREE_SHARE} ${dir} ${STAGEDIR}${PREFIX}/${APP_DIR} "! -name *\.orig" .endfor # ${LN} -s ${JAVASHAREDIR}/classes/jna.jar \ # ${STAGEDIR}${PREFIX}/${APP_DIR}/elasticsearch/lib/jna.jar gen-plist: ${ECHO} '@sample ${APP_DIR}/conf/sonar.properties.sample' >${PLIST}.new ${ECHO} '@dir(sonarqube,sonarqube,755) %%DBBASE_DIR%%' >>${PLIST}.new ${ECHO} '@dir(sonarqube,sonarqube,755) %%DATA_DIR%%' >>${PLIST}.new ${ECHO} '@dir(sonarqube,sonarqube,755) %%TEMP_DIR%%' >>${PLIST}.new ${ECHO} '@dir %%APP_DIR%%/elasticsearch/plugins' >>${PLIST}.new # ${ECHO} '@dir(sonarqube,sonarqube,755) %%APP_DIR%%/extensions' >>${PLIST}.new .for dir in conf elasticsearch lib web ${FIND} ${STAGEDIR}${PREFIX}/${APP_DIR}/${dir} -type f -o -type l | \ ${SED} -e "s:${STAGEDIR}${PREFIX}/::g ; \ s:${JAR_VERSION}:%%JAR_VERSION%%:g ; \ s:sonar-csharp-plugin-[0-9.]*.jar:sonar-csharp-plugin-%%SONARCSHARP_VER%%.jar:g ; \ s:sonar-java-plugin-[0-9.]*.jar:sonar-java-plugin-%%SONARJAVA_VER%%.jar:g ; \ s:sonar-javascript-plugin-[0-9.]*.jar:sonar-javascript-plugin-%%SONARJAVASCRIPT_VER%%.jar:g ; \ s:sonar-php-plugin-[0-9.]*.jar:sonar-php-plugin-%%SONARPHP_VER%%.jar:g ; \ s:sonar-python-plugin-[0-9.]*.jar:sonar-python-plugin-%%SONARPYTHON_VER%%.jar:g ; \ s:sonar-vbnet-plugin-[0-9.]*.jar:sonar-vbnet-plugin-%%SONARVBNET_VER%%.jar:g ; \ s:\(.*elasticsearch/bin.*\):@(,,755) \1:g" | \ ${GREP} -v conf/sonar.properties.sample | ${SORT} >> ${PLIST}.new .endfor ${ECHO} '@owner sonarqube' >>${PLIST}.new ${ECHO} '@group sonarqube' >>${PLIST}.new .for dir in extensions ${FIND} ${STAGEDIR}${PREFIX}/${APP_DIR}/${dir} -type d | \ ${SED} -e "s:${STAGEDIR}${PREFIX}/:@dir(sonarqube,sonarqube,755) :g" | \ ${SORT} >> ${PLIST}.new ${FIND} ${STAGEDIR}${PREFIX}/${APP_DIR}/${dir} -type f | \ ${SED} -e "s:${STAGEDIR}${PREFIX}/::g ; \ s:${JAR_VERSION}:%%JAR_VERSION%%:g" | \ ${SORT} >> ${PLIST}.new .endfor ${ECHO} '@dir(sonarqube,sonarqube,755) %%LOG_DIR%%' >> ${PLIST}.new ${ECHO} '@dir(sonarqube,sonarqube,755) %%PID_DIR%%' >> ${PLIST}.new .include diff --git a/devel/sonarqube-community/files/patch-conf_sonar.properties.sample b/devel/sonarqube-community/files/patch-conf_sonar.properties.sample index 14257611600f..0710d361c0f9 100644 --- a/devel/sonarqube-community/files/patch-conf_sonar.properties.sample +++ b/devel/sonarqube-community/files/patch-conf_sonar.properties.sample @@ -1,31 +1,31 @@ ---- conf/sonar.properties.sample.orig 2020-02-25 14:27:14 UTC +--- conf/sonar.properties.sample.orig 2023-06-20 11:44:40 UTC +++ conf/sonar.properties.sample -@@ -94,7 +94,7 @@ +@@ -93,7 +93,7 @@ #sonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError # Same as previous property, but allows to not repeat all other settings like -Xmx -#sonar.web.javaAdditionalOpts= +sonar.search.javaAdditionalOpts=-server # Binding IP address. For servers with more than one IP address, this property specifies which # address will be used for listening on the specified ports. -@@ -362,7 +362,7 @@ +@@ -377,7 +377,7 @@ # Path to log files. Can be absolute or relative to installation directory. # Default is /logs -#sonar.path.logs=logs +sonar.path.logs=/var/log/sonarqube # Rolling policy of log files # - based on time if value starts with "time:", for example by day ("time:yyyy-MM-dd") -@@ -403,8 +403,8 @@ +@@ -418,8 +418,8 @@ # Paths to persistent data files (embedded database and search index) and temporary files. # Can be absolute or relative to installation directory. # Defaults are respectively /data and /temp -#sonar.path.data=data -#sonar.path.temp=temp +sonar.path.data=/var/db/sonarqube/data +sonar.path.temp=/var/db/sonarqube/temp # Telemetry - Share anonymous SonarQube statistics # By sharing anonymous SonarQube statistics, you help us understand how SonarQube is used so we can improve the product to work even better for you. diff --git a/devel/sonarqube-community/files/patch-elasticsearch_config_elasticsearch.yml b/devel/sonarqube-community/files/patch-elasticsearch_config_elasticsearch.yml index cf27fe810bc6..5ecdeea99043 100644 --- a/devel/sonarqube-community/files/patch-elasticsearch_config_elasticsearch.yml +++ b/devel/sonarqube-community/files/patch-elasticsearch_config_elasticsearch.yml @@ -1,9 +1,9 @@ ---- /var/ports/root/devel/sonarqube-community/work/sonarqube-10.1.0.73491/elasticsearch/config/elasticsearch.yml.orig 2023-03-27 16:30:24.000000000 +0200 -+++ /var/ports/root/devel/sonarqube-community/work/sonarqube-10.1.0.73491/elasticsearch/config/elasticsearch.yml 2023-07-05 20:36:37.154402000 +0200 +--- elasticsearch/config/elasticsearch.yml.orig 2023-03-27 14:30:24 UTC ++++ elasticsearch/config/elasticsearch.yml @@ -80,3 +80,6 @@ # Allow wildcard deletion of indices: # #action.destructive_requires_name: false + +# ml is not supported on FreeBSD +xpack.ml.enabled: false