diff options
author | dNhax | 2018-02-18 10:21:11 +0100 |
---|---|---|
committer | dNhax | 2018-02-18 10:21:11 +0100 |
commit | b415fa450f5ff58eddb3532113ef92295e150f1a (patch) | |
tree | 8c5caba0a753c7c67f19ea10589af73de416dd15 | |
parent | 43f85ade38011ff0294de07d031747fd5f06ff2c (diff) | |
download | aur-b415fa450f5ff58eddb3532113ef92295e150f1a.tar.gz |
Added example configuration for required sysctl values
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 99-sonarqube.conf | 3 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | sonarqube-lts.install | 8 | ||||
-rw-r--r-- | sonarqube.service | 2 |
5 files changed, 26 insertions, 6 deletions
@@ -1,7 +1,7 @@ pkgbase = sonarqube-lts pkgdesc = An open source platform for continuous inspection of code quality pkgver = 6.7.1 - pkgrel = 2 + pkgrel = 3 url = http://www.sonarqube.org/ install = sonarqube-lts.install arch = x86_64 @@ -20,10 +20,12 @@ pkgbase = sonarqube-lts source = sonarqube.service source = sonarqube-tmpfile.conf source = sonarqube-user.conf + source = 99-sonarqube.conf sha256sums = 74cc70ef75d83fa260c7be86863416f45e092f77a2582ab51529d84f9a696fc7 - sha256sums = cb3e3e810892e4d7ccf7a843ae1cb7daa14e3395025d0cc505b562f45e4f1ee9 + sha256sums = 1aeefc9db232d13a3139a27af308e30df72c8c9fd631f713e317e1ab18a24d77 sha256sums = 6e024de469ebb1bc4083274412f0a5d68d5fa511c2139ce4cb1d243c51ff9535 sha256sums = 43ff10bbb495827e952225dce79da79bb800627eaa6f1d933f8f7fb408aafe6d + sha256sums = 682b3ab19eee18b39453fa2e99af89ba7e4ecb0f63dcebf137e65aa225a42e68 pkgname = sonarqube-lts diff --git a/99-sonarqube.conf b/99-sonarqube.conf new file mode 100644 index 000000000000..2aa402b2d337 --- /dev/null +++ b/99-sonarqube.conf @@ -0,0 +1,3 @@ +vm.max_map_count = 262144 +fs.file-max = 65536 + @@ -3,7 +3,7 @@ _pkgname=sonarqube pkgname=${_pkgname}-lts pkgver=6.7.1 -pkgrel=2 +pkgrel=3 pkgdesc="An open source platform for continuous inspection of code quality" arch=('x86_64') url="http://www.sonarqube.org/" @@ -27,12 +27,14 @@ install=${pkgname}.install source=("https://sonarsource.bintray.com/Distribution/${_pkgname}/${_pkgname}-${pkgver}.zip" "${_pkgname}.service" "${_pkgname}-tmpfile.conf" - "${_pkgname}-user.conf") + "${_pkgname}-user.conf" + "99-${_pkgname}.conf") sha256sums=('74cc70ef75d83fa260c7be86863416f45e092f77a2582ab51529d84f9a696fc7' - 'cb3e3e810892e4d7ccf7a843ae1cb7daa14e3395025d0cc505b562f45e4f1ee9' + '1aeefc9db232d13a3139a27af308e30df72c8c9fd631f713e317e1ab18a24d77' '6e024de469ebb1bc4083274412f0a5d68d5fa511c2139ce4cb1d243c51ff9535' - '43ff10bbb495827e952225dce79da79bb800627eaa6f1d933f8f7fb408aafe6d') + '43ff10bbb495827e952225dce79da79bb800627eaa6f1d933f8f7fb408aafe6d' + '682b3ab19eee18b39453fa2e99af89ba7e4ecb0f63dcebf137e65aa225a42e68') package() { cd "${srcdir}/${_pkgname}-${pkgver}" @@ -60,6 +62,9 @@ package() { install -Dm644 "${_pkgname}-user.conf" "${pkgdir}/usr/lib/sysusers.d/${_pkgname}.conf" install -Dm644 "${_pkgname}-tmpfile.conf" "${pkgdir}/usr/lib/tmpfiles.d/${_pkgname}.conf" + # Install an example conf for required sysctl values (vm.max_map_count and fs.file-max); see https://docs.sonarqube.org/display/SONAR/Requirements#Requirements-Linux. + 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" diff --git a/sonarqube-lts.install b/sonarqube-lts.install index fc8c6b683869..c49434509c2d 100644 --- a/sonarqube-lts.install +++ b/sonarqube-lts.install @@ -7,6 +7,9 @@ post_install() { systemd-sysusers "${username}.conf" systemd-tmpfiles --create "${username}.conf" chown -R "$username:$username" /etc/$username /run/$username /usr/share/$username /var/log/$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" } @@ -14,6 +17,11 @@ post_upgrade() { getent passwd "${username}" >/dev/null 2>&1 || systemd-sysusers "${username}.conf" systemd-tmpfiles --create sonarqube.conf + 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 + if [ "$(vercmp $2 5.6)" -lt 0 ]; then echo " >> " echo " >> Major version update from 4.5.7 to 5.6. Please take a look at http://www.sonarqube.org/downloads/ for more information." diff --git a/sonarqube.service b/sonarqube.service index 0b6f2dc50895..6fb45d31713b 100644 --- a/sonarqube.service +++ b/sonarqube.service @@ -12,6 +12,8 @@ StandardOutput=syslog 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 |