Browse Source

Update sonarqube ports to the most revent version:

- sonarqube-community: 8.2
 - sonarqube-ant-task: 2.7.0.1612
 - sonar-scanner-cli: 4.3.0.2102
master
netchild 4 months ago
parent
commit
69e6139b74
23 changed files with 2365 additions and 2518 deletions
  1. +1
    -1
      GIDs
  2. +1
    -1
      UIDs
  3. +22
    -0
      UPDATING
  4. +46
    -31
      devel/sonar-scanner-cli/Makefile
  5. +0
    -8
      devel/sonar-scanner-cli/README.md
  6. +3
    -3
      devel/sonar-scanner-cli/distinfo
  7. +8
    -8
      devel/sonar-scanner-cli/files/pkg-message.in
  8. +6
    -0
      devel/sonar-scanner-cli/files/sonar-scanner.in
  9. +6
    -8
      devel/sonar-scanner-cli/pkg-descr
  10. +4
    -12
      devel/sonar-scanner-cli/pkg-plist
  11. +10
    -16
      devel/sonarqube-ant-task/Makefile
  12. +3
    -3
      devel/sonarqube-ant-task/distinfo
  13. +2
    -2
      devel/sonarqube-ant-task/files/pkg-message.in
  14. +4
    -1
      devel/sonarqube-ant-task/pkg-descr
  15. +129
    -70
      devel/sonarqube-community/Makefile
  16. +13
    -3
      devel/sonarqube-community/distinfo
  17. +0
    -13
      devel/sonarqube-community/files/patch-conf_sonar.properties
  18. +31
    -0
      devel/sonarqube-community/files/patch-conf_sonar.properties.sample
  19. +0
    -60
      devel/sonarqube-community/files/patch-conf_wrapper.conf
  20. +35
    -11
      devel/sonarqube-community/files/pkg-message.in
  21. +62
    -54
      devel/sonarqube-community/files/sonarqube.in
  22. +12
    -19
      devel/sonarqube-community/pkg-descr
  23. +1967
    -2194
      devel/sonarqube-community/pkg-plist

+ 1
- 1
GIDs View File

@@ -189,7 +189,7 @@ routinator:*:245:
fahclient:*:246:fahclient
fcron:*:247:
signal-cli:*:248:
# free: 249
sonarqube:*:249:
sems:*:250:
# free: 251
# free: 252

+ 1
- 1
UIDs View File

@@ -194,7 +194,7 @@ routinator:*:245:245::0:0:Routinator 3000 Pseudo User:/nonexistent:/usr/sbin/nol
fahclient:*:246:246::0:0:Folding@home User:/nonexistent:/usr/sbin/nologin
fcron:*:247:247::0:0:fcron pseudo-user:/nonexistent:/usr/sbin/nologin
signal-cli:*:248:248::0:0:Signal CLI:/nonexistent:/usr/sbin/nologin
# free: 249
sonarqube:*:249:249::0:0:SonarQube Server:/nonexistent:/usr/sbin/nologin
sems:*:250:250::0:0:SIP Express Media Server:/nonexistent:/usr/sbin/nologin
# free: 251
# free: 252

+ 22
- 0
UPDATING View File

@@ -5,6 +5,28 @@ 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.

20200326:
AFFECTS: users of devel/sonarqube and devel/sonar-ant-task
AUTHOR: netchild@FreeBSD.org

The outdated port devel/sonarqube has moved to
devel/sonarqube-community to make it clear that it is the community
edition. The log and DB files are still stored in the same location.

The devel/sonar-ant-task port has moved to devel/sonarqube-ant-task
to match the upstream-name. The install location is renamed
accordingly.

At the same time the user/group of the sonarqube port changed from
www:www to sonarqube:sonarqube.

It is expected that nobody was using the 6.2 version from 2016
anymore and no change needs to be done. No analysis was done to check
if the old 6.2 version can be updated in-place to the 8.2 version.
As such if there is still someone using the old 6.2 version, you may
have to delete /var/log/sonarqube and /var/db/sonarqube before
installing the new version.

20200320
AFFECTS: users of devel/qca
AUTHOR: kde@FreeBSD.org

+ 46
- 31
devel/sonar-scanner-cli/Makefile View File

@@ -1,50 +1,65 @@
# Created by: Dusan Vejnovic <freebsd@dussan.org>
# $FreeBSD$

PORTNAME= sonar-scanner-cli
PORTVERSION= 2.8
PORTREVISION= 1
CATEGORIES= devel java
MASTER_SITES= https://sonarsource.bintray.com/Distribution/${PORTNAME}/
DISTNAME= sonar-scanner-${PORTVERSION}
DISTVERSION= 4.3.0.2102
PORTREVISION= 0
CATEGORIES= devel security www java
MASTER_SITES= https://binaries.sonarsource.com/Distribution/${PORTNAME}/

MAINTAINER= netchild@FreeBSD.org
COMMENT= Launcher for analyzing projects with SonarQube

BROKEN= unfetchable
COMMENT= Scanner component of SonarQube

