Merge branch '16-protect-nexus-config-files-from-being-overridden-on-upgrade' into 'master'

protect the config files from being overridden

Closes #16

See merge request !73
This commit is contained in:
Manuel Friedli 2016-06-07 09:52:17 +02:00
commit 5830937401
2 changed files with 52 additions and 0 deletions

View file

@ -6,5 +6,6 @@ DIST nexus-2.11.4-01-bundle.tar.gz 70938260 SHA256 2901d00c7a5c287d0ab51980b0ea8
DIST nexus-3.0.0-03-unix.tar.gz 79751162 SHA256 0666769effc200a520825cce22d59a5a296d03795f72f57d0a97fbe61836d0ca SHA512 e4f728097f0b7e1232538cca2077a20cbd3ed487d86d6360cfb947a9439c9eab82fb286acb1d167f909bb158ef5914d0752e9c26f02bcce60864b7a6cec0ebe7 WHIRLPOOL 2cddeb27ed44ffd844a2c724f2db33206a331eb7dd9ad3e3de42a23afc703bed0eb8c5b76e3363f7c71c4f5897ae49a07a9801aaf424ec44baeff5c2a1c1450c
EBUILD nexus-oss-bin-2.11.2.ebuild 1077 SHA256 a6764695b07366aaebb582698277df84897a958a5476222549da496e3997287b SHA512 5a312b18e201bd46cb26dd7de974b01c58d11cc15665d4c9e5192f915dbf41fcf7ebad5985198d9061825d1ea929c701586260493f708eeb996c2f255387dbdb WHIRLPOOL abd2162cd46c2e0ca09cdb048a5297eaa1600cdf77945405154e00fa517c26a70c89c7e67225c89b5c77bade9ed6ce5974fec9e2cff1eae3e1e058ee3cb9898c
EBUILD nexus-oss-bin-2.11.4.ebuild 1077 SHA256 960db2f4b017aeee080298e6bebc6bc599cfe5fa3fae1f4295392f422ad0fc70 SHA512 880a7762fdad21284c82b876cd862b61200b56ac8e0678c69dc7e2517166a5e29f8f2b280990f2c1e6600d8b08975643e9d363c7a4742067847e1e894957fcf4 WHIRLPOOL 35016da52fae3d885981475f592b444bda726c0e353ed2e506aa7deeb057a233d3eaabd8c1b78f54757dbfb4ed2c95060d664dc66e39d11978809c62d4fbf446
EBUILD nexus-oss-bin-3.0.0-r1.ebuild 1064 SHA256 5e7efa5433c4ea05ee853236627401d860319db4bcfe173206c1aacf251a2480 SHA512 7901995f687f4e85d619694b9e46f4f8f823b8c0a0761541ab5d48dcecaee0aafceb2e420d918948b0dbf400a79934c18d4600940219edad27c27cc16a9b60ec WHIRLPOOL 1018b54df4bc340f80eaa0906953ee266aaf84830bc69363a196dd7cf1ee0ed802761ae33c3adcbd2f3516520e590921d0985b5d521b8425d6ca9b6b3357fa79
EBUILD nexus-oss-bin-3.0.0.ebuild 918 SHA256 821a3da74ed4429b90058d1bf3f0a8071ad5fd3b2fcc7507fd0404b7e54a600f SHA512 ba2c052e08b4a7f22283ed527125e35c55af5d9811b3eac7af9090120951ebe9cf6b1c6d631c2b9c6eab6815cf2b893f67bb119b14a803fa2b3ba74cab148cba WHIRLPOOL 82320b9d5579aa6cb45f7077166227ce1496fe8d8d93ec410594fa96eba652275fcd5fa2a4cd5d07db9bcda5f7e9a5601535c674ad0fbd6ad6f94614bc2a2c7f
MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431

View file

@ -0,0 +1,51 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
inherit eutils user
DESCRIPTION="Maven Repository Manager"
HOMEPAGE="http://nexus.sonatype.org/"
LICENSE="GPL-3"
MAJOR_VERSION="3"
SUB_VERSION="-03"
SRC_URI="http://download.sonatype.com/nexus/${MAJOR_VERSION}/nexus-${PV}${SUB_VERSION}-unix.tar.gz"
RESTRICT="mirror"
KEYWORDS="~x86 ~amd64"
SLOT="0"
IUSE=""
S="${WORKDIR}"
RDEPEND=">=virtual/jdk-1.8"
INSTALL_DIR="/opt/nexus"
WEBAPP_DIR="${INSTALL_DIR}/nexus-oss-webapp"
pkg_setup() {
enewgroup nexus
enewuser nexus -1 /bin/bash /opt/nexus "nexus"
}
src_unpack() {
unpack ${A}
cd "${S}"
}
src_install() {
insinto ${WEBAPP_DIR}
doins -r nexus-${PV}${SUB_VERSION}/*
doins -r nexus-${PV}${SUB_VERSION}/.install4j
newinitd "${FILESDIR}/init.sh" nexus
fowners -R nexus:nexus ${INSTALL_DIR}
fperms 755 "${WEBAPP_DIR}/bin/nexus"
# protect config files on upgrade
echo "CONFIG_PROTECT=\"${WEBAPP_DIR}/bin ${WEBAPP_DIR}/etc\"" > "${T}/25nexus" || die
doenvd "${T}/25nexus"
}