diff options
author | dNhax | 2018-10-07 13:34:05 +0200 |
---|---|---|
committer | dNhax | 2018-10-07 13:34:05 +0200 |
commit | 753a86698147c6aacb866750ae9d5e9582beb3cb (patch) | |
tree | 48e5f1a6fede4920f3a0f9b0818819f34aa137a5 | |
parent | 4ada13a29e75d55b07300787c495765d929c8f30 (diff) | |
download | aur-753a86698147c6aacb866750ae9d5e9582beb3cb.tar.gz |
Install SonarQube to /usr/share/webapps, configuration to /etc/webapps/sonarqube
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | sonarqube-tmpfile.conf | 2 | ||||
-rw-r--r-- | sonarqube.install | 10 | ||||
-rw-r--r-- | sonarqube.service | 4 |
5 files changed, 31 insertions, 31 deletions
@@ -1,7 +1,7 @@ pkgbase = sonarqube pkgdesc = An open source platform for continuous inspection of code quality pkgver = 7.3 - pkgrel = 1 + pkgrel = 2 url = http://www.sonarqube.org/ install = sonarqube.install arch = x86_64 @@ -14,16 +14,16 @@ pkgbase = sonarqube provides = sonarqube conflicts = sonarqube-lts options = !strip - backup = etc/sonarqube/sonar.properties - backup = etc/sonarqube/wrapper.conf + backup = etc/webapps/sonarqube/sonar.properties + backup = etc/webapps/sonarqube/wrapper.conf source = https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-7.3.zip source = sonarqube.service source = sonarqube-tmpfile.conf source = sonarqube-user.conf source = 99-sonarqube.conf sha256sums = d9e08960dccf62680d093dcf58d3bac66eda3ec06c95764bb601ae308df4f285 - sha256sums = 1aeefc9db232d13a3139a27af308e30df72c8c9fd631f713e317e1ab18a24d77 - sha256sums = 6e024de469ebb1bc4083274412f0a5d68d5fa511c2139ce4cb1d243c51ff9535 + sha256sums = c98f317003056a5774b88bf78c05d7606b5506ec7b88a682aff2e1eded50b88b + sha256sums = e4e44b78abc0b0184f6e00d3c581216f5d3d61f9d10ddf0e8ff61834df4c5cd9 sha256sums = 43ff10bbb495827e952225dce79da79bb800627eaa6f1d933f8f7fb408aafe6d sha256sums = 682b3ab19eee18b39453fa2e99af89ba7e4ecb0f63dcebf137e65aa225a42e68 @@ -3,7 +3,7 @@ _pkgname=sonarqube pkgname=${_pkgname} pkgver=7.3 -pkgrel=1 +pkgrel=2 pkgdesc="An open source platform for continuous inspection of code quality" arch=('x86_64') url="http://www.sonarqube.org/" @@ -16,8 +16,8 @@ optdepends=('apache: a fully featured webserver' '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}-lts") provides=("${_pkgname}") @@ -31,30 +31,30 @@ source=("https://sonarsource.bintray.com/Distribution/${_pkgname}/${_pkgname}-${ "99-${_pkgname}.conf") sha256sums=('d9e08960dccf62680d093dcf58d3bac66eda3ec06c95764bb601ae308df4f285' - '1aeefc9db232d13a3139a27af308e30df72c8c9fd631f713e317e1ab18a24d77' - '6e024de469ebb1bc4083274412f0a5d68d5fa511c2139ce4cb1d243c51ff9535' + 'c98f317003056a5774b88bf78c05d7606b5506ec7b88a682aff2e1eded50b88b' + 'e4e44b78abc0b0184f6e00d3c581216f5d3d61f9d10ddf0e8ff61834df4c5cd9' '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 +66,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..baa1626737c0 100644 --- a/sonarqube-tmpfile.conf +++ b/sonarqube-tmpfile.conf @@ -1,4 +1,4 @@ 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 - +d /etc/webapps/sonarqube 0755 sonarqube sonarqube - diff --git a/sonarqube.install b/sonarqube.install index a501fd79f9b3..d267ea35f6d4 100644 --- a/sonarqube.install +++ b/sonarqube.install @@ -6,14 +6,14 @@ username="sonarqube" 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 + chown -R "$username:$username" /etc/webapps/$username /run/$username /usr/share/webapps/$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" } pre_upgrade() { - rm -rf /usr/share/sonarqube/extensions/plugins/ + 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)." } @@ -21,9 +21,9 @@ post_upgrade() { getent passwd "${username}" >/dev/null 2>&1 || systemd-sysusers "${username}.conf" systemd-tmpfiles --create sonarqube.conf - if [ -f /etc/sonarqube/sonar.properties.pacnew ]; then - echo "Please check for changes in /etc/sonarqube/sonar.properties and edit accordingly:" - echo "$ diff /etc/sonarqube/sonar.properties /etc/sonarqube/sonar.properties.pacnew" + 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 diff --git a/sonarqube.service b/sonarqube.service index 6fb45d31713b..f02400ab2bb1 100644 --- a/sonarqube.service +++ b/sonarqube.service @@ -14,8 +14,8 @@ 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 +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 |