LICENSE= LGPL3

NO_ARCH= yes
NO_BUILD= yes
# node -> JS analysis
RUN_DEPENDS= node:www/node

USES= cpe zip
CPE_VENDOR= sonarsource

USE_JAVA= yes

SR= sonar-runner
SQ_CLI= sonar-scanner
SQ_ARCH= x86-${ARCH:S/i386/32/:S/amd64/64/}
SQ= ${PREFIX}/sonarqube/bin/freebsd-${SQ_ARCH}
WRKSRC= ${WRKDIR}/sonar-scanner-${DISTVERSION}

SUB_FILES= pkg-message
PLIST_SUB= SR_HOME=${PREFIX}/${PORTNAME}
NO_ARCH= yes
NO_BUILD= yes
JAVA_VERSION= 11+
JAVA_VENDOR= openjdk

OPTIONS_DEFINE= SQ
SQ_DESC= SonarQube server support
SQ_RUN_DEPENDS= ${SQ}/sonar.sh.sample:devel/sonarqube
APP_NAME= ${PORTNAME}
APP_DIR= libexec/${PORTNAME}
JAR_VERSION= ${DISTVERSION}

SUB_LIST= \
APP_DIR=${APP_DIR} \
JAR_VERSION=${JAR_VERSION}

SUB_FILES= \
sonar-scanner \
pkg-message

PLIST_SUB= \
APP_DIR=${APP_DIR} \
JAR_VERSION=${JAR_VERSION}

