From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EE8411382C5 for ; Fri, 16 Apr 2021 21:53:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 528BBE0841; Fri, 16 Apr 2021 21:53:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2C007E0841 for ; Fri, 16 Apr 2021 21:53:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 370F9335D11 for ; Fri, 16 Apr 2021 21:53:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A38A65D2 for ; Fri, 16 Apr 2021 21:53:15 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1618609985.57279114d0f51addfdff5c7583d0acda33043e06.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/artifactory-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/artifactory-bin/artifactory-bin-6.3.3-r2.ebuild X-VCS-Directories: dev-util/artifactory-bin/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 57279114d0f51addfdff5c7583d0acda33043e06 X-VCS-Branch: master Date: Fri, 16 Apr 2021 21:53:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5a65ee49-51ce-4532-8c5b-80cc0fbb43f1 X-Archives-Hash: 0dbdaf52f3f8b3f6feecce633eda197d commit: 57279114d0f51addfdff5c7583d0acda33043e06 Author: Conrad Kostecki gentoo org> AuthorDate: Fri Apr 16 21:46:19 2021 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Fri Apr 16 21:53:05 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57279114 dev-util/artifactory-bin: migrate to GLEP 81 Closes: https://bugs.gentoo.org/671166 Closes: https://bugs.gentoo.org/781299 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Conrad Kostecki gentoo.org> .../artifactory-bin-6.3.3-r2.ebuild | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/dev-util/artifactory-bin/artifactory-bin-6.3.3-r2.ebuild b/dev-util/artifactory-bin/artifactory-bin-6.3.3-r2.ebuild new file mode 100644 index 00000000000..4f84f4602ee --- /dev/null +++ b/dev-util/artifactory-bin/artifactory-bin-6.3.3-r2.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Using a binary ebuild until a source ebuild is doable. +# This was previously blocked by two major bugs upstream: +# A lack of documented build instructions - https://www.jfrog.com/jira/browse/RTFACT-8960 +# A lack of source releases - https://www.jfrog.com/jira/browse/RTFACT-8961 +# Upstream now releases source and instructions (yay!), but most of artifactory's +# dependencies are not in portage yet. + +EAPI=7 + +inherit java-pkg-2 systemd + +MY_P="${P/-bin}" +MY_PN="${PN/-bin}" +MY_PV="${PV/-bin}" + +DESCRIPTION="The world's most advanced repository manager for maven" +HOMEPAGE="http://www.jfrog.org/products.php" +SRC_URI="https://bintray.com/artifact/download/jfrog/artifactory/jfrog-artifactory-oss-${MY_PV}.zip -> ${MY_P}.zip" +S="${WORKDIR}/${MY_PN}-oss-${MY_PV}" + +LICENSE="AGPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl" + +DEPEND=" + acct-group/artifactory + acct-user/artifactory +" +RDEPEND=" + ${DEPEND} + >=virtual/jre-1.8 +" +BDEPEND="app-arch/unzip" + +limitsdfile=40-${MY_PN}.conf + +print_limitsdfile() { + printf "# Start of ${limitsdfile} from ${P}\n\n" + printf "@${MY_PN}\t-\tnofile\t32000\n" + printf "\n# End of ${limitsdfile} from ${P}\n" +} + +src_prepare() { + default + + if use ssl ; then + cp "${FILESDIR}/artifactory.xml" tomcat/conf/Catalina/localhost/artifactory.xml || die + cp "${FILESDIR}/server.xml" tomcat/conf/server.xml || die + fi + + # Reverse https://www.jfrog.com/jira/browse/RTFACT-7123 + sed -i -e "s%artifactory.repo.global.disabled=true%artifactory.repo.global.disabled=false%g;" \ + etc/artifactory.system.properties || die + + # See FIXME in src_install(), this can probably go away, + # but catalina.sh may need to be fixed for that: + sed -i -e "s%/etc/opt/jfrog/artifactory/default%/etc/conf.d/${MY_PN}%g;" \ + misc/service/setenv.sh || die + + einfo "Generating ${limitsdfile}" + print_limitsdfile > "${S}/${limitsdfile}" +} + +src_install() { + local ARTIFACTORY_HOME="/opt/artifactory" + local TOMCAT_HOME="${ARTIFACTORY_HOME}/tomcat" + + insinto ${ARTIFACTORY_HOME} + doins -r etc misc tomcat webapps + + dodir /etc/opt/jfrog + dosym ${ARTIFACTORY_HOME}/etc /etc/opt/jfrog/artifactory + + exeinto ${ARTIFACTORY_HOME}/bin + doexe bin/* + + # FIXME: this is called by catalina.sh (it echoes the variables before starting + # artifactory, as well as makes sure log dir, etc. exists). Those directories + # could probably be moved to the ebuild and the script removed from catalina.sh + # without consequence (and quieter starts). Would need to check if CATALINA_* + # variables are actually used anywhere (from reading code don't appear to be + # actually needed) + exeinto ${TOMCAT_HOME}/bin + doexe misc/service/setenv.sh + doexe tomcat/bin/* + + keepdir ${ARTIFACTORY_HOME}/backup + keepdir ${ARTIFACTORY_HOME}/data + keepdir ${ARTIFACTORY_HOME}/run + keepdir ${ARTIFACTORY_HOME}/work + keepdir ${TOMCAT_HOME}/logs/catalina + keepdir ${TOMCAT_HOME}/temp + keepdir ${TOMCAT_HOME}/work + keepdir /var/opt/jfrog/artifactory/run + + newconfd "${FILESDIR}/confd" ${MY_PN} + newinitd "${FILESDIR}/initd-r3" ${MY_PN} + + systemd_dounit misc/service/artifactory.service + + fowners -R artifactory:artifactory ${ARTIFACTORY_HOME} + fperms -R u+w ${TOMCAT_HOME}/work + + insinto /etc/security/limits.d + doins "${S}/${limitsdfile}" +}