mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-15 21:02:30 +01:00
sonarqube: merge pull #302 manually since it is not signed
This commit is contained in:
parent
d909d5d4f7
commit
1493ade100
11 changed files with 488 additions and 131 deletions
376
302.patch
Normal file
376
302.patch
Normal file
|
|
@ -0,0 +1,376 @@
|
|||
From 4047fdf4c6e397c49aae5475162a01c5fce33a4a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Istv=C3=A1n=20T=C3=B3th?= <tothi@math.bme.hu>
|
||||
Date: Tue, 31 Jul 2018 19:54:10 +0200
|
||||
Subject: [PATCH] sonarqube update remove obsolote sonarqube-bin add current
|
||||
sonarqube-bin (community edition) add sonarscanner-bin
|
||||
|
||||
---
|
||||
dev-util/sonarqube-bin/Manifest | 6 +-
|
||||
dev-util/sonarqube-bin/files/init.sh | 33 ----------
|
||||
dev-util/sonarqube-bin/files/linux-multiarch.sh | 13 ++++
|
||||
dev-util/sonarqube-bin/files/sonar.confd | 1 -
|
||||
dev-util/sonarqube-bin/files/sonar.service | 9 +++
|
||||
dev-util/sonarqube-bin/sonarqube-bin-4.5.ebuild | 74 ----------------------
|
||||
...bin-4.5.2.ebuild => sonarqube-bin-7.2.1.ebuild} | 37 +++++------
|
||||
dev-util/sonarscanner-bin/Manifest | 3 +
|
||||
.../files/sonarscanner-bin-system_jre.patch | 11 ++++
|
||||
.../sonarscanner-bin-3.2.0.1227.ebuild | 56 ++++++++++++++++
|
||||
10 files changed, 112 insertions(+), 131 deletions(-)
|
||||
delete mode 100644 dev-util/sonarqube-bin/files/init.sh
|
||||
create mode 100755 dev-util/sonarqube-bin/files/linux-multiarch.sh
|
||||
delete mode 100644 dev-util/sonarqube-bin/files/sonar.confd
|
||||
create mode 100644 dev-util/sonarqube-bin/files/sonar.service
|
||||
delete mode 100644 dev-util/sonarqube-bin/sonarqube-bin-4.5.ebuild
|
||||
rename dev-util/sonarqube-bin/{sonarqube-bin-4.5.2.ebuild => sonarqube-bin-7.2.1.ebuild} (61%)
|
||||
create mode 100644 dev-util/sonarscanner-bin/Manifest
|
||||
create mode 100644 dev-util/sonarscanner-bin/files/sonarscanner-bin-system_jre.patch
|
||||
create mode 100644 dev-util/sonarscanner-bin/sonarscanner-bin-3.2.0.1227.ebuild
|
||||
|
||||
diff --git a/dev-util/sonarqube-bin/Manifest b/dev-util/sonarqube-bin/Manifest
|
||||
index 56b449e5..5dc69e60 100644
|
||||
--- a/dev-util/sonarqube-bin/Manifest
|
||||
+++ b/dev-util/sonarqube-bin/Manifest
|
||||
@@ -1,2 +1,4 @@
|
||||
-DIST sonarqube-4.5.2.zip 90520081 SHA256 fbdf8ec8480833e3f73072d4af62bb225edf03287dd53bcf676ab00e92bc0db7 SHA512 9204f7e8604854ed2c7b002bf8a9a04145900616dcfb8468b168b4bb8ac723e1d7757c19ee1ab9fe5da9baa8383ac440886af20e601b46db5ce4a5447713fc17 WHIRLPOOL 8329e6622613522d3bb6355811254a8788079aa8486ffe56e3dae8ad9b24f5244e0cc4b7b0ba32a43d2d94d863964ba3d1dbe3c5710df88a4bf563155ea40f5d
|
||||
-DIST sonarqube-4.5.zip 90188628 SHA256 707d7d960fef17e2e2d0ceb4bd9828966d6b6c99aabe2c7bc2e2c07e5f398deb SHA512 261bced70b0fe13973b33fdca5ac1e234fd95389e0b15e6505c7f2e12f6d5ef91d86f56c1b3a924460d9395b29c0446322d1d7d3b82bab8e7c03e631d34d66a2 WHIRLPOOL 69ab385e8fb653a442d74692055f5502b9c6f89fee3844138c2e704a70c5f0438f7351f940ad8870e83c14383d48c8951263bf24885985e21f6ea1380a7efb4e
|
||||
+AUX linux-multiarch.sh 239 BLAKE2B 021a0d76dece1cec52818b9e84d24631aea40c792956e39822b29af7e598948baacbfd0b2f38c54e0d607b8572b64a32a9e9b9ac060f4d9b5b8f46e0f3ead696 SHA512 7797af4a694cf231a5f45b123cd4750244f812c5a7ced617560fa78bc29afe7aa9d4187147dd4ef063ab7b34b536997455cc30f3a7b740aa5b6d12166abb88fe
|
||||
+AUX sonar.service 177 BLAKE2B 5d98db7e2c0739c1e8ba7a0fdf02311b1ee63e62d9155cafe6073ddfabb571a2de6614b08de4d88b7fbfe871ac8586f398fce2b81a0af72ed835b62979816fa3 SHA512 b005fa411eb45842f54d1cb17a109d1416eddd19e42513bcb9e96e3d0439f1e9466340c78564ac72dfaded3d206799c0d0d1dbb88b51ffaafd6910af7b98ed58
|
||||
+DIST sonarqube-7.2.1.zip 158122606 BLAKE2B 49ccc9a453242d0d38b2ac85bad8aeb573edbf8dae583abe5345fd30d9f8248dfdb3d8a82d30a0c7ac5e31843d4cfb1dabe1d8121a6bdd27d352837644a7a790 SHA512 7034679e82df1dc87e2999e2ead4629c7348f432e7bf050664e492ce7cf4ca9103243837361a38a38c653355e386aafff0bb4ccf607157bd3895efc806a00cb2
|
||||
+EBUILD sonarqube-bin-7.2.1.ebuild 1700 BLAKE2B cf9f806f5b236ad33b9ac2e82e5db61da81844fa3d74ba26f950dc4318365a66165eacc709e69b2d0b9ba1f5312b331e281b546cc78608abbac33c763e5046f0 SHA512 eddb8d4670cd12180cdac84afa0ce97cb6682d31938261d40d5a3298192e3ad2c3796331dec328a8713408e2a9627965ab8e2f64d3ab2430c700bf8ef768776d
|
||||
diff --git a/dev-util/sonarqube-bin/files/init.sh b/dev-util/sonarqube-bin/files/init.sh
|
||||
deleted file mode 100644
|
||||
index 3e8ec3f9..00000000
|
||||
--- a/dev-util/sonarqube-bin/files/init.sh
|
||||
+++ /dev/null
|
||||
@@ -1,33 +0,0 @@
|
||||
-#!/sbin/runscript
|
||||
-
|
||||
-depend() {
|
||||
- need net
|
||||
- use dns logger
|
||||
-}
|
||||
-
|
||||
-RUN_AS=sonar
|
||||
-
|
||||
-MACHINE_TYPE=`getconf LONG_BIT`
|
||||
-if [ "${MACHINE_TYPE}" = "64" ]; then
|
||||
- JSW=/opt/sonar/bin/linux-x86-64/sonar.sh
|
||||
-else
|
||||
- JSW=/opt/sonar/bin/linux-x86-32/sonar.sh
|
||||
-fi
|
||||
-
|
||||
-checkconfig() {
|
||||
- return 0
|
||||
-}
|
||||
-
|
||||
-start() {
|
||||
- checkconfig || return 1
|
||||
-
|
||||
- ebegin "Starting ${SVCNAME}"
|
||||
- su $RUN_AS -c "$JSW start"
|
||||
- eend $?
|
||||
-}
|
||||
-
|
||||
-stop() {
|
||||
- ebegin "Stopping ${SVCNAME}"
|
||||
- su $RUN_AS -c "$JSW stop"
|
||||
- eend $?
|
||||
-}
|
||||
diff --git a/dev-util/sonarqube-bin/files/linux-multiarch.sh b/dev-util/sonarqube-bin/files/linux-multiarch.sh
|
||||
new file mode 100755
|
||||
index 00000000..553f304f
|
||||
--- /dev/null
|
||||
+++ b/dev-util/sonarqube-bin/files/linux-multiarch.sh
|
||||
@@ -0,0 +1,13 @@
|
||||
+#!/bin/sh
|
||||
+#
|
||||
+
|
||||
+MACHINE_TYPE=`getconf LONG_BIT`
|
||||
+if [ "${MACHINE_TYPE}" = "64" ]; then
|
||||
+ JSW=/opt/sonar/bin/linux-x86-64/sonar.sh
|
||||
+else
|
||||
+ JSW=/opt/sonar/bin/linux-x86-32/sonar.sh
|
||||
+fi
|
||||
+
|
||||
+echo "Launching startup scripts ${JWS}"
|
||||
+
|
||||
+exec ${JSW} console
|
||||
diff --git a/dev-util/sonarqube-bin/files/sonar.confd b/dev-util/sonarqube-bin/files/sonar.confd
|
||||
deleted file mode 100644
|
||||
index c73599fa..00000000
|
||||
--- a/dev-util/sonarqube-bin/files/sonar.confd
|
||||
+++ /dev/null
|
||||
@@ -1 +0,0 @@
|
||||
-RUBYOPT=
|
||||
diff --git a/dev-util/sonarqube-bin/files/sonar.service b/dev-util/sonarqube-bin/files/sonar.service
|
||||
new file mode 100644
|
||||
index 00000000..fdc2dcd2
|
||||
--- /dev/null
|
||||
+++ b/dev-util/sonarqube-bin/files/sonar.service
|
||||
@@ -0,0 +1,9 @@
|
||||
+[Unit]
|
||||
+Description=SonarQube Community Edition
|
||||
+After=network.target
|
||||
+
|
||||
+[Service]
|
||||
+User=sonar
|
||||
+Group=sonar
|
||||
+# universal sonar startup file
|
||||
+ExecStart=/opt/sonar/bin/linux-multiarch.sh
|
||||
diff --git a/dev-util/sonarqube-bin/sonarqube-bin-4.5.ebuild b/dev-util/sonarqube-bin/sonarqube-bin-4.5.ebuild
|
||||
deleted file mode 100644
|
||||
index a441afe0..00000000
|
||||
--- a/dev-util/sonarqube-bin/sonarqube-bin-4.5.ebuild
|
||||
+++ /dev/null
|
||||
@@ -1,74 +0,0 @@
|
||||
-# Copyright 1999-2014 Gentoo Foundation
|
||||
-# Distributed under the terms of the GNU General Public License v2
|
||||
-# $Header: $
|
||||
-
|
||||
-EAPI=5
|
||||
-
|
||||
-inherit java-pkg-2 user
|
||||
-
|
||||
-DESCRIPTION="SonarQube is an open platform to manage code quality."
|
||||
-HOMEPAGE="http://www.sonarqube.org/"
|
||||
-LICENSE="LGPL-3"
|
||||
-MY_PV="${PV/_alpha/M}"
|
||||
-MY_PV="${MY_PV/_rc/-RC}"
|
||||
-MY_P="sonarqube-${MY_PV}"
|
||||
-SRC_URI="http://dist.sonar.codehaus.org/${MY_P}.zip"
|
||||
-RESTRICT="mirror"
|
||||
-SLOT="0"
|
||||
-KEYWORDS="~x86 ~amd64"
|
||||
-IUSE=""
|
||||
-
|
||||
-S="${WORKDIR}/${MY_P}"
|
||||
-
|
||||
-DEPEND="app-arch/unzip"
|
||||
-RDEPEND=">=virtual/jdk-1.6"
|
||||
-
|
||||
-INSTALL_DIR="/opt/sonar"
|
||||
-
|
||||
-pkg_setup() {
|
||||
- #enewgroup <name> [gid]
|
||||
- enewgroup sonar
|
||||
- #enewuser <user> [uid] [shell] [homedir] [groups] [params]
|
||||
- enewuser sonar -1 /bin/bash /opt/sonar "sonar"
|
||||
-}
|
||||
-
|
||||
-src_unpack() {
|
||||
- unpack ${A}
|
||||
- cd "${S}"
|
||||
-
|
||||
- # TODO remove unneded files
|
||||
-
|
||||
- # Fix permissions
|
||||
- chmod -R a-x,a+X conf data extensions lib temp web COPYING
|
||||
-
|
||||
- # Fix EOL in configuration files
|
||||
- for i in conf/* ; do
|
||||
- awk '{ sub("\r$", ""); print }' $i > $i.new
|
||||
- mv $i.new $i
|
||||
- done
|
||||
-}
|
||||
-
|
||||
-src_install() {
|
||||
- insinto ${INSTALL_DIR}
|
||||
- doins -r bin conf data extensions lib logs temp web COPYING
|
||||
-
|
||||
- newinitd "${FILESDIR}/init.sh" sonar
|
||||
- newconfd "${FILESDIR}"/sonar.confd sonar
|
||||
-
|
||||
- fowners -R sonar:sonar ${INSTALL_DIR}
|
||||
-
|
||||
- fperms 755 "${INSTALL_DIR}/bin/linux-x86-32/sonar.sh"
|
||||
- fperms 755 "${INSTALL_DIR}/bin/linux-x86-32/wrapper"
|
||||
-
|
||||
- fperms 755 "${INSTALL_DIR}/bin/linux-x86-64/sonar.sh"
|
||||
- fperms 755 "${INSTALL_DIR}/bin/linux-x86-64/wrapper"
|
||||
-
|
||||
- # Protect Sonar conf on upgrade
|
||||
- echo "CONFIG_PROTECT=\"${INSTALL_DIR}/conf\"" > "${T}/25sonar" || die
|
||||
- doenvd "${T}/25sonar"
|
||||
-}
|
||||
-
|
||||
-pkg_postinst() {
|
||||
- einfo "Please complete the upgrade using the following guideline:"
|
||||
- einfo "http://docs.codehaus.org/display/SONAR/Upgrading"
|
||||
-}
|
||||
diff --git a/dev-util/sonarqube-bin/sonarqube-bin-4.5.2.ebuild b/dev-util/sonarqube-bin/sonarqube-bin-7.2.1.ebuild
|
||||
similarity index 61%
|
||||
rename from dev-util/sonarqube-bin/sonarqube-bin-4.5.2.ebuild
|
||||
rename to dev-util/sonarqube-bin/sonarqube-bin-7.2.1.ebuild
|
||||
index a441afe0..62055d1b 100644
|
||||
--- a/dev-util/sonarqube-bin/sonarqube-bin-4.5.2.ebuild
|
||||
+++ b/dev-util/sonarqube-bin/sonarqube-bin-7.2.1.ebuild
|
||||
@@ -2,17 +2,17 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
-EAPI=5
|
||||
+EAPI=6
|
||||
|
||||
-inherit java-pkg-2 user
|
||||
+inherit user systemd
|
||||
|
||||
-DESCRIPTION="SonarQube is an open platform to manage code quality."
|
||||
-HOMEPAGE="http://www.sonarqube.org/"
|
||||
+DESCRIPTION="SonarQube Community Edition is an open platform to manage code quality."
|
||||
+HOMEPAGE="https://www.sonarqube.org/"
|
||||
LICENSE="LGPL-3"
|
||||
MY_PV="${PV/_alpha/M}"
|
||||
MY_PV="${MY_PV/_rc/-RC}"
|
||||
MY_P="sonarqube-${MY_PV}"
|
||||
-SRC_URI="http://dist.sonar.codehaus.org/${MY_P}.zip"
|
||||
+SRC_URI="https://sonarsource.bintray.com/Distribution/sonarqube/${MY_P}.zip"
|
||||
RESTRICT="mirror"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
@@ -21,7 +21,7 @@ IUSE=""
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DEPEND="app-arch/unzip"
|
||||
-RDEPEND=">=virtual/jdk-1.6"
|
||||
+RDEPEND=">=virtual/jdk-1.8"
|
||||
|
||||
INSTALL_DIR="/opt/sonar"
|
||||
|
||||
@@ -34,26 +34,17 @@ pkg_setup() {
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
- cd "${S}"
|
||||
|
||||
- # TODO remove unneded files
|
||||
-
|
||||
- # Fix permissions
|
||||
- chmod -R a-x,a+X conf data extensions lib temp web COPYING
|
||||
-
|
||||
- # Fix EOL in configuration files
|
||||
- for i in conf/* ; do
|
||||
- awk '{ sub("\r$", ""); print }' $i > $i.new
|
||||
- mv $i.new $i
|
||||
- done
|
||||
+ # TODO remove unneeded files
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto ${INSTALL_DIR}
|
||||
- doins -r bin conf data extensions lib logs temp web COPYING
|
||||
+ doins -r bin conf data elasticsearch extensions lib logs temp web COPYING
|
||||
+ insinto ${INSTALL_DIR}/bin
|
||||
+ doins "${FILESDIR}"/linux-multiarch.sh
|
||||
|
||||
- newinitd "${FILESDIR}/init.sh" sonar
|
||||
- newconfd "${FILESDIR}"/sonar.confd sonar
|
||||
+ systemd_dounit "${FILESDIR}"/sonar.service
|
||||
|
||||
fowners -R sonar:sonar ${INSTALL_DIR}
|
||||
|
||||
@@ -63,6 +54,10 @@ src_install() {
|
||||
fperms 755 "${INSTALL_DIR}/bin/linux-x86-64/sonar.sh"
|
||||
fperms 755 "${INSTALL_DIR}/bin/linux-x86-64/wrapper"
|
||||
|
||||
+ fperms 755 "${INSTALL_DIR}/bin/linux-multiarch.sh"
|
||||
+
|
||||
+ fperms -R 755 "${INSTALL_DIR}/elasticsearch"
|
||||
+
|
||||
# Protect Sonar conf on upgrade
|
||||
echo "CONFIG_PROTECT=\"${INSTALL_DIR}/conf\"" > "${T}/25sonar" || die
|
||||
doenvd "${T}/25sonar"
|
||||
@@ -70,5 +65,5 @@ src_install() {
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "Please complete the upgrade using the following guideline:"
|
||||
- einfo "http://docs.codehaus.org/display/SONAR/Upgrading"
|
||||
+ einfo "https://docs.sonarqube.org/display/SONAR/Upgrading"
|
||||
}
|
||||
diff --git a/dev-util/sonarscanner-bin/Manifest b/dev-util/sonarscanner-bin/Manifest
|
||||
new file mode 100644
|
||||
index 00000000..866a78a1
|
||||
--- /dev/null
|
||||
+++ b/dev-util/sonarscanner-bin/Manifest
|
||||
@@ -0,0 +1,3 @@
|
||||
+AUX sonarscanner-bin-system_jre.patch 352 BLAKE2B 6f8e77c034a99f9084a43ef2ff140b0c27a5e4355e774d4fd7a39e6202055f8c0885b9b185361ef2b6f6ed9b5b6ab943d31b4fb560c31bfa54a94a23a0bcc1a8 SHA512 8c418c68b9e11882111b7d375cea969bed8fc8fa914011a2484ba9b33e039da6da9b0d15cb8e35a8ee22baede790731239884ac237f54a7165af62d98641947b
|
||||
+DIST sonar-scanner-cli-3.2.0.1227-linux.zip 73847400 BLAKE2B 7b4ad074720cbb4c630f78abd4c1e61e0c8a938726e4aadeeb2783722d83dd120212d693deb5c0afcf8a4b32ff147f829195531e6d3b34344d2f8209edc30f7b SHA512 17b5a39b2790c42d6894c8b56b866a4c7591f0fcf83d54aa46b7a3dd61e05c5030c99ea074b9d4338abe30387a71de302e4fda4b843e6e404f0c53c62f142a3b
|
||||
+EBUILD sonarscanner-bin-3.2.0.1227.ebuild 1279 BLAKE2B 454dbc33a6db4356769fb562ba810628fea325f6928526e7043b044474289dfdb7e832f719d3da3afbba79a4bb61d37105e7cdc694e52bcc7c76afdcdee3164e SHA512 468bc002720a43b4d24a86e531e8ed8f269336e14ea381a1db738fc362aaac1f20454581c309efb076709eef7580429bb3a54fbc1d081f9a0705167e1061a110
|
||||
diff --git a/dev-util/sonarscanner-bin/files/sonarscanner-bin-system_jre.patch b/dev-util/sonarscanner-bin/files/sonarscanner-bin-system_jre.patch
|
||||
new file mode 100644
|
||||
index 00000000..35b4f2df
|
||||
--- /dev/null
|
||||
+++ b/dev-util/sonarscanner-bin/files/sonarscanner-bin-system_jre.patch
|
||||
@@ -0,0 +1,11 @@
|
||||
+--- a/sonar-scanner-3.2.0.1227-linux/bin/sonar-scanner 2018-05-23 09:19:12.000000000 +0200
|
||||
++++ b/sonar-scanner-3.2.0.1227-linux/bin/sonar-scanner 2018-07-31 19:05:52.300704170 +0200
|
||||
+@@ -37,7 +37,7 @@
|
||||
+ exit 1
|
||||
+ fi
|
||||
+
|
||||
+-use_embedded_jre=true
|
||||
++use_embedded_jre=false
|
||||
+ if [ "$use_embedded_jre" = true ]; then
|
||||
+ export JAVA_HOME=$sonar_scanner_home/jre
|
||||
+ fi
|
||||
diff --git a/dev-util/sonarscanner-bin/sonarscanner-bin-3.2.0.1227.ebuild b/dev-util/sonarscanner-bin/sonarscanner-bin-3.2.0.1227.ebuild
|
||||
new file mode 100644
|
||||
index 00000000..a71ec6df
|
||||
--- /dev/null
|
||||
+++ b/dev-util/sonarscanner-bin/sonarscanner-bin-3.2.0.1227.ebuild
|
||||
@@ -0,0 +1,56 @@
|
||||
+# Copyright 1999-2014 Gentoo Foundation
|
||||
+# Distributed under the terms of the GNU General Public License v2
|
||||
+# $Header: $
|
||||
+
|
||||
+EAPI=6
|
||||
+
|
||||
+inherit user eutils
|
||||
+
|
||||
+DESCRIPTION="SonarQube Command-Line Scanner"
|
||||
+HOMEPAGE="https://www.sonarqube.org/"
|
||||
+LICENSE="LGPL-3"
|
||||
+MY_PV="${PV/_alpha/M}"
|
||||
+MY_PV="${MY_PV/_rc/-RC}"
|
||||
+MY_P="sonar-scanner-cli-${MY_PV}-linux"
|
||||
+SRC_URI="https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/${MY_P}.zip"
|
||||
+RESTRICT="mirror"
|
||||
+SLOT="0"
|
||||
+KEYWORDS="~x86 ~amd64"
|
||||
+IUSE="embedded_jre"
|
||||
+
|
||||
+S="${WORKDIR}/sonar-scanner-${MY_PV}-linux"
|
||||
+
|
||||
+DEPEND="app-arch/unzip"
|
||||
+RDEPEND="!embedded_jre? ( >=virtual/jre-1.8 )"
|
||||
+
|
||||
+INSTALL_DIR="/opt/sonar-scanner"
|
||||
+
|
||||
+src_unpack() {
|
||||
+ unpack ${A}
|
||||
+
|
||||
+ if ! use embedded_jre; then
|
||||
+ epatch "${FILESDIR}/${PN}-system_jre.patch"
|
||||
+ fi
|
||||
+
|
||||
+ # TODO remove unneeded files
|
||||
+}
|
||||
+
|
||||
+src_install() {
|
||||
+ insinto ${INSTALL_DIR}
|
||||
+
|
||||
+ if use embedded_jre; then
|
||||
+ doins -r bin conf jre lib
|
||||
+ fperms -R 755 "${INSTALL_DIR}/jre/bin"
|
||||
+ else
|
||||
+ doins -r bin conf lib
|
||||
+ fi
|
||||
+
|
||||
+ fperms -R 755 "${INSTALL_DIR}/bin"
|
||||
+
|
||||
+ dosym ${INSTALL_DIR}/bin/sonar-scanner /usr/bin/sonar-scanner
|
||||
+ dosym ${INSTALL_DIR}/bin/sonar-scanner-debug /usr/bin/sonar-scanner-debug
|
||||
+
|
||||
+ # Protect Sonar conf on upgrade
|
||||
+ echo "CONFIG_PROTECT=\"${INSTALL_DIR}/conf\"" > "${T}/25sonarcli" || die
|
||||
+ doenvd "${T}/25sonarcli"
|
||||
+}
|
||||
|
|
@ -1,2 +1,4 @@
|
|||
DIST sonarqube-4.5.2.zip 90520081 SHA256 fbdf8ec8480833e3f73072d4af62bb225edf03287dd53bcf676ab00e92bc0db7 SHA512 9204f7e8604854ed2c7b002bf8a9a04145900616dcfb8468b168b4bb8ac723e1d7757c19ee1ab9fe5da9baa8383ac440886af20e601b46db5ce4a5447713fc17 WHIRLPOOL 8329e6622613522d3bb6355811254a8788079aa8486ffe56e3dae8ad9b24f5244e0cc4b7b0ba32a43d2d94d863964ba3d1dbe3c5710df88a4bf563155ea40f5d
|
||||
DIST sonarqube-4.5.zip 90188628 SHA256 707d7d960fef17e2e2d0ceb4bd9828966d6b6c99aabe2c7bc2e2c07e5f398deb SHA512 261bced70b0fe13973b33fdca5ac1e234fd95389e0b15e6505c7f2e12f6d5ef91d86f56c1b3a924460d9395b29c0446322d1d7d3b82bab8e7c03e631d34d66a2 WHIRLPOOL 69ab385e8fb653a442d74692055f5502b9c6f89fee3844138c2e704a70c5f0438f7351f940ad8870e83c14383d48c8951263bf24885985e21f6ea1380a7efb4e
|
||||
AUX linux-multiarch.sh 239 BLAKE2B 021a0d76dece1cec52818b9e84d24631aea40c792956e39822b29af7e598948baacbfd0b2f38c54e0d607b8572b64a32a9e9b9ac060f4d9b5b8f46e0f3ead696 SHA512 7797af4a694cf231a5f45b123cd4750244f812c5a7ced617560fa78bc29afe7aa9d4187147dd4ef063ab7b34b536997455cc30f3a7b740aa5b6d12166abb88fe
|
||||
AUX sonar.service 177 BLAKE2B 5d98db7e2c0739c1e8ba7a0fdf02311b1ee63e62d9155cafe6073ddfabb571a2de6614b08de4d88b7fbfe871ac8586f398fce2b81a0af72ed835b62979816fa3 SHA512 b005fa411eb45842f54d1cb17a109d1416eddd19e42513bcb9e96e3d0439f1e9466340c78564ac72dfaded3d206799c0d0d1dbb88b51ffaafd6910af7b98ed58
|
||||
DIST sonarqube-7.2.1.zip 158122606 BLAKE2B 49ccc9a453242d0d38b2ac85bad8aeb573edbf8dae583abe5345fd30d9f8248dfdb3d8a82d30a0c7ac5e31843d4cfb1dabe1d8121a6bdd27d352837644a7a790 SHA512 7034679e82df1dc87e2999e2ead4629c7348f432e7bf050664e492ce7cf4ca9103243837361a38a38c653355e386aafff0bb4ccf607157bd3895efc806a00cb2
|
||||
EBUILD sonarqube-bin-7.2.1.ebuild 1700 BLAKE2B cf9f806f5b236ad33b9ac2e82e5db61da81844fa3d74ba26f950dc4318365a66165eacc709e69b2d0b9ba1f5312b331e281b546cc78608abbac33c763e5046f0 SHA512 eddb8d4670cd12180cdac84afa0ce97cb6682d31938261d40d5a3298192e3ad2c3796331dec328a8713408e2a9627965ab8e2f64d3ab2430c700bf8ef768776d
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
#!/sbin/runscript
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use dns logger
|
||||
}
|
||||
|
||||
RUN_AS=sonar
|
||||
|
||||
MACHINE_TYPE=`getconf LONG_BIT`
|
||||
if [ "${MACHINE_TYPE}" = "64" ]; then
|
||||
JSW=/opt/sonar/bin/linux-x86-64/sonar.sh
|
||||
else
|
||||
JSW=/opt/sonar/bin/linux-x86-32/sonar.sh
|
||||
fi
|
||||
|
||||
checkconfig() {
|
||||
return 0
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
|
||||
ebegin "Starting ${SVCNAME}"
|
||||
su $RUN_AS -c "$JSW start"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${SVCNAME}"
|
||||
su $RUN_AS -c "$JSW stop"
|
||||
eend $?
|
||||
}
|
||||
13
dev-util/sonarqube-bin/files/linux-multiarch.sh
Executable file
13
dev-util/sonarqube-bin/files/linux-multiarch.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
|
||||
MACHINE_TYPE=`getconf LONG_BIT`
|
||||
if [ "${MACHINE_TYPE}" = "64" ]; then
|
||||
JSW=/opt/sonar/bin/linux-x86-64/sonar.sh
|
||||
else
|
||||
JSW=/opt/sonar/bin/linux-x86-32/sonar.sh
|
||||
fi
|
||||
|
||||
echo "Launching startup scripts ${JWS}"
|
||||
|
||||
exec ${JSW} console
|
||||
|
|
@ -1 +0,0 @@
|
|||
RUBYOPT=
|
||||
9
dev-util/sonarqube-bin/files/sonar.service
Normal file
9
dev-util/sonarqube-bin/files/sonar.service
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=SonarQube Community Edition
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=sonar
|
||||
Group=sonar
|
||||
# universal sonar startup file
|
||||
ExecStart=/opt/sonar/bin/linux-multiarch.sh
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit java-pkg-2 user
|
||||
|
||||
DESCRIPTION="SonarQube is an open platform to manage code quality."
|
||||
HOMEPAGE="http://www.sonarqube.org/"
|
||||
LICENSE="LGPL-3"
|
||||
MY_PV="${PV/_alpha/M}"
|
||||
MY_PV="${MY_PV/_rc/-RC}"
|
||||
MY_P="sonarqube-${MY_PV}"
|
||||
SRC_URI="http://dist.sonar.codehaus.org/${MY_P}.zip"
|
||||
RESTRICT="mirror"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
IUSE=""
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DEPEND="app-arch/unzip"
|
||||
RDEPEND=">=virtual/jdk-1.6"
|
||||
|
||||
INSTALL_DIR="/opt/sonar"
|
||||
|
||||
pkg_setup() {
|
||||
#enewgroup <name> [gid]
|
||||
enewgroup sonar
|
||||
#enewuser <user> [uid] [shell] [homedir] [groups] [params]
|
||||
enewuser sonar -1 /bin/bash /opt/sonar "sonar"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# TODO remove unneded files
|
||||
|
||||
# Fix permissions
|
||||
chmod -R a-x,a+X conf data extensions lib temp web COPYING
|
||||
|
||||
# Fix EOL in configuration files
|
||||
for i in conf/* ; do
|
||||
awk '{ sub("\r$", ""); print }' $i > $i.new
|
||||
mv $i.new $i
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto ${INSTALL_DIR}
|
||||
doins -r bin conf data extensions lib logs temp web COPYING
|
||||
|
||||
newinitd "${FILESDIR}/init.sh" sonar
|
||||
newconfd "${FILESDIR}"/sonar.confd sonar
|
||||
|
||||
fowners -R sonar:sonar ${INSTALL_DIR}
|
||||
|
||||
fperms 755 "${INSTALL_DIR}/bin/linux-x86-32/sonar.sh"
|
||||
fperms 755 "${INSTALL_DIR}/bin/linux-x86-32/wrapper"
|
||||
|
||||
fperms 755 "${INSTALL_DIR}/bin/linux-x86-64/sonar.sh"
|
||||
fperms 755 "${INSTALL_DIR}/bin/linux-x86-64/wrapper"
|
||||
|
||||
# Protect Sonar conf on upgrade
|
||||
echo "CONFIG_PROTECT=\"${INSTALL_DIR}/conf\"" > "${T}/25sonar" || die
|
||||
doenvd "${T}/25sonar"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "Please complete the upgrade using the following guideline:"
|
||||
einfo "http://docs.codehaus.org/display/SONAR/Upgrading"
|
||||
}
|
||||
|
|
@ -2,17 +2,17 @@
|
|||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=5
|
||||
EAPI=6
|
||||
|
||||
inherit java-pkg-2 user
|
||||
inherit user systemd
|
||||
|
||||
DESCRIPTION="SonarQube is an open platform to manage code quality."
|
||||
HOMEPAGE="http://www.sonarqube.org/"
|
||||
DESCRIPTION="SonarQube Community Edition is an open platform to manage code quality."
|
||||
HOMEPAGE="https://www.sonarqube.org/"
|
||||
LICENSE="LGPL-3"
|
||||
MY_PV="${PV/_alpha/M}"
|
||||
MY_PV="${MY_PV/_rc/-RC}"
|
||||
MY_P="sonarqube-${MY_PV}"
|
||||
SRC_URI="http://dist.sonar.codehaus.org/${MY_P}.zip"
|
||||
SRC_URI="https://sonarsource.bintray.com/Distribution/sonarqube/${MY_P}.zip"
|
||||
RESTRICT="mirror"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
|
|
@ -21,7 +21,7 @@ IUSE=""
|
|||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DEPEND="app-arch/unzip"
|
||||
RDEPEND=">=virtual/jdk-1.6"
|
||||
RDEPEND=">=virtual/jdk-1.8"
|
||||
|
||||
INSTALL_DIR="/opt/sonar"
|
||||
|
||||
|
|
@ -34,26 +34,17 @@ pkg_setup() {
|
|||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# TODO remove unneded files
|
||||
|
||||
# Fix permissions
|
||||
chmod -R a-x,a+X conf data extensions lib temp web COPYING
|
||||
|
||||
# Fix EOL in configuration files
|
||||
for i in conf/* ; do
|
||||
awk '{ sub("\r$", ""); print }' $i > $i.new
|
||||
mv $i.new $i
|
||||
done
|
||||
# TODO remove unneeded files
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto ${INSTALL_DIR}
|
||||
doins -r bin conf data extensions lib logs temp web COPYING
|
||||
doins -r bin conf data elasticsearch extensions lib logs temp web COPYING
|
||||
insinto ${INSTALL_DIR}/bin
|
||||
doins "${FILESDIR}"/linux-multiarch.sh
|
||||
|
||||
newinitd "${FILESDIR}/init.sh" sonar
|
||||
newconfd "${FILESDIR}"/sonar.confd sonar
|
||||
systemd_dounit "${FILESDIR}"/sonar.service
|
||||
|
||||
fowners -R sonar:sonar ${INSTALL_DIR}
|
||||
|
||||
|
|
@ -63,6 +54,10 @@ src_install() {
|
|||
fperms 755 "${INSTALL_DIR}/bin/linux-x86-64/sonar.sh"
|
||||
fperms 755 "${INSTALL_DIR}/bin/linux-x86-64/wrapper"
|
||||
|
||||
fperms 755 "${INSTALL_DIR}/bin/linux-multiarch.sh"
|
||||
|
||||
fperms -R 755 "${INSTALL_DIR}/elasticsearch"
|
||||
|
||||
# Protect Sonar conf on upgrade
|
||||
echo "CONFIG_PROTECT=\"${INSTALL_DIR}/conf\"" > "${T}/25sonar" || die
|
||||
doenvd "${T}/25sonar"
|
||||
|
|
@ -70,5 +65,5 @@ src_install() {
|
|||
|
||||
pkg_postinst() {
|
||||
einfo "Please complete the upgrade using the following guideline:"
|
||||
einfo "http://docs.codehaus.org/display/SONAR/Upgrading"
|
||||
einfo "https://docs.sonarqube.org/display/SONAR/Upgrading"
|
||||
}
|
||||
3
dev-util/sonarscanner-bin/Manifest
Normal file
3
dev-util/sonarscanner-bin/Manifest
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
AUX sonarscanner-bin-system_jre.patch 352 BLAKE2B 6f8e77c034a99f9084a43ef2ff140b0c27a5e4355e774d4fd7a39e6202055f8c0885b9b185361ef2b6f6ed9b5b6ab943d31b4fb560c31bfa54a94a23a0bcc1a8 SHA512 8c418c68b9e11882111b7d375cea969bed8fc8fa914011a2484ba9b33e039da6da9b0d15cb8e35a8ee22baede790731239884ac237f54a7165af62d98641947b
|
||||
DIST sonar-scanner-cli-3.2.0.1227-linux.zip 73847400 BLAKE2B 7b4ad074720cbb4c630f78abd4c1e61e0c8a938726e4aadeeb2783722d83dd120212d693deb5c0afcf8a4b32ff147f829195531e6d3b34344d2f8209edc30f7b SHA512 17b5a39b2790c42d6894c8b56b866a4c7591f0fcf83d54aa46b7a3dd61e05c5030c99ea074b9d4338abe30387a71de302e4fda4b843e6e404f0c53c62f142a3b
|
||||
EBUILD sonarscanner-bin-3.2.0.1227.ebuild 1279 BLAKE2B 454dbc33a6db4356769fb562ba810628fea325f6928526e7043b044474289dfdb7e832f719d3da3afbba79a4bb61d37105e7cdc694e52bcc7c76afdcdee3164e SHA512 468bc002720a43b4d24a86e531e8ed8f269336e14ea381a1db738fc362aaac1f20454581c309efb076709eef7580429bb3a54fbc1d081f9a0705167e1061a110
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- a/sonar-scanner-3.2.0.1227-linux/bin/sonar-scanner 2018-05-23 09:19:12.000000000 +0200
|
||||
+++ b/sonar-scanner-3.2.0.1227-linux/bin/sonar-scanner 2018-07-31 19:05:52.300704170 +0200
|
||||
@@ -37,7 +37,7 @@
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-use_embedded_jre=true
|
||||
+use_embedded_jre=false
|
||||
if [ "$use_embedded_jre" = true ]; then
|
||||
export JAVA_HOME=$sonar_scanner_home/jre
|
||||
fi
|
||||
56
dev-util/sonarscanner-bin/sonarscanner-bin-3.2.0.1227.ebuild
Normal file
56
dev-util/sonarscanner-bin/sonarscanner-bin-3.2.0.1227.ebuild
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit user eutils
|
||||
|
||||
DESCRIPTION="SonarQube Command-Line Scanner"
|
||||
HOMEPAGE="https://www.sonarqube.org/"
|
||||
LICENSE="LGPL-3"
|
||||
MY_PV="${PV/_alpha/M}"
|
||||
MY_PV="${MY_PV/_rc/-RC}"
|
||||
MY_P="sonar-scanner-cli-${MY_PV}-linux"
|
||||
SRC_URI="https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/${MY_P}.zip"
|
||||
RESTRICT="mirror"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
IUSE="embedded_jre"
|
||||
|
||||
S="${WORKDIR}/sonar-scanner-${MY_PV}-linux"
|
||||
|
||||
DEPEND="app-arch/unzip"
|
||||
RDEPEND="!embedded_jre? ( >=virtual/jre-1.8 )"
|
||||
|
||||
INSTALL_DIR="/opt/sonar-scanner"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
|
||||
if ! use embedded_jre; then
|
||||
epatch "${FILESDIR}/${PN}-system_jre.patch"
|
||||
fi
|
||||
|
||||
# TODO remove unneeded files
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto ${INSTALL_DIR}
|
||||
|
||||
if use embedded_jre; then
|
||||
doins -r bin conf jre lib
|
||||
fperms -R 755 "${INSTALL_DIR}/jre/bin"
|
||||
else
|
||||
doins -r bin conf lib
|
||||
fi
|
||||
|
||||
fperms -R 755 "${INSTALL_DIR}/bin"
|
||||
|
||||
dosym ${INSTALL_DIR}/bin/sonar-scanner /usr/bin/sonar-scanner
|
||||
dosym ${INSTALL_DIR}/bin/sonar-scanner-debug /usr/bin/sonar-scanner-debug
|
||||
|
||||
# Protect Sonar conf on upgrade
|
||||
echo "CONFIG_PROTECT=\"${INSTALL_DIR}/conf\"" > "${T}/25sonarcli" || die
|
||||
doenvd "${T}/25sonarcli"
|
||||
}
|
||||
Loading…
Reference in a new issue