post-extract:
${MV} ${WRKSRC}/conf/sonar-scanner.properties ${WRKSRC}/conf/sonar-scanner.properties.sample
${RM} ${WRKSRC}/bin/*.bat

do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}
@(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${PORTNAME})
@${MV} -f ${STAGEDIR}${PREFIX}/${PORTNAME}/conf/${SQ_CLI}.properties \
${STAGEDIR}${PREFIX}/${PORTNAME}/conf/${SQ_CLI}.properties.sample

post-install:
@${LN} -f ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/${SR} \
${STAGEDIR}${PREFIX}/bin/${SR}
@${LN} -f ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/${SQ_CLI} \
${STAGEDIR}${PREFIX}/bin/${SQ_CLI}
${MKDIR} ${STAGEDIR}${PREFIX}/${APP_DIR}
${INSTALL} ${WRKDIR}/sonar-scanner ${STAGEDIR}${PREFIX}/bin/
.for dir in bin conf lib
cd ${WRKSRC}; ${COPYTREE_SHARE} ${dir} ${STAGEDIR}${PREFIX}/${APP_DIR} "! -name *\.orig"
.endfor

gen-plist:
${ECHO} '@sample ${APP_DIR}/conf/sonar-scanner.properties.sample' >${PLIST}.new
${ECHO} 'bin/sonar-scanner' >>${PLIST}.new
.for dir in bin conf lib
${FIND} ${STAGEDIR}${PREFIX}/${APP_DIR}/${dir} -type f | \
${SED} -e "s:${STAGEDIR}${PREFIX}/::g ; \
s:${JAR_VERSION}:%%JAR_VERSION%%:g" | \
${GREP} -v conf/sonar-scanner.properties | ${SORT} >> ${PLIST}.new
.endfor

.include <bsd.port.mk>

+ 0
- 8
devel/sonar-scanner-cli/README.md View File

@@ -1,8 +0,0 @@
# Sonar Scanner CLI port for The FreeBSD Ports

The Sonar Scanner CLI is the default launcher to analyze projects for SonarQube. The Sonar Runner allows you to perform source code analyzes without using tools such as Ant or Maven. The SonarQube platform is an open source quality management platform, dedicated to continuously analyzing and measuring the technical quality of source code, from project portfolio down to the method level. With the Sonar Runner, and also a tool like Jenkins, everyone can analyze all kinds of languages, not just Java. The SonarQube Scanner is recommended as the default launcher to analyze a project with SonarQube. The SonarQube Scanner allows you to perform source code analyzes without using tools such as Ant or Maven. The SonarQube platform is an open source quality management platform, dedicated to continuously analyzing and measuring the technical quality of source code, from project portfolio down to the method level. With the SonarQube Scanner, and also a tool like Jenkins, everyone can analyze all kinds of languages, not just Java.

___VERSION:___ 2.8
___MAINTAINER:___ <freebsd@dussan.org>
___LICENSE:___ [GNU Lesser General Public License, Version 3](http://www.gnu.org/licenses/lgpl-3.0.html)
___WWW:___ [http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner](http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner)

+ 3
- 3
devel/sonar-scanner-cli/distinfo View File

@@ -1,3 +1,3 @@
TIMESTAMP = 1484414843
SHA256 (sonar-scanner-2.8.zip) = 0295365a7e5d4499ec6b46cb6c70f3fa127159b58b73930f675acd0897a6b350
SIZE (sonar-scanner-2.8.zip) = 496533
TIMESTAMP = 1584986417
SHA256 (sonar-scanner-cli-4.3.0.2102.zip) = 8c78a2a1af24dfbc564d87ba6826795e6892d3035cb91a98c61d9e33e2b3cd46
SIZE (sonar-scanner-cli-4.3.0.2102.zip) = 588561

+ 8
- 8
devel/sonar-scanner-cli/files/pkg-message.in View File

@@ -1,12 +1,12 @@
[
{ type: install
message: <<EOM
Before start the SonarQube Scanner (default settings):
- create a new SONAR_RUNNER_HOME environment variable set to
"/usr/local/sonar-scanner-cli"
{
message: <<EOT
The SonarQube scanner component is now installed as
%%PREFIX%%/bin/sonar-scanner

More information:
http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner
EOM
Before the first start (but not if you update), you have to configure which
SonarQube server to use in
%%PREFIX%%/%%APP_DIR%%/conf/sonar-scanner.properties
EOT
}
]

+ 6
- 0
devel/sonar-scanner-cli/files/sonar-scanner.in View File

@@ -0,0 +1,6 @@
#!/bin/sh

# $FreeBSD$

exec /bin/sh %%PREFIX%%/%%APP_DIR%%/bin/sonar-scanner "$@"


+ 6
- 8
devel/sonar-scanner-cli/pkg-descr View File

@@ -1,9 +1,7 @@
The SonarQube Scanner is recommended as the default launcher to analyze a
project with SonarQube. The SonarQube Scanner allows you to perform source code
analyzes without using tools such as Ant or Maven. The SonarQube platform is an
open source quality management platform, dedicated to continuously analyzing and
measuring the technical quality of source code, from project portfolio down to
the method level. With the SonarQube Scanner, and also a tool like Jenkins,
everyone can analyze all kinds of languages, not just Java.
SonarQube is the leading tool for continuously inspecting the Code
Quality and Security of your codebases and guiding development teams
during Code Reviews.

WWW: http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner
Sonar-scanner-cli is a source code scanning component of SonarQube.

WWW: https://www.sonarqube.org/

+ 4
- 12
devel/sonar-scanner-cli/pkg-plist View File

@@ -1,13 +1,5 @@
bin/sonar-runner
@sample libexec/sonar-scanner-cli/conf/sonar-scanner.properties.sample
bin/sonar-scanner
@(,,755) %%SR_HOME%%/bin/sonar-runner
@(,,755) %%SR_HOME%%/bin/sonar-scanner
@(,,755) %%SR_HOME%%/bin/sonar-scanner-debug
%%SR_HOME%%/bin/sonar-runner.bat
%%SR_HOME%%/bin/sonar-scanner-debug.bat
%%SR_HOME%%/bin/sonar-scanner.bat
%%SR_HOME%%/lib/sonar-scanner-cli-2.8.jar
@sample %%SR_HOME%%/conf/sonar-scanner.properties.sample
@dir(,,755) %%SR_HOME%%/bin
@dir(,,755) %%SR_HOME%%/conf
@dir(,,755) %%SR_HOME%%/lib
libexec/sonar-scanner-cli/bin/sonar-scanner
libexec/sonar-scanner-cli/bin/sonar-scanner-debug
libexec/sonar-scanner-cli/lib/sonar-scanner-cli-%%JAR_VERSION%%.jar

+ 10
- 16
devel/sonarqube-ant-task/Makefile View File

@@ -1,12 +1,10 @@
# Created by: Dusan Vejnovic <freebsd@dussan.org>
# $FreeBSD$

PORTNAME= sonar-ant-task
PORTVERSION= 2.5
PORTNAME= sonarqube-ant-task
PORTVERSION= 2.7.0.1612
CATEGORIES= devel java
MASTER_SITES= https://sonarsource.bintray.com/Distribution/sonarqube-ant-task/ \
LOCAL/ler/sonar-ant-task
DISTNAME= sonarqube-ant-task-${PORTVERSION}
MASTER_SITES= https://binaries.sonarsource.com/Distribution/sonarqube-ant-task/
EXTRACT_SUFX= .jar
EXTRACT_ONLY=

@@ -15,23 +13,19 @@ COMMENT= SonarQube Plugin for analysis projects with an Apache Ant

LICENSE= LGPL3

USES= cpe
USE_JAVA= yes
CPE_VENDOR= sonarsource

NO_ARCH= yes
NO_BUILD= yes
NO_WRKSUBDIR= yes

RUN_DEPENDS+= ant:devel/apache-ant

USES= cpe
CPE_VENDOR= sonarsource

USE_JAVA= yes
RUN_DEPENDS+= ant:devel/apache-ant \
sonar-scanner:devel/sonar-scanner-cli

SUB_FILES= pkg-message
PLIST_FILES= ${DATADIR_REL}/sonar-ant-task.jar

OPTIONS_DEFINE= SQ
SQ_DESC= SonarQube server support
SQ_RUN_DEPENDS= sonarqube>=0:devel/sonarqube
PLIST_FILES= ${DATADIR_REL}/${PORTNAME}${EXTRACT_SUFX}

do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}

+ 3
- 3
devel/sonarqube-ant-task/distinfo View File

@@ -1,3 +1,3 @@
TIMESTAMP = 1484408469
SHA256 (sonarqube-ant-task-2.5.jar) = 43e7a8e0a5f8d44cd602de4a7ccf2e819e23429370d1b97425d38562651331cf
SIZE (sonarqube-ant-task-2.5.jar) = 537405
TIMESTAMP = 1585130760
SHA256 (sonarqube-ant-task-2.7.0.1612.jar) = c0898b5e018867f7bd7767282e95ae6e21b77f7aa306ca106fbf650f6f273650
SIZE (sonarqube-ant-task-2.7.0.1612.jar) = 633825

+ 2
- 2
devel/sonarqube-ant-task/files/pkg-message.in View File

@@ -5,11 +5,11 @@
settings):
- define a new sonar Ant target in your Ant build script
- for the SonarQube target set classpath value to
%%DATADIR%%/sonar-ant-task.jar
%%DATADIR%%/sonarqube-ant-task.jar


More information:
http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Ant
https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-ant/
EOM
}
]

+ 4
- 1
devel/sonarqube-ant-task/pkg-descr View File

@@ -1,3 +1,6 @@
The SonarScanner for Ant provides a task to allow integration of SonarQube
analysis into an Apache Ant build script.

The SonarQube Scanner for Ant is an Ant Task that is wrapper of SonarQube
Scanner, which works by invoking SonarQube Scanner and passing to it all
properties named following a sonar.* convention. This has the downside of not
@@ -5,4 +8,4 @@ being very Ant-y, but the upside of providing instant availability of any new
analysis parameter introduced by a new version of a plugin or of SonarQube
itself.

WWW: http://docs.sonarqube.org/display/SONAR/Installing+and+Configuring+Ant+SonarQube+Task
WWW: https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-ant/

+ 129
- 70
devel/sonarqube-community/Makefile View File

@@ -1,90 +1,149 @@
# Created by: Dusan Vejnovic <freebsd@dussan.org>
# $FreeBSD$

PORTNAME= sonarqube
PORTVERSION= 6.2
CATEGORIES= devel www java
MASTER_SITES= http://sonarsource.bintray.com/Distribution/sonarqube/
DISTVERSION= 8.2.0.32929
PORTREVISION= 0
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-python-plugin/:m_python \
https://binaries.sonarsource.com/Distribution/sonar-scm-git-plugin/:m_scmgit \
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-python-plugin-${SONARPYTHON_VER}.jar:m_python \
sonar-scm-git-plugin-${SONARSCMGIT_VER}.jar:m_scmgit \
sonar-vbnet-plugin-${SONARVBNET_VER}.jar:m_vbnet
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}

MAINTAINER= netchild@FreeBSD.org
COMMENT= Platform for continuous inspection of code quality

BROKEN= unfetchable
COMMENT= Web-based continuous code inspection tool

LICENSE= LGPL3
LICENSE_FILE= ${WRKSRC}/COPYING

LIB_DEPENDS= libbiconv.so:converters/iconv
RUN_DEPENDS= javaservicewrapper:sysutils/javaservicewrapper
RUN_DEPENDS= bash:shells/bash

USES= shebangfix zip
CPE_VENDOR= sonarsource
USE_JAVA= yes

SHEBANG_FILES= elasticsearch/bin/elasticsearch \
elasticsearch/bin/elasticsearch-env

NO_ARCH= yes
NO_BUILD= yes

JAVA_VERSION= 11+
JAVA_VENDOR= openjdk
USE_RC_SUBR= ${PORTNAME}
USERS= www
GROUPS= www

USES= cpe dos2unix zip
CPE_VENDOR= sonarsource
DOS2UNIX_GLOB= *.properties *.conf

USE_JAVA= yes

SQ_FILE= sonar.sh
SQ_HOME= ${PREFIX}/share/${PORTNAME}
SQ_DB_DIR= /var/db/${PORTNAME}
SQ_LOG_DIR= /var/log/${PORTNAME}
SQ_LOG_FILE= ${PORTNAME}.log
SQ_JSW= ${PREFIX}/lib/javaservicewrapper

SUB_LIST+= SQ_DB_DIR=${SQ_DB_DIR} \
SQ_GROUP=${GROUPS} \
SQ_LOG_DIR=${SQ_LOG_DIR} \
SQ_LOG_FILE=${SQ_LOG_FILE} \
SQ_RC=${PORTNAME} \
SQ_RUN=${SQ_HOME}/bin/freebsd/${SQ_FILE} \
SQ_USER=${USERS}
PLIST_SUB+= SQ_DB_DIR=${SQ_DB_DIR} \
SQ_GROUP=${GROUPS} \
SQ_HOME=${SQ_HOME} \
SQ_LOG_DIR=${SQ_LOG_DIR} \
SQ_USER=${USERS}

OPTIONS_RADIO= SQL
OPTIONS_RADIO_SQL= MYSQL PGSQL

MYSQL_USES= mysql
PGSQL_USES= pgsql
APP_NAME= ${PORTNAME}
APP_DIR= libexec/${PORTNAME}
LOG_DIR= /var/log/${PORTNAME}
PID_DIR= /var/run/${PORTNAME}
JAR_VERSION= ${DISTVERSION}
DATA_DIR= /var/db/${PORTNAME}/data
TEMP_DIR= /var/db/${PORTNAME}/temp

SONARCSHARP_VER= 8.5.0.15942
SONARJAVA_VER= 6.2.0.21135
SONARPYTHON_VER= 2.7.0.5975
SONARSCMGIT_VER= 1.11.0.11
SONARVBNET_VER= 8.5.0.15942

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} \
DATA_DIR=${DATA_DIR} \
TEMP_DIR=${TEMP_DIR} \
SONARCSHARP_VER=${SONARCSHARP_VER} \
SONARJAVA_VER=${SONARJAVA_VER} \
SONARPYTHON_VER=${SONARPYTHON_VER} \
SONARSCMGIT_VER=${SONARSCMGIT_VER} \
SONARVBNET_VER=${SONARVBNET_VER}

post-extract:
${RM} -r ${WRKSRC}/bin ${WRKSRC}/lib/jsw ${WRKSRC}/conf/wrapper.conf
${MV} ${WRKSRC}/conf/sonar.properties ${WRKSRC}/conf/sonar.properties.sample
.for plugin in sonar-csharp-plugin \
sonar-java-plugin \
sonar-python-plugin \
sonar-scm-git-plugin \
sonar-vbnet-plugin
${RM} ${WRKSRC}/extensions/plugins/${plugin}-*.jar
.endfor
.for plugin in sonar-csharp-plugin-${SONARCSHARP_VER}.jar \
sonar-java-plugin-${SONARJAVA_VER}.jar \
sonar-python-plugin-${SONARPYTHON_VER}.jar \
sonar-scm-git-plugin-${SONARSCMGIT_VER}.jar \
sonar-vbnet-plugin-${SONARVBNET_VER}.jar
${CP} ${DISTDIR}/${plugin} ${WRKSRC}/extensions/plugins/
.endfor

post-patch:
@${REINPLACE_CMD} -e 's|%%DIR%%|${SQ_HOME}|' \
-e 's|%%LIB%%|${SQ_JSW}|' \
-e 's|%%LOG%%|${SQ_LOG_DIR}/${SQ_LOG_FILE}|' \
-e 's|%%LOGDIR%%|${SQ_LOG_DIR}|' \
-e 's|%%DBDIR%%|${SQ_DB_DIR}|' \
-e 's|%%WRAPPER_JAR%%|${SQ_JSW}/lib/wrapper.jar|' \
${WRKSRC}/conf/wrapper.conf ${WRKSRC}/conf/sonar.properties
${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}${SQ_HOME}
@(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${SQ_HOME})
@${MKDIR} ${STAGEDIR}${SQ_HOME}/bin/freebsd/lib
@${CP} ${STAGEDIR}${SQ_HOME}/bin/linux-x86-64/${SQ_FILE} \
${STAGEDIR}${SQ_HOME}/bin/freebsd
@${REINPLACE_CMD} -e 's|#RUN_AS_USER=|RUN_AS_USER=${USERS}|' \
-e 's|-p $$pid -o args|ww $$pid|' \
-e 's|=\"./wrapper\"|=\"${SQ_JSW}/bin/wrapper\"|' \
${STAGEDIR}${SQ_HOME}/bin/freebsd/${SQ_FILE}
@${MV} -f ${STAGEDIR}${SQ_HOME}/bin/freebsd/${SQ_FILE} \
${STAGEDIR}${SQ_HOME}/bin/freebsd/${SQ_FILE}.sample
@${MV} -f ${STAGEDIR}${SQ_HOME}/conf/sonar.properties \
${STAGEDIR}${SQ_HOME}/conf/sonar.properties.sample
@${MV} -f ${STAGEDIR}${SQ_HOME}/conf/wrapper.conf \
${STAGEDIR}${SQ_HOME}/conf/wrapper.conf.sample
@${RM} -drf ${STAGEDIR}${SQ_HOME}/bin/linux-x86-32
@${RM} -drf ${STAGEDIR}${SQ_HOME}/bin/linux-x86-64
@${RM} -drf ${STAGEDIR}${SQ_HOME}/bin/macosx-universal-64
@${RM} -drf ${STAGEDIR}${SQ_HOME}/bin/windows-x86-32
@${RM} -drf ${STAGEDIR}${SQ_HOME}/bin/windows-x86-64
${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

gen-plist:
${ECHO} '@sample ${APP_DIR}/conf/sonar.properties.sample' >${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 | \
${SED} -e "s:${STAGEDIR}${PREFIX}/::g ; \
s:${JAR_VERSION}:%%JAR_VERSION%%: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 ; \
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-python-plugin-[0-9.]*.jar:sonar-python-plugin-%%SONARPYTHON_VER%%.jar:g ; \
s:sonar-scm-git-plugin-[0-9.]*.jar:sonar-scm-git-plugin-%%SONARSCMGIT_VER%%.jar:g ; \
s:sonar-vbnet-plugin-[0-9.]*.jar:sonar-vbnet-plugin-%%SONARVBNET_VER%%.jar:g" | \
${SORT} >> ${PLIST}.new
.endfor
${ECHO} '@dir(sonarqube,sonarqube,755) %%LOG_DIR%%' >> ${PLIST}.new
${ECHO} '@dir(sonarqube,sonarqube,755) %%PID_DIR%%' >> ${PLIST}.new

.include <bsd.port.mk>

+ 13
- 3
devel/sonarqube-community/distinfo View File

@@ -1,3 +1,13 @@
TIMESTAMP = 1485762264
SHA256 (sonarqube-6.2.zip) = 6bb187b8568d493131952e3b66e65940992f1a62c7962c1bf5801f6f48f1c160
SIZE (sonarqube-6.2.zip) = 131365696
TIMESTAMP = 1584980926
SHA256 (sonarqube-8.2.0.32929.zip) = 6a46cc9cb29898ae6b062ef40ce72688dc8bd47dc2b68ed016eeef521268dd88
SIZE (sonarqube-8.2.0.32929.zip) = 221945914
SHA256 (sonar-csharp-plugin-8.5.0.15942.jar) = 5afbf966af647addde362b96fbdb901e7ec0ed5658e85b3fdd5d07c8c3f62e71
SIZE (sonar-csharp-plugin-8.5.0.15942.jar) = 5020050
SHA256 (sonar-java-plugin-6.2.0.21135.jar) = a26ec4299b22ff47ec45bd56af241483341d6dc815f1cf3fb24fa774f23edece
SIZE (sonar-java-plugin-6.2.0.21135.jar) = 17071013
SHA256 (sonar-python-plugin-2.7.0.5975.jar) = b5d32130fab1bff123d5a34154300e4842964c374ae25bd54605492ca3d19a0b
SIZE (sonar-python-plugin-2.7.0.5975.jar) = 3142083
SHA256 (sonar-scm-git-plugin-1.11.0.11.jar) = 7741687151514d78862fa35d59641be34df6e1f5fa4baef00cda02de0fe6be06
SIZE (sonar-scm-git-plugin-1.11.0.11.jar) = 3800907
SHA256 (sonar-vbnet-plugin-8.5.0.15942.jar) = 764039d1711878081ff91dd7afd063eccb5ef4dd78cd43f502f769d4a9fbc9a4
SIZE (sonar-vbnet-plugin-8.5.0.15942.jar) = 3744062

+ 0
- 13
devel/sonarqube-community/files/patch-conf_sonar.properties View File

@@ -1,13 +0,0 @@
--- conf/sonar.properties.orig 2017-01-14 22:11:32.000000000 +0100
+++ conf/sonar.properties 2017-01-15 10:04:00.697189852 +0100
@@ -336,8 +336,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 <installation home>/data and <installation home>/temp
-#sonar.path.data=data
-#sonar.path.temp=temp
+sonar.path.data=%%DBDIR%%/data
+sonar.path.temp=%%DBDIR%%/temp
#--------------------------------------------------------------------------------------------------

+ 31
- 0
devel/sonarqube-community/files/patch-conf_sonar.properties.sample View File

@@ -0,0 +1,31 @@
--- conf/sonar.properties.sample.orig 2020-02-25 14:27:14 UTC
+++ conf/sonar.properties.sample
@@ -94,7 +94,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=-Dbootstrap.system_call_filter=false -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 @@
# Path to log files. Can be absolute or relative to installation directory.
# Default is <installation home>/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 @@
# Paths to persistent data files (embedded database and search index) and temporary files.
# Can be absolute or relative to installation directory.
# Defaults are respectively <installation home>/data and <installation home>/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.

+ 0
- 60
devel/sonarqube-community/files/patch-conf_wrapper.conf View File

@@ -1,60 +0,0 @@
--- conf/wrapper.conf.orig 2016-03-08 17:34:14.000000000 +0100
+++ conf/wrapper.conf 2016-04-06 19:43:04.145588942 +0200
@@ -1,7 +1,7 @@
# Path to JVM executable. By default it must be available in PATH.
# Can be an absolute path, for example:
#wrapper.java.command=/path/to/my/jdk/bin/java
-wrapper.java.command=java
+wrapper.java.command=/usr/local/bin/java
#
@@ -14,13 +14,13 @@
#********************************************************************
wrapper.java.additional.1=-Dsonar.wrapped=true
wrapper.java.additional.2=-Djava.awt.headless=true
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
-wrapper.java.classpath.1=../../lib/jsw/*.jar
-wrapper.java.classpath.2=../../lib/*.jar
-wrapper.java.library.path.1=./lib
+wrapper.java.classpath.1=%%WRAPPER_JAR%%
+wrapper.java.classpath.2=%%DIR%%/lib/*.jar
+wrapper.java.library.path.1=%%LIB%%/lib
wrapper.app.parameter.1=org.sonar.application.App
-wrapper.java.initmemory=8
-wrapper.java.maxmemory=8
+wrapper.java.initmemory=512
+wrapper.java.maxmemory=512
#********************************************************************
# Wrapper Logs
@@ -27,7 +27,7 @@
wrapper.console.format=PM
wrapper.console.loglevel=INFO
-wrapper.logfile=../../logs/sonar.log
+wrapper.logfile=%%LOGDIR%%/sonar.log
wrapper.logfile.format=M
wrapper.logfile.loglevel=INFO

@@ -35,11 +35,11 @@
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
-#wrapper.logfile.maxsize=0
+wrapper.logfile.maxsize=10m
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
-#wrapper.logfile.maxfiles=0
+wrapper.logfile.maxfiles=10
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
@@ -85,4 +85,4 @@
wrapper.disable_restarts=TRUE
wrapper.ping.timeout=0
wrapper.shutdown.timeout=3000
-wrapper.jvm_exit.timeout=3000
\ No newline at end of file
+wrapper.jvm_exit.timeout=3000

+ 35
- 11
devel/sonarqube-community/files/pkg-message.in View File

@@ -1,17 +1,41 @@
[
{ type: install
message: <<EOM
Before start the SonarQube, prepare the Database and
the Web Server, when installing for the first time.
{
message: <<EOT
SonarQube is now installed in %%PREFIX%%/%%APP_DIR%%.

More information:
http://docs.sonarqube.org/display/SONAR/Installing
Before the first start (but not if you update), you have to configure a DB in
%%PREFIX%%/%%APP_DIR%%/conf/sonar.properties
A real DB server is recommended instead of the default local H2 DB. No testing
will be done for this port to handle an update for the local H2 DB (it is
recommended to only use the local H2 DB to evaluate this software).

When upgrading the SonarQube, follow instructions:
http://docs.sonarqube.org/display/SONAR/Upgrading
Important information for the next steps:
https://docs.sonarqube.org/latest/requirements/requirements/
https://docs.sonarqube.org/latest/setup/install-server/
https://docs.sonarqube.org/latest/instance-administration/security/
Note: the "wrapper" is not installed in FreeBSD, the FreeBSD daemon(8)
facility is used instead.

To run the SonarQube from startup, add sonarqube_enable="YES"
in your /etc/rc.conf
EOM
Per default the server is started in supervised mode, this means if it dies
or is stopped via the admin interface (e.g. after updating/installing
plugins), it will automatically start again.

While the server is *not* running, you can switch from supervised to
unsupervised mode via:
# sysrc sonarqube_supervised=NO

Temporary files are saved to
%%TEMP_DIR%%
and are cleaned-up at every start.

Data files which are not saved to the DB are stored in
%%DATA_DIR%%

Logfiles can be found in
%%LOG_DIR%%

Once SonarQube is started, point your web browser to the page at
http://<hostname>:9000/.
EOT
}
]

+ 62
- 54
devel/sonarqube-community/files/sonarqube.in View File

@@ -1,66 +1,74 @@
#!/bin/sh
#
# $FreeBSD
#

# PROVIDE: %%SQ_RC%%
# REQUIRE: LOGIN
# PROVIDE: sonarqube
# REQUIRE: NETWORKING SERVERS
# KEYWORD: shutdown

#
# Configuration settings for %%SQ_RC%% in /etc/rc.conf:
# Add the following line to /etc/rc.conf to enable %%APP_NAME%%:
#
# %%SQ_RC%%_enable (bool):
# Set to "NO" by default.
# Set it to "YES" to enable %%SQ_RC%%.
# %%APP_NAME%%_enable="YES"
#

. /etc/rc.subr

name="%%SQ_RC%%"
rcvar=%%SQ_RC%%_enable
extra_commands="restart status"

load_rc_config $name

%%SQ_RC%%_enable="${%%SQ_RC%%_enable:-"NO"}"

start_precmd="%%SQ_RC%%_prestart"
start_cmd="%%SQ_RC%%_start"
stop_cmd="%%SQ_RC%%_stop"
restart_cmd="%%SQ_RC%%_restart"
status_cmd="%%SQ_RC%%_status"

%%SQ_RC%%_prestart()
{
if [ ! -f "%%SQ_LOG_DIR%%/%%SQ_LOG_FILE%%" ]; then
mkdir -p "%%SQ_LOG_DIR%%"
touch "%%SQ_LOG_DIR%%/%%SQ_LOG_FILE%%"
chown -R "%%SQ_USER%%:%%SQ_GROUP%%" "%%SQ_LOG_DIR%%"
chmod 755 "%%SQ_LOG_DIR%%"
chmod 640 "%%SQ_LOG_DIR%%/%%SQ_LOG_FILE%%"
fi
if [ ! -d "%%SQ_DB_DIR%%/data" ]; then
install -d -m 755 -o %%SQ_USER%% -g %%SQ_GROUP%% "%%SQ_DB_DIR%%/data"
install -d -m 755 -o %%SQ_USER%% -g %%SQ_GROUP%% "%%SQ_DB_DIR%%/temp"
fi
}

%%SQ_RC%%_start()
{
%%SQ_RUN%% start
}

%%SQ_RC%%_stop()
{
%%SQ_RUN%% stop
}

%%SQ_RC%%_restart()
{
%%SQ_RUN%% restart
}

%%SQ_RC%%_status()
{
%%SQ_RUN%% status
}
name=%%APP_NAME%%
rcvar=%%APP_NAME%%_enable

# set defaults

%%APP_NAME%%_enable=${%%APP_NAME%%_enable:-"NO"}
%%APP_NAME%%_supervised=${%%APP_NAME%%_supervised:-"YES"}
%%APP_NAME%%_user=${%%APP_NAME%%_user:-"sonarqube"}
%%APP_NAME%%_group=${%%APP_NAME%%_group:-"sonarqube"}
%%APP_NAME%%_parameters=${%%APP_NAME%%_parameters:-"-Xms32m -Xmx32m -Djava.net.preferIPv4Stack=true"}
%%APP_NAME%%_logfile=${%%APP_NAME%%_logfile:-"%%LOG_DIR%%/daemon.log"}
%%APP_NAME%%_pidpath=${%%APP_NAME%%_pidpath:-"%%PID_DIR%%"}

sup_pidfile=${%%APP_NAME%%_pidpath}/%%APP_NAME%%_supervisor.pid
main_pidfile=${%%APP_NAME%%_pidpath}/%%APP_NAME%%.pid

if [ ! -d %%PID_DIR%% ]; then
mkdir -p %%PID_DIR%%
chown ${%%APP_NAME%%_user}:${%%APP_NAME%%_group} %%PID_DIR%%
fi

if [ ! -d %%LOG_DIR%% ]; then
mkdir -p %%LOG_DIR%%
chown ${%%APP_NAME%%_user}:${%%APP_NAME%%_group} %%LOG_DIR%%
fi

if test -n "${%%APP_NAME%%_java_version}" ; then
JAVA_HOME=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | cut -d= -f2)
javaname=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -d= -f2)
else
JAVA_HOME=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | cut -d= -f2)
javaname=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -d= -f2)
fi

export JAVA_HOME

jarname="%%PREFIX%%/%%APP_DIR%%/lib/sonar-application-%%JAR_VERSION%%.jar"
command="/usr/sbin/daemon"
required_files="%%PREFIX%%/%%APP_DIR%%/conf/sonar.properties"

load_rc_config ${name}

if checkyesno %%APP_NAME%%_supervised; then
# auto-restart on termination
pidfile=${sup_pidfile}
daemon_supervise_args="-r -P ${sup_pidfile}"
procname=daemon
else
# no restart on termination
pidfile=${main_pidfile}
damon_supervise_args=""
procname=${javaname}
fi

command_args="${daemon_supervise_args} -o ${%%APP_NAME%%_logfile} -p ${main_pidfile} ${javaname} ${%%APP_NAME%%_parameters} -jar ${jarname}"

run_rc_command "$1"

+ 12
- 19
devel/sonarqube-community/pkg-descr View File

@@ -1,21 +1,14 @@
The SonarQube platform is an open source quality management platform,
dedicated to continuously analyzing and measuring the technical quality of
source code, from project portfolio down to the method level.
SonarQube is the leading tool for continuously inspecting the Code
Quality and Security of your codebases and guiding development teams
during Code Reviews.

Features:
- Supports languages: Java, C/C++, Objective-C, C#, PHP, Flex, Groovy,
JavaScript, Python, PL/SQL, COBOL, etc.
- Can also be used in Android development.
- Offers reports on duplicated code, coding standards, unit tests, code
coverage, complex code, potential bugs, comments and design and
architecture.
- Records metrics history and provides evolution graphs ("time machine")
and differential views.
- Provides fully automated analyses: integrates with Maven, Ant, Gradle and
continuous integration tools (Atlassian Bamboo, Jenkins, Hudson, etc.).
- Integrates with the Eclipse development environment.
- Integrates with external tools: JIRA, Mantis, LDAP, Fortify, etc.
- Is expandable with the use of plugins.
- Implements the SQALE methodology to compute technical debt.
Covering 27 programming languages (OSS version: 15 languages), while
pairing-up with your existing software pipeline, SonarQube provides
clear remediation guidance for developers to understand and fix
issues and for teams overall to deliver better, safer software.
With over 170,000 deployments, helping small development teams as
well as global organizations, SonarQube provides the means for all
teams and companies, around the world, to own and impact their Code
Quality and Security.

WWW: http://www.sonarqube.org/
WWW: https://www.sonarqube.org/

+ 1967
- 2194
devel/sonarqube-community/pkg-plist
File diff suppressed because it is too large
View File


Loading…
Cancel
Save