diff options
author | dNhax | 2019-07-02 20:06:53 +0200 |
---|---|---|
committer | dNhax | 2019-07-02 20:06:53 +0200 |
commit | 15e289fa9ee6292539629028ae3a1b3ceab5ffc6 (patch) | |
tree | 0adc52e3aac61cdec8a05df195c6fcadf64d2922 | |
parent | 1e9df4477bb391040f3c66cc7dfbc63a9286d5de (diff) | |
download | aur-15e289fa9ee6292539629028ae3a1b3ceab5ffc6.tar.gz |
Update to 7.9
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | sonarqube-tmpfile.conf | 1 | ||||
-rw-r--r-- | sonarqube.install | 34 | ||||
-rw-r--r-- | sonarqube.service | 6 |
5 files changed, 65 insertions, 34 deletions
@@ -1,29 +1,28 @@ pkgbase = sonarqube-lts pkgdesc = An open source platform for continuous inspection of code quality - pkgver = 6.7.7 + pkgver = 7.9 pkgrel = 1 url = http://www.sonarqube.org/ install = sonarqube-lts.install arch = x86_64 license = LGPL3 - depends = java-runtime>=8 + depends = java-runtime>=11 optdepends = apache: a fully featured webserver - optdepends = mysql: Fast SQL database server, community edition optdepends = maven: a java project management and project comprehension tool optdepends = postgresql: A sophisticated object-relational DBMS provides = sonarqube conflicts = sonarqube options = !strip - backup = etc/sonarqube/sonar.properties - backup = etc/sonarqube/wrapper.conf - source = https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-6.7.7.zip + backup = etc/webapps/sonarqube/sonar.properties + backup = etc/webapps/sonarqube/wrapper.conf + source = https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.9.zip source = sonarqube.service source = sonarqube-tmpfile.conf source = sonarqube-user.conf source = 99-sonarqube.conf - sha256sums = c3b9cdb6188a8fbf12dfefff38779fe48beb440794c1c91e6122c36966afb185 - sha256sums = 1aeefc9db232d13a3139a27af308e30df72c8c9fd631f713e317e1ab18a24d77 - sha256sums = 6e024de469ebb1bc4083274412f0a5d68d5fa511c2139ce4cb1d243c51ff9535 + sha256sums = ab6c63c961f2e45c94b11ada2e5f2ff80f2da1eab31d364ffb91029bcb84c3e8 + sha256sums = 26ca557a0d371702124212df1ab82a56bb49d6ea26ef7fb472f953e9c2cc5a21 + sha256sums = 2d908a2965df90a74feb0e734dabb27543f5a375ce94ce2a26b4682f462e3ea5 sha256sums = 43ff10bbb495827e952225dce79da79bb800627eaa6f1d933f8f7fb408aafe6d sha256sums = 682b3ab19eee18b39453fa2e99af89ba7e4ecb0f63dcebf137e65aa225a42e68 @@ -2,22 +2,21 @@ _pkgname=sonarqube pkgname=${_pkgname}-lts -pkgver=6.7.7 +pkgver=7.9 pkgrel=1 pkgdesc="An open source platform for continuous inspection of code quality" arch=('x86_64') url="http://www.sonarqube.org/" license=('LGPL3') -depends=('java-runtime>=8') +depends=('java-runtime>=11') optdepends=('apache: a fully featured webserver' - 'mysql: Fast SQL database server, community edition' 'maven: a java project management and project comprehension tool' 'postgresql: A sophisticated object-relational DBMS') -backup=("etc/${_pkgname}/sonar.properties" - "etc/${_pkgname}/wrapper.conf") +backup=("etc/webapps/${_pkgname}/sonar.properties" + "etc/webapps/${_pkgname}/wrapper.conf") conflicts=("${_pkgname}") provides=("${_pkgname}") @@ -30,31 +29,31 @@ source=("https://binaries.sonarsource.com/Distribution/${_pkgname}/${_pkgname}-$ "${_pkgname}-user.conf" "99-${_pkgname}.conf") -sha256sums=('c3b9cdb6188a8fbf12dfefff38779fe48beb440794c1c91e6122c36966afb185' - '1aeefc9db232d13a3139a27af308e30df72c8c9fd631f713e317e1ab18a24d77' - '6e024de469ebb1bc4083274412f0a5d68d5fa511c2139ce4cb1d243c51ff9535' +sha256sums=('ab6c63c961f2e45c94b11ada2e5f2ff80f2da1eab31d364ffb91029bcb84c3e8' + '26ca557a0d371702124212df1ab82a56bb49d6ea26ef7fb472f953e9c2cc5a21' + '2d908a2965df90a74feb0e734dabb27543f5a375ce94ce2a26b4682f462e3ea5' '43ff10bbb495827e952225dce79da79bb800627eaa6f1d933f8f7fb408aafe6d' '682b3ab19eee18b39453fa2e99af89ba7e4ecb0f63dcebf137e65aa225a42e68') package() { cd "${srcdir}/${_pkgname}-${pkgver}" - # Copy everything except conf and logs to /usr/share/sonarqube. - install -dm755 "${pkgdir}/usr/share/${_pkgname}" - cp -dr --no-preserve=ownership {bin,data,elasticsearch,extensions,lib,temp,web} "${pkgdir}/usr/share/${_pkgname}/" + # Copy everything except conf and logs to /usr/share/webapps/sonarqube. + install -dm755 "${pkgdir}/usr/share/webapps/${_pkgname}" + cp -dr --no-preserve=ownership {bin,data,elasticsearch,extensions,lib,temp,web} "${pkgdir}/usr/share/webapps/${_pkgname}/" # Delete unused files. - rm -rf "${pkgdir}/usr/share/${_pkgname}/bin/linux-x86-32" - rm -rf "${pkgdir}/usr/share/${_pkgname}/bin/macosx-universal-64" - rm -rf "${pkgdir}/usr/share/${_pkgname}/bin/windows-x86-32" - rm -rf "${pkgdir}/usr/share/${_pkgname}/bin/windows-x86-64" + rm -rf "${pkgdir}/usr/share/webapps/${_pkgname}/bin/linux-x86-32" + rm -rf "${pkgdir}/usr/share/webapps/${_pkgname}/bin/macosx-universal-64" + rm -rf "${pkgdir}/usr/share/webapps/${_pkgname}/bin/windows-x86-32" + rm -rf "${pkgdir}/usr/share/webapps/${_pkgname}/bin/windows-x86-64" # Install the license. install -Dm644 "COPYING" "${pkgdir}/usr/share/doc/${_pkgname}/COPYING" - # Install the configuration files to /etc/sonarqube. - install -Dm644 "conf/sonar.properties" "${pkgdir}/etc/${_pkgname}/sonar.properties" - install -Dm644 "conf/wrapper.conf" "${pkgdir}/etc/${_pkgname}/wrapper.conf" + # Install the configuration files to /etc/webapps/sonarqube. + install -Dm644 "conf/sonar.properties" "${pkgdir}/etc/webapps/${_pkgname}/sonar.properties" + install -Dm644 "conf/wrapper.conf" "${pkgdir}/etc/webapps/${_pkgname}/wrapper.conf" # Install the systemd configuration and service files. cd "${srcdir}" @@ -66,9 +65,9 @@ package() { install -Dm644 "99-${_pkgname}.conf" "${pkgdir}/usr/share/doc/${_pkgname}/99-${_pkgname}.conf" # Create symbolic links because SonarQube expects a specific directory layout. - ln -s "/var/log/${_pkgname}" "${pkgdir}/usr/share/${_pkgname}/logs" - ln -s "/run/${_pkgname}" "${pkgdir}/usr/share/${_pkgname}/run" - ln -s "/etc/${_pkgname}" "${pkgdir}/usr/share/${_pkgname}/conf" + ln -s "/var/log/${_pkgname}" "${pkgdir}/usr/share/webapps/${_pkgname}/logs" + ln -s "/run/${_pkgname}" "${pkgdir}/usr/share/webapps/${_pkgname}/run" + ln -s "/etc/webapps/${_pkgname}" "${pkgdir}/usr/share/webapps/${_pkgname}/conf" } diff --git a/sonarqube-tmpfile.conf b/sonarqube-tmpfile.conf index fc5767027131..f395f3af0b1c 100644 --- a/sonarqube-tmpfile.conf +++ b/sonarqube-tmpfile.conf @@ -1,4 +1,3 @@ d /run/sonarqube 0755 sonarqube sonarqube - f /run/sonarqube/SonarQube.pid 0644 sonarqube sonarqube - d /var/log/sonarqube 0755 sonarqube sonarqube - -d /etc/sonarqube 0755 sonarqube sonarqube - diff --git a/sonarqube.install b/sonarqube.install new file mode 100644 index 000000000000..9fe6a7d11624 --- /dev/null +++ b/sonarqube.install @@ -0,0 +1,34 @@ +#!/usr/bin/env sh +# vim:set ts=4 sw=4 et: + +username="sonarqube" + +post_install() { + systemd-sysusers "${username}.conf" + systemd-tmpfiles --create "${username}.conf" + chown -R "$username:$username" /etc/webapps/$username /usr/share/webapps/$username + + echo "Copy /usr/share/doc/sonarqube/99-sonarqube.conf to /etc/sysctl.d/99-sonarqube.conf for required sysctl values (vm.max_map_count and fs.file-max)." + echo "For further information see https://docs.sonarqube.org/display/SONAR/Requirements#Requirements-Linux" +} + +pre_upgrade() { + rm -rf /usr/share/webapps/sonarqube/extensions/plugins/ + echo "Non-default plugins have been deleted. Please re-install the plugins according to the compatibility matrix (https://docs.sonarqube.org/display/PLUG/Plugin+Version+Matrix)." +} + +post_upgrade() { + getent passwd "${username}" >/dev/null 2>&1 || systemd-sysusers "${username}.conf" + systemd-tmpfiles --create "${username}.conf" + chown -R "$username:$username" /etc/webapps/$username /usr/share/webapps/$username + + if [ -f /etc/webapps/sonarqube/sonar.properties.pacnew ]; then + echo "Please check for changes in /etc/webapps/sonarqube/sonar.properties and edit accordingly:" + echo "$ diff /etc/webapps/sonarqube/sonar.properties /etc/webapps/sonarqube/sonar.properties.pacnew" + fi + + if [ ! -f /etc/sysctl.d/99-sonarqube.conf ]; then + echo "Copy /usr/share/doc/sonarqube/99-sonarqube.conf to /etc/sysctl.d/99-sonarqube.conf for required sysctl values (vm.max_map_count and fs.file-max)." + echo "For further information see https://docs.sonarqube.org/display/SONAR/Requirements#Requirements-Linux" + fi +} diff --git a/sonarqube.service b/sonarqube.service index 6fb45d31713b..56cc1381f059 100644 --- a/sonarqube.service +++ b/sonarqube.service @@ -13,9 +13,9 @@ StandardError=syslog SyslogIdentifier=sonarqube RuntimeDirectory=sonarqube LimitNOFILE=65536 -LimitNPROC=2048 -ExecStart=/usr/share/sonarqube/bin/linux-x86-64/sonar.sh start -ExecStop=/usr/share/sonarqube/bin/linux-x86-64/sonar.sh stop +LimitNPROC=4096 +ExecStart=/usr/share/webapps/sonarqube/bin/linux-x86-64/sonar.sh start +ExecStop=/usr/share/webapps/sonarqube/bin/linux-x86-64/sonar.sh stop [Install] WantedBy=multi-user.target |