1 |
commit: 57279114d0f51addfdff5c7583d0acda33043e06 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 16 21:46:19 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 16 21:53:05 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57279114 |
7 |
|
8 |
dev-util/artifactory-bin: migrate to GLEP 81 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/671166 |
11 |
Closes: https://bugs.gentoo.org/781299 |
12 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
13 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
14 |
|
15 |
.../artifactory-bin-6.3.3-r2.ebuild | 110 +++++++++++++++++++++ |
16 |
1 file changed, 110 insertions(+) |
17 |
|
18 |
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 |
19 |
new file mode 100644 |
20 |
index 00000000000..4f84f4602ee |
21 |
--- /dev/null |
22 |
+++ b/dev-util/artifactory-bin/artifactory-bin-6.3.3-r2.ebuild |
23 |
@@ -0,0 +1,110 @@ |
24 |
+# Copyright 1999-2021 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+# Using a binary ebuild until a source ebuild is doable. |
28 |
+# This was previously blocked by two major bugs upstream: |
29 |
+# A lack of documented build instructions - https://www.jfrog.com/jira/browse/RTFACT-8960 |
30 |
+# A lack of source releases - https://www.jfrog.com/jira/browse/RTFACT-8961 |
31 |
+# Upstream now releases source and instructions (yay!), but most of artifactory's |
32 |
+# dependencies are not in portage yet. |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+inherit java-pkg-2 systemd |
37 |
+ |
38 |
+MY_P="${P/-bin}" |
39 |
+MY_PN="${PN/-bin}" |
40 |
+MY_PV="${PV/-bin}" |
41 |
+ |
42 |
+DESCRIPTION="The world's most advanced repository manager for maven" |
43 |
+HOMEPAGE="http://www.jfrog.org/products.php" |
44 |
+SRC_URI="https://bintray.com/artifact/download/jfrog/artifactory/jfrog-artifactory-oss-${MY_PV}.zip -> ${MY_P}.zip" |
45 |
+S="${WORKDIR}/${MY_PN}-oss-${MY_PV}" |
46 |
+ |
47 |
+LICENSE="AGPL-3+" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~amd64 ~x86" |
50 |
+IUSE="ssl" |
51 |
+ |
52 |
+DEPEND=" |
53 |
+ acct-group/artifactory |
54 |
+ acct-user/artifactory |
55 |
+" |
56 |
+RDEPEND=" |
57 |
+ ${DEPEND} |
58 |
+ >=virtual/jre-1.8 |
59 |
+" |
60 |
+BDEPEND="app-arch/unzip" |
61 |
+ |
62 |
+limitsdfile=40-${MY_PN}.conf |
63 |
+ |
64 |
+print_limitsdfile() { |
65 |
+ printf "# Start of ${limitsdfile} from ${P}\n\n" |
66 |
+ printf "@${MY_PN}\t-\tnofile\t32000\n" |
67 |
+ printf "\n# End of ${limitsdfile} from ${P}\n" |
68 |
+} |
69 |
+ |
70 |
+src_prepare() { |
71 |
+ default |
72 |
+ |
73 |
+ if use ssl ; then |
74 |
+ cp "${FILESDIR}/artifactory.xml" tomcat/conf/Catalina/localhost/artifactory.xml || die |
75 |
+ cp "${FILESDIR}/server.xml" tomcat/conf/server.xml || die |
76 |
+ fi |
77 |
+ |
78 |
+ # Reverse https://www.jfrog.com/jira/browse/RTFACT-7123 |
79 |
+ sed -i -e "s%artifactory.repo.global.disabled=true%artifactory.repo.global.disabled=false%g;" \ |
80 |
+ etc/artifactory.system.properties || die |
81 |
+ |
82 |
+ # See FIXME in src_install(), this can probably go away, |
83 |
+ # but catalina.sh may need to be fixed for that: |
84 |
+ sed -i -e "s%/etc/opt/jfrog/artifactory/default%/etc/conf.d/${MY_PN}%g;" \ |
85 |
+ misc/service/setenv.sh || die |
86 |
+ |
87 |
+ einfo "Generating ${limitsdfile}" |
88 |
+ print_limitsdfile > "${S}/${limitsdfile}" |
89 |
+} |
90 |
+ |
91 |
+src_install() { |
92 |
+ local ARTIFACTORY_HOME="/opt/artifactory" |
93 |
+ local TOMCAT_HOME="${ARTIFACTORY_HOME}/tomcat" |
94 |
+ |
95 |
+ insinto ${ARTIFACTORY_HOME} |
96 |
+ doins -r etc misc tomcat webapps |
97 |
+ |
98 |
+ dodir /etc/opt/jfrog |
99 |
+ dosym ${ARTIFACTORY_HOME}/etc /etc/opt/jfrog/artifactory |
100 |
+ |
101 |
+ exeinto ${ARTIFACTORY_HOME}/bin |
102 |
+ doexe bin/* |
103 |
+ |
104 |
+ # FIXME: this is called by catalina.sh (it echoes the variables before starting |
105 |
+ # artifactory, as well as makes sure log dir, etc. exists). Those directories |
106 |
+ # could probably be moved to the ebuild and the script removed from catalina.sh |
107 |
+ # without consequence (and quieter starts). Would need to check if CATALINA_* |
108 |
+ # variables are actually used anywhere (from reading code don't appear to be |
109 |
+ # actually needed) |
110 |
+ exeinto ${TOMCAT_HOME}/bin |
111 |
+ doexe misc/service/setenv.sh |
112 |
+ doexe tomcat/bin/* |
113 |
+ |
114 |
+ keepdir ${ARTIFACTORY_HOME}/backup |
115 |
+ keepdir ${ARTIFACTORY_HOME}/data |
116 |
+ keepdir ${ARTIFACTORY_HOME}/run |
117 |
+ keepdir ${ARTIFACTORY_HOME}/work |
118 |
+ keepdir ${TOMCAT_HOME}/logs/catalina |
119 |
+ keepdir ${TOMCAT_HOME}/temp |
120 |
+ keepdir ${TOMCAT_HOME}/work |
121 |
+ keepdir /var/opt/jfrog/artifactory/run |
122 |
+ |
123 |
+ newconfd "${FILESDIR}/confd" ${MY_PN} |
124 |
+ newinitd "${FILESDIR}/initd-r3" ${MY_PN} |
125 |
+ |
126 |
+ systemd_dounit misc/service/artifactory.service |
127 |
+ |
128 |
+ fowners -R artifactory:artifactory ${ARTIFACTORY_HOME} |
129 |
+ fperms -R u+w ${TOMCAT_HOME}/work |
130 |
+ |
131 |
+ insinto /etc/security/limits.d |
132 |
+ doins "${S}/${limitsdfile}" |
133 |
+